From patchwork Wed Oct 20 17:27:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 12572833 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7FADC433EF for ; Wed, 20 Oct 2021 17:38:12 +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 45334611F2 for ; Wed, 20 Oct 2021 17:38:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 45334611F2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:40482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdFXX-0000rl-Au for qemu-devel@archiver.kernel.org; Wed, 20 Oct 2021 13:38:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37364) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdFUV-00050w-VM for qemu-devel@nongnu.org; Wed, 20 Oct 2021 13:35:03 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:55985) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdFUS-0002WA-2d for qemu-devel@nongnu.org; Wed, 20 Oct 2021 13:35:03 -0400 Received: by mail-wm1-x335.google.com with SMTP id v127so20451430wme.5 for ; Wed, 20 Oct 2021 10:34:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IE2Z2g5VHAv0ugACUjC75Ov9MFD4N5L+Ta3HLhuuRgI=; b=uC2QuLWwFtWmyhfZq/n0pwY0R5GKH52ISkMTrXtYX/dWqI1YbncKngt1X0C4VlyiXD hPZ9vlqvmyFX/hHUwvvADXcLeRrIK4ul5UTiaaDxYmRuVJNCzo5EkENs8b+jGw7w2y1D S4IISbGY2WdKTlPomKdIyvDDgmNm02GQJFk5cFF1JUHFXiWWGaD2IcZNGgnZ23i1ddls 35uUdkwae4toq0loKQUNKjS1HLgqmvaK4dT7nqb99DsMKW2nSbcbBwneNxhy+xRgxE9G IdDkbqe3K/iu/cCP5Vljk4zkJJ+HMPO2JupdpAFJEhux50eiidZxs5ehb7KHC4UZ0shL U7Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IE2Z2g5VHAv0ugACUjC75Ov9MFD4N5L+Ta3HLhuuRgI=; b=6McQA6/dQxpVZQlzDjr7c3PbwTJQXAzQkHfcU41k1zo9/PNlx5ublaYZ4pD6TAZ3Sp yXuUD/iAMIu2Ahi6CF2u8xzFMQFIdSlVNB9D+GsJn/b3cYCMByx14uuJo89SkUPExSyI HJWlaRWTTGYMICsvJGzJ0eBZS8Ph9ePA64ME3Ahr4N7FANYkG+U5BYTeGdIhT+DFEc+n qoVvmNr3NlrxY5myIpKMxqZ75dI8SeKN2DvgCB0zoWvfTc/SVcRgt+wiebIymTs/lp1P PafaI5MVQCyxp4DzEuGye4bNlngCmv73bNeYPwqjpwN4vIvRB7I/Vgp0dVKbQS/cdbsn dqDQ== X-Gm-Message-State: AOAM533kXsCCno6BFlCpdOvI0xVZO0w5Fpq8sLqlluBQIzYemQE+rfa2 wXEcuMshg/zcDNfYkSnh/ycI9A== X-Google-Smtp-Source: ABdhPJxWZuyPKFroOKv0akAgIvrobWmqm9pEBL87Kmtc+Z63zdojAjOqn44pCIyQux4uZNa4ogtR1g== X-Received: by 2002:a1c:3586:: with SMTP id c128mr15141180wma.78.1634751297735; Wed, 20 Oct 2021 10:34:57 -0700 (PDT) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id n7sm2662270wrp.17.2021.10.20.10.34.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 10:34:57 -0700 (PDT) From: Jean-Philippe Brucker To: mst@redhat.com, imammedo@redhat.com, peter.maydell@linaro.org Subject: [PATCH v5 01/12] hw/acpi: Add VIOT table Date: Wed, 20 Oct 2021 18:27:35 +0100 Message-Id: <20211020172745.620101-2-jean-philippe@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211020172745.620101-1-jean-philippe@linaro.org> References: <20211020172745.620101-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=jean-philippe@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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: Jean-Philippe Brucker , ehabkost@redhat.com, eric.auger@redhat.com, jasowang@redhat.com, richard.henderson@linaro.org, qemu-devel@nongnu.org, peterx@redhat.com, shannon.zhaosl@gmail.com, qemu-arm@nongnu.org, ani@anisinha.ca, pbonzini@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Add a function that generates a Virtual I/O Translation table (VIOT), describing the topology of paravirtual IOMMUs. The table is created if a virtio-iommu device is present. It contains a virtio-iommu node and PCI Range nodes for endpoints managed by the IOMMU. By default, a single node describes all PCI devices. When passing the "default_bus_bypass_iommu" machine option and "bypass_iommu" PXB option, only buses that do not bypass the IOMMU are described by PCI Range nodes. Reviewed-by: Eric Auger Tested-by: Eric Auger Signed-off-by: Jean-Philippe Brucker --- hw/acpi/viot.h | 13 +++++ hw/acpi/viot.c | 114 ++++++++++++++++++++++++++++++++++++++++++++ hw/acpi/Kconfig | 4 ++ hw/acpi/meson.build | 1 + 4 files changed, 132 insertions(+) create mode 100644 hw/acpi/viot.h create mode 100644 hw/acpi/viot.c diff --git a/hw/acpi/viot.h b/hw/acpi/viot.h new file mode 100644 index 0000000000..9fe565bb87 --- /dev/null +++ b/hw/acpi/viot.h @@ -0,0 +1,13 @@ +/* + * ACPI Virtual I/O Translation Table implementation + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#ifndef VIOT_H +#define VIOT_H + +void build_viot(MachineState *ms, GArray *table_data, BIOSLinker *linker, + uint16_t virtio_iommu_bdf, const char *oem_id, + const char *oem_table_id); + +#endif /* VIOT_H */ diff --git a/hw/acpi/viot.c b/hw/acpi/viot.c new file mode 100644 index 0000000000..c1af75206e --- /dev/null +++ b/hw/acpi/viot.c @@ -0,0 +1,114 @@ +/* + * ACPI Virtual I/O Translation table implementation + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#include "qemu/osdep.h" +#include "hw/acpi/acpi.h" +#include "hw/acpi/aml-build.h" +#include "hw/acpi/viot.h" +#include "hw/pci/pci.h" +#include "hw/pci/pci_host.h" + +struct viot_pci_ranges { + GArray *blob; + size_t count; + uint16_t output_node; +}; + +/* Build PCI range for a given PCI host bridge */ +static int build_pci_range_node(Object *obj, void *opaque) +{ + struct viot_pci_ranges *pci_ranges = opaque; + GArray *blob = pci_ranges->blob; + + if (object_dynamic_cast(obj, TYPE_PCI_HOST_BRIDGE)) { + PCIBus *bus = PCI_HOST_BRIDGE(obj)->bus; + + if (bus && !pci_bus_bypass_iommu(bus)) { + int min_bus, max_bus; + + pci_bus_range(bus, &min_bus, &max_bus); + + /* Type */ + build_append_int_noprefix(blob, 1 /* PCI range */, 1); + /* Reserved */ + build_append_int_noprefix(blob, 0, 1); + /* Length */ + build_append_int_noprefix(blob, 24, 2); + /* Endpoint start */ + build_append_int_noprefix(blob, PCI_BUILD_BDF(min_bus, 0), 4); + /* PCI Segment start */ + build_append_int_noprefix(blob, 0, 2); + /* PCI Segment end */ + build_append_int_noprefix(blob, 0, 2); + /* PCI BDF start */ + build_append_int_noprefix(blob, PCI_BUILD_BDF(min_bus, 0), 2); + /* PCI BDF end */ + build_append_int_noprefix(blob, PCI_BUILD_BDF(max_bus, 0xff), 2); + /* Output node */ + build_append_int_noprefix(blob, pci_ranges->output_node, 2); + /* Reserved */ + build_append_int_noprefix(blob, 0, 6); + + pci_ranges->count++; + } + } + + return 0; +} + +/* + * Generate a VIOT table with one PCI-based virtio-iommu that manages PCI + * endpoints. + * + * Defined in the ACPI Specification (Version TBD) + */ +void build_viot(MachineState *ms, GArray *table_data, BIOSLinker *linker, + uint16_t virtio_iommu_bdf, const char *oem_id, + const char *oem_table_id) +{ + /* The virtio-iommu node follows the 48-bytes header */ + int viommu_off = 48; + AcpiTable table = { .sig = "VIOT", .rev = 0, + .oem_id = oem_id, .oem_table_id = oem_table_id }; + struct viot_pci_ranges pci_ranges = { + .output_node = viommu_off, + .blob = g_array_new(false, true /* clear */, 1), + }; + + /* Build the list of PCI ranges that this viommu manages */ + object_child_foreach_recursive(OBJECT(ms), build_pci_range_node, + &pci_ranges); + + /* ACPI table header */ + acpi_table_begin(&table, table_data); + /* Node count */ + build_append_int_noprefix(table_data, pci_ranges.count + 1, 2); + /* Node offset */ + build_append_int_noprefix(table_data, viommu_off, 2); + /* Reserved */ + build_append_int_noprefix(table_data, 0, 8); + + /* Virtio-iommu node */ + /* Type */ + build_append_int_noprefix(table_data, 3 /* virtio-pci IOMMU */, 1); + /* Reserved */ + build_append_int_noprefix(table_data, 0, 1); + /* Length */ + build_append_int_noprefix(table_data, 16, 2); + /* PCI Segment */ + build_append_int_noprefix(table_data, 0, 2); + /* PCI BDF number */ + build_append_int_noprefix(table_data, virtio_iommu_bdf, 2); + /* Reserved */ + build_append_int_noprefix(table_data, 0, 8); + + /* PCI ranges found above */ + g_array_append_vals(table_data, pci_ranges.blob->data, + pci_ranges.blob->len); + g_array_free(pci_ranges.blob, true); + + acpi_table_end(linker, &table); +} + diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig index 3b5e118c54..622b0b50b7 100644 --- a/hw/acpi/Kconfig +++ b/hw/acpi/Kconfig @@ -51,6 +51,10 @@ config ACPI_VMGENID default y depends on PC +config ACPI_VIOT + bool + depends on ACPI + config ACPI_HW_REDUCED bool select ACPI diff --git a/hw/acpi/meson.build b/hw/acpi/meson.build index 7d8c0eb43e..adf6347bc4 100644 --- a/hw/acpi/meson.build +++ b/hw/acpi/meson.build @@ -20,6 +20,7 @@ acpi_ss.add(when: 'CONFIG_ACPI_APEI', if_true: files('ghes.c'), if_false: files( acpi_ss.add(when: 'CONFIG_ACPI_PIIX4', if_true: files('piix4.c')) acpi_ss.add(when: 'CONFIG_ACPI_PCIHP', if_true: files('pcihp.c')) acpi_ss.add(when: 'CONFIG_ACPI_PCIHP', if_false: files('acpi-pci-hotplug-stub.c')) +acpi_ss.add(when: 'CONFIG_ACPI_VIOT', if_true: files('viot.c')) acpi_ss.add(when: 'CONFIG_ACPI_X86_ICH', if_true: files('ich9.c', 'tco.c')) acpi_ss.add(when: 'CONFIG_IPMI', if_true: files('ipmi.c'), if_false: files('ipmi-stub.c')) acpi_ss.add(when: 'CONFIG_PC', if_false: files('acpi-x86-stub.c')) From patchwork Wed Oct 20 17:27:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 12572811 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48D15C433EF for ; Wed, 20 Oct 2021 17:37:11 +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 CD01461038 for ; Wed, 20 Oct 2021 17:37:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CD01461038 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:38446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdFWX-0007w9-Pr for qemu-devel@archiver.kernel.org; Wed, 20 Oct 2021 13:37:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37382) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdFUW-00051i-Ee for qemu-devel@nongnu.org; Wed, 20 Oct 2021 13:35:04 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:37503) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdFUS-0002X0-DY for qemu-devel@nongnu.org; Wed, 20 Oct 2021 13:35:04 -0400 Received: by mail-wr1-x429.google.com with SMTP id e12so58283wra.4 for ; Wed, 20 Oct 2021 10:34:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=i19WYEt+XB11rUrQQOBD1fOttTO4Ul1mLLVvAi2QvL0=; b=Oqel96G8KkMs+V7uijvFVKlNu1aAI7tWMVk4ngzBBJGugNrbTAFYNvr5K90O/XOa4g TfG/1REB07tikL1t5f1iUoFPIO4Zi6031P0NEogqtmtjqlEAePTXAhT4psk95NtfTUad S3KGk8YJgNgwjIcpIzKYnFrE52vQcaHRr/xoGUWYpeVopul2zKACocy/Zp8fm9TTyRw3 kXNXW8oMJ8xoeRg+OlN+kudVXGl52ZsWuRX1y4d2JeSuHU9Ofy77NNrikMBiUM1KfyO9 1Rhie/kGkTgnD+61LRujP+ZKkU6Wie7RXNWROBgyJ/1x7XKXssD85qTR0I/SegZyjhBt 1iwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=i19WYEt+XB11rUrQQOBD1fOttTO4Ul1mLLVvAi2QvL0=; b=cfawQEqgGkhkR3u8icZSoZuEKZ+TGdKftm4igbz3xJoKDtSaOEIkHax5ryqLJ7VJ8X +icFwhJwSHO8JVXbdy4j1CWRRH3T4d0HGZzUr40wK89nufRswMuotZxYISjxRu96mGz+ xUelt83PczSgx6YkfBS9TfTHP3jLhKNzBC4omCj904Di05YmP7Sw+JQLA4QlkJSdtS9r Ul/yTZnr311RR9Qk6QRUtQOq9mxwbmVSee6REFYZ7Gpr8jxj907Cj4Ip6Bx1aCRPmi4B H/qCTHQ3MyeM/NJc5wLC+xHTjK/ihZQHfHhpBgY+MEvjYG47dBIe2wAjTvwKNFtUopCg qr4g== X-Gm-Message-State: AOAM531wmRVYE1K64/c1NdiJlmbiZQOOVSeFWlKGZBuMiFZCWVIJsTlX CNvq5rFd00MSXwhV4G88W9V88Q== X-Google-Smtp-Source: ABdhPJy3b4NnZeTtmN6ks1IA2aJh3lvjJT5U66J6hhw83f0E0XRIalVqPY7922Mv7bCpz0ygpAry5g== X-Received: by 2002:adf:bc12:: with SMTP id s18mr756123wrg.328.1634751298973; Wed, 20 Oct 2021 10:34:58 -0700 (PDT) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id n7sm2662270wrp.17.2021.10.20.10.34.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 10:34:58 -0700 (PDT) From: Jean-Philippe Brucker To: mst@redhat.com, imammedo@redhat.com, peter.maydell@linaro.org Subject: [PATCH v5 02/12] hw/i386/pc: Remove x86_iommu_get_type() Date: Wed, 20 Oct 2021 18:27:36 +0100 Message-Id: <20211020172745.620101-3-jean-philippe@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211020172745.620101-1-jean-philippe@linaro.org> References: <20211020172745.620101-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=jean-philippe@linaro.org; helo=mail-wr1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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: Jean-Philippe Brucker , ehabkost@redhat.com, eric.auger@redhat.com, jasowang@redhat.com, richard.henderson@linaro.org, qemu-devel@nongnu.org, peterx@redhat.com, shannon.zhaosl@gmail.com, qemu-arm@nongnu.org, ani@anisinha.ca, pbonzini@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" To generate the IOMMU ACPI table, acpi-build.c can use base QEMU types instead of a special IommuType value. Signed-off-by: Jean-Philippe Brucker Reviewed-by: Eric Auger Reviewed-by: Igor Mammedov --- include/hw/i386/x86-iommu.h | 12 ------------ hw/i386/acpi-build.c | 20 +++++++++----------- hw/i386/amd_iommu.c | 2 -- hw/i386/intel_iommu.c | 3 --- hw/i386/x86-iommu-stub.c | 5 ----- hw/i386/x86-iommu.c | 5 ----- 6 files changed, 9 insertions(+), 38 deletions(-) diff --git a/include/hw/i386/x86-iommu.h b/include/hw/i386/x86-iommu.h index 9de92d33a1..5ba0c056d6 100644 --- a/include/hw/i386/x86-iommu.h +++ b/include/hw/i386/x86-iommu.h @@ -33,12 +33,6 @@ OBJECT_DECLARE_TYPE(X86IOMMUState, X86IOMMUClass, X86_IOMMU_DEVICE) typedef struct X86IOMMUIrq X86IOMMUIrq; typedef struct X86IOMMU_MSIMessage X86IOMMU_MSIMessage; -typedef enum IommuType { - TYPE_INTEL, - TYPE_AMD, - TYPE_NONE -} IommuType; - struct X86IOMMUClass { SysBusDeviceClass parent; /* Intel/AMD specific realize() hook */ @@ -71,7 +65,6 @@ struct X86IOMMUState { OnOffAuto intr_supported; /* Whether vIOMMU supports IR */ bool dt_supported; /* Whether vIOMMU supports DT */ bool pt_supported; /* Whether vIOMMU supports pass-through */ - IommuType type; /* IOMMU type - AMD/Intel */ QLIST_HEAD(, IEC_Notifier) iec_notifiers; /* IEC notify list */ }; @@ -140,11 +133,6 @@ struct X86IOMMU_MSIMessage { */ X86IOMMUState *x86_iommu_get_default(void); -/* - * x86_iommu_get_type - get IOMMU type - */ -IommuType x86_iommu_get_type(void); - /** * x86_iommu_iec_register_notifier - register IEC (Interrupt Entry * Cache) notifiers diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 81418b7911..ab49e799ff 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2488,6 +2488,7 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) PCMachineState *pcms = PC_MACHINE(machine); PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms); X86MachineState *x86ms = X86_MACHINE(machine); + X86IOMMUState *iommu = x86_iommu_get_default(); GArray *table_offsets; unsigned facs, dsdt, rsdt, fadt; AcpiPmInfo pm; @@ -2604,17 +2605,14 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) build_mcfg(tables_blob, tables->linker, &mcfg, x86ms->oem_id, x86ms->oem_table_id); } - if (x86_iommu_get_default()) { - IommuType IOMMUType = x86_iommu_get_type(); - if (IOMMUType == TYPE_AMD) { - acpi_add_table(table_offsets, tables_blob); - build_amd_iommu(tables_blob, tables->linker, x86ms->oem_id, - x86ms->oem_table_id); - } else if (IOMMUType == TYPE_INTEL) { - acpi_add_table(table_offsets, tables_blob); - build_dmar_q35(tables_blob, tables->linker, x86ms->oem_id, - x86ms->oem_table_id); - } + if (object_dynamic_cast(OBJECT(iommu), TYPE_AMD_IOMMU_DEVICE)) { + acpi_add_table(table_offsets, tables_blob); + build_amd_iommu(tables_blob, tables->linker, x86ms->oem_id, + x86ms->oem_table_id); + } else if (object_dynamic_cast(OBJECT(iommu), TYPE_INTEL_IOMMU_DEVICE)) { + acpi_add_table(table_offsets, tables_blob); + build_dmar_q35(tables_blob, tables->linker, x86ms->oem_id, + x86ms->oem_table_id); } if (machine->nvdimms_state->is_enabled) { nvdimm_build_acpi(table_offsets, tables_blob, tables->linker, diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c index 9242a0d3ed..91fe34ae58 100644 --- a/hw/i386/amd_iommu.c +++ b/hw/i386/amd_iommu.c @@ -1538,7 +1538,6 @@ static void amdvi_sysbus_realize(DeviceState *dev, Error **errp) { int ret = 0; AMDVIState *s = AMD_IOMMU_DEVICE(dev); - X86IOMMUState *x86_iommu = X86_IOMMU_DEVICE(dev); MachineState *ms = MACHINE(qdev_get_machine()); PCMachineState *pcms = PC_MACHINE(ms); X86MachineState *x86ms = X86_MACHINE(ms); @@ -1548,7 +1547,6 @@ static void amdvi_sysbus_realize(DeviceState *dev, Error **errp) amdvi_uint64_equal, g_free, g_free); /* This device should take care of IOMMU PCI properties */ - x86_iommu->type = TYPE_AMD; if (!qdev_realize(DEVICE(&s->pci), &bus->qbus, errp)) { return; } diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 75f075547f..c27b20090e 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -3806,9 +3806,6 @@ static void vtd_realize(DeviceState *dev, Error **errp) X86MachineState *x86ms = X86_MACHINE(ms); PCIBus *bus = pcms->bus; IntelIOMMUState *s = INTEL_IOMMU_DEVICE(dev); - X86IOMMUState *x86_iommu = X86_IOMMU_DEVICE(dev); - - x86_iommu->type = TYPE_INTEL; if (!vtd_decide_config(s, errp)) { return; diff --git a/hw/i386/x86-iommu-stub.c b/hw/i386/x86-iommu-stub.c index c5ba077f9d..781b5ff922 100644 --- a/hw/i386/x86-iommu-stub.c +++ b/hw/i386/x86-iommu-stub.c @@ -36,8 +36,3 @@ bool x86_iommu_ir_supported(X86IOMMUState *s) { return false; } - -IommuType x86_iommu_get_type(void) -{ - abort(); -} diff --git a/hw/i386/x86-iommu.c b/hw/i386/x86-iommu.c index 86ad03972e..dc968c7a53 100644 --- a/hw/i386/x86-iommu.c +++ b/hw/i386/x86-iommu.c @@ -98,11 +98,6 @@ X86IOMMUState *x86_iommu_get_default(void) return x86_iommu_default; } -IommuType x86_iommu_get_type(void) -{ - return x86_iommu_default->type; -} - static void x86_iommu_realize(DeviceState *dev, Error **errp) { X86IOMMUState *x86_iommu = X86_IOMMU_DEVICE(dev); From patchwork Wed Oct 20 17:27:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 12572835 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DDC90C433EF for ; Wed, 20 Oct 2021 17:39: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 82352610EA for ; Wed, 20 Oct 2021 17:39:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 82352610EA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:41866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdFYd-0001nQ-MB for qemu-devel@archiver.kernel.org; Wed, 20 Oct 2021 13:39:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37452) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdFUY-00057t-RV for qemu-devel@nongnu.org; Wed, 20 Oct 2021 13:35:06 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:35589) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdFUT-0002Yf-It for qemu-devel@nongnu.org; Wed, 20 Oct 2021 13:35:06 -0400 Received: by mail-wr1-x435.google.com with SMTP id g25so52571wrb.2 for ; Wed, 20 Oct 2021 10:35:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qeaTmZSDk/Gw7IgtRc4USWfswVE7NvHNqpapepv6UO4=; b=L2lvwXsGp+FffPLBsPgpobooIKbidC+J2dOMz8A6yueX03txkArQmRqAPWl6riO/19 qweE33iL6UCcpMXZ/HCxgpzTy0WwFaVtI0iTTbyBs28ytX5IUEHC9i4OTZctyJNF1QNu JysqX44fgmSAhxr+44bLZr1NGpWyRhcuWRNtkccNCKhQztzIEVP1VwFi1yADezeMCXD9 ndg0H+hyRF9D17kX3GPu9+9TWHvhWXckYqmQQnlHDjoFG/tQInXfdAxHkOelheUpycD2 I/cNzU0I4Qy6VM9kbZFwTzGc9QzxO58vJANkxMtrfjCGCRlDAd68VlbzOZfZr6QLwaEb /Lvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qeaTmZSDk/Gw7IgtRc4USWfswVE7NvHNqpapepv6UO4=; b=ASoq91fUOwb4L9T++9WVllrBAxl57vWM/VLjAuBtbF2189KewttTchNb8BTl/ZjyZa qQJZV+ZlxYzYHAp1xK9aEG26/k2nKs3ZZsxv8jl1BJJkkTMNnyV7XS12SMCCjv+QAcv3 H9QJUA/B/Czuq07BGYPRFFJVlyHdXFKZ+C41qIUygOHKzDdOES0sVXeHqCHBnUiqBeaU +Uh4C8xnFMJgFMYJb4z4CNA0r+hSf/dOwYdjerf+a/nCNOW5R561a0ULmtMqNydIdzGt be7fgHgqteYgnki7J4uGH3cKucaVvU2unk9gPvrYJqc1X0CTX7pF8UUvmnv2fZ5IvOko 1ZQQ== X-Gm-Message-State: AOAM533wfFeeENn919T2ULGwb2bx8l09tR8ELKjQ2JG3J3RPafCxvRVC SM1JqXuQ1PDqSPUU3b30VUHH5Q== X-Google-Smtp-Source: ABdhPJyuE76TIixsrHaVaxZQt8I0E+WrRqQ/Kvp/r6JKs8cKCpYo+w+gFFmT8uKg99xQKQTn1g46tg== X-Received: by 2002:adf:97d0:: with SMTP id t16mr750146wrb.124.1634751300066; Wed, 20 Oct 2021 10:35:00 -0700 (PDT) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id n7sm2662270wrp.17.2021.10.20.10.34.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 10:34:59 -0700 (PDT) From: Jean-Philippe Brucker To: mst@redhat.com, imammedo@redhat.com, peter.maydell@linaro.org Subject: [PATCH v5 03/12] hw/i386/pc: Move IOMMU singleton into PCMachineState Date: Wed, 20 Oct 2021 18:27:37 +0100 Message-Id: <20211020172745.620101-4-jean-philippe@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211020172745.620101-1-jean-philippe@linaro.org> References: <20211020172745.620101-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=jean-philippe@linaro.org; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: Jean-Philippe Brucker , ehabkost@redhat.com, eric.auger@redhat.com, jasowang@redhat.com, richard.henderson@linaro.org, qemu-devel@nongnu.org, peterx@redhat.com, shannon.zhaosl@gmail.com, qemu-arm@nongnu.org, ani@anisinha.ca, pbonzini@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" We're about to support a third vIOMMU for x86, virtio-iommu which doesn't inherit X86IOMMUState. Move the IOMMU singleton into PCMachineState, so it can be shared between all three vIOMMUs. The x86_iommu_get_default() helper is still needed by KVM and IOAPIC to fetch the default IRQ-remapping IOMMU. Since virtio-iommu doesn't support IRQ remapping, this interface doesn't need to change for the moment. We could later replace X86IOMMUState with an "IRQ remapping IOMMU" interface if necessary. Signed-off-by: Jean-Philippe Brucker Reviewed-by: Eric Auger Reviewed-by: Igor Mammedov --- include/hw/i386/pc.h | 1 + hw/i386/pc.c | 12 +++++++++++- hw/i386/x86-iommu.c | 26 ++++++++------------------ 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 11426e26dc..b72e5bf9d1 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -35,6 +35,7 @@ typedef struct PCMachineState { I2CBus *smbus; PFlashCFI01 *flash[2]; ISADevice *pcspk; + DeviceState *iommu; /* Configuration options: */ uint64_t max_ram_below_4g; diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 54e4c00dce..fcbf328e8d 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1330,6 +1330,15 @@ static void pc_machine_device_pre_plug_cb(HotplugHandler *hotplug_dev, } else if (object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_PMEM_PCI) || object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_MEM_PCI)) { pc_virtio_md_pci_pre_plug(hotplug_dev, dev, errp); + } else if (object_dynamic_cast(OBJECT(dev), TYPE_X86_IOMMU_DEVICE)) { + PCMachineState *pcms = PC_MACHINE(hotplug_dev); + + if (pcms->iommu) { + error_setg(errp, "QEMU does not support multiple vIOMMUs " + "for x86 yet."); + return; + } + pcms->iommu = dev; } } @@ -1384,7 +1393,8 @@ static HotplugHandler *pc_get_hotplug_handler(MachineState *machine, if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM) || object_dynamic_cast(OBJECT(dev), TYPE_CPU) || object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_PMEM_PCI) || - object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_MEM_PCI)) { + object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_MEM_PCI) || + object_dynamic_cast(OBJECT(dev), TYPE_X86_IOMMU_DEVICE)) { return HOTPLUG_HANDLER(machine); } diff --git a/hw/i386/x86-iommu.c b/hw/i386/x86-iommu.c index dc968c7a53..01d11325a6 100644 --- a/hw/i386/x86-iommu.c +++ b/hw/i386/x86-iommu.c @@ -77,25 +77,17 @@ void x86_iommu_irq_to_msi_message(X86IOMMUIrq *irq, MSIMessage *msg_out) msg_out->data = msg.msi_data; } -/* Default X86 IOMMU device */ -static X86IOMMUState *x86_iommu_default = NULL; - -static void x86_iommu_set_default(X86IOMMUState *x86_iommu) +X86IOMMUState *x86_iommu_get_default(void) { - assert(x86_iommu); + MachineState *ms = MACHINE(qdev_get_machine()); + PCMachineState *pcms = + PC_MACHINE(object_dynamic_cast(OBJECT(ms), TYPE_PC_MACHINE)); - if (x86_iommu_default) { - error_report("QEMU does not support multiple vIOMMUs " - "for x86 yet."); - exit(1); + if (pcms && + object_dynamic_cast(OBJECT(pcms->iommu), TYPE_X86_IOMMU_DEVICE)) { + return X86_IOMMU_DEVICE(pcms->iommu); } - - x86_iommu_default = x86_iommu; -} - -X86IOMMUState *x86_iommu_get_default(void) -{ - return x86_iommu_default; + return NULL; } static void x86_iommu_realize(DeviceState *dev, Error **errp) @@ -131,8 +123,6 @@ static void x86_iommu_realize(DeviceState *dev, Error **errp) if (x86_class->realize) { x86_class->realize(dev, errp); } - - x86_iommu_set_default(X86_IOMMU_DEVICE(dev)); } static Property x86_iommu_properties[] = { From patchwork Wed Oct 20 17:27:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 12572837 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FF8CC433F5 for ; Wed, 20 Oct 2021 17:42:46 +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 9A221611C7 for ; Wed, 20 Oct 2021 17:42:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9A221611C7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:46992 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdFbw-0005IE-Lz for qemu-devel@archiver.kernel.org; Wed, 20 Oct 2021 13:42:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37408) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdFUX-00054F-Fh for qemu-devel@nongnu.org; Wed, 20 Oct 2021 13:35:05 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:38755) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdFUU-0002ZX-El for qemu-devel@nongnu.org; Wed, 20 Oct 2021 13:35:05 -0400 Received: by mail-wr1-x431.google.com with SMTP id u18so27196wrg.5 for ; Wed, 20 Oct 2021 10:35:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=v0Q7UmquKNnlNjJfzVAqtJId7snjF4fwvfjyxqNqrCM=; b=WuM9ItxjRNslon9TCgB2tPO03npX3Jx4ovnWK1CKkuvR9/gF+9HxFRmArRBtJiCVwF rsHZU5L+TVXtqfXvh66vbSUd0BMzVmFHp73vytsGuE+54u+TEIZ02z9hrKNEL1H/Gxce 8zM5ROZTtHlHdbZ3Ipn7hAkdJhHu8F9RthwNJtal3ncIXWc9LnDm5DYNWapizoJS+EMr IvMFhxpl8+52eAAYZS6YGYneq0sD+Pm61gxhE7RB7a1gIxDmHLqZDdUtlyMOl9Pxy/MH YwbC5upb8YYLhRtbFwRO1vsST/CNceCf7OWT/+pbpKTSDpuSeoElXG25C4n0752M0yR1 9E3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=v0Q7UmquKNnlNjJfzVAqtJId7snjF4fwvfjyxqNqrCM=; b=pnV9gzN17aMYvwluTwjZruuLRDidL1h7ikch9+JSEJwrkfZEctNFjjIhEWTB+u5dkO RekbaQet0sl/3gM5yKW2Nd0AhIkJv1nEFjPztha2UJhqOr1md8gX2Bmu4K/GGPqX1DFE V8UGu46iw5ZCBplR2zqlFZomefCcH+ovyIrCr54/m7Wn7ESiJGenaymfkZvUGfmW0zH5 ta+kAnEnZ3Qhao483UjAB5i10BIIhjQ4PjR04FWrE+Jwb2+SEfXbZZDYkDxNTRuhgErP sX9VFOzodLgcOli0emc0M4RHrvly76i/FtYmrCoiJBI35AqBQ8STGlpjHLGNb2KA3sPU 9m8w== X-Gm-Message-State: AOAM532VVSmRBwn08wQ3GCR9HUu2IyrpPZfnS+thmsWnmBZxNjl3qdXP 01dy+zVZ857r2ZHy81IixyEOeg== X-Google-Smtp-Source: ABdhPJx5sIPAGQ59+Q+GbmSQHVecQoEqeTUgwA8qycjGz/yX87S+a4miMFHpBwy+8aiXOR8VBOqjzQ== X-Received: by 2002:adf:bd91:: with SMTP id l17mr679556wrh.261.1634751301187; Wed, 20 Oct 2021 10:35:01 -0700 (PDT) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id n7sm2662270wrp.17.2021.10.20.10.35.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 10:35:00 -0700 (PDT) From: Jean-Philippe Brucker To: mst@redhat.com, imammedo@redhat.com, peter.maydell@linaro.org Subject: [PATCH v5 04/12] hw/i386/pc: Allow instantiating a virtio-iommu device Date: Wed, 20 Oct 2021 18:27:38 +0100 Message-Id: <20211020172745.620101-5-jean-philippe@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211020172745.620101-1-jean-philippe@linaro.org> References: <20211020172745.620101-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=jean-philippe@linaro.org; helo=mail-wr1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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: Jean-Philippe Brucker , ehabkost@redhat.com, eric.auger@redhat.com, jasowang@redhat.com, richard.henderson@linaro.org, qemu-devel@nongnu.org, peterx@redhat.com, shannon.zhaosl@gmail.com, qemu-arm@nongnu.org, ani@anisinha.ca, pbonzini@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Allow instantiating a virtio-iommu device by adding an ACPI Virtual I/O Translation table (VIOT), which describes the relation between the virtio-iommu and the endpoints it manages. Add a hotplug handler for virtio-iommu on x86 and set the necessary reserved region property. On x86, the [0xfee00000, 0xfeefffff] DMA region is reserved for MSIs. DMA transactions to this range either trigger IRQ remapping in the IOMMU or bypasses IOMMU translation. Although virtio-iommu does not support IRQ remapping it must be informed of the reserved region so that it can forward DMA transactions targeting this region. Reviewed-by: Eric Auger Tested-by: Eric Auger Signed-off-by: Jean-Philippe Brucker Reviewed-by: Igor Mammedov --- hw/i386/acpi-build.c | 10 +++++++++- hw/i386/pc.c | 16 +++++++++++++++- hw/i386/Kconfig | 1 + 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index ab49e799ff..3ca6cc8118 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -68,9 +68,11 @@ #include "qom/qom-qobject.h" #include "hw/i386/amd_iommu.h" #include "hw/i386/intel_iommu.h" +#include "hw/virtio/virtio-iommu.h" #include "hw/acpi/ipmi.h" #include "hw/acpi/hmat.h" +#include "hw/acpi/viot.h" /* These are used to size the ACPI tables for -M pc-i440fx-1.7 and * -M pc-i440fx-2.0. Even if the actual amount of AML generated grows @@ -2488,7 +2490,7 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) PCMachineState *pcms = PC_MACHINE(machine); PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms); X86MachineState *x86ms = X86_MACHINE(machine); - X86IOMMUState *iommu = x86_iommu_get_default(); + DeviceState *iommu = pcms->iommu; GArray *table_offsets; unsigned facs, dsdt, rsdt, fadt; AcpiPmInfo pm; @@ -2613,6 +2615,12 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) acpi_add_table(table_offsets, tables_blob); build_dmar_q35(tables_blob, tables->linker, x86ms->oem_id, x86ms->oem_table_id); + } else if (object_dynamic_cast(OBJECT(iommu), TYPE_VIRTIO_IOMMU_PCI)) { + PCIDevice *pdev = PCI_DEVICE(iommu); + + acpi_add_table(table_offsets, tables_blob); + build_viot(machine, tables_blob, tables->linker, pci_get_bdf(pdev), + x86ms->oem_id, x86ms->oem_table_id); } if (machine->nvdimms_state->is_enabled) { nvdimm_build_acpi(table_offsets, tables_blob, tables->linker, diff --git a/hw/i386/pc.c b/hw/i386/pc.c index fcbf328e8d..f47f7866c7 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -83,6 +83,7 @@ #include "hw/i386/intel_iommu.h" #include "hw/net/ne2000-isa.h" #include "standard-headers/asm-x86/bootparam.h" +#include "hw/virtio/virtio-iommu.h" #include "hw/virtio/virtio-pmem-pci.h" #include "hw/virtio/virtio-mem-pci.h" #include "hw/mem/memory-device.h" @@ -1330,7 +1331,19 @@ static void pc_machine_device_pre_plug_cb(HotplugHandler *hotplug_dev, } else if (object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_PMEM_PCI) || object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_MEM_PCI)) { pc_virtio_md_pci_pre_plug(hotplug_dev, dev, errp); - } else if (object_dynamic_cast(OBJECT(dev), TYPE_X86_IOMMU_DEVICE)) { + } else if (object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_IOMMU_PCI)) { + /* Declare the APIC range as the reserved MSI region */ + char *resv_prop_str = g_strdup_printf("0xfee00000:0xfeefffff:%d", + VIRTIO_IOMMU_RESV_MEM_T_MSI); + + object_property_set_uint(OBJECT(dev), "len-reserved-regions", 1, errp); + object_property_set_str(OBJECT(dev), "reserved-regions[0]", + resv_prop_str, errp); + g_free(resv_prop_str); + } + + if (object_dynamic_cast(OBJECT(dev), TYPE_X86_IOMMU_DEVICE) || + object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_IOMMU_PCI)) { PCMachineState *pcms = PC_MACHINE(hotplug_dev); if (pcms->iommu) { @@ -1394,6 +1407,7 @@ static HotplugHandler *pc_get_hotplug_handler(MachineState *machine, object_dynamic_cast(OBJECT(dev), TYPE_CPU) || object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_PMEM_PCI) || object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_MEM_PCI) || + object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_IOMMU_PCI) || object_dynamic_cast(OBJECT(dev), TYPE_X86_IOMMU_DEVICE)) { return HOTPLUG_HANDLER(machine); } diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig index 962d2c981b..d22ac4a4b9 100644 --- a/hw/i386/Kconfig +++ b/hw/i386/Kconfig @@ -59,6 +59,7 @@ config PC_ACPI select ACPI_X86 select ACPI_CPU_HOTPLUG select ACPI_MEMORY_HOTPLUG + select ACPI_VIOT select SMBUS_EEPROM select PFLASH_CFI01 depends on ACPI_SMBUS From patchwork Wed Oct 20 17:27:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 12572851 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE91CC433EF for ; Wed, 20 Oct 2021 17:43:11 +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 72B90611C7 for ; Wed, 20 Oct 2021 17:43:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 72B90611C7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:48996 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdFcM-0006dK-In for qemu-devel@archiver.kernel.org; Wed, 20 Oct 2021 13:43:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdFUY-00056X-Dz for qemu-devel@nongnu.org; Wed, 20 Oct 2021 13:35:06 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:44685) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdFUV-0002am-Va for qemu-devel@nongnu.org; Wed, 20 Oct 2021 13:35:06 -0400 Received: by mail-wr1-x429.google.com with SMTP id e3so48178359wrc.11 for ; Wed, 20 Oct 2021 10:35:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4N3flSOS4BQcPNyyp4dLaBJWrxFo0hCjRbw4JO7PSy8=; b=p1mL79IQiyQIXVPk4QALNMpR0xOtxQbdYa6kTvYewTTK0eI/63MM6MeB/GErGZgV/X NmMIJXP3rAkkev+dSZ9aD6V3JhLqx0kxAnaLCh5SRAYlRoqvtWxO13lMq7l6IoKSzfIa WAH0uBkKMuLalXt0PvRizne0Bribpl267SfgR02rodsPsFGGa1c+NSxM2RP1q8fiqBF2 i1d7uuVO2xZ5RzJx7rLMgt2ZbXmSxxxv94zcQRVPAVh3eMbe2vK70P25jowzzHdnCWKb vAoNzVCrwkjfC0AM4qrzQbuPJeJr5d2SCdyON7TcxsvDkLUrFs/hXFuYWEFzBo51v8qm b6xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4N3flSOS4BQcPNyyp4dLaBJWrxFo0hCjRbw4JO7PSy8=; b=2hrMVsf6IuHDZYFI0WtXaYe5DZBL0NkulSv+vDHauwn8LmP2lRFl2B3oiP2oux+cOe JyGoZiDgjCKz94ar0TodNNh05uKIfNAOD3lJiG6pbz5LNyyq3zK8gZrkJV71vNiyqrvG nFUd1h3TXYlYzE9KHFUK1I2+8DLxsQaW2Ap6YKkqs+HCAE/1Wt1jB+J4n7IY4gmG+L5X Dmxv08C7GUO0O5+JjvbwEbet/M7Y0lrKDIybzEf8esZzDt2r3xQrfhP1Q5kn9UnficBH XQXKyuIVkDaHA4DuzuYR49jlNvjUEQF8Si9GW/ugPy7yNa+fkXhwM2iLDSOMELdZO6tX h2Lg== X-Gm-Message-State: AOAM530iHHkglMX8Gq/zYYqhMuNZLUYw36VlUgj5xieV0MrkzSqKutA5 1/8eAPhrGTEm+3sVJRBQQLSB7Q== X-Google-Smtp-Source: ABdhPJz263HY/l5KeV1maebJ+m3qaCTqExPSm/n1XiKdc/t+c6CWdavHABSr5+1QJxmWYCS3xguoOg== X-Received: by 2002:adf:a38d:: with SMTP id l13mr697294wrb.103.1634751302517; Wed, 20 Oct 2021 10:35:02 -0700 (PDT) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id n7sm2662270wrp.17.2021.10.20.10.35.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 10:35:01 -0700 (PDT) From: Jean-Philippe Brucker To: mst@redhat.com, imammedo@redhat.com, peter.maydell@linaro.org Subject: [PATCH v5 05/12] hw/arm/virt-acpi-build: Add VIOT table for virtio-iommu Date: Wed, 20 Oct 2021 18:27:39 +0100 Message-Id: <20211020172745.620101-6-jean-philippe@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211020172745.620101-1-jean-philippe@linaro.org> References: <20211020172745.620101-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=jean-philippe@linaro.org; helo=mail-wr1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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: Jean-Philippe Brucker , ehabkost@redhat.com, eric.auger@redhat.com, jasowang@redhat.com, richard.henderson@linaro.org, qemu-devel@nongnu.org, peterx@redhat.com, shannon.zhaosl@gmail.com, qemu-arm@nongnu.org, ani@anisinha.ca, pbonzini@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" When a virtio-iommu is instantiated, describe it using the ACPI VIOT table. Reviewed-by: Eric Auger Signed-off-by: Jean-Philippe Brucker Acked-by: Igor Mammedov --- hw/arm/virt-acpi-build.c | 7 +++++++ hw/arm/Kconfig | 1 + 2 files changed, 8 insertions(+) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 6cec97352b..e26639e1e1 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -55,6 +55,7 @@ #include "kvm_arm.h" #include "migration/vmstate.h" #include "hw/acpi/ghes.h" +#include "hw/acpi/viot.h" #define ARM_SPI_BASE 32 @@ -934,6 +935,12 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables) } #endif + if (vms->iommu == VIRT_IOMMU_VIRTIO) { + acpi_add_table(table_offsets, tables_blob); + build_viot(ms, tables_blob, tables->linker, vms->virtio_iommu_bdf, + vms->oem_id, vms->oem_table_id); + } + /* XSDT is pointed to by RSDP */ xsdt = tables_blob->len; build_xsdt(tables_blob, tables->linker, table_offsets, vms->oem_id, diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index 2d37d29f02..e652590943 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@ -27,6 +27,7 @@ config ARM_VIRT select DIMM select ACPI_HW_REDUCED select ACPI_APEI + select ACPI_VIOT config CHEETAH bool From patchwork Wed Oct 20 17:27:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 12572813 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B737CC433FE for ; Wed, 20 Oct 2021 17:37:13 +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 85057600EF for ; Wed, 20 Oct 2021 17:37:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 85057600EF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:38736 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdFWa-00087d-HN for qemu-devel@archiver.kernel.org; Wed, 20 Oct 2021 13:37:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdFUZ-00058s-BN for qemu-devel@nongnu.org; Wed, 20 Oct 2021 13:35:07 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:37508) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdFUX-0002cG-8j for qemu-devel@nongnu.org; Wed, 20 Oct 2021 13:35:07 -0400 Received: by mail-wr1-x42d.google.com with SMTP id e12so58606wra.4 for ; Wed, 20 Oct 2021 10:35:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JOvNgK26X/wymWFWaeD3t7rim5VIlCPCs1/Ursd+4V0=; b=qwjl8s3o1f2q3K1oOpPZc9k7QGqhi+1+0Tmuprq6lDL1XG1trhS/0CXtnqSWlV0T80 yOqbQges4GBGe06ADqsGNdqgN5LHeQF8gVLUidp1H9GpPdfGyV2o5gtOfrq6ii9tBlZq p5fBkMneaSALGkqaqn0Bu42Chnewa7vasqGBDNJt9C8uhkhdlj3vFlTrdnkPCI9Ps9Zt IqiDq3hTiSgUBVpRMyQq4DlLFHXbrRzH3xn8fUO51ISheXQRoJ4fwv425nawazbGpFn9 KrRWOOXFcKHE2y0WrLMS7KNDdBIwsNotZDe8OdqBHQLM3+GXRjyN4ervkPLjB9J4UK92 5YRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JOvNgK26X/wymWFWaeD3t7rim5VIlCPCs1/Ursd+4V0=; b=MOyEsyaBnB+XeQ06bGRaCLKu2NUH/bSvNYJujBQxPMg8oyvhrYJZg10Atetf0eJEL4 B/IhizP6CVCOfuE+VIvy0+sNnVeYgMzGhYFkHX9ABwrfXMtG326e4JwOlqJ5AR/aBLUZ LvkX5cVdAoAjzrxScNFmAOTShkfIsXA+/TR7WnnFBXJ29GpMgXXlAJC4yC4vFx65dMxx N16YIOwAMB+U3hUVz0eIn3Q3iUTYLkZMI+ZAjbn/cDuANLZ1+KZ9jkhO1X0/IDwoslRa f3uhxWTpm8wfuB2mfMfvCh6CQp3RnGHBB369FDqV+BjthLJoIHp7NvNY1X2aTYblCs1n 2Xmw== X-Gm-Message-State: AOAM533Fuiw8fyl4ZD6ujgXSxILHbgKwmlWra68l6vuphTKyHMSmCFve HKwEshrj75jlkOIShnQgi8U6UQ== X-Google-Smtp-Source: ABdhPJwwD3ayQcXvCifzKFt1qK5oyw0duVn0gj5W3n4z18Z0twIwrX6dyjafbSKdCeaDCUeknp1xlQ== X-Received: by 2002:adf:d1c2:: with SMTP id b2mr725748wrd.73.1634751303921; Wed, 20 Oct 2021 10:35:03 -0700 (PDT) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id n7sm2662270wrp.17.2021.10.20.10.35.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 10:35:03 -0700 (PDT) From: Jean-Philippe Brucker To: mst@redhat.com, imammedo@redhat.com, peter.maydell@linaro.org Subject: [PATCH v5 06/12] hw/arm/virt: Remove device tree restriction for virtio-iommu Date: Wed, 20 Oct 2021 18:27:40 +0100 Message-Id: <20211020172745.620101-7-jean-philippe@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211020172745.620101-1-jean-philippe@linaro.org> References: <20211020172745.620101-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=jean-philippe@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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: Jean-Philippe Brucker , ehabkost@redhat.com, eric.auger@redhat.com, jasowang@redhat.com, richard.henderson@linaro.org, qemu-devel@nongnu.org, peterx@redhat.com, shannon.zhaosl@gmail.com, qemu-arm@nongnu.org, ani@anisinha.ca, pbonzini@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" virtio-iommu is now supported with ACPI VIOT as well as device tree. Remove the restriction that prevents from instantiating a virtio-iommu device under ACPI. Reviewed-by: Eric Auger Signed-off-by: Jean-Philippe Brucker Acked-by: Igor Mammedov --- hw/arm/virt.c | 10 ++-------- hw/virtio/virtio-iommu-pci.c | 12 ++---------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index f7f456bf58..3da7a86e37 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2561,16 +2561,10 @@ static HotplugHandler *virt_machine_get_hotplug_handler(MachineState *machine, MachineClass *mc = MACHINE_GET_CLASS(machine); if (device_is_dynamic_sysbus(mc, dev) || - (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM))) { + object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM) || + object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_IOMMU_PCI)) { return HOTPLUG_HANDLER(machine); } - if (object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_IOMMU_PCI)) { - VirtMachineState *vms = VIRT_MACHINE(machine); - - if (!vms->bootinfo.firmware_loaded || !virt_is_acpi_enabled(vms)) { - return HOTPLUG_HANDLER(machine); - } - } return NULL; } diff --git a/hw/virtio/virtio-iommu-pci.c b/hw/virtio/virtio-iommu-pci.c index 770c286be7..5c0b87316a 100644 --- a/hw/virtio/virtio-iommu-pci.c +++ b/hw/virtio/virtio-iommu-pci.c @@ -48,16 +48,8 @@ static void virtio_iommu_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp) VirtIOIOMMU *s = VIRTIO_IOMMU(vdev); if (!qdev_get_machine_hotplug_handler(DEVICE(vpci_dev))) { - MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine()); - - error_setg(errp, - "%s machine fails to create iommu-map device tree bindings", - mc->name); - error_append_hint(errp, - "Check your machine implements a hotplug handler " - "for the virtio-iommu-pci device\n"); - error_append_hint(errp, "Check the guest is booted without FW or with " - "-no-acpi\n"); + error_setg(errp, "Check your machine implements a hotplug handler " + "for the virtio-iommu-pci device"); return; } for (int i = 0; i < s->nb_reserved_regions; i++) { From patchwork Wed Oct 20 17:27:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 12572877 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C7E1C433F5 for ; Wed, 20 Oct 2021 17:51:51 +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 324B6611EF for ; Wed, 20 Oct 2021 17:51:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 324B6611EF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:35354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdFkk-0008Hy-6v for qemu-devel@archiver.kernel.org; Wed, 20 Oct 2021 13:51:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37508) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdFUa-0005CD-Ja for qemu-devel@nongnu.org; Wed, 20 Oct 2021 13:35:08 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:46952) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdFUY-0002d8-DG for qemu-devel@nongnu.org; Wed, 20 Oct 2021 13:35:08 -0400 Received: by mail-wr1-x434.google.com with SMTP id k7so39555wrd.13 for ; Wed, 20 Oct 2021 10:35:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=c2ZO3QF7aKiu/qtLjz0/gkgshbB0NhJBsLRiXAH1moU=; b=F5LghO364b6+pB6hJTsifG9M6OQl9putRZaeVKAN+amfgH+H1EiqiyVwoQTM9SWLjU RjzR0tWx8v+3fV+NEWU1sYlTvcoSzWAC3jw7kfuZAGYnnl645u1gqq1R0AkyzyGsWZWL X5qC5cvLVTxvpctmICwWCdDZqGlRi46AxLflTVXJnHdS2jOxyhDX9lAJw5Q/mfwrqkg1 j20KOnjmBSM7n28U2FSUp+mNCCPIUQcoPjmRb6311imXE8WURHAoW7GwV8Fi7RCEfDCZ VJXmJJlSx0t/hElO0So5nUOTSPntvCmhI0tCxLdddBqAB6590QFGgpVLSTRGegJDCP22 2UGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=c2ZO3QF7aKiu/qtLjz0/gkgshbB0NhJBsLRiXAH1moU=; b=RewwKzLvJg8H4O6YsCeJRbg5sysfgub0nCpcwoL4U0ay3x46QhUkijL2XD0XizTi0x JZ0q9Gll8BeI5qZhH9eYADZWBG0ZEkDoFOukBzMBJXs9gfxErE7sZUc9ooOCRcczJCmo +T0BQKOwOl6cRxxx/GA+hPPc23OCL9dckJTcB+VC/Th8qpuE5uf0aZGEaQCc1lhWnT1x 7mgR7RawCqBNwbI3sNZo3l0ctq+E25dsc0DCCkkVniCjng+fvct3sFrO/q/n0qTYHTIH ZzS7jZdMTgNzCwdTIzAzY2oI8ZD2rB+hJU3fafwlsg2cfpkEibhgroYl8WEVfwDijJaR Hzqg== X-Gm-Message-State: AOAM530Wmo77PCFWw5VkSKwLODbmYDILGqVAbbSIkaTfxFqWPxFfTrXo 1v8UVmkGWQ3IhNBTLIb17TxN5A== X-Google-Smtp-Source: ABdhPJzUXaOAxVY7br9Qt/qhdKf+TEwQNcAjQDE0dOv7rnaU/Lvkq9lH8XIbAWc9fo3XkQqMeWsXtA== X-Received: by 2002:a5d:58ca:: with SMTP id o10mr726675wrf.358.1634751305058; Wed, 20 Oct 2021 10:35:05 -0700 (PDT) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id n7sm2662270wrp.17.2021.10.20.10.35.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 10:35:04 -0700 (PDT) From: Jean-Philippe Brucker To: mst@redhat.com, imammedo@redhat.com, peter.maydell@linaro.org Subject: [PATCH v5 07/12] hw/arm/virt: Reject instantiation of multiple IOMMUs Date: Wed, 20 Oct 2021 18:27:41 +0100 Message-Id: <20211020172745.620101-8-jean-philippe@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211020172745.620101-1-jean-philippe@linaro.org> References: <20211020172745.620101-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=jean-philippe@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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: Jean-Philippe Brucker , ehabkost@redhat.com, eric.auger@redhat.com, jasowang@redhat.com, richard.henderson@linaro.org, qemu-devel@nongnu.org, peterx@redhat.com, shannon.zhaosl@gmail.com, qemu-arm@nongnu.org, ani@anisinha.ca, pbonzini@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" We do not support instantiating multiple IOMMUs. Before adding a virtio-iommu, check that no other IOMMU is present. This will detect both "iommu=smmuv3" machine parameter and another virtio-iommu instance. Fixes: 70e89132c9 ("hw/arm/virt: Add the virtio-iommu device tree mappings") Reviewed-by: Eric Auger Reviewed-by: Igor Mammedov Signed-off-by: Jean-Philippe Brucker Reviewed-by: Igor Mammedov --- hw/arm/virt.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 3da7a86e37..25db8d4262 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2441,6 +2441,11 @@ static void virt_machine_device_pre_plug_cb(HotplugHandler *hotplug_dev, hwaddr db_start = 0, db_end = 0; char *resv_prop_str; + if (vms->iommu != VIRT_IOMMU_NONE) { + error_setg(errp, "virt machine does not support multiple IOMMUs"); + return; + } + switch (vms->msi_controller) { case VIRT_MSI_CTRL_NONE: return; From patchwork Wed Oct 20 17:27:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 12572849 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E17FDC433F5 for ; Wed, 20 Oct 2021 17:43: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 7D3AD611C7 for ; Wed, 20 Oct 2021 17:43:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7D3AD611C7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:48368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdFcC-0006EW-Jh for qemu-devel@archiver.kernel.org; Wed, 20 Oct 2021 13:43:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37524) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdFUb-0005FL-HG for qemu-devel@nongnu.org; Wed, 20 Oct 2021 13:35:09 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:37571) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdFUZ-0002eu-P7 for qemu-devel@nongnu.org; Wed, 20 Oct 2021 13:35:09 -0400 Received: by mail-wm1-x333.google.com with SMTP id g79-20020a1c2052000000b00323023159e1so3419162wmg.2 for ; Wed, 20 Oct 2021 10:35:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MQaHeRwjBXtlwH+HWJdlO988bBQFl1PSkeW02oBI2yE=; b=cnvSmzp5Q5I2fhVe8VKQflUG8EBRmB7TnGd+GGy+RlewS6eQFKzYmUXNbh4AxF91Hp 5UT4MA6u6aC7nkqjsvkvVZemBaagF26NqnCjPBjsnNGF8r/7pW1nsfFgaf39t0yOINr/ /k7kMl85EU0lV2wE5s1SeQPesy5JbtnJ2GNmNAZqRCtji+ISFur4/0jdltyQyIU+JKfO H9aUWbvrQXYetFarD+02xCWEPRHy+z/CqFkjrylyC34oDIfc8G8Lt0ZfKa2l2kdeqCRd MLpM3TOnP/8GlM1677chK4nA0pvLSZlJlnyg3TP2LZQlRebKK4vN4cPdzj4NOD1BtT5O pVXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MQaHeRwjBXtlwH+HWJdlO988bBQFl1PSkeW02oBI2yE=; b=PPflgwACaTAjV0Rr+BlPr+bSQJuq9sXj9HgQc4ukBmguQ8lMmoUxyXaCylcK05r1Em RcqOS4JCmfO80CGGPpLZ1oryHbN4ZmtYpvuUDE5g9JFf0ARAAupK0E8suaUSgdrvbIZT DxeLe+RtgfqBiyC9a1C8ikT1nvTH7ptqovEYk0mq1GLv7Pbd7ZmqfxXXLqqLV9z3nado Jc+Xa3sFsPFbAlXnFjsHXSbKpSvqHPTJFzzk0tXlEVZxDFUcwXV6SmRswgJC8zodoEW1 sBEAQzeuaV1vMbxRpbW2Vl5wzr5tAHUhcpQO/Xq3zOw0Dr95Mz//6M1e0epytYOOpax/ WZNg== X-Gm-Message-State: AOAM530y3iO+WEc2SnneIj8KmrEC9SrWMELjMBwij40KJ0AhFmrvHsFf J1/31i+/yq5Q1e26goZbsZyXWA== X-Google-Smtp-Source: ABdhPJxm3Uhw+C2nSYxFqgaSbTORrUw6CaZ7dvF70PKDj59IA5O9/8vviPl7gRx+3eEl7snZZVbMNA== X-Received: by 2002:a05:600c:1d19:: with SMTP id l25mr671862wms.119.1634751306327; Wed, 20 Oct 2021 10:35:06 -0700 (PDT) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id n7sm2662270wrp.17.2021.10.20.10.35.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 10:35:05 -0700 (PDT) From: Jean-Philippe Brucker To: mst@redhat.com, imammedo@redhat.com, peter.maydell@linaro.org Subject: [PATCH v5 08/12] hw/arm/virt: Use object_property_set instead of qdev_prop_set Date: Wed, 20 Oct 2021 18:27:42 +0100 Message-Id: <20211020172745.620101-9-jean-philippe@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211020172745.620101-1-jean-philippe@linaro.org> References: <20211020172745.620101-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=jean-philippe@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: Jean-Philippe Brucker , ehabkost@redhat.com, eric.auger@redhat.com, jasowang@redhat.com, richard.henderson@linaro.org, qemu-devel@nongnu.org, peterx@redhat.com, shannon.zhaosl@gmail.com, qemu-arm@nongnu.org, ani@anisinha.ca, pbonzini@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" To propagate errors to the caller of the pre_plug callback, use the object_poperty_set*() functions directly instead of the qdev_prop_set*() helpers. Suggested-by: Igor Mammedov Reviewed-by: Eric Auger Reviewed-by: Igor Mammedov Signed-off-by: Jean-Philippe Brucker --- hw/arm/virt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 25db8d4262..7a061ab401 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2465,8 +2465,9 @@ static void virt_machine_device_pre_plug_cb(HotplugHandler *hotplug_dev, db_start, db_end, VIRTIO_IOMMU_RESV_MEM_T_MSI); - qdev_prop_set_uint32(dev, "len-reserved-regions", 1); - qdev_prop_set_string(dev, "reserved-regions[0]", resv_prop_str); + object_property_set_uint(OBJECT(dev), "len-reserved-regions", 1, errp); + object_property_set_str(OBJECT(dev), "reserved-regions[0]", + resv_prop_str, errp); g_free(resv_prop_str); } } From patchwork Wed Oct 20 17:27:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 12572853 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD757C433F5 for ; Wed, 20 Oct 2021 17:47:12 +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 7EC5E611C7 for ; Wed, 20 Oct 2021 17:47:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7EC5E611C7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:55806 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdFgF-0002pP-H5 for qemu-devel@archiver.kernel.org; Wed, 20 Oct 2021 13:47:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdFUc-0005JB-UR for qemu-devel@nongnu.org; Wed, 20 Oct 2021 13:35:10 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:36413) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdFUb-0002gV-Bs for qemu-devel@nongnu.org; Wed, 20 Oct 2021 13:35:10 -0400 Received: by mail-wr1-x42a.google.com with SMTP id o20so48590929wro.3 for ; Wed, 20 Oct 2021 10:35:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tUzjz0DaQh9V/E1AtSG5a0bXdcLZdXoyXVjvZ0SiJck=; b=ZQHFOc3lXBs4VPWAtkf3sK+f/tzzXdB+Jg3MUUcFa4H/2/2WyCvbnzEU5V4oYnkd5n Wt4RDKnv/k4s+GmT1+78GNrgKxTG1h3FvXxb+7JsVhaFOsi/wskhgTr3o4CDk5e/TlTq uyBnb/MPT+sSeDlYbr3GvytYmploI25H7xf2Qm9Rg09J2YAjcUdbD/qnh1pAeCq5xfoG DWntZcjQSIUyTLMdqYrVpaA02/LCFxdl7PYvvyrLWf+59JKcjyqNaZeNelVjarZTQIdx edtDqKia0d+VwfBf4rlQoJOKqQQA0he1W7ClzaUiVjWEljesjv+GBXp3BBfaCW4+vYTm VWjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tUzjz0DaQh9V/E1AtSG5a0bXdcLZdXoyXVjvZ0SiJck=; b=cIC+WydSquTn8onUWN3LJPkx88hSFjncz/5ykwLlshDtG5cogJI1NL8J1BwGWNtsKx vnfgSHR2XakZD8wFGmZN7KJMC14MotYSZRJqIDhc8c3Ff8WL4zrudt2iUxyI5kB/fv2l ziHZox+Nr8KLzNp2002F7EWaCeEClKEfOt8AKQg/yzsDUzzJdGYwcEnbKh9Q/ui4fdwH SBhEVIao/6Nq6yJF0qYZ0IfnpmpRY+hJtK/omipnge8iqFLFiD2CmULT4wvdWq5AQGv3 sl9ax+puUr9+0dc4vhAcBa2yyCiUjkCISvgyZ4mqNQX6i5DZSni7FF13QuvRwrIFuh4M 5Ubw== X-Gm-Message-State: AOAM533oIBOqBODg+wchXn/TLnZYa26L5VCvwvvFHhJe3KJA8EbBCl4Z Rp6/WkgXsUhonvV9JAMMofFATQ== X-Google-Smtp-Source: ABdhPJxmk+jvAisc16qp1QTq6U/nKMixeGELt5/4u32ZcUUkbLB/D8UZcSFB4U6vqLiCOMhgK/DWOw== X-Received: by 2002:a5d:47cb:: with SMTP id o11mr749684wrc.184.1634751307902; Wed, 20 Oct 2021 10:35:07 -0700 (PDT) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id n7sm2662270wrp.17.2021.10.20.10.35.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 10:35:07 -0700 (PDT) From: Jean-Philippe Brucker To: mst@redhat.com, imammedo@redhat.com, peter.maydell@linaro.org Subject: [PATCH v5 09/12] tests/acpi: allow updates of VIOT expected data files Date: Wed, 20 Oct 2021 18:27:43 +0100 Message-Id: <20211020172745.620101-10-jean-philippe@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211020172745.620101-1-jean-philippe@linaro.org> References: <20211020172745.620101-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=jean-philippe@linaro.org; helo=mail-wr1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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: Jean-Philippe Brucker , ehabkost@redhat.com, eric.auger@redhat.com, jasowang@redhat.com, richard.henderson@linaro.org, qemu-devel@nongnu.org, peterx@redhat.com, shannon.zhaosl@gmail.com, qemu-arm@nongnu.org, ani@anisinha.ca, pbonzini@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Create empty data files and allow updates for the upcoming VIOT tests. Signed-off-by: Jean-Philippe Brucker Reviewed-by: Eric Auger Acked-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 3 +++ tests/data/acpi/q35/DSDT.viot | 0 tests/data/acpi/q35/VIOT.viot | 0 tests/data/acpi/virt/VIOT | 0 4 files changed, 3 insertions(+) create mode 100644 tests/data/acpi/q35/DSDT.viot create mode 100644 tests/data/acpi/q35/VIOT.viot create mode 100644 tests/data/acpi/virt/VIOT diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..29b5b1eabc 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,4 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/virt/VIOT", +"tests/data/acpi/q35/DSDT.viot", +"tests/data/acpi/q35/VIOT.viot", diff --git a/tests/data/acpi/q35/DSDT.viot b/tests/data/acpi/q35/DSDT.viot new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/data/acpi/q35/VIOT.viot b/tests/data/acpi/q35/VIOT.viot new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/data/acpi/virt/VIOT b/tests/data/acpi/virt/VIOT new file mode 100644 index 0000000000..e69de29bb2 From patchwork Wed Oct 20 17:27:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 12572875 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C49D1C433F5 for ; Wed, 20 Oct 2021 17:51:31 +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 5AF0A611EF for ; Wed, 20 Oct 2021 17:51:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5AF0A611EF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:34440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdFkQ-0007hH-F2 for qemu-devel@archiver.kernel.org; Wed, 20 Oct 2021 13:51:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37590) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdFUe-0005ND-9r for qemu-devel@nongnu.org; Wed, 20 Oct 2021 13:35:12 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:36492) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdFUc-0002hv-Da for qemu-devel@nongnu.org; Wed, 20 Oct 2021 13:35:11 -0400 Received: by mail-wm1-x334.google.com with SMTP id z11-20020a1c7e0b000000b0030db7b70b6bso3433569wmc.1 for ; Wed, 20 Oct 2021 10:35:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=b6FkINxR9TYPTnIwt4QFR5QO1CjWz4r+7L+WyL24pqY=; b=TUt58ZwLOXqIzqa7Z8fjADGTOnCKRNIroPpeCTpryE1y7pUkb6zTXOqDaT500SzV/K G9XMxhJOneCzhTeegp0gDEyrQOUqarpJ3KAPHQZZdSiOjBKug0hzb4kCuKoXovs8/JfM CLg5RBo2vLpaIOIrNbAnj3o3DusDMutYDen5zNnqhXJf+wsEhBBgXZ+m6+zKCcGyQYA3 f+lUNNFMmZMze3BVQXyjrJx5HXvo6xYcu38XJsKqxmoXjVMF7SNXzLtxt2opggS1Yx4B onQMRZzCTuOlPgQZterx98AftbkNBtt/E9fOVd7RTRc8XA8Fp8xK10Stj05/jf1awryr GJ/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=b6FkINxR9TYPTnIwt4QFR5QO1CjWz4r+7L+WyL24pqY=; b=AKOWJ9wUgpvJQin7tO0u8JNHF7iJIPj1gRIDMF+GZ2cZGbPtQIONFZsOC3iuf/f2GQ RL9nGkGBU3iEhWsKrQ9Wfw0i8ruSKZj+lGg26opT9GA63I5Q1WAWREp52h64rgO8EE8j LQtDILS0XqBireliti5gk5pT1TRDae+Nz7oT5qSMR8g2BeV7QFZCXewSwR/dqpmFufR4 rLKNRu3UrNoO7fEB85Imbn1PBA+0UGra1k5vUKbsUCCWO2JX4vSX4++08ngNgduI4utO Nc/Ead9qtpWBINCKyo5gzS5Ss5T07qUM7T9c2xnwdj3Sa+A0ElWf2KuFGvO7dWPz2P/2 n1Kg== X-Gm-Message-State: AOAM533RO1tJml8y7txlDeu4xFjykeEnrAJxIVnw0lTjqolLr+S3Vy5G gcLOi8MhjBorTMpxksaIulSzCRPo6BSg0g== X-Google-Smtp-Source: ABdhPJziI18hUczn45ny3bPvDlXku7v3xoDCwsM54ZJWUIRYdzpRWmIWQJp1ECWwyZPUrEViIcK6Bg== X-Received: by 2002:a05:600c:1c10:: with SMTP id j16mr713499wms.28.1634751309034; Wed, 20 Oct 2021 10:35:09 -0700 (PDT) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id n7sm2662270wrp.17.2021.10.20.10.35.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 10:35:08 -0700 (PDT) From: Jean-Philippe Brucker To: mst@redhat.com, imammedo@redhat.com, peter.maydell@linaro.org Subject: [PATCH v5 10/12] tests/acpi: add test cases for VIOT Date: Wed, 20 Oct 2021 18:27:44 +0100 Message-Id: <20211020172745.620101-11-jean-philippe@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211020172745.620101-1-jean-philippe@linaro.org> References: <20211020172745.620101-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=jean-philippe@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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: Jean-Philippe Brucker , ehabkost@redhat.com, eric.auger@redhat.com, jasowang@redhat.com, richard.henderson@linaro.org, qemu-devel@nongnu.org, peterx@redhat.com, shannon.zhaosl@gmail.com, qemu-arm@nongnu.org, ani@anisinha.ca, pbonzini@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Add two test cases for VIOT, one on the q35 machine and the other on virt. To test complex topologies the q35 test has two PCIe buses that bypass the IOMMU (and are therefore not described by VIOT), and two buses that are translated by virtio-iommu. Reviewed-by: Eric Auger Reviewed-by: Igor Mammedov Signed-off-by: Jean-Philippe Brucker --- tests/qtest/bios-tables-test.c | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 4f11d03055..599b155201 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1403,6 +1403,42 @@ static void test_acpi_virt_tcg(void) free_test_data(&data); } +static void test_acpi_q35_viot(void) +{ + test_data data = { + .machine = MACHINE_Q35, + .variant = ".viot", + }; + + /* + * To keep things interesting, two buses bypass the IOMMU. + * VIOT should only describes the other two buses. + */ + test_acpi_one("-machine default_bus_bypass_iommu=on " + "-device virtio-iommu-pci " + "-device pxb-pcie,bus_nr=0x10,id=pcie.100,bus=pcie.0 " + "-device pxb-pcie,bus_nr=0x20,id=pcie.200,bus=pcie.0,bypass_iommu=on " + "-device pxb-pcie,bus_nr=0x30,id=pcie.300,bus=pcie.0", + &data); + free_test_data(&data); +} + +static void test_acpi_virt_viot(void) +{ + test_data data = { + .machine = "virt", + .uefi_fl1 = "pc-bios/edk2-aarch64-code.fd", + .uefi_fl2 = "pc-bios/edk2-arm-vars.fd", + .cd = "tests/data/uefi-boot-images/bios-tables-test.aarch64.iso.qcow2", + .ram_start = 0x40000000ULL, + .scan_len = 128ULL * 1024 * 1024, + }; + + test_acpi_one("-cpu cortex-a57 " + "-device virtio-iommu-pci", &data); + free_test_data(&data); +} + static void test_oem_fields(test_data *data) { int i; @@ -1567,12 +1603,14 @@ int main(int argc, char *argv[]) if (strcmp(arch, "x86_64") == 0) { qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie_tcg); } + qtest_add_func("acpi/q35/viot", test_acpi_q35_viot); } else if (strcmp(arch, "aarch64") == 0) { qtest_add_func("acpi/virt", test_acpi_virt_tcg); qtest_add_func("acpi/virt/numamem", test_acpi_virt_tcg_numamem); qtest_add_func("acpi/virt/memhp", test_acpi_virt_tcg_memhp); qtest_add_func("acpi/virt/pxb", test_acpi_virt_tcg_pxb); qtest_add_func("acpi/virt/oem-fields", test_acpi_oem_fields_virt); + qtest_add_func("acpi/virt/viot", test_acpi_virt_viot); } ret = g_test_run(); boot_sector_cleanup(disk); From patchwork Wed Oct 20 17:27:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 12572891 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4383C433F5 for ; Wed, 20 Oct 2021 17:53:57 +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 6298161212 for ; Wed, 20 Oct 2021 17:53:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6298161212 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:38778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdFmm-0002C5-H0 for qemu-devel@archiver.kernel.org; Wed, 20 Oct 2021 13:53:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdFUf-0005QE-26 for qemu-devel@nongnu.org; Wed, 20 Oct 2021 13:35:13 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:54038) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdFUd-0002j0-DS for qemu-devel@nongnu.org; Wed, 20 Oct 2021 13:35:12 -0400 Received: by mail-wm1-x334.google.com with SMTP id g39so16312939wmp.3 for ; Wed, 20 Oct 2021 10:35:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dozp0i//DXBHAKKI5F8x2p4gKun2eWFo2D6lVjmBtXQ=; b=DnI5xCZ5JtuflUZ6Heb0yVGyQZb2oI1pdMhC5kVs8D7JrVu/4rbtWUH5rtSUwldj/r deYgEZXlleVD2ijeBcpa+hVhcb4KUurpDyt/6BrJfppNJEtUQqp6FlE62DmtKCa073C4 c4e+mA+LEoAvcTXWNfgj90hpaV7xx7VC6vYquKDRuv2PmasItq7AM//DNYRSs4CVZjBZ LwOd4rbla+dZfHQZTJwWG7Io440nZI1jUHmgo+1zIDgw4CQaued05/TAvz0tFkrwnr7P Vj+dqx3rXyilg/Yg2xi7ubZXvLvoMOycAtvMYDzHqLjtdxfyMgU2zE4+8Q1o3xFlxLbF 09KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dozp0i//DXBHAKKI5F8x2p4gKun2eWFo2D6lVjmBtXQ=; b=AonnfMLYN81hpuN7DBrWjDt58PL8Ewlg+aGY+91oYpvKEQyH8e8X7zGZ1pourgcw2f QMI+vNEWiUlm2RYaoJPht13v2p9jxkQHYD/YvsvvhHytCtx4+uODw0pKjSU97cRwzrcl cPRjZWMtPmVKtm7UtVVdF7UB/F0xdpoukpyl8j5Kl5LMjQY3gm4EVI2uMzzsbzA8STNx UNsFKHvq6DiI4Nvhp2yNKNN7T2lrtX6GrGpnako6PQVn++fki+vOfSmJrEzMF+nPA39Q /G6EEW5LoUx46aIJDFrpsthdYBtsEIT8MfCHiUauKfaXE7ChxSvQw5zfyQJRLgGDl+zN a+lA== X-Gm-Message-State: AOAM5304P9DAFKT/SvCCVSC9dx78XSiLoYZYk0AMz9saGpT47yFKFu8X svgJ38+XPgchkCbWC9uvVHly5Q== X-Google-Smtp-Source: ABdhPJzjQDC6jHVE9Or2dwytfllYv/TuZRcHY9ZmWe6TddQNZPhsyPV0oi+trrlT+rrRDCAlJhjLeQ== X-Received: by 2002:a1c:4645:: with SMTP id t66mr654638wma.179.1634751310134; Wed, 20 Oct 2021 10:35:10 -0700 (PDT) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id n7sm2662270wrp.17.2021.10.20.10.35.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 10:35:09 -0700 (PDT) From: Jean-Philippe Brucker To: mst@redhat.com, imammedo@redhat.com, peter.maydell@linaro.org Subject: [PATCH v5 11/12] tests/acpi: add expected blob for VIOT test on virt machine Date: Wed, 20 Oct 2021 18:27:45 +0100 Message-Id: <20211020172745.620101-12-jean-philippe@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211020172745.620101-1-jean-philippe@linaro.org> References: <20211020172745.620101-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=jean-philippe@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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: Jean-Philippe Brucker , ehabkost@redhat.com, eric.auger@redhat.com, jasowang@redhat.com, richard.henderson@linaro.org, qemu-devel@nongnu.org, peterx@redhat.com, shannon.zhaosl@gmail.com, qemu-arm@nongnu.org, ani@anisinha.ca, pbonzini@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The VIOT blob contains the following: [000h 0000 4] Signature : "VIOT" [Virtual I/O Translation Table] [004h 0004 4] Table Length : 00000058 [008h 0008 1] Revision : 00 [009h 0009 1] Checksum : 66 [00Ah 0010 6] Oem ID : "BOCHS " [010h 0016 8] Oem Table ID : "BXPC " [018h 0024 4] Oem Revision : 00000001 [01Ch 0028 4] Asl Compiler ID : "BXPC" [020h 0032 4] Asl Compiler Revision : 00000001 [024h 0036 2] Node count : 0002 [026h 0038 2] Node offset : 0030 [028h 0040 8] Reserved : 0000000000000000 [030h 0048 1] Type : 03 [VirtIO-PCI IOMMU] [031h 0049 1] Reserved : 00 [032h 0050 2] Length : 0010 [034h 0052 2] PCI Segment : 0000 [036h 0054 2] PCI BDF number : 0008 [038h 0056 8] Reserved : 0000000000000000 [040h 0064 1] Type : 01 [PCI Range] [041h 0065 1] Reserved : 00 [042h 0066 2] Length : 0018 [044h 0068 4] Endpoint start : 00000000 [048h 0072 2] PCI Segment start : 0000 [04Ah 0074 2] PCI Segment end : 0000 [04Ch 0076 2] PCI BDF start : 0000 [04Eh 0078 2] PCI BDF end : 00FF [050h 0080 2] Output node : 0030 [052h 0082 6] Reserved : 000000000000 Acked-by: Ani Sinha Reviewed-by: Eric Auger Signed-off-by: Jean-Philippe Brucker --- tests/qtest/bios-tables-test-allowed-diff.h | 1 - tests/data/acpi/virt/VIOT | Bin 0 -> 88 bytes 2 files changed, 1 deletion(-) diff --git a/tests/data/acpi/virt/VIOT b/tests/data/acpi/virt/VIOT index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..921f40d88c28ba2171a4d664e119914335309e7d 100644 GIT binary patch literal 88 zcmWIZ^bd((0D?3pe`k+i1*eDrX9XZ&1PX!JAexE60Hgv8m>C3sGzXN&z`)2L0cSHX I{D-Rq0Q5fy0RR91 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 29b5b1eabc..fa213e4738 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,4 +1,3 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/virt/VIOT", "tests/data/acpi/q35/DSDT.viot", "tests/data/acpi/q35/VIOT.viot", From patchwork Wed Oct 20 17:27:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 12572893 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E49EC433F5 for ; Wed, 20 Oct 2021 17:56:34 +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 44F1861130 for ; Wed, 20 Oct 2021 17:56:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 44F1861130 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:42076 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdFpI-0004T3-0g for qemu-devel@archiver.kernel.org; Wed, 20 Oct 2021 13:56:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdFUi-0005YW-Ho for qemu-devel@nongnu.org; Wed, 20 Oct 2021 13:35:16 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:42557) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdFUe-0002jL-NF for qemu-devel@nongnu.org; Wed, 20 Oct 2021 13:35:16 -0400 Received: by mail-wr1-x434.google.com with SMTP id v17so48410400wrv.9 for ; Wed, 20 Oct 2021 10:35:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SMPxXY858z4Kf7KrvjZGDmyceiHBnIhXO+Rom1fQSGo=; b=TwMI4gvBESCe76ZbeWuupYQDHoqy5167oLRHLwOoxUbVpyY1HTyOo1HPCuZk6cm+Y8 c0nzqnZE/UoLaJlK0EvoXyARvNPxiJiKpkn0SmstJZb2GhZIC7K9DwvtAYQF0BT4PvEs v0rTC04rwSHjVJDQQI1U/vtumRRg/cjKNZgliqu6q5hwLlZh0G2Xkx0Q3aVhYoyS4fNy g9n+Ka9QL+cNN5LthSv1SZcrwtWIk/jvbhjZrzRL2IlGknVoC34HaKIeZB86NwUNzPNh EfjKRh/uldTDA9Mmipm3hA6h34ZrTkm5YGWzGNLgi4KXmHZcX8dKmEzjTNgIpXZxfuff H8Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SMPxXY858z4Kf7KrvjZGDmyceiHBnIhXO+Rom1fQSGo=; b=1TWF2wpDyVse1SOrDOBJHponjGm7zkRr+sHkcgBbZVj3v1yss45YeQKPYpiPd2o5MA 4dtiLSuRD9g2ruFLAjiVlXFORN8Jr9/86PJsYLds3xspC0cz+ymy8FYc4kkHzMEGlOrW oxg01BoQQx08FHnWRhQnHgK3rgHyyIXgb0CZRO2AC/Ew886s9bmq4jAMefGRmbLuHYn/ L94c+RSIBEqIVjTrLAq88m2RZHVsNr5E3FndWheVh/RRnXYHU57NSeZfB/PQTRFlbfxe HDoVriGzwhg0Y+0nL2eF4QbmNhZQaGOYEH177yYJK+lCWGUGm6vmeLFfOBwn3Sg7c429 7jyw== X-Gm-Message-State: AOAM533I9NfFz7rUUKkjmhf/dPpgqk4uPN9tXBa1fZb49XV3jUIWw7Bp 4LnmAe/zMDpAu37XKbuYaS8P+w== X-Google-Smtp-Source: ABdhPJw7JIkzcIDz/uyrIn5hjNRLv2NjKAnrh5SHbXAB6lCQJmyyHC6Yq/LAaPyYrR5ubg4ruPki7A== X-Received: by 2002:a5d:648f:: with SMTP id o15mr735362wri.3.1634751311224; Wed, 20 Oct 2021 10:35:11 -0700 (PDT) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id n7sm2662270wrp.17.2021.10.20.10.35.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 10:35:10 -0700 (PDT) From: Jean-Philippe Brucker To: mst@redhat.com, imammedo@redhat.com, peter.maydell@linaro.org Subject: [PATCH v5 12/12] tests/acpi: add expected blobs for VIOT test on q35 machine Date: Wed, 20 Oct 2021 18:27:46 +0100 Message-Id: <20211020172745.620101-13-jean-philippe@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211020172745.620101-1-jean-philippe@linaro.org> References: <20211020172745.620101-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=jean-philippe@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: Jean-Philippe Brucker , ehabkost@redhat.com, eric.auger@redhat.com, jasowang@redhat.com, richard.henderson@linaro.org, qemu-devel@nongnu.org, peterx@redhat.com, shannon.zhaosl@gmail.com, qemu-arm@nongnu.org, ani@anisinha.ca, pbonzini@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Add expected blobs of the VIOT and DSDT table for the VIOT test on the q35 machine. Since the test instantiates a virtio device and two PCIe expander bridges, DSDT.viot has more blocks than the base DSDT. The VIOT table generated for the q35 test is: [000h 0000 4] Signature : "VIOT" [Virtual I/O Translation Table] [004h 0004 4] Table Length : 00000070 [008h 0008 1] Revision : 00 [009h 0009 1] Checksum : 3D [00Ah 0010 6] Oem ID : "BOCHS " [010h 0016 8] Oem Table ID : "BXPC " [018h 0024 4] Oem Revision : 00000001 [01Ch 0028 4] Asl Compiler ID : "BXPC" [020h 0032 4] Asl Compiler Revision : 00000001 [024h 0036 2] Node count : 0003 [026h 0038 2] Node offset : 0030 [028h 0040 8] Reserved : 0000000000000000 [030h 0048 1] Type : 03 [VirtIO-PCI IOMMU] [031h 0049 1] Reserved : 00 [032h 0050 2] Length : 0010 [034h 0052 2] PCI Segment : 0000 [036h 0054 2] PCI BDF number : 0010 [038h 0056 8] Reserved : 0000000000000000 [040h 0064 1] Type : 01 [PCI Range] [041h 0065 1] Reserved : 00 [042h 0066 2] Length : 0018 [044h 0068 4] Endpoint start : 00003000 [048h 0072 2] PCI Segment start : 0000 [04Ah 0074 2] PCI Segment end : 0000 [04Ch 0076 2] PCI BDF start : 3000 [04Eh 0078 2] PCI BDF end : 30FF [050h 0080 2] Output node : 0030 [052h 0082 6] Reserved : 000000000000 [058h 0088 1] Type : 01 [PCI Range] [059h 0089 1] Reserved : 00 [05Ah 0090 2] Length : 0018 [05Ch 0092 4] Endpoint start : 00001000 [060h 0096 2] PCI Segment start : 0000 [062h 0098 2] PCI Segment end : 0000 [064h 0100 2] PCI BDF start : 1000 [066h 0102 2] PCI BDF end : 10FF [068h 0104 2] Output node : 0030 [06Ah 0106 6] Reserved : 000000000000 And the DSDT diff is: @@ -5,13 +5,13 @@ * * Disassembling to symbolic ASL+ operators * - * Disassembly of tests/data/acpi/q35/DSDT, Wed Oct 20 16:33:00 2021 + * Disassembly of /tmp/aml-4TWUB1, Wed Oct 20 16:16:49 2021 * * Original Table Header: * Signature "DSDT" - * Length 0x00002061 (8289) + * Length 0x000024B6 (9398) * Revision 0x01 **** 32-bit table (V1), no 64-bit math support - * Checksum 0xF9 + * Checksum 0xA6 * OEM ID "BOCHS " * OEM Table ID "BXPC " * OEM Revision 0x00000001 (1) @@ -3114,6 +3114,339 @@ } } + Scope (\_SB) + { + Device (PC30) + { + Name (_UID, 0x30) // _UID: Unique ID + Name (_BBN, 0x30) // _BBN: BIOS Bus Number + Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */) // _HID: Hardware ID + Name (_CID, EisaId ("PNP0A03") /* PCI Bus */) // _CID: Compatible ID + Method (_OSC, 4, NotSerialized) // _OSC: Operating System Capabilities + { + CreateDWordField (Arg3, Zero, CDW1) + If ((Arg0 == ToUUID ("33db4d5b-1ff7-401c-9657-7441c03dd766") /* PCI Host Bridge Device */)) + { + CreateDWordField (Arg3, 0x04, CDW2) + CreateDWordField (Arg3, 0x08, CDW3) + Local0 = CDW3 /* \_SB_.PC30._OSC.CDW3 */ + Local0 &= 0x1F + If ((Arg1 != One)) + { + CDW1 |= 0x08 + } + + If ((CDW3 != Local0)) + { + CDW1 |= 0x10 + } + + CDW3 = Local0 + } + Else + { + CDW1 |= 0x04 + } + + Return (Arg3) + } + + Method (_PRT, 0, NotSerialized) // _PRT: PCI Routing Table + { + Local0 = Package (0x80){} + Local1 = Zero + While ((Local1 < 0x80)) + { + Local2 = (Local1 >> 0x02) + Local3 = ((Local1 + Local2) & 0x03) + If ((Local3 == Zero)) + { + Local4 = Package (0x04) + { + Zero, + Zero, + LNKD, + Zero + } + } + + If ((Local3 == One)) + { + Local4 = Package (0x04) + { + Zero, + Zero, + LNKA, + Zero + } + } + + If ((Local3 == 0x02)) + { + Local4 = Package (0x04) + { + Zero, + Zero, + LNKB, + Zero + } + } + + If ((Local3 == 0x03)) + { + Local4 = Package (0x04) + { + Zero, + Zero, + LNKC, + Zero + } + } + + Local4 [Zero] = ((Local2 << 0x10) | 0xFFFF) + Local4 [One] = (Local1 & 0x03) + Local0 [Local1] = Local4 + Local1++ + } + + Return (Local0) + } + + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, + 0x0000, // Granularity + 0x0030, // Range Minimum + 0x0030, // Range Maximum + 0x0000, // Translation Offset + 0x0001, // Length + ,, ) + }) + } + } + + Scope (\_SB) + { + Device (PC20) + { + Name (_UID, 0x20) // _UID: Unique ID + Name (_BBN, 0x20) // _BBN: BIOS Bus Number + Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */) // _HID: Hardware ID + Name (_CID, EisaId ("PNP0A03") /* PCI Bus */) // _CID: Compatible ID + Method (_OSC, 4, NotSerialized) // _OSC: Operating System Capabilities + { + CreateDWordField (Arg3, Zero, CDW1) + If ((Arg0 == ToUUID ("33db4d5b-1ff7-401c-9657-7441c03dd766") /* PCI Host Bridge Device */)) + { + CreateDWordField (Arg3, 0x04, CDW2) + CreateDWordField (Arg3, 0x08, CDW3) + Local0 = CDW3 /* \_SB_.PC20._OSC.CDW3 */ + Local0 &= 0x1F + If ((Arg1 != One)) + { + CDW1 |= 0x08 + } + + If ((CDW3 != Local0)) + { + CDW1 |= 0x10 + } + + CDW3 = Local0 + } + Else + { + CDW1 |= 0x04 + } + + Return (Arg3) + } + + Method (_PRT, 0, NotSerialized) // _PRT: PCI Routing Table + { + Local0 = Package (0x80){} + Local1 = Zero + While ((Local1 < 0x80)) + { + Local2 = (Local1 >> 0x02) + Local3 = ((Local1 + Local2) & 0x03) + If ((Local3 == Zero)) + { + Local4 = Package (0x04) + { + Zero, + Zero, + LNKD, + Zero + } + } + + If ((Local3 == One)) + { + Local4 = Package (0x04) + { + Zero, + Zero, + LNKA, + Zero + } + } + + If ((Local3 == 0x02)) + { + Local4 = Package (0x04) + { + Zero, + Zero, + LNKB, + Zero + } + } + + If ((Local3 == 0x03)) + { + Local4 = Package (0x04) + { + Zero, + Zero, + LNKC, + Zero + } + } + + Local4 [Zero] = ((Local2 << 0x10) | 0xFFFF) + Local4 [One] = (Local1 & 0x03) + Local0 [Local1] = Local4 + Local1++ + } + + Return (Local0) + } + + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, + 0x0000, // Granularity + 0x0020, // Range Minimum + 0x0020, // Range Maximum + 0x0000, // Translation Offset + 0x0001, // Length + ,, ) + }) + } + } + + Scope (\_SB) + { + Device (PC10) + { + Name (_UID, 0x10) // _UID: Unique ID + Name (_BBN, 0x10) // _BBN: BIOS Bus Number + Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */) // _HID: Hardware ID + Name (_CID, EisaId ("PNP0A03") /* PCI Bus */) // _CID: Compatible ID + Method (_OSC, 4, NotSerialized) // _OSC: Operating System Capabilities + { + CreateDWordField (Arg3, Zero, CDW1) + If ((Arg0 == ToUUID ("33db4d5b-1ff7-401c-9657-7441c03dd766") /* PCI Host Bridge Device */)) + { + CreateDWordField (Arg3, 0x04, CDW2) + CreateDWordField (Arg3, 0x08, CDW3) + Local0 = CDW3 /* \_SB_.PC10._OSC.CDW3 */ + Local0 &= 0x1F + If ((Arg1 != One)) + { + CDW1 |= 0x08 + } + + If ((CDW3 != Local0)) + { + CDW1 |= 0x10 + } + + CDW3 = Local0 + } + Else + { + CDW1 |= 0x04 + } + + Return (Arg3) + } + + Method (_PRT, 0, NotSerialized) // _PRT: PCI Routing Table + { + Local0 = Package (0x80){} + Local1 = Zero + While ((Local1 < 0x80)) + { + Local2 = (Local1 >> 0x02) + Local3 = ((Local1 + Local2) & 0x03) + If ((Local3 == Zero)) + { + Local4 = Package (0x04) + { + Zero, + Zero, + LNKD, + Zero + } + } + + If ((Local3 == One)) + { + Local4 = Package (0x04) + { + Zero, + Zero, + LNKA, + Zero + } + } + + If ((Local3 == 0x02)) + { + Local4 = Package (0x04) + { + Zero, + Zero, + LNKB, + Zero + } + } + + If ((Local3 == 0x03)) + { + Local4 = Package (0x04) + { + Zero, + Zero, + LNKC, + Zero + } + } + + Local4 [Zero] = ((Local2 << 0x10) | 0xFFFF) + Local4 [One] = (Local1 & 0x03) + Local0 [Local1] = Local4 + Local1++ + } + + Return (Local0) + } + + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, + 0x0000, // Granularity + 0x0010, // Range Minimum + 0x0010, // Range Maximum + 0x0000, // Translation Offset + 0x0001, // Length + ,, ) + }) + } + } + Scope (\_SB.PCI0) { Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings @@ -3121,9 +3454,9 @@ WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, 0x0000, // Granularity 0x0000, // Range Minimum - 0x00FF, // Range Maximum + 0x000F, // Range Maximum 0x0000, // Translation Offset - 0x0100, // Length + 0x0010, // Length ,, ) IO (Decode16, 0x0CF8, // Range Minimum @@ -3278,6 +3611,26 @@ } } + Device (S10) + { + Name (_ADR, 0x00020000) // _ADR: Address + } + + Device (S18) + { + Name (_ADR, 0x00030000) // _ADR: Address + } + + Device (S20) + { + Name (_ADR, 0x00040000) // _ADR: Address + } + + Device (S28) + { + Name (_ADR, 0x00050000) // _ADR: Address + } + Method (PCNT, 0, NotSerialized) { } Reviewed-by: Eric Auger Signed-off-by: Jean-Philippe Brucker --- tests/qtest/bios-tables-test-allowed-diff.h | 2 -- tests/data/acpi/q35/DSDT.viot | Bin 0 -> 9398 bytes tests/data/acpi/q35/VIOT.viot | Bin 0 -> 112 bytes 3 files changed, 2 deletions(-) diff --git a/tests/data/acpi/q35/DSDT.viot b/tests/data/acpi/q35/DSDT.viot index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..20e5c87b6be3be9df70a8a74d82f68bb2c6a25cf 100644 GIT binary patch literal 9398 zcmeHNO>7&-8J*>iv|O&FB}G~OOGG$H|5C)1oWHhc5OS9yDTx$CQgH$r;8Idr*-4Q_ z5(9Az1F`}niVsB-#zBvCpcK8er(A2Gm-gmc1N78GFS!;)e6sq!nH_0{q=4wuOC(@- zzuEWZn>V|&Z#cVN(`$Y8BxA-O3af6pnJv6pceD627-Muyd#4h+!rD7tq0}*wk(klG zo#e;Z6wJ&|y~29Q`2Dv3x$nRGk#BSZw(*5?ccUA8u;*_u0$tw-EQ=1D;$){;=(KlT ztL|2EW~W^7?EC}EG&`<1ikh9g*I;I6z2dRV%6MnB>BjE7!Cde1e7_d&ZKtL!r(ON$ zrEllXzx?^-ck}mu`Hx@SdBchUuzkY4y%{<>}w(=~X z5TsEKgmGN+6-yyU#8cJb=YDilX&sl}vNm znkgAR^O<3kj4if>{e=j!wRfMauC5=lrlvKPX~i#454Cp}R_d*JS$9laZ$ra6)LDi%GLaw-k6NOr}VI&_28U=2l zwqDKFE8eTwwozDdms#eix?5a|w4b2p;2_v0L~z5n%BYU^52<*cWuDH1GYUm@1+?)) zte^45>Rz)t*DljxJ?^&Z?-?vyJn3C>3D=qux{Y*bs5|5n)Qmi$TD^Zdn4GU$ocJS2Hh-< z`wbt+^+v0nUVdjMos8k`WGl7hA`{03ju%ckUB>FI=~GokB5sOq#dotCE4(sd$KbtW~PNlj-`*NIToiD#j5J#9^= zt?NXn>YUJYPG~wObe#xQos*i*NloXZt`niEb4t@WrRki~bs|)CI+{*L)9L6s5vn>< zn$DD_Go|Z9sOn5>I@6lYw5}7Os&iV?Ij!lO)^#FOb!If38BJ$K*NIToIiu;E(R9w} zIuWWmPiZ<&X*y5oIuWWmF_XaEC!a&Jn$B5WCqh-{X-(&8P3LJ{Cqh-{8P3dyPr@^t zSqL9?X9Uwd3W@23*s~h*tj0X6GZCuHa~kuU#yqDp5vt7d8uPryJg+kms?5hU=3^T3 zF`bD}Wj@ZC(q$g!O!8zC{}6`a#@&S^R4^qdGqP7?;2R}8e&tROWvQv=6H z92zJBq!mFFflLYm6*z851|ybipMj(TdT5{sr8F3*z)AyEpk$x|dT5{s(Hd!>0vkq@ zQ#DWlJv2~+Xc5Q4Km|68LX8|s1}dO3RCU5YMYWs>16818pa`Wal7S+WI$@v!%b74x z1xf}gpgboTC_Az;Y%GRDqI#3Mglifg+UG69y`< zoCyO}pk$x|%9&)K2&GOKsK9b23{-)VfeI*Rl7S+WI$@v!%b74x1xf}gpqxnticso= zfeI{V!ax-$8K{7ACK)I~sS^e&u$&14RiI>`0?L_Wpa`W-7^uKf}LawZulLa7r5DzKah16818paRO7 zWS|J8P8g`bawZH^fs%m=C})y^B9uB|paRR8Fi-_b1}dPONd}5g>V$y`EN8+%6(|{~ zfN~}oC_Az;Y%GRDqI#3Mglifg+STVW0xbnJ`cV zN(L&RoJj_XQ0jz%3M^;BKouw%sDN@N87M-j69$S%F;GORfg)556rp0E3KIsZFv&m_ zCK;&0gn=qd7^uP|167!0pb8TPsxV=o3X=>}VUmF=OcNTyib(b?87M;8w`8CQu~c-n0}Ew+yT^a5?$Zy_ zdte@gi+Xv?-gJ>B<^b1Nw=Z z*3LE-SrYqJGV^R@&21zAXyj6pR`TO9mf$NvH`pC2v*OrRf}7jc6r&?FqJgECm2u1w z@^Z<;#&QiU2AODfGj+n9kzkeQ+b%ZFpwRKC*L`HLCId=*$Zf&n!S)2oxRZBt&(=J zl!oQLP`ed5L3&q7@ACBSKzjF>^lq5m8xU_{LF+rK_muP=Pwx$+_l`;Lh3Sif>0>8I zUsTc;dHUi&`r#mj=?8 zj!9n%)0YR+kDnlYSxH~!>B|G@%g3ZIBYlh>WrOJ*kzPJLFs;CF7wflrS!Rq6dF*Ih zht&-ZV=JXshq=a3b)sx!bwlGatyhN$$WV2nY-Dvq;|xo{G|r?j%u0r;6J;Z-8yYtm zy*f-)hN=@~BdZ%42Qzwgn7<5FC(1@vH*{a0(yPOyW~e$*HnO^*`*c>X4l|vh>O`4d zopbJJJ$rYmSuNmI3tp?(QLOnpt1pSS6J_hl(Tab)QEbY))WYC|H%++p^=$dAcY`;t z|2q5j>+igE{q4=y-(hXTt*-HCJjCGhkGRyZ+J@t_KYg zjhx84^-3-`pQC1o7f10-%55#a7U^5PZT6v?%jK?S%41l)&nMbXT)7yNuQo_1383Zo z!D1u}nBPC!8$3Z00&5D(?n7r*miPTkHBPclmdF^a3N?(ZKeKqsZMrq{7#XHpD_%}V z4g$6r7+YU>>E4zRu&u!G1J?aw#r|E-H|}nt$PYFLQ*yzBg}5mF*}H?KxGbAr_7lCX zb$~Qq2BXgRpB(Bry6(Z|9<{N{u6NO@doT2#8-npW1D9{piUva+gOlK0-=r6d#h7@r zNEL3dO}gaJw%MK^EpDhTwCDQ9=x(ki+|_2wKBk*T-z`J+qw|8RBl;$=B7>y_y*5~g zZXVgX_6IN0J&o~?KMW7t*XBOm-53GYd@Gf-Oor74nulg4@zS)FBr$CJ>b1-{44zWG z*eT`~SUBQoAkjVLtj6dRANb*z%016AKLd82QAZrU5fpE%l!Cfj<1N(?&eF^k@o>q{ z)ZI&X>fkwIVOJ>BXgB=2_y78eH}i4=*3@D_I{6jApd_uC2}p>*jBX`NtDWN$V?ldozZ$IDkvWL;Im^m?$?eNx|Q@xceX4 zhw%gk4P*b|UtRF?^gH?BfPN>_UxaDjW0-ia{U>pT{ZTt}A0KKw5@+tebmwV&!x7dd z%INV)FU9dB)&3}^uNK@Go|d>ja7XY@Lh^W8in$V%E0ZMgB|}n-XFf^Fj%CLT{^`R~ ztX{4+Mpc4N8ZqG-uIs*i-!@L;negK)NZ-8FNsq-0v>nIKcG70dis1Q0(Q|Z$lsLaQ zx(w~zXBIEJVj?`TR;;eWR~873uRGKhJ8>sY(>kY+;16|Y$)u~;-c2@hIq?w*y5uL# z+>0W>6*CxS=goPK;VT9lEXadPbkN33bUq{k8xaLZz7 B)Oi2^ literal 0 HcmV?d00001 diff --git a/tests/data/acpi/q35/VIOT.viot b/tests/data/acpi/q35/VIOT.viot index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..9b179266ccbf84f1c250ee646812d17e27987764 100644 GIT binary patch literal 112 zcmWIZ^baXu00LVle`k+i1*eDrX9XZ&1PX!JAex!M0Hgv8m>C3sGzdcgBZCA3T-xBj Q0Zb)W9Hva*zW_`e0M!8s0RR91 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 fa213e4738..dfb8523c8b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,3 +1 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/q35/DSDT.viot", -"tests/data/acpi/q35/VIOT.viot",