From patchwork Fri Sep 11 18:07:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 11771335 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2544E13B1 for ; Fri, 11 Sep 2020 18:09:01 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B53DF206F4 for ; Fri, 11 Sep 2020 18:09:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=anisinha-ca.20150623.gappssmtp.com header.i=@anisinha-ca.20150623.gappssmtp.com header.b="GpkBoxEU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B53DF206F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=anisinha.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:39812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGnTn-0003h2-88 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 11 Sep 2020 14:08:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGnTD-0002PC-NU for qemu-devel@nongnu.org; Fri, 11 Sep 2020 14:08:23 -0400 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]:34139) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGnTC-0005x2-95 for qemu-devel@nongnu.org; Fri, 11 Sep 2020 14:08:23 -0400 Received: by mail-pj1-x1042.google.com with SMTP id n3so2928813pjq.1 for ; Fri, 11 Sep 2020 11:08:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anisinha-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=HHdiOGLkXts4NNVu4SCMzFcJi56aYTGQpkW5PEoj6js=; b=GpkBoxEUA/uY89jGfSgaEWHEQwRqOxC/Zdl+9fZ0iuGCck5pUWB7TNpQ58KrI3pAOX sxEqJ+F2rHYzr39i8XHJ5Di/4C1HRelZwmjR4wVelcxAOirYbzZyKtSOz2TrBcOduWvc /R4dB4dxgMSCNqVywNmGoPs3tEVBjg7u1Gn8Cz4L+IDjnDTQ1Fu8I/XAFX1TMsQr2r/s lpSXc3jZ7GoneFFCcAxWriY/v0cXWbq1mVQgZVbpFk6tlnJ3PD4GaftvD4lPEGGJEn7A tazqBMWAo3KYDRP8Typ7eSeS8jYJxoVFcEAX38TiQcRZ+6DcDQDYdJ3Ur99b4jF4QV9K mzsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=HHdiOGLkXts4NNVu4SCMzFcJi56aYTGQpkW5PEoj6js=; b=gHO3KoVu7sygzS6TLCKlWgGQW3J31yCuazCM/QwEt44qT7JGwE2S4QwywayLuOv3mv hYSnZe1HySkcOggQAxJYN6uyyRclE3VF3nQybjzjLaiDEBFekC8XNRVwY35ogsJnEbpO aV8cDxSarmiA9JzrPsXz/67rPXL6mnYujZfR3VVpPxCywdyFkXAptIWkSNV0ZPlLEI1K Whzf7kWVX1nFwPpm4GHzJCy+prU/yIJaTuD4av+rI+slHjSuE2dXJtNGFy3R3Xo3oQRO b7u7ztslgjNy4qfvEpWxz/ul4Q8ygUw1h/FLgb8qmcTMQj74U1+UjR+ShLAHO5NxVwCW HMdA== X-Gm-Message-State: AOAM531HFV7PoqZdmAoeOwaKHchlBtQGnenBa5OwwwRXnDjSVSBcfjoE 9+CSKSzFjPufKuZ/UI3L9TkI0ic9XPEcJQ== X-Google-Smtp-Source: ABdhPJzvLqKxnPXSdYL68lCoSLRYW5UakjOxmzJymcaXScA4O5OHgRNtgHEzvi7AFaFR4Luc5EIbXw== X-Received: by 2002:a17:90a:f992:: with SMTP id cq18mr3311525pjb.136.1599847700260; Fri, 11 Sep 2020 11:08:20 -0700 (PDT) Received: from localhost.localdomain ([115.96.135.201]) by smtp.googlemail.com with ESMTPSA id n9sm2929135pfu.163.2020.09.11.11.08.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Sep 2020 11:08:19 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org Subject: [PATCH 1/9] tests/acpi: document addition of table DSDT.roothp for unit testing root pci hotplug on/off Date: Fri, 11 Sep 2020 23:37:47 +0530 Message-Id: <20200911180755.28409-1-ani@anisinha.ca> X-Mailer: git-send-email 2.17.1 Received-SPF: none client-ip=2607:f8b0:4864:20::1042; envelope-from=ani@anisinha.ca; helo=mail-pj1-x1042.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Cc: Ani Sinha , Igor Mammedov , jusual@redhat.com, "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" A new binary acpi table tests/data/acpi/pc/DSDT.roothp is added in order to unit test the feature flag that can disable/enable root pci bus hotplug on i440fx. This feature was added with the commit: 3d7e78aa7777f0 ("Introduce a new flag for i440fx to disable PCI hotplug on the root bus") This change documents the fact that this new file addition was made as a part of the unit test change. Signed-off-by: Ani Sinha Reviewed-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..ac864fc982 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,2 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/pc/DSDT.roothp", From patchwork Fri Sep 11 18:07:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 11771337 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CEE71698 for ; Fri, 11 Sep 2020 18:09:07 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3B603206F4 for ; Fri, 11 Sep 2020 18:09:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=anisinha-ca.20150623.gappssmtp.com header.i=@anisinha-ca.20150623.gappssmtp.com header.b="bvU7WDdy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3B603206F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=anisinha.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:40492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGnTt-0003xZ-Jy for patchwork-qemu-devel@patchwork.kernel.org; Fri, 11 Sep 2020 14:09:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53930) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGnTH-0002SY-BJ for qemu-devel@nongnu.org; Fri, 11 Sep 2020 14:08:27 -0400 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]:37134) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGnTF-0005xD-SM for qemu-devel@nongnu.org; Fri, 11 Sep 2020 14:08:27 -0400 Received: by mail-pj1-x1042.google.com with SMTP id kk9so2058727pjb.2 for ; Fri, 11 Sep 2020 11:08:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anisinha-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cy7jtmkUUHvcw0+QvBletz9ezeL9whuTVJlIAXVHHp0=; b=bvU7WDdykIBqjEWoH0J3gzp9P/l6l8dunm1lDPaQgGcSt2+y+OMhsfNBOElUJdOAhP DG+TaSMJg/EhXEKrgiRa9N4+P/Ph7ct7mUkQhS5o2ymiK7cKCgJ6Au6YnGhXyj1cGpAE CQv4NhjrXw/Vu1ItXUOLkd7EWq81qnz3mgvP/ippvx1RRsLJ82krzUZo49aUEMUi4sOD 8B3WjiukzoJd6wl6uuEzWiBIYLwMBl/+5qqwfkxWuLDXYdsMFDknLZXQNrSG2BnB/6u6 +XklJKMZwZrBuBT7hhDaRYiyWlooCCoZxPoWO3ftchpbJy49GkE5Rw8wSTkqKOQc5Owh Mo6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=cy7jtmkUUHvcw0+QvBletz9ezeL9whuTVJlIAXVHHp0=; b=jAafs+CUduPBR8j+r/DcDXQiSb7bCBTi+aL38FFSBj4VPedKOifLNn69ogHQpB0C24 7yHENu6WXfnn28T3iolbsfRbOalvTu3WcpO48/ee1jXZfxz1dDdyLCtXG8THsq2wpENo YItFnWeiI1+Fm7yaVt7GE1X25rwa291ZQgJK99WDABk4Q9KQaxMFU5H2GnO1FSx8pvgO 2Lm6UfVKbrQJBtF8DcZsC7qLqjGXnUvplDF402kgV4WCKM8VHlnqz6S2KdACifDK8gXE fjJQnfcnypjkZc6sC8Ci+vEnN1QRLIgoZlhUodqGQ40FwwNgMxESORlenulX3PAn4PU0 WG1A== X-Gm-Message-State: AOAM533mJxK2UO5KkR1VAL2aYuuNxTfbFiFoSxwY1eE0OsiyycevVkwP O5bG4BXsTuIUrRfnuu3efPVBxfHi8JorJA== X-Google-Smtp-Source: ABdhPJxfyCcAMbC5WKxAac6ahr5x1VllHHKtibVUVNkpH2d7xF7dTbB9oQXx61Fh75ZEmfmZFbSmDg== X-Received: by 2002:a17:90b:1b03:: with SMTP id nu3mr3266242pjb.148.1599847704321; Fri, 11 Sep 2020 11:08:24 -0700 (PDT) Received: from localhost.localdomain ([115.96.135.201]) by smtp.googlemail.com with ESMTPSA id n9sm2929135pfu.163.2020.09.11.11.08.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Sep 2020 11:08:23 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org Subject: [PATCH 2/9] tests/acpi: add a new unit test to test hotplug off/on feature on the root pci bus Date: Fri, 11 Sep 2020 23:37:48 +0530 Message-Id: <20200911180755.28409-2-ani@anisinha.ca> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200911180755.28409-1-ani@anisinha.ca> References: <20200911180755.28409-1-ani@anisinha.ca> Received-SPF: none client-ip=2607:f8b0:4864:20::1042; envelope-from=ani@anisinha.ca; helo=mail-pj1-x1042.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Cc: Laurent Vivier , Thomas Huth , "Michael S. Tsirkin" , jusual@redhat.com, Paolo Bonzini , Ani Sinha , Igor Mammedov Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Ability to turn hotplug off on the pci root bus for i440fx was added in commit: 3d7e78aa7777f0 ("Introduce a new flag for i440fx to disable PCI hotplug on the root bus") This change adds a unit test in order to test this feature. This change has been tested against upstream qemu master branch on top of tag v5.1.0. Signed-off-by: Ani Sinha Reviewed-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 504b810af5..d8c7d57557 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -740,6 +740,20 @@ static void test_acpi_piix4_tcg_bridge(void) free_test_data(&data); } +static void test_acpi_piix4_root_hotplug(void) +{ + test_data data; + + memset(&data, 0, sizeof(data)); + data.machine = MACHINE_PC; + data.variant = ".roothp"; + data.required_struct_types = base_required_struct_types; + data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types); + test_acpi_one("-global PIIX4_PM.acpi-root-pci-hotplug=off " + "-device pci-bridge,chassis_nr=1", &data); + free_test_data(&data); +} + static void test_acpi_q35_tcg(void) { test_data data; @@ -1144,6 +1158,7 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/q35/tpm-tis", test_acpi_q35_tcg_tpm_tis); qtest_add_func("acpi/piix4", test_acpi_piix4_tcg); qtest_add_func("acpi/piix4/bridge", test_acpi_piix4_tcg_bridge); + qtest_add_func("acpi/piix4/hotplug", test_acpi_piix4_root_hotplug); qtest_add_func("acpi/q35", test_acpi_q35_tcg); qtest_add_func("acpi/q35/bridge", test_acpi_q35_tcg_bridge); qtest_add_func("acpi/q35/mmio64", test_acpi_q35_tcg_mmio64); From patchwork Fri Sep 11 18:07:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 11771339 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5EF5313B1 for ; Fri, 11 Sep 2020 18:09:20 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BF222206F4 for ; Fri, 11 Sep 2020 18:09:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=anisinha-ca.20150623.gappssmtp.com header.i=@anisinha-ca.20150623.gappssmtp.com header.b="JkJEfKvg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BF222206F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=anisinha.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:41246 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGnU6-0004H8-OL for patchwork-qemu-devel@patchwork.kernel.org; Fri, 11 Sep 2020 14:09:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53942) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGnTL-0002Zh-W4 for qemu-devel@nongnu.org; Fri, 11 Sep 2020 14:08:32 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:34893) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGnTJ-0005xR-He for qemu-devel@nongnu.org; Fri, 11 Sep 2020 14:08:31 -0400 Received: by mail-pf1-x444.google.com with SMTP id o68so8107268pfg.2 for ; Fri, 11 Sep 2020 11:08:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anisinha-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=QIrKg06WOm42suw0WWNTsY7tcSv9RsvVFBeMyFGCXZc=; b=JkJEfKvgDWqVSDBQFQqpBFmtIrMqCidpoaVIGndPlx4qkXOkpuSLbeNszhqGnuFBxH q4IUES2wD62D4VLlaGOWYmi+P9ZC78wnHxDnJ3LYXI2uQjyI+InVzubZkSQgiQvU49oo Mndh+9P7rCb8v+QDp0jfCTzlJFcsJCQolZY3hwerw8+kFt0jS35vovZ7io9D9E4BQOpL zlP/fTSBau1dCDL66ZlyvhYgZk4i9zYTJOLg+HaXAolxX4n4BdHnYKqLDF21w2ipLxeQ DPH6dCmLqQfC6MxA1A/LKsUpOpDcKUm80KTgU102NW7UJDLm0O+ICVsMIDvSCs7niUJa PczQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=QIrKg06WOm42suw0WWNTsY7tcSv9RsvVFBeMyFGCXZc=; b=VkPevnCz1t8Py7MApMpoallYkBDeVOlizvPBRmegUIc8JwfGPDESu9KGgMnRoLlqXt ro7ve5XuA7pJxrpuG/nK9iC9GUjjbofrirN5cvqazefH1r0YovrYsN3VHZ11XDEE9Qnx vRilZoVartjJbfOJsbQ7MIHCZTqAv76h9JvdHJ8BF2+J8Yzm7PWJGvBRgF544Xczgct4 7G+oepsurDzOpYcPIFlxtZxXyJ2QbUWA6PS7qzgswhni9UXKENDRA+WCYLzo/dVtgTTw hySetAFWlh/3vP5rmbAtPhZVJ2PoVwx86+i6pwlPM09hMkF1CtVPlGfW+wYKEfmd6NnP 5g+A== X-Gm-Message-State: AOAM531WGgZ7j9pPU96JxLtvLoS5FTPJf3F8jAY8YEClkxnob0+uwNTK QRLdFfzpLYzj5AWc6leWhNNz9G7TKZa+2Q== X-Google-Smtp-Source: ABdhPJwskaT/cpLbRSuw6s6IxIQrpnnfpHk9pV3JFIMXr7RKVpovIZwTVZK2CdZT0sNIXBdCV0GmXg== X-Received: by 2002:a62:55c5:: with SMTP id j188mr3226655pfb.103.1599847707525; Fri, 11 Sep 2020 11:08:27 -0700 (PDT) Received: from localhost.localdomain ([115.96.135.201]) by smtp.googlemail.com with ESMTPSA id n9sm2929135pfu.163.2020.09.11.11.08.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Sep 2020 11:08:26 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org Subject: [PATCH 3/9] tests/acpi: add a new ACPI table in order to test root pci hotplug on/off Date: Fri, 11 Sep 2020 23:37:49 +0530 Message-Id: <20200911180755.28409-3-ani@anisinha.ca> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200911180755.28409-1-ani@anisinha.ca> References: <20200911180755.28409-1-ani@anisinha.ca> Received-SPF: none client-ip=2607:f8b0:4864:20::444; envelope-from=ani@anisinha.ca; helo=mail-pf1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_FILL_THIS_FORM_SHORT=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Cc: Ani Sinha , Igor Mammedov , jusual@redhat.com, "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" A new binary ACPI table tests/data/acpi/pc/DSDT.roothp is added in order to unit test hotplug on/off capability on the root pci bus for i440fx. The diff between the table DSDT.bridge and DSDT.roothp is listed below: @@ -1,30 +1,30 @@ /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20180105 (64-bit version) * Copyright (c) 2000 - 2018 Intel Corporation * * Disassembling to symbolic ASL+ operators * - * Disassembly of tests/data/acpi/pc/DSDT.bridge, Fri Sep 11 22:51:04 2020 + * Disassembly of /tmp/aml-UGIHQ0, Fri Sep 11 22:51:04 2020 * * Original Table Header: * Signature "DSDT" - * Length 0x00001A89 (6793) + * Length 0x0000140A (5130) * Revision 0x01 **** 32-bit table (V1), no 64-bit math support - * Checksum 0x09 + * Checksum 0xE6 * OEM ID "BOCHS " * OEM Table ID "BXPCDSDT" * OEM Revision 0x00000001 (1) * Compiler ID "BXPC" * Compiler Version 0x00000001 (1) */ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPCDSDT", 0x00000001) { Scope (\) { OperationRegion (DBG, SystemIO, 0x0402, One) Field (DBG, ByteAcc, NoLock, Preserve) { DBGB, 8 } @@ -831,61 +831,60 @@ Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings { IO (Decode16, 0x0510, // Range Minimum 0x0510, // Range Maximum 0x01, // Alignment 0x0C, // Length ) }) } } Scope (\_SB) { Scope (PCI0) { - Name (BSEL, Zero) Device (S00) { Name (_ADR, Zero) // _ADR: Address } Device (S10) { Name (_ADR, 0x00020000) // _ADR: Address Method (_S1D, 0, NotSerialized) // _S1D: S1 Device State { Return (Zero) } Method (_S2D, 0, NotSerialized) // _S2D: S2 Device State { Return (Zero) } Method (_S3D, 0, NotSerialized) // _S3D: S3 Device State { Return (Zero) } } Device (S18) { Name (_ADR, 0x00030000) // _ADR: Address - Name (BSEL, One) + Name (BSEL, Zero) Device (S00) { Name (_SUN, Zero) // _SUN: Slot User Number Name (_ADR, Zero) // _ADR: Address Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device { PCEJ (BSEL, _SUN) } } Device (S08) { Name (_SUN, One) // _SUN: Slot User Number Name (_ADR, 0x00010000) // _ADR: Address Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device { @@ -1345,456 +1344,30 @@ Notify (SE8, Arg1) } If ((Arg0 & 0x40000000)) { Notify (SF0, Arg1) } If ((Arg0 & 0x80000000)) { Notify (SF8, Arg1) } } Method (PCNT, 0, NotSerialized) { - BNUM = One + BNUM = Zero DVNT (PCIU, One) DVNT (PCID, 0x03) } } - Device (S20) - { - Name (_SUN, 0x04) // _SUN: Slot User Number - Name (_ADR, 0x00040000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S28) - { - Name (_SUN, 0x05) // _SUN: Slot User Number - Name (_ADR, 0x00050000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S30) - { - Name (_SUN, 0x06) // _SUN: Slot User Number - Name (_ADR, 0x00060000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S38) - { - Name (_SUN, 0x07) // _SUN: Slot User Number - Name (_ADR, 0x00070000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S40) - { - Name (_SUN, 0x08) // _SUN: Slot User Number - Name (_ADR, 0x00080000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S48) - { - Name (_SUN, 0x09) // _SUN: Slot User Number - Name (_ADR, 0x00090000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S50) - { - Name (_SUN, 0x0A) // _SUN: Slot User Number - Name (_ADR, 0x000A0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S58) - { - Name (_SUN, 0x0B) // _SUN: Slot User Number - Name (_ADR, 0x000B0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S60) - { - Name (_SUN, 0x0C) // _SUN: Slot User Number - Name (_ADR, 0x000C0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S68) - { - Name (_SUN, 0x0D) // _SUN: Slot User Number - Name (_ADR, 0x000D0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S70) - { - Name (_SUN, 0x0E) // _SUN: Slot User Number - Name (_ADR, 0x000E0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S78) - { - Name (_SUN, 0x0F) // _SUN: Slot User Number - Name (_ADR, 0x000F0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S80) - { - Name (_SUN, 0x10) // _SUN: Slot User Number - Name (_ADR, 0x00100000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S88) - { - Name (_SUN, 0x11) // _SUN: Slot User Number - Name (_ADR, 0x00110000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S90) - { - Name (_SUN, 0x12) // _SUN: Slot User Number - Name (_ADR, 0x00120000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S98) - { - Name (_SUN, 0x13) // _SUN: Slot User Number - Name (_ADR, 0x00130000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SA0) - { - Name (_SUN, 0x14) // _SUN: Slot User Number - Name (_ADR, 0x00140000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SA8) - { - Name (_SUN, 0x15) // _SUN: Slot User Number - Name (_ADR, 0x00150000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SB0) - { - Name (_SUN, 0x16) // _SUN: Slot User Number - Name (_ADR, 0x00160000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SB8) - { - Name (_SUN, 0x17) // _SUN: Slot User Number - Name (_ADR, 0x00170000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SC0) - { - Name (_SUN, 0x18) // _SUN: Slot User Number - Name (_ADR, 0x00180000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SC8) - { - Name (_SUN, 0x19) // _SUN: Slot User Number - Name (_ADR, 0x00190000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SD0) - { - Name (_SUN, 0x1A) // _SUN: Slot User Number - Name (_ADR, 0x001A0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SD8) - { - Name (_SUN, 0x1B) // _SUN: Slot User Number - Name (_ADR, 0x001B0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SE0) - { - Name (_SUN, 0x1C) // _SUN: Slot User Number - Name (_ADR, 0x001C0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SE8) - { - Name (_SUN, 0x1D) // _SUN: Slot User Number - Name (_ADR, 0x001D0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SF0) - { - Name (_SUN, 0x1E) // _SUN: Slot User Number - Name (_ADR, 0x001E0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SF8) - { - Name (_SUN, 0x1F) // _SUN: Slot User Number - Name (_ADR, 0x001F0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Method (DVNT, 2, NotSerialized) - { - If ((Arg0 & 0x10)) - { - Notify (S20, Arg1) - } - - If ((Arg0 & 0x20)) - { - Notify (S28, Arg1) - } - - If ((Arg0 & 0x40)) - { - Notify (S30, Arg1) - } - - If ((Arg0 & 0x80)) - { - Notify (S38, Arg1) - } - - If ((Arg0 & 0x0100)) - { - Notify (S40, Arg1) - } - - If ((Arg0 & 0x0200)) - { - Notify (S48, Arg1) - } - - If ((Arg0 & 0x0400)) - { - Notify (S50, Arg1) - } - - If ((Arg0 & 0x0800)) - { - Notify (S58, Arg1) - } - - If ((Arg0 & 0x1000)) - { - Notify (S60, Arg1) - } - - If ((Arg0 & 0x2000)) - { - Notify (S68, Arg1) - } - - If ((Arg0 & 0x4000)) - { - Notify (S70, Arg1) - } - - If ((Arg0 & 0x8000)) - { - Notify (S78, Arg1) - } - - If ((Arg0 & 0x00010000)) - { - Notify (S80, Arg1) - } - - If ((Arg0 & 0x00020000)) - { - Notify (S88, Arg1) - } - - If ((Arg0 & 0x00040000)) - { - Notify (S90, Arg1) - } - - If ((Arg0 & 0x00080000)) - { - Notify (S98, Arg1) - } - - If ((Arg0 & 0x00100000)) - { - Notify (SA0, Arg1) - } - - If ((Arg0 & 0x00200000)) - { - Notify (SA8, Arg1) - } - - If ((Arg0 & 0x00400000)) - { - Notify (SB0, Arg1) - } - - If ((Arg0 & 0x00800000)) - { - Notify (SB8, Arg1) - } - - If ((Arg0 & 0x01000000)) - { - Notify (SC0, Arg1) - } - - If ((Arg0 & 0x02000000)) - { - Notify (SC8, Arg1) - } - - If ((Arg0 & 0x04000000)) - { - Notify (SD0, Arg1) - } - - If ((Arg0 & 0x08000000)) - { - Notify (SD8, Arg1) - } - - If ((Arg0 & 0x10000000)) - { - Notify (SE0, Arg1) - } - - If ((Arg0 & 0x20000000)) - { - Notify (SE8, Arg1) - } - - If ((Arg0 & 0x40000000)) - { - Notify (SF0, Arg1) - } - - If ((Arg0 & 0x80000000)) - { - Notify (SF8, Arg1) - } - } - Method (PCNT, 0, NotSerialized) { - BNUM = Zero - DVNT (PCIU, One) - DVNT (PCID, 0x03) ^S18.PCNT () } } } } Signed-off-by: Ani Sinha Acked-by: Igor Mammedov --- tests/data/acpi/pc/DSDT.roothp | Bin 0 -> 5130 bytes tests/qtest/bios-tables-test-allowed-diff.h | 1 - 2 files changed, 1 deletion(-) create mode 100644 tests/data/acpi/pc/DSDT.roothp diff --git a/tests/data/acpi/pc/DSDT.roothp b/tests/data/acpi/pc/DSDT.roothp new file mode 100644 index 0000000000000000000000000000000000000000..886a5e6952f6f034bdd80d44d43de5975a1a4b0f GIT binary patch literal 5130 zcmb7IQEwZ^5uPQF@^O!pj?&q3tT-lQyJ?cbCMj8Q&=-++6iG{@&OFL(aYFAXDJT^L z$iaz=C`wS80Tjn?f$E|UeP9eeTR)-w3Hb@>OMgI$#(D}nbH}AYish6#E;rFI)ppF3mjp?sik+#8Z8-!eB$l^fgbI6oYO#EbgY77cNR>&l98Qq#Yp78<5Ahk z8+DMKt%?C^RSqykxoj320>ltRX1iTB8&yaEeD{+AlKogEdG0~6W~9x!;iR<{$7IH=5j`laF>=C7(FEwqfSQJg*s**|Z8g#y5F}@e>~5H}N~m7kHn4$baNBT$Y_R zqnMiK8dbpPCxU|A$!(a8tVmA^){earuF8`o_G$Ffs4OqG{TOokW_9>Z4AHot6W%$E zo<>1lRQ-2u)*Je8LX<(KKD7rPFnJLeu2NY(Tc)Q9Ce*j#b^e1%z6X7*+|>atLu(<;~3cFqP zco#u&thkNZx&eFL8^^n>n>ucCX{fef@7v^1$|ERsyvrj)O<|yk4mCRLd0!mta22rT z;mIC=ci2RKPxcsidr#aZJZkn_`|*w2QHqwzmI|7g_4^qaA6a_j=&>YgbCvrztKIk^ zZ?|y2#Cu%PRx0=PdK>}uOlq1dUr#~YFO~y%N;)3HXQit=YhlhU8uv(TcQ!6ynplj% z-bmoyqn$0|Tv@40eD3RMh(}{sWgNc>eh)yK@i%pkf}rrUlw(vZ_=3i~?Q3Re4*(+c zx-ZW=R^4JxTR{}q2BbxW_wVQDb;d0sho8HVn`I4RC>wtu->ysD@_8zMJttG~=y@)LBiH0at8snPY9zuEow#1-g2jxz{Rw$_ zJTk5&=m+CUoPvqb*x8>I#l|7 zI#lQr0pB8SIC8)L&z}OzzkYoB&e=PGj$r+M|1Sa_XrWDi=~kvoI0eD2ENRxvOdh8o z=su($X*`6>xc#e^1io(o>U3#Q?v=&fyZZ!I~q zQxe0NalGuz$`W4m@Ct|09kNjH>Tk~`+wR<2`<=cP1aQAt-NItY5gKo=qYroy1_3D#KwoehNwR{Ym7h;=Runis6ND+8z&3Kgsu1@vMV zv>;e73FxIzs9>EJ(D^W^E?6%M=;ctTV0}$MUkig8g7u1kUI~Q?)&&7w2!j>{>+1sg zdMH$|UKP-*VbC?f`i6kM5egNo*97$1B&b%qYCNblB378M2Td4VNOg0QTjfPE{lv`HXK^01{~Pd>7+`3xlTv^=ztD{LVH8~M63 zw2?Dx1Opp+TN&EO9d74=jr_e!wwc40e+ZzA+fvAQ^r3ua#{=-l!VMO_EnUz qIEMB%$!OQE(aj2fBcUHEXrb|V-eQA+!J``fG=la&-l7$y;r{_Geabxm literal 0 HcmV?d00001 diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index ac864fc982..dfb8523c8b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,2 +1 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/pc/DSDT.roothp", From patchwork Fri Sep 11 18:07:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 11771341 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9A49C159A for ; Fri, 11 Sep 2020 18:09:20 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3914C2220E for ; Fri, 11 Sep 2020 18:09:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=anisinha-ca.20150623.gappssmtp.com header.i=@anisinha-ca.20150623.gappssmtp.com header.b="u3W/o8P1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3914C2220E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=anisinha.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:41272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGnU7-0004I1-4P for patchwork-qemu-devel@patchwork.kernel.org; Fri, 11 Sep 2020 14:09:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGnTO-0002dn-46 for qemu-devel@nongnu.org; Fri, 11 Sep 2020 14:08:34 -0400 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:35368) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGnTM-0005xW-Ab for qemu-devel@nongnu.org; Fri, 11 Sep 2020 14:08:33 -0400 Received: by mail-pg1-x542.google.com with SMTP id g29so7218732pgl.2 for ; Fri, 11 Sep 2020 11:08:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anisinha-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Gel2ySMpTt4f7XUoVi2e2wkLqL2QzwXiN3Z4/PyZJos=; b=u3W/o8P1eTKmxjWMX2yHNNkkKCgTsIAPquXKWN40MOr4kJXyETU1AvIGx6yL1tTQIo 7PQHVM4DSV+yD4YnT3FtJFD8oi0aVTtT1HqgEOTDbYk7wIQcnYPpum6jP49j+6prR0p7 58qBGlkoanNqYPxMPyWRfNotgOePELAryozSTW3DxHT+XZyBYcgS64JUOqoRvfJPlXJ0 V4qdLZOPj7+GkoZsLr8EWd/wXjas0sClF0CP4TPKQwbvAA0M0tgWwk3BHNn6GPvXM7C5 ZkGRYl02l1liPjJLFTZp1ZqR0zZWQrmb2B3iU8hnOs2gEGqXhUoz3EkKZkr+w/P4TgHG Gp/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Gel2ySMpTt4f7XUoVi2e2wkLqL2QzwXiN3Z4/PyZJos=; b=bFIKmuSyVeitNEfXV68pRp5AY2EgZ68qyovMkWty6PYdCImuBG673TFDQVeg6uai9N 5WTL/hp4FlWrjhfbt3s2t9B2eUTdIRfA7Z33VjxtHC/ePGuPLoHtJb19R/jK5buYa+fX wCxzq7wUkKCUOM9GEQP2N+DusCuuZ1lf/YtrlKfb3hSeXIyv/27SeVcidMkW2WO6DGzN +Ritx7dD6OAyZrjQyTEcnPvU/S3xbzGu+nZ2/mCcXbaxOeXSARBQNEaF0T2QWp5Rd84p u6noqk6L5w7JJoGzHkC4K/PBpk67e5ltmKkiLrlKCIS7153Ydi2ucqPS01vGqxrfkWpu sR5g== X-Gm-Message-State: AOAM531AH6EaG8bSk+1MSHAvBmMhQ8tVQ0/MXYMVEsphjvXFY96o1Qhm /Dqp7dnEiFYo4wab1sx6KXswpID9a3EmEw== X-Google-Smtp-Source: ABdhPJzqaDNA8P/A6MD5VC5ghPPF+/mEPI40V/fEGPDUFg82QlJsx6XF/bjdefD9CRdsXR8NkIbt+Q== X-Received: by 2002:a17:902:b10a:: with SMTP id q10mr3247096plr.156.1599847710585; Fri, 11 Sep 2020 11:08:30 -0700 (PDT) Received: from localhost.localdomain ([115.96.135.201]) by smtp.googlemail.com with ESMTPSA id n9sm2929135pfu.163.2020.09.11.11.08.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Sep 2020 11:08:29 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org Subject: [PATCH 4/9] Fix a gap where acpi_pcihp_find_hotplug_bus() returns a non-hotpluggable bus Date: Fri, 11 Sep 2020 23:37:50 +0530 Message-Id: <20200911180755.28409-4-ani@anisinha.ca> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200911180755.28409-1-ani@anisinha.ca> References: <20200911180755.28409-1-ani@anisinha.ca> Received-SPF: none client-ip=2607:f8b0:4864:20::542; envelope-from=ani@anisinha.ca; helo=mail-pg1-x542.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Cc: Ani Sinha , Igor Mammedov , jusual@redhat.com, "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" When ACPI hotplug for the root bus is disabled, the bsel property for that bus is not set. Please see the following commit: 3d7e78aa7777f ("Introduce a new flag for i440fx to disable PCI hotplug on the root bus"). As a result, when acpi_pcihp_find_hotplug_bus() is called with bsel set to 0, it may return the root bus. This can cause devices attached to the root bus to get hot-unplugged if the user issues the following set of commmands: outl 0xae10 0 outl 0xae08 your_slot Thanks to Julia for pointing this out here: https://www.mail-archive.com/qemu-devel@nongnu.org/msg734548.html In this patch, we fix the issue in this function by checking if the bus which is returned by the function is actually hotpluggable. If not, we simply return NULL. This avoids the scenario where we were returning a non-hotpluggable bus. This patch is based off of tag v5.10 Signed-off-by: Ani Sinha Reviewed-by: Igor Mammedov --- hw/acpi/pcihp.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c index 39b1f74442..32ae8b2c0a 100644 --- a/hw/acpi/pcihp.c +++ b/hw/acpi/pcihp.c @@ -147,6 +147,21 @@ static PCIBus *acpi_pcihp_find_hotplug_bus(AcpiPciHpState *s, int bsel) if (!bsel && !find.bus) { find.bus = s->root; } + + /* + * Check if find.bus is actually hotpluggable. If bsel is set to + * NULL for example on the root bus in order to make it + * non-hotpluggable, find.bus will match the root bus when bsel + * is 0. See acpi_pcihp_test_hotplug_bus() above. Since the + * bus is not hotpluggable however, we should not select the bus. + * Instead, we should set find.bus to NULL in that case. In the check + * below, we generalize this case for all buses, not just the root bus. + * The callers of this function check for a null return value and + * handle them appropriately. + */ + if (find.bus && !qbus_is_hotpluggable(BUS(find.bus))) { + find.bus = NULL; + } return find.bus; } From patchwork Fri Sep 11 18:07:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 11771349 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7D40813B1 for ; Fri, 11 Sep 2020 18:12:21 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2FF89207FB for ; Fri, 11 Sep 2020 18:12:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=anisinha-ca.20150623.gappssmtp.com header.i=@anisinha-ca.20150623.gappssmtp.com header.b="qa//iG4M" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2FF89207FB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=anisinha.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:52566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGnX2-0000ZP-35 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 11 Sep 2020 14:12:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGnTS-0002qD-MG for qemu-devel@nongnu.org; Fri, 11 Sep 2020 14:08:38 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]:40884) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGnTQ-0005xm-TS for qemu-devel@nongnu.org; Fri, 11 Sep 2020 14:08:38 -0400 Received: by mail-pf1-x436.google.com with SMTP id x123so7972391pfc.7 for ; Fri, 11 Sep 2020 11:08:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anisinha-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Q9e5WoPP1IxGkMk/UfsIYmbQR1ZYEM3M7sDwaoDUZm8=; b=qa//iG4MKfSGhJGQlsB8InCMmTVDF9o4dQJSO4Z/8Pvl91W2y3qbfbom4HS08UVA0r 1ZxZURivOpLMc8MN9UGiTi4gBTiz+azB6ql53afZpHsZ0EICBELuukIvoRTCSsn77+oZ OiyLvg8k1WarB/yfK2RHIx3yEHyAqogn8USQfx5zo2gmZfnFOkLRGVFc8KCAk0vHwT2z De01xOwNZjcwwJXiht+Y2t9i1G7W+q126mRjsVP4jlC42JkcVB6efj7SkKGvXXpQySq7 fJMRqWoUZFlKKfgC67qG10NADWOFWtDiIpvj4EFivBRNnkvbDmkyTGh6tV83nJCO6QtS v2nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Q9e5WoPP1IxGkMk/UfsIYmbQR1ZYEM3M7sDwaoDUZm8=; b=SDCRub9aHw70CiCLCxz2oUVGjq9QIk+r8zTznc3Kgll3zuyKpZ7XM/1P6BX2d0OwFK zxxc91K+N5iFXyHBlAoL6KrAIKhQfpXU4ZNwbsNpNh0hsLKhZKTSGSf0nT0ZyjYrQ9WV xYZZJFfNL9bmHt0U1+ag/icRt6uG10EmnYNlEe3v4MnvWRFpjnMMnUE7dlnYeAyZQArf MZ0Dq9vHRJaZj4I0MsvWtJ/krvg6KldEYwo9bDp1x7qn+ruxAlJngG/PvbRBnuHHgEM3 qT0kPAfETS+VcjwG7T1554/CXNgvhLYA0wMd9j2o8e/c0l3i4wvga+Pd7qXI0/lToOw1 jsIA== X-Gm-Message-State: AOAM531EnalW6yao89kita+m7P/41oM32R7d8Knf01oF+/XBesuu3ajg A1/XsMp/6TseniUREGwlagNB5uVrUToaHA== X-Google-Smtp-Source: ABdhPJxMjZXl2ek9cWR/7x3TMiiBSsvp97/oHPrkk/pItWkv2ZfYPIQeP0xGaf+yTRWETNtemCmjvg== X-Received: by 2002:a63:ff4e:: with SMTP id s14mr2420890pgk.137.1599847715119; Fri, 11 Sep 2020 11:08:35 -0700 (PDT) Received: from localhost.localdomain ([115.96.135.201]) by smtp.googlemail.com with ESMTPSA id n9sm2929135pfu.163.2020.09.11.11.08.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Sep 2020 11:08:33 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org Subject: [PATCH 5/9] i440fx/acpi: do not add hotplug related amls for cold plugged bridges Date: Fri, 11 Sep 2020 23:37:51 +0530 Message-Id: <20200911180755.28409-5-ani@anisinha.ca> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200911180755.28409-1-ani@anisinha.ca> References: <20200911180755.28409-1-ani@anisinha.ca> Received-SPF: none client-ip=2607:f8b0:4864:20::436; envelope-from=ani@anisinha.ca; helo=mail-pf1-x436.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , jusual@redhat.com, Paolo Bonzini , Ani Sinha , Igor Mammedov , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Cold plugged bridges are not hot unpluggable, even when their hotplug property (acpi-pci-hotplug-with-bridge-support) is turned off. Please see the function acpi_pcihp_pc_no_hotplug() (thanks Julia). However, with the current implementaton, windows would try to hot-unplug a pci bridge when it's hotplug switch is off. This is regardless of whether there are devices attached to the bridge. This is because we add amls like _EJ0 etc for the pci slot where the bridge is cold plugged. We have a demo video here: https://youtu.be/pME2sjyQweo In this fix, we identify a cold plugged bridge and for cold plugged bridges, we do not add the appropriate amls and acpi methods that are used by the OS to identify a hot-pluggable/unpluggable pci device. After this change, Windows does not show an option to eject the PCI bridge. A demo video is here: https://youtu.be/kbgej5B9Hgs As a result of the patch, the following are the changes to the DSDT ACPI table: @@ -858,38 +858,33 @@ Return (Zero) } Method (_S2D, 0, NotSerialized) // _S2D: S2 Device State { Return (Zero) } Method (_S3D, 0, NotSerialized) // _S3D: S3 Device State { Return (Zero) } } Device (S18) { - Name (_SUN, 0x03) // _SUN: Slot User Number Name (_ADR, 0x00030000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } } Device (S20) { Name (_SUN, 0x04) // _SUN: Slot User Number Name (_ADR, 0x00040000) // _ADR: Address Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device { PCEJ (BSEL, _SUN) } } Device (S28) { Name (_SUN, 0x05) // _SUN: Slot User Number Name (_ADR, 0x00050000) // _ADR: Address @@ -1148,37 +1143,32 @@ PCEJ (BSEL, _SUN) } } Device (SF8) { Name (_SUN, 0x1F) // _SUN: Slot User Number Name (_ADR, 0x001F0000) // _ADR: Address Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device { PCEJ (BSEL, _SUN) } } Method (DVNT, 2, NotSerialized) { - If ((Arg0 & 0x08)) - { - Notify (S18, Arg1) - } - If ((Arg0 & 0x10)) { Notify (S20, Arg1) } If ((Arg0 & 0x20)) { Notify (S28, Arg1) } If ((Arg0 & 0x40)) { Notify (S30, Arg1) } If ((Arg0 & 0x80)) While at it, I have also updated a stale comment. This change is tested with a Windows 2012R2 guest image and Windows 2019 server guest image running on Ubuntu 18.04 host. This change is based off of upstream qemu master branch tag v5.1.0. Signed-off-by: Ani Sinha Reviewed-by: Igor Mammedov Reviewed-by: Julia Suvorova --- hw/i386/acpi-build.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 7a5a8b3521..e079b686f5 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -359,6 +359,7 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus, int slot = PCI_SLOT(i); bool hotplug_enabled_dev; bool bridge_in_acpi; + bool cold_plugged_bridge; if (!pdev) { if (bsel) { /* add hotplug slots for non present devices */ @@ -380,15 +381,14 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus, pc = PCI_DEVICE_GET_CLASS(pdev); dc = DEVICE_GET_CLASS(pdev); - /* When hotplug for bridges is enabled, bridges are - * described in ACPI separately (see build_pci_bus_end). - * In this case they aren't themselves hot-pluggable. + /* + * Cold plugged bridges aren't themselves hot-pluggable. * Hotplugged bridges *are* hot-pluggable. */ - bridge_in_acpi = pc->is_bridge && pcihp_bridge_en && - !DEVICE(pdev)->hotplugged; + cold_plugged_bridge = pc->is_bridge && !DEVICE(pdev)->hotplugged; + bridge_in_acpi = cold_plugged_bridge && pcihp_bridge_en; - hotplug_enabled_dev = bsel && dc->hotpluggable && !bridge_in_acpi; + hotplug_enabled_dev = bsel && dc->hotpluggable && !cold_plugged_bridge; if (pc->class_id == PCI_CLASS_BRIDGE_ISA) { continue; From patchwork Fri Sep 11 18:07:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 11771345 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 499BD159A for ; Fri, 11 Sep 2020 18:11:18 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 078C5207FB for ; Fri, 11 Sep 2020 18:11:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=anisinha-ca.20150623.gappssmtp.com header.i=@anisinha-ca.20150623.gappssmtp.com header.b="sKQdulpc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 078C5207FB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=anisinha.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:47938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGnW0-00078k-VK for patchwork-qemu-devel@patchwork.kernel.org; Fri, 11 Sep 2020 14:11:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53978) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGnTV-0002xG-Ao for qemu-devel@nongnu.org; Fri, 11 Sep 2020 14:08:41 -0400 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:43996) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGnTT-0005xw-Mz for qemu-devel@nongnu.org; Fri, 11 Sep 2020 14:08:40 -0400 Received: by mail-pg1-x542.google.com with SMTP id t14so7178133pgl.10 for ; Fri, 11 Sep 2020 11:08:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anisinha-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fmZ0zShxvpsHgpLnoq8aruXTkYTNo4xgCabQ1KXMZUo=; b=sKQdulpcLpdgPKeI+qu69CuQjlF0DPf8n4ur+lHZiQ1FNz1npvkmBYVOOqGfA0s0Fg ufyUfaiPojWH17n1NCtQ7EF9wyiOiqxXQrOHZHYn2EHWXyMeQlzBXxFV7xwkHxuZExTR glet0tD0OdWvWDulfMScDO66/hAoYKD+88F0ot5dNQM58hC7AmsBUHJXoY5dicRDlpsM vDnwMcojT81gImGI1n5uZCQFfvROAC+NtxofBwaRMNW1pUNd/4d9F9n2HbLLo/QWU0Uq lOY+WCaae7J/cwhPjom249+5bj+WIsnFRpbA77WCK4zvIsYi5Q2va/lomfmkW37D5mDf EtAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fmZ0zShxvpsHgpLnoq8aruXTkYTNo4xgCabQ1KXMZUo=; b=uYcy49a7YTxCfu8b23Xlu8Bpo1ITkeaF5eYIIxoiZ2CqCFSvREDLIN+l29zf6e+Itw urvVYjfq8ZFxJdFqP+pwLnMCRlfev+dqZEju9bAVf5YSXq96F/b4d0+a1ifiEPwA2Unw IZcVQAax2U/IGHEz5tk7F4QqllxLxQaMK4fFzy0tk7y8ihl4iBXLvfO4J2krOU7S83Zz PLe2Qsn+4EYrElhBVbATGjPne9ySz6eXE3EeurCssGSydWipzcazoCMTt3DP7R2u+uwm YsKBlPv02hcDFeiYrCDduDExCQYsnF4uJ+IsP/KRjJCHmJdb+XvG9w1BdbSENlUbshTg bzLQ== X-Gm-Message-State: AOAM532reWn/SiA00oL0z5+h5bSCWzj/Z80ZXYQzbeSJ8eLPhB5d1xRY 09p9cvpkgp2zdgKTKNVLR5obN7ifmQCwVg== X-Google-Smtp-Source: ABdhPJxmhvvUo2uWs/IHdZLNxLZWJlpxymQpobGxlZQoKs8Yt9mOjeLfbFHJd2HNUddJuL0k1/l7rg== X-Received: by 2002:a63:4451:: with SMTP id t17mr2426027pgk.92.1599847718188; Fri, 11 Sep 2020 11:08:38 -0700 (PDT) Received: from localhost.localdomain ([115.96.135.201]) by smtp.googlemail.com with ESMTPSA id n9sm2929135pfu.163.2020.09.11.11.08.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Sep 2020 11:08:37 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org Subject: [PATCH 6/9] tests/acpi: list added acpi table binary file for pci bridge hotplug test Date: Fri, 11 Sep 2020 23:37:52 +0530 Message-Id: <20200911180755.28409-6-ani@anisinha.ca> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200911180755.28409-1-ani@anisinha.ca> References: <20200911180755.28409-1-ani@anisinha.ca> Received-SPF: none client-ip=2607:f8b0:4864:20::542; envelope-from=ani@anisinha.ca; helo=mail-pg1-x542.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Cc: Ani Sinha , Igor Mammedov , jusual@redhat.com, "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The file 'tests/data/acpi/pc/DSDT.hpbridge' is a newly added acpi table file for testing the pci bridge option 'acpi-pci-hotplug-with-bridge-support' under i440fx. This change documents this fact. Signed-off-by: Ani Sinha --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..96a9237355 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,2 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/pc/DSDT.hpbridge", From patchwork Fri Sep 11 18:07:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 11771347 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9F48B13B1 for ; Fri, 11 Sep 2020 18:11:36 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 569F8207FB for ; Fri, 11 Sep 2020 18:11:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=anisinha-ca.20150623.gappssmtp.com header.i=@anisinha-ca.20150623.gappssmtp.com header.b="Y3sDZ+MC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 569F8207FB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=anisinha.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:49306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGnWJ-0007gX-Cb for patchwork-qemu-devel@patchwork.kernel.org; Fri, 11 Sep 2020 14:11:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53990) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGnTZ-00037c-1f for qemu-devel@nongnu.org; Fri, 11 Sep 2020 14:08:45 -0400 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:40886) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGnTX-0005yD-Kr for qemu-devel@nongnu.org; Fri, 11 Sep 2020 14:08:44 -0400 Received: by mail-pg1-x542.google.com with SMTP id j34so7191102pgi.7 for ; Fri, 11 Sep 2020 11:08:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anisinha-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ppZphd05C86FqB7ckX7fxnS8pQWDT9kE9aEVt6BaDW8=; b=Y3sDZ+MCsragt3kOoiWr5zqXDdx4h/ifpmiN+wTsoNtrqqVMJzaOOgXeiAmpDZCiI1 ljBqWWD3juHfHdBTaaC8fWDFe24n5qkHn74v9N7pqm6dxH3Rg3mLWcMOkeBnkw02ohFd iuu4RqpS2elB9SoMeQIYkYraUucdkzBETnlfk/Ioljb2YVyVR7EWJnujAogylxDhE5Ae clEk98i6WFifZwwveXyRkTrq3j/DWFa4HmgZKGynebxmSTX5z8fZ7kdgFb+1jjX6Y/Lm QngcpzClBjV5LAgiuLtctlznitkFiBByBlCXC/QVguFgq/NAkiz1iWe3jXkw/80BUFN4 Lpgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ppZphd05C86FqB7ckX7fxnS8pQWDT9kE9aEVt6BaDW8=; b=B6rH6iXRIUCN3i9Lo8m+09m06rzhmmpx4lbo4rElCG4K/ZHVAiRn9CQ7e7bUnuRGjv eJeGnQ9xa9U7b43mPnNq57y2axDRVrfRylAjhok/ekSeD7jdInBt86RszFYAkGv8mA9U vaLFT4utH7EwkRh5bdKF+018M1xPZ2lFZSMvsJ+wk2KfH1EUhNq4zjk/aXitZEZEE0dX y5/OoHOw8uDUcYFfgjCU5Os4Vs960s332QlsxN/4x3FL1225G+RfTdkuDLNCZTEF1a/W fZpQHfXI9K9OJKeQWUQCx9rb53pA1Od1Q7rvb685tHzsMsSHxzYfgOYeuwlT1aOP2KYX 1DdA== X-Gm-Message-State: AOAM531RNM4wSZq6MV3CPsxjX70xqUQkGcMhWmzdVgtDjunS7V/ilXa9 L1juTHCD3KEECMFk0Rmf7Q/mN2afarZMww== X-Google-Smtp-Source: ABdhPJy/ODe5yruky77As3yPf/mXwlsL4S/fE0e7DNdDOXM+rLiKTOIwF7bFvP29nWoOPqsTB03qMQ== X-Received: by 2002:a63:60e:: with SMTP id 14mr2449177pgg.343.1599847721999; Fri, 11 Sep 2020 11:08:41 -0700 (PDT) Received: from localhost.localdomain ([115.96.135.201]) by smtp.googlemail.com with ESMTPSA id n9sm2929135pfu.163.2020.09.11.11.08.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Sep 2020 11:08:41 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org Subject: [PATCH 7/9] tests/acpi: unit test for 'acpi-pci-hotplug-with-bridge-support' bridge flag Date: Fri, 11 Sep 2020 23:37:53 +0530 Message-Id: <20200911180755.28409-7-ani@anisinha.ca> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200911180755.28409-1-ani@anisinha.ca> References: <20200911180755.28409-1-ani@anisinha.ca> Received-SPF: none client-ip=2607:f8b0:4864:20::542; envelope-from=ani@anisinha.ca; helo=mail-pg1-x542.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Cc: Laurent Vivier , Thomas Huth , "Michael S. Tsirkin" , jusual@redhat.com, Paolo Bonzini , Ani Sinha , Igor Mammedov Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This change adds a new unit test for the global flag 'acpi-pci-hotplug-with-bridge-support' which is available for cold plugged pci bridges in i440fx. The flag can be used to turn off acpi based hotplug support for all the slots of the pci bus. Tested on the upstream qemu master branch. Signed-off-by: Ani Sinha Reviewed-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index d8c7d57557..7632cfe1be 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -754,6 +754,20 @@ static void test_acpi_piix4_root_hotplug(void) free_test_data(&data); } +static void test_acpi_piix4_bridge_hotplug(void) +{ + test_data data; + + memset(&data, 0, sizeof(data)); + data.machine = MACHINE_PC; + data.variant = ".hpbridge"; + data.required_struct_types = base_required_struct_types; + data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types); + test_acpi_one("-global PIIX4_PM.acpi-pci-hotplug-with-bridge-support=off " + "-device pci-bridge,chassis_nr=1", &data); + free_test_data(&data); +} + static void test_acpi_q35_tcg(void) { test_data data; @@ -1159,6 +1173,7 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/piix4", test_acpi_piix4_tcg); qtest_add_func("acpi/piix4/bridge", test_acpi_piix4_tcg_bridge); qtest_add_func("acpi/piix4/hotplug", test_acpi_piix4_root_hotplug); + qtest_add_func("acpi/piix4/brhotplug", test_acpi_piix4_bridge_hotplug); qtest_add_func("acpi/q35", test_acpi_q35_tcg); qtest_add_func("acpi/q35/bridge", test_acpi_q35_tcg_bridge); qtest_add_func("acpi/q35/mmio64", test_acpi_q35_tcg_mmio64); From patchwork Fri Sep 11 18:07:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 11771351 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 296D3698 for ; Fri, 11 Sep 2020 18:14:30 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7B35B207FB for ; Fri, 11 Sep 2020 18:14:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=anisinha-ca.20150623.gappssmtp.com header.i=@anisinha-ca.20150623.gappssmtp.com header.b="yg4vB/gR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B35B207FB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=anisinha.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:57962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGnZ6-0002m6-If for patchwork-qemu-devel@patchwork.kernel.org; Fri, 11 Sep 2020 14:14:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGnTe-0003KZ-2O for qemu-devel@nongnu.org; Fri, 11 Sep 2020 14:08:50 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:36579) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGnTb-0005yY-6r for qemu-devel@nongnu.org; Fri, 11 Sep 2020 14:08:49 -0400 Received: by mail-pf1-x443.google.com with SMTP id d9so7983933pfd.3 for ; Fri, 11 Sep 2020 11:08:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anisinha-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ARrqKiw0ZI71X/nMn8SUrP42xKqFqGltw1z766gv2gQ=; b=yg4vB/gRlI+mhee5TzqGa49ovAapCid0n3z+JOlzDzLwd51ZePF2UB1L+Zz/gGk0dX nc5QUU+3bupju/j5VZ1plxN57wGhbp9xbftfETxBGNb5Q/vy4wsNWJiUUtWwqM5bhiDY hX4KAF1ftEPidCXgvZ9D6wtiwqaG7mY720zaQjWEIm/CvehZF/ktVJBWk3JdfBfMTWjq 1UOE3lZdeJcPyHMc7AVz7ESTWp3G2vuhqmk5NWaKY5+UZVvQ3t6Gyl5WTt/EsPVlLlh4 0B7meEDdEOT1/xKdwQyy8fP+7fHioH7X2E7oZPWl5NHnafVGvWK6DBNy0Hs1cz/TNtVR vhvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ARrqKiw0ZI71X/nMn8SUrP42xKqFqGltw1z766gv2gQ=; b=d9t0hqJ1qjBNNyuceO+Wp9U+fIz1IOMTJ6ur7DSZ6Y/sEZtbdSa0BwzIvDaBO/uAwS 3vZkhAosIlWErjhO0O075TcC6g0SQYjKi7EVaLB0N357rXfwtIqRrGhkyohry4dDUERn ymJKJjkryDdnn1BeX/E6emh2IxEje+xwD8wa+aL1GftHfx8jS7i3shWWH5Al8FMiK0cF O4qFCPVDhw5XXzqCM5qrmzo4/ZXbYNLzbefgdL5Sfs4g/+BlBKBXgPj/naNTloicuXzT 0Qo3a6NQJQCjWGbWx0+CcfcGrz4XqTY1cfEEdtyXxmlnBMgEgKL4l8JufVQeaFKCkOja oJxw== X-Gm-Message-State: AOAM5305DAao/oD7qBgTTEbMA745vLAcEtYoOymvx8hu2y1ZsqgTRGq1 fG0AJ3crCK+NrLLgUnMzreMaO6CdfkMp/Q== X-Google-Smtp-Source: ABdhPJymgUJicY/Gf8f+EELHB3ZPsVfyBkmRRIZWylOeuCHvZ4jtBEG5jAPq1+56YtVazFcgzWcYOg== X-Received: by 2002:a62:1ac3:0:b029:13f:7c9b:5a8a with SMTP id a186-20020a621ac30000b029013f7c9b5a8amr3222699pfa.12.1599847725145; Fri, 11 Sep 2020 11:08:45 -0700 (PDT) Received: from localhost.localdomain ([115.96.135.201]) by smtp.googlemail.com with ESMTPSA id n9sm2929135pfu.163.2020.09.11.11.08.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Sep 2020 11:08:44 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org Subject: [PATCH 8/9] tests/acpi: add newly added acpi DSDT table blob for pci bridge hotplug flag Date: Fri, 11 Sep 2020 23:37:54 +0530 Message-Id: <20200911180755.28409-8-ani@anisinha.ca> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200911180755.28409-1-ani@anisinha.ca> References: <20200911180755.28409-1-ani@anisinha.ca> Received-SPF: none client-ip=2607:f8b0:4864:20::443; envelope-from=ani@anisinha.ca; helo=mail-pf1-x443.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Cc: Ani Sinha , Igor Mammedov , jusual@redhat.com, "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This patch adds a binary blob corresponding to the DSDT acpi table. It is used to unit test the flag 'acpi-pci-hotplug-with-bridge-support' used with pci bridges. This change also clears the file tests/qtest/bios-tables-test-allowed-diff.h so that future changes which affect the table can be caught. The following is the diff between files tests/data/acpi/pc/DSDT.bridge and tests/data/acpi/pc/DSDT.hpbridge after disassembly : @@ -1,30 +1,30 @@ /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20180105 (64-bit version) * Copyright (c) 2000 - 2018 Intel Corporation * * Disassembling to symbolic ASL+ operators * - * Disassembly of tests/data/acpi/pc/DSDT.bridge, Fri Sep 11 23:21:34 2020 + * Disassembly of /tmp/aml-7UURQ0, Fri Sep 11 23:21:34 2020 * * Original Table Header: * Signature "DSDT" - * Length 0x00001A89 (6793) + * Length 0x0000131F (4895) * Revision 0x01 **** 32-bit table (V1), no 64-bit math support - * Checksum 0x09 + * Checksum 0xF9 * OEM ID "BOCHS " * OEM Table ID "BXPCDSDT" * OEM Revision 0x00000001 (1) * Compiler ID "BXPC" * Compiler Version 0x00000001 (1) */ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPCDSDT", 0x00000001) { Scope (\) { OperationRegion (DBG, SystemIO, 0x0402, One) Field (DBG, ByteAcc, NoLock, Preserve) { DBGB, 8 } @@ -859,522 +859,32 @@ } Method (_S2D, 0, NotSerialized) // _S2D: S2 Device State { Return (Zero) } Method (_S3D, 0, NotSerialized) // _S3D: S3 Device State { Return (Zero) } } Device (S18) { Name (_ADR, 0x00030000) // _ADR: Address - Name (BSEL, One) - Device (S00) - { - Name (_SUN, Zero) // _SUN: Slot User Number - Name (_ADR, Zero) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S08) - { - Name (_SUN, One) // _SUN: Slot User Number - Name (_ADR, 0x00010000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S10) - { - Name (_SUN, 0x02) // _SUN: Slot User Number - Name (_ADR, 0x00020000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S18) - { - Name (_SUN, 0x03) // _SUN: Slot User Number - Name (_ADR, 0x00030000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S20) - { - Name (_SUN, 0x04) // _SUN: Slot User Number - Name (_ADR, 0x00040000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S28) - { - Name (_SUN, 0x05) // _SUN: Slot User Number - Name (_ADR, 0x00050000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S30) - { - Name (_SUN, 0x06) // _SUN: Slot User Number - Name (_ADR, 0x00060000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S38) - { - Name (_SUN, 0x07) // _SUN: Slot User Number - Name (_ADR, 0x00070000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S40) - { - Name (_SUN, 0x08) // _SUN: Slot User Number - Name (_ADR, 0x00080000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S48) - { - Name (_SUN, 0x09) // _SUN: Slot User Number - Name (_ADR, 0x00090000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S50) - { - Name (_SUN, 0x0A) // _SUN: Slot User Number - Name (_ADR, 0x000A0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S58) - { - Name (_SUN, 0x0B) // _SUN: Slot User Number - Name (_ADR, 0x000B0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S60) - { - Name (_SUN, 0x0C) // _SUN: Slot User Number - Name (_ADR, 0x000C0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S68) - { - Name (_SUN, 0x0D) // _SUN: Slot User Number - Name (_ADR, 0x000D0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S70) - { - Name (_SUN, 0x0E) // _SUN: Slot User Number - Name (_ADR, 0x000E0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S78) - { - Name (_SUN, 0x0F) // _SUN: Slot User Number - Name (_ADR, 0x000F0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S80) - { - Name (_SUN, 0x10) // _SUN: Slot User Number - Name (_ADR, 0x00100000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S88) - { - Name (_SUN, 0x11) // _SUN: Slot User Number - Name (_ADR, 0x00110000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S90) - { - Name (_SUN, 0x12) // _SUN: Slot User Number - Name (_ADR, 0x00120000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S98) - { - Name (_SUN, 0x13) // _SUN: Slot User Number - Name (_ADR, 0x00130000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SA0) - { - Name (_SUN, 0x14) // _SUN: Slot User Number - Name (_ADR, 0x00140000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SA8) - { - Name (_SUN, 0x15) // _SUN: Slot User Number - Name (_ADR, 0x00150000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SB0) - { - Name (_SUN, 0x16) // _SUN: Slot User Number - Name (_ADR, 0x00160000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SB8) - { - Name (_SUN, 0x17) // _SUN: Slot User Number - Name (_ADR, 0x00170000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SC0) - { - Name (_SUN, 0x18) // _SUN: Slot User Number - Name (_ADR, 0x00180000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SC8) - { - Name (_SUN, 0x19) // _SUN: Slot User Number - Name (_ADR, 0x00190000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SD0) - { - Name (_SUN, 0x1A) // _SUN: Slot User Number - Name (_ADR, 0x001A0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SD8) - { - Name (_SUN, 0x1B) // _SUN: Slot User Number - Name (_ADR, 0x001B0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SE0) - { - Name (_SUN, 0x1C) // _SUN: Slot User Number - Name (_ADR, 0x001C0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SE8) - { - Name (_SUN, 0x1D) // _SUN: Slot User Number - Name (_ADR, 0x001D0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SF0) - { - Name (_SUN, 0x1E) // _SUN: Slot User Number - Name (_ADR, 0x001E0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SF8) - { - Name (_SUN, 0x1F) // _SUN: Slot User Number - Name (_ADR, 0x001F0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Method (DVNT, 2, NotSerialized) - { - If ((Arg0 & One)) - { - Notify (S00, Arg1) - } - - If ((Arg0 & 0x02)) - { - Notify (S08, Arg1) - } - - If ((Arg0 & 0x04)) - { - Notify (S10, Arg1) - } - - If ((Arg0 & 0x08)) - { - Notify (S18, Arg1) - } - - If ((Arg0 & 0x10)) - { - Notify (S20, Arg1) - } - - If ((Arg0 & 0x20)) - { - Notify (S28, Arg1) - } - - If ((Arg0 & 0x40)) - { - Notify (S30, Arg1) - } - - If ((Arg0 & 0x80)) - { - Notify (S38, Arg1) - } - - If ((Arg0 & 0x0100)) - { - Notify (S40, Arg1) - } - - If ((Arg0 & 0x0200)) - { - Notify (S48, Arg1) - } - - If ((Arg0 & 0x0400)) - { - Notify (S50, Arg1) - } - - If ((Arg0 & 0x0800)) - { - Notify (S58, Arg1) - } - - If ((Arg0 & 0x1000)) - { - Notify (S60, Arg1) - } - - If ((Arg0 & 0x2000)) - { - Notify (S68, Arg1) - } - - If ((Arg0 & 0x4000)) - { - Notify (S70, Arg1) - } - - If ((Arg0 & 0x8000)) - { - Notify (S78, Arg1) - } - - If ((Arg0 & 0x00010000)) - { - Notify (S80, Arg1) - } - - If ((Arg0 & 0x00020000)) - { - Notify (S88, Arg1) - } - - If ((Arg0 & 0x00040000)) - { - Notify (S90, Arg1) - } - - If ((Arg0 & 0x00080000)) - { - Notify (S98, Arg1) - } - - If ((Arg0 & 0x00100000)) - { - Notify (SA0, Arg1) - } - - If ((Arg0 & 0x00200000)) - { - Notify (SA8, Arg1) - } - - If ((Arg0 & 0x00400000)) - { - Notify (SB0, Arg1) - } - - If ((Arg0 & 0x00800000)) - { - Notify (SB8, Arg1) - } - - If ((Arg0 & 0x01000000)) - { - Notify (SC0, Arg1) - } - - If ((Arg0 & 0x02000000)) - { - Notify (SC8, Arg1) - } - - If ((Arg0 & 0x04000000)) - { - Notify (SD0, Arg1) - } - - If ((Arg0 & 0x08000000)) - { - Notify (SD8, Arg1) - } - - If ((Arg0 & 0x10000000)) - { - Notify (SE0, Arg1) - } - - If ((Arg0 & 0x20000000)) - { - Notify (SE8, Arg1) - } - - If ((Arg0 & 0x40000000)) - { - Notify (SF0, Arg1) - } - - If ((Arg0 & 0x80000000)) - { - Notify (SF8, Arg1) - } - } - - Method (PCNT, 0, NotSerialized) - { - BNUM = One - DVNT (PCIU, One) - DVNT (PCID, 0x03) - } } Device (S20) { Name (_SUN, 0x04) // _SUN: Slot User Number Name (_ADR, 0x00040000) // _ADR: Address Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device { PCEJ (BSEL, _SUN) } } Device (S28) { Name (_SUN, 0x05) // _SUN: Slot User Number Name (_ADR, 0x00050000) // _ADR: Address @@ -1779,22 +1289,21 @@ If ((Arg0 & 0x40000000)) { Notify (SF0, Arg1) } If ((Arg0 & 0x80000000)) { Notify (SF8, Arg1) } } Method (PCNT, 0, NotSerialized) { BNUM = Zero DVNT (PCIU, One) DVNT (PCID, 0x03) - ^S18.PCNT () } } } } Signed-off-by: Ani Sinha Acked-by: Igor Mammedov --- tests/data/acpi/pc/DSDT.hpbridge | Bin 0 -> 4895 bytes tests/qtest/bios-tables-test-allowed-diff.h | 1 - 2 files changed, 1 deletion(-) create mode 100644 tests/data/acpi/pc/DSDT.hpbridge diff --git a/tests/data/acpi/pc/DSDT.hpbridge b/tests/data/acpi/pc/DSDT.hpbridge new file mode 100644 index 0000000000000000000000000000000000000000..b0751398541bdf88ce405be9742aeba0b375dbc3 GIT binary patch literal 4895 zcmb7IQE%Hu5}p+)hgwNCWixSVw~gQ=SF}AelAO9J?!^)*ONuR-5#`(+Xn>UM;^d-5 ziL?Rg8pSCp;HG&ibUEC^J*a`6t!ol_>-v{sAB*?@AR!!$ zH|n4`I~4=esuEy|O4%$n1c)Js%yzqMHmZ;S_~Dm0$o3=M+b;Td5SEJ&9q)NDeZ< z5vad=hoYfy?aorg$~%6n=$>IH=Ix9g;Vzfe+Ttxq010JxZf_P01P3Wf7(GTM++5|C zOUwlq7%Q;@IKc0f2zs+SH>%q^qfv7UFO5=obOlsG<&_OXAI;w-oH+`9nO`ljpQN88 zkW1`^^g;r*vJP*_K5=$q%gl>;-Y_cjX%%>sZ}SY}r#!-M;@>=9<^%o_|C!HmMR7Ka zVrr3VQ~~3k2nu#5w`Df6B0V`+JN8nzDo>W!=hEkrqO7$27;^e{bu=c5Xk5@KW6q>A z36vGpA9J(b&_@#zA7<)Pd*A_6R)FCum6h{lYMZ*%U~zcP6|4>tbX>ljG(L>9-L{H% zv5J-F9BU^|f?miJ@1mhltJYau4Gbjch1yOvZL`9bz6sh*Q!n0)*w;xK47?T@y(4xA zG~9lJ)O}EESbYUY-Q-j;n!z2j-T-et(sn&)J}bnYHhJ6oqRAt$=N&(2?g5uzzo&Nh z5fsCU+p29EaL~Ka-Dka2x5?#^+Jb}ck|QaPpj3CCM@E{$P$P{rIvjXk9_?`zu;$_M z0f2YhM1PMD7l5C2dt-)m69r?Phm$zI)z(&3bX%o zPd|D1VE=(%=V z8$yPGtm{<+Tg^OyB;6`*r4ec58)+@!RB9E)15#r0Z}0kD3S$Z4OXhX6lF4K<6hUwl zMzxgQ*!Xj#$Ga^!(KDIMp;n&39+r>U*LQEp;*6mjDR$~alWKJ4f!kZ^P8ukBkI%XG z8y75Fn|)WSMk%A;=7>#FA;VODtvst+dQAySgSpT0@vh4-bPpy;afW*(`9ebeO5k)& z!g2DMcOf!Fd(8cAQ|^^7Qu*sSor+5rxe$(A(-W=6^lht=2upP8dR+(>GxiRrtG&nN(NeoA8N~3 zz9qBh6f-$oApg2UrA(`;Zp&oyH}i0g6x6eXM5-5PK1+<`Bp!SK|M_|mAh6S+G8oXI zLZ1lu7IDK-27~W^2`vBm`N`YoV*(w)27|$01w7C~o4)B*rpq`5!L2N5*33*Ery%G) zq#tWL!8Iu!?Se zhB4#&ZD(GQ@uG)UIF#Nc3k9$K;e4{~&N~}_)Hi|v?iH&$SS&e0b2NlL@ZMD7NWSZ4)v zHWVsY@dg;gIu{1LBUn`dRYReIH6@^_FzEY&bzVT{L!p8df0G5VE`&kzf)xurfNG&o z!FpLhFNZ-3g7u1kUI~Q?)O{aPc^OB}cG$JYrputQ%+ zlW=D!tfPQUD6q6iAWQPN701)}#KKN8lp-XJY%)sN4~8~{q>+uB;jSLq$lKb;M(%KL z4sGP`J+jRmx3Hn&@o-|{9uqPi5GbG9@t8QVaJL9M-Vjhex2q&$-3xo#m(T6%Bx3~& zd)t@K?S95si^7hl#EGSk*(qzRs*#=YHpc9fIo8L>o+f$BzK$}k^vK>O8SUCNx_{t* S66ohVtr{L;J8bx3aOwYF+mJl~ literal 0 HcmV?d00001 diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index 96a9237355..dfb8523c8b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,2 +1 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/pc/DSDT.hpbridge", From patchwork Fri Sep 11 18:07:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 11771353 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9D96659D for ; Fri, 11 Sep 2020 18:16:25 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 41E1B21D40 for ; Fri, 11 Sep 2020 18:16:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=anisinha-ca.20150623.gappssmtp.com header.i=@anisinha-ca.20150623.gappssmtp.com header.b="b/GFoVvO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 41E1B21D40 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=anisinha.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:33030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGnay-0004Fx-4z for patchwork-qemu-devel@patchwork.kernel.org; Fri, 11 Sep 2020 14:16:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54036) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGnTh-0003TU-Do for qemu-devel@nongnu.org; Fri, 11 Sep 2020 14:08:53 -0400 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]:50531) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGnTf-0005yv-Oo for qemu-devel@nongnu.org; Fri, 11 Sep 2020 14:08:53 -0400 Received: by mail-pj1-x1041.google.com with SMTP id fa1so2095091pjb.0 for ; Fri, 11 Sep 2020 11:08:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anisinha-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2bDn5lP82DTof33HcPkKGbpUXGX2/dBL7v5dVOpxZK0=; b=b/GFoVvOlaY4Oy7QM61ZqHQqHdQkZlnCKibwTYv0i+Fouk6lhrVPZFVkWNnC861hy6 vY7DckkrsfCkP1+duurcDlOr/sYkoEdjd61Kd7d4YwZFftuAiaPaxuBmAp+5GPmKyDiI gBb+KPU1RTjpgt0Z9JO3xDE50fdniIfcq1K+NPB/vY7qC+dKD3w2g6CdziEtqpl1isFU jTHdjdGKfUNRzLKCe4hKUBCOE9IOQxxwN2ZQhSz7lOhasfjENgbzesQ7Hj+RjonhPLsQ Kd1irTbLRjdLE2ee9kVtriovxtshIjJn5C9h7IvlZoZrr2Q7CTWdvck9VpAZVR5fH9lE wAsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2bDn5lP82DTof33HcPkKGbpUXGX2/dBL7v5dVOpxZK0=; b=Ai1jqQCgEVuE13JKi1pQlXshkFnO4xlzlilwypnpn+CcAaKJFx5STHuHPxfwN87wEY coLZfcP8o/wprMEFfSnOfK/c24xEkF+NIDUvXaTHULlCo9ZOXSCjsEzmTXo3VcHjFhjz BDIUeadNBmRjpbTWcIk7km8Wf2YZQr5fqUTmn+iMTM3kB1rL6SQIEI+4KvMkNRCEGO12 Wh+hmAT9TaG3zZhYYqacWOYeVcMStPU+ffcMdufi8yh2XYGRx8KDIFiKCVjDEFNlq3nF frHkuxiTbCtKe6g7dvjx5ChHchCkeV4bMDt9iEhQZREckq33eYJ/f7vWF43SltFkII9r xblQ== X-Gm-Message-State: AOAM5302e+jtXZ0PLyWNjb4sZRbgHFTIhEdj03ug0LUcPoDx2OVYhTuX VLC+VEQieQzH9a9D84qPK1ZOxwI3DleDdBho X-Google-Smtp-Source: ABdhPJwKUulMOxjoSEaVpBxZ+IGq7azvXY1K9ctlV2klYo1URWjWqnF7wIEeYNbyiOQ7IQ5aXo9keQ== X-Received: by 2002:a17:90b:ecc:: with SMTP id gz12mr3242695pjb.123.1599847729972; Fri, 11 Sep 2020 11:08:49 -0700 (PDT) Received: from localhost.localdomain ([115.96.135.201]) by smtp.googlemail.com with ESMTPSA id n9sm2929135pfu.163.2020.09.11.11.08.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Sep 2020 11:08:49 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org Subject: [PATCH 9/9] piix4: don't reserve hw resources when hotplug is off globally Date: Fri, 11 Sep 2020 23:37:55 +0530 Message-Id: <20200911180755.28409-9-ani@anisinha.ca> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200911180755.28409-1-ani@anisinha.ca> References: <20200911180755.28409-1-ani@anisinha.ca> Received-SPF: none client-ip=2607:f8b0:4864:20::1041; envelope-from=ani@anisinha.ca; helo=mail-pj1-x1041.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , jusual@redhat.com, =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= , Aleksandar Markovic , Paolo Bonzini , Ani Sinha , Igor Mammedov , Aurelien Jarno , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" When acpi hotplug is turned off for both root pci bus as well as for pci bridges, we should not generate the related amls for DSDT table or initialize related hw ports or reserve hw resources. This change makes sure all those operations are turned off in the case acpi pci hotplug is off globally. Signed-off-by: Ani Sinha --- hw/acpi/piix4.c | 6 ++++-- hw/i386/acpi-build.c | 10 ++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index e6163bb6ce..b70b1f98af 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c @@ -596,8 +596,10 @@ static void piix4_acpi_system_hot_add_init(MemoryRegion *parent, "acpi-gpe0", GPE_LEN); memory_region_add_subregion(parent, GPE_BASE, &s->io_gpe); - acpi_pcihp_init(OBJECT(s), &s->acpi_pci_hotplug, bus, parent, - s->use_acpi_hotplug_bridge); + if (s->use_acpi_hotplug_bridge || s->use_acpi_root_pci_hotplug) { + acpi_pcihp_init(OBJECT(s), &s->acpi_pci_hotplug, bus, parent, + s->use_acpi_hotplug_bridge); + } s->cpu_hotplug_legacy = true; object_property_add_bool(OBJECT(s), "cpu-hotplug-legacy", diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index e079b686f5..7e3cf3b57b 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -95,6 +95,7 @@ typedef struct AcpiPmInfo { bool s3_disabled; bool s4_disabled; bool pcihp_bridge_en; + bool pcihp_root_en; uint8_t s4_val; AcpiFadtData fadt; uint16_t cpu_hp_io_base; @@ -245,6 +246,9 @@ static void acpi_get_pm_info(MachineState *machine, AcpiPmInfo *pm) pm->pcihp_bridge_en = object_property_get_bool(obj, "acpi-pci-hotplug-with-bridge-support", NULL); + pm->pcihp_root_en = + object_property_get_bool(obj, "acpi-root-pci-hotplug", + NULL); } static void acpi_get_misc_info(AcpiMiscInfo *info) @@ -1504,7 +1508,9 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, build_hpet_aml(dsdt); build_piix4_isa_bridge(dsdt); build_isa_devices_aml(dsdt); - build_piix4_pci_hotplug(dsdt); + if (pm->pcihp_bridge_en || pm->pcihp_root_en) { + build_piix4_pci_hotplug(dsdt); + } build_piix4_pci0_int(dsdt); } else { sb_scope = aml_scope("_SB"); @@ -1698,7 +1704,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, crs_range_set_free(&crs_range_set); /* reserve PCIHP resources */ - if (pm->pcihp_io_len) { + if (pm->pcihp_io_len && (pm->pcihp_bridge_en || pm->pcihp_root_en)) { dev = aml_device("PHPR"); aml_append(dev, aml_name_decl("_HID", aml_string("PNP0A06"))); aml_append(dev,