From patchwork Mon Dec 16 11:09:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 181695 Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp4178509och; Mon, 16 Dec 2019 03:31:11 -0800 (PST) X-Google-Smtp-Source: APXvYqw54LIYDezyqEn1iorZIfIly+K23Thx+36K8amQGnBop6Q5o/eNIIynNubhf7bGgRNY7+aG X-Received: by 2002:a05:6830:1e69:: with SMTP id m9mr6097077otr.335.1576495871367; Mon, 16 Dec 2019 03:31:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576495871; cv=none; d=google.com; s=arc-20160816; b=UhDssjRHoJFIpfLEt7NLZ00dtRQt2z1A/hzaQglpkEYD7qIYJ+kEsEQ1mp7RZg/Zv2 UzbtlhJfbIl+yKN1+Ol4NtRuffucGBeOD0WOkexWQamaFTXL1IZzQFZxWu8CaA21md86 u8lUvodwGt2wjLfE0kEOj+GZrcaBrHT8OALY3RG7xfTTmWQRGDZnFboKqoKufdU/5K3m /XmTsQNlPOUkCwhs67PAFLiVl3Q/QrKWo9y76UfeZSEEvzMVwTf5u7IATalUL1jV+EYU 0OTEbcR2ca26Fr+gqQSUIirLHs3aNAPJuiLhYPq7kByv0F/1akxd7F+vpYjXMbCzvtwd R5Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=wi/6WNBxanhHv1N5BExE4AXQCOcHHg7jTThmTTrFuxQ=; b=Fkd2uYrdDwFUwi1R6gKMMbm0t/+v91jKAYUFMCWDzxggVwGtbmPrvyEN6faB8HYPcP IlPf+pGooLOcHJvjaavd/9zijgqO72FSGIP5aYI2s+tA5wgJnD5DfDZ7ytoFcKwO017V FFgW8i8pMGV7ioYJc+dbPd43Z1KTz70mbqtWvtrAhAbOMX9yXGabnugx9DfxQJMe7dw5 rgYKlyxZGBUk/W8IrbtFrHfXpEuLLpt8l3OVVB5cWZntEgB6DLwOz9GBHkc4ThwCw/MI FWzJykt6QYneb9nnIlKE9pwwt/H3JT6oR0wlGPShwGKV/tTA0xCOr/dUk8h7G2OVBqaO l/Zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E3fAQ5rM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s14si9465227otq.37.2019.12.16.03.31.11 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 03:31:11 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E3fAQ5rM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:51782 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igoak-0002qi-2y for patch@linaro.org; Mon, 16 Dec 2019 06:31:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51257) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igoG0-00088k-9k for qemu-devel@nongnu.org; Mon, 16 Dec 2019 06:09:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igoFz-0000FD-1s for qemu-devel@nongnu.org; Mon, 16 Dec 2019 06:09:44 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:52505) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igoFy-0000Ea-P0 for qemu-devel@nongnu.org; Mon, 16 Dec 2019 06:09:42 -0500 Received: by mail-wm1-x334.google.com with SMTP id p9so6267511wmc.2 for ; Mon, 16 Dec 2019 03:09:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=wi/6WNBxanhHv1N5BExE4AXQCOcHHg7jTThmTTrFuxQ=; b=E3fAQ5rMQqlRQ9i4FQQsIxXvkz4kn9TgzZejAjUVtx/8JRNY4xZc73bvqFyxzLhhbP 1R7DbAXzszwvGyxy+ZPeaeYcUfuxu7LH8aPzSRlGM+SjyHmlNJjxL+JdJv3cDX03Zh/o FgZz7NwfOKOmAamu1cmElumik801kRe242CDCD52vPhTzUb1ynG/IFNrL91XZZiMLIWO pYSyEqh64aJpbuUjctJUVGJzT/4NndXOziAMWRECebvcA0/k1iAQTspkmql2gpM8dotE ay0ozQRYMSXAglHy9Ugp+1n1GnPRvs5jufVfy7CEoV6JBPItTygNimGsog8QeI9NFhgp 0Pgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wi/6WNBxanhHv1N5BExE4AXQCOcHHg7jTThmTTrFuxQ=; b=XhKNSRONBqf8fesvrwvD6kdrxW7KxHQvH1vBuJdJE8HGZRBYbWvIOoagadznWcDgKm BRayoOQSrlaPoko7ReU0Uzkze4m3HRhjZNqe47UwZ1ue4UDcv+spAQalEiBKQzU6z7Qk 5QnWbnFKnpByMFY+EBqoE4p5jhoCILf3Pnjvv18KIVvafr9YzuWhryrc1SnBI60kVMja 9DqzZ4mHLMvm8y560xL1C+q7TPbf59r+zK9XAqLMuTpv+rUEdHc53RQUhq3FQnZ0WHlA wsMYp9tX4nD0lh0LzNkvXqQNNKCyelfFnXujl/3hhllSMAttnOX3EF7O0u6SDg1jJIHp H01w== X-Gm-Message-State: APjAAAUwCUqQ3ScObwyclDA7q6/W6LujOQ4VEoBdJcV/rdHYt0P+S23q ZBVdkdwl1jrXFt//WSi1JZfU+NhE2i4Ptw== X-Received: by 2002:a05:600c:2509:: with SMTP id d9mr30448057wma.148.1576494581374; Mon, 16 Dec 2019 03:09:41 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id x10sm20976131wrp.58.2019.12.16.03.09.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 03:09:40 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 32/34] hw/arm/acpi: enable SHPC native hot plug Date: Mon, 16 Dec 2019 11:09:02 +0000 Message-Id: <20191216110904.30815-33-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216110904.30815-1-peter.maydell@linaro.org> References: <20191216110904.30815-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::334 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Heyi Guo After the introduction of generic PCIe root port and PCIe-PCI bridge, we will also have SHPC controller on ARM, so just enable SHPC native hot plug. Also update tests/data/acpi/virt/DSDT* to pass "make check". Cc: Shannon Zhao Cc: Peter Maydell Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Reviewed-by: Michael S. Tsirkin Reviewed-by: Igor Mammedov Signed-off-by: Heyi Guo Message-id: 20191209063719.23086-3-guoheyi@huawei.com Signed-off-by: Peter Maydell --- hw/arm/virt-acpi-build.c | 7 ++++++- tests/data/acpi/virt/DSDT | Bin 18462 -> 18462 bytes tests/data/acpi/virt/DSDT.memhp | Bin 19799 -> 19799 bytes tests/data/acpi/virt/DSDT.numamem | Bin 18462 -> 18462 bytes 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/data/acpi/virt/DSDT b/tests/data/acpi/virt/DSDT index 05bcfc8a912f58f266aa906563ea01c24906717e..d0f3afeb134fdf1c11f64cd06dbcdd30be603b80 100644 GIT binary patch delta 28 kcmbO?fpOjhMlP3Nmk>D*1_q{tja=*8809zbbW3Ff0C~9xM*si- delta 28 kcmbO?fpOjhMlP3Nmk>D*1_q|2ja=*87-cu_bW3Ff0C~j-M*si- diff --git a/tests/data/acpi/virt/DSDT.memhp b/tests/data/acpi/virt/DSDT.memhp index c041a910fdf272cb89263bb636239ae3a5e1708d..41ccc6431b917252bcbaac86c33b340c796be5ce 100644 GIT binary patch delta 28 kcmcaUi}Cs_MlP3NmymE@1_mbija=*8809zbbeqQp0Eq|*2mk;8 delta 28 kcmcaUi}Cs_MlP3NmymE@1_ma@ja=*87-cu_beqQp0ErX{2mk;8 diff --git a/tests/data/acpi/virt/DSDT.numamem b/tests/data/acpi/virt/DSDT.numamem index 05bcfc8a912f58f266aa906563ea01c24906717e..d0f3afeb134fdf1c11f64cd06dbcdd30be603b80 100644 GIT binary patch delta 28 kcmbO?fpOjhMlP3Nmk>D*1_q{tja=*8809zbbW3Ff0C~9xM*si- delta 28 kcmbO?fpOjhMlP3Nmk>D*1_q|2ja=*87-cu_bW3Ff0C~j-M*si- -- 2.20.1 diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 51b293e0a1e..bd5f771e9be 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -267,7 +267,12 @@ static void acpi_dsdt_add_pci(Aml *scope, const MemMapEntry *memmap, aml_create_dword_field(aml_arg(3), aml_int(8), "CDW3")); aml_append(ifctx, aml_store(aml_name("CDW2"), aml_name("SUPP"))); aml_append(ifctx, aml_store(aml_name("CDW3"), aml_name("CTRL"))); - aml_append(ifctx, aml_and(aml_name("CTRL"), aml_int(0x1D), + + /* + * Allow OS control for all 5 features: + * PCIeHotplug SHPCHotplug PME AER PCIeCapability. + */ + aml_append(ifctx, aml_and(aml_name("CTRL"), aml_int(0x1F), aml_name("CTRL"))); ifctx1 = aml_if(aml_lnot(aml_equal(aml_arg(1), aml_int(0x1))));