From patchwork Fri Oct 1 17:33:49 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: 515102 Delivered-To: patch@linaro.org Received: by 2002:a02:606e:0:0:0:0:0 with SMTP id d46csp1029199jaf; Fri, 1 Oct 2021 10:54:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytkZeYSzhIbvcYC9mrweecbGBzZn1yNAXeRnBk6FYMHSaMLyCie1oRFovGaX90Gu7da6Ls X-Received: by 2002:ab0:158d:: with SMTP id i13mr11355984uae.68.1633110872162; Fri, 01 Oct 2021 10:54:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633110872; cv=none; d=google.com; s=arc-20160816; b=DlXhHdfyxpKUTplhYshS2tq72bLqUsIYaRWjCiEls6zMYePEvPH9xTFF+3F50by/Bt x8eJY06gV94ZJtpmLB3hPVHroVczAkCh7EGQHlmQTzo4iLXyBVWaE32Sc00xONVuMch6 L/M4EdbgEgbP1G3dwu0M6tqKy6Hv78kYLYf1/Q9faeU6jCiQLdv00fECuihZxxf+Oofw Nj/M/qsS7mFKZVd4KP+VHtWzJdjzABq9kAZc23nUNSbu4toFdBBV1Plg2/NKnQk/97bE HYRhO5i73Ac/lCodFjfOumU158ST8fVEKRCA/96oQDeja5YNUTJimsaKmfl2xT8SDW3Z FJ2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=PXZfK7Oh9ka7EzsTMcy7G7qzk9dy5gzr+jsgpmOW2zQ=; b=FPfLgYctUkz7KO4WMZmSnonVZNB8wndtps7574foMebt7pPhgBCJEtKsLVKjsLbgQd /hrriTEBWnsT60p2S+O8NUPYefQbnFqipGnJ7s2bDs8LahtmJGeA4JAFfr5EtWLRQAkO ylMalxSck9Kpp0SbxdTWhaLjrhNxKJ5HNs7wHa4gBXfgaMAJJRcZj1LJG3KQelYPVohm NWmOvum05Bw91iV6eBdTjwDxnHucNPQCBd5HWuNjpHX+zB8W2wcw7lbV4+RxsdIGANHQ T2Pqapc53iwIT9lGFQD/CWH1VRp8ng1Si6GTUKra2nhryu3wpK8zAK9spvRLIODEHjB7 Jd4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Z0Gssepq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e5si1013111vsj.100.2021.10.01.10.54.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Oct 2021 10:54:32 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Z0Gssepq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:37220 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWMjv-0006os-GG for patch@linaro.org; Fri, 01 Oct 2021 13:54:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWMUC-0000TM-71 for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:38:17 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:50824) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWMU9-0000e0-7b for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:38:15 -0400 Received: by mail-wm1-x32a.google.com with SMTP id j27so7797383wms.0 for ; Fri, 01 Oct 2021 10:38: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=PXZfK7Oh9ka7EzsTMcy7G7qzk9dy5gzr+jsgpmOW2zQ=; b=Z0GssepqB+TcpKw9wrQAcQfElGS+NHmSdLqdSJA24wwWq/jnYCbxj3N6EdY1cmO2n8 BehvRFxjGbEdM52Agj7gvzobP5iIJoBA5N5Z7i4hNli30v3LvE5ZjotC2PTFp2p3mXgZ k3/3GQ6uDWkIE6Emj326/JOnQzxFfx5SF1MB9AjPwAHnkcZOLww5egdiNok0fMSTbQJA j7HXLoXI1wQJsPYZoNsKWmtmPDOJGOWjXwK9ZdHh79LYE+pncTJ+jqsqToeFt9a3gPiH X65mFuEZDzrNcJ7nFoqb8MuW3LNayefio2wQcjCVRbqydKbVY1QIeqDTJ4hIr2AHGktX tezw== 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=PXZfK7Oh9ka7EzsTMcy7G7qzk9dy5gzr+jsgpmOW2zQ=; b=Oot8yS8ugpG81aRL59sdiWEgU34b7u6BRk0bJJuLvgzM7CvovQKr3gZXcFz+x5vJ+F iA/lDPTgem3e/Wdl6q+qIKIEQQiXQxhxZ84uxHflMeAknXAA8qFEKZMQ67bCFUasnPN0 HiLrh3TR1sXgQ4Qqnfd7EFSc2oonI7gNCdPvP7I3DurRSE/icnknpSXEx8Nzq8FFG7AT 47e2KYBNQWrDXPfXzxXg4m+6B7A5zr+qE6Z3VmkDvNPNN+igwomg2rctKlmQkDyB/n+u w1JC2d2HxpYGshHPxSbakQjIsgXqMHMlHlkJcxuJGQggQ+CQQuKyli3FPXGX34zFOlmh BYGQ== X-Gm-Message-State: AOAM533/CsJWv48FJXVY4kzFRUXnchnY1oJ2PlUDNWiEusFhCPsFA9hO 2naXUzzZejVI31ZQz7IEr2GxlQ== X-Received: by 2002:a05:600c:a45:: with SMTP id c5mr5913096wmq.79.1633109891785; Fri, 01 Oct 2021 10:38: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 k9sm6186592wrz.22.2021.10.01.10.38.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 10:38:11 -0700 (PDT) From: Jean-Philippe Brucker To: eric.auger@redhat.com, imammedo@redhat.com Subject: [PATCH v4 01/11] hw/acpi: Add VIOT table Date: Fri, 1 Oct 2021 18:33:49 +0100 Message-Id: <20211001173358.863017-2-jean-philippe@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211001173358.863017-1-jean-philippe@linaro.org> References: <20211001173358.863017-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=jean-philippe@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) 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: peter.maydell@linaro.org, ehabkost@redhat.com, mst@redhat.com, richard.henderson@linaro.org, qemu-devel@nongnu.org, shannon.zhaosl@gmail.com, Jean-Philippe Brucker , qemu-arm@nongnu.org, ani@anisinha.ca, pbonzini@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.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 when instantiating a virtio-iommu device. 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 | 112 ++++++++++++++++++++++++++++++++++++++++++++ hw/acpi/Kconfig | 4 ++ hw/acpi/meson.build | 1 + 4 files changed, 130 insertions(+) create mode 100644 hw/acpi/viot.h create mode 100644 hw/acpi/viot.c -- 2.33.0 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..e33d468e11 --- /dev/null +++ b/hw/acpi/viot.c @@ -0,0 +1,112 @@ +/* + * 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 (PCI range) */ + build_append_int_noprefix(blob, 1, 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. + */ +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 (virtio-pci IOMMU) */ + build_append_int_noprefix(table_data, 3, 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 Fri Oct 1 17:33:50 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: 515114 Delivered-To: patch@linaro.org Received: by 2002:a02:606e:0:0:0:0:0 with SMTP id d46csp1037209jaf; Fri, 1 Oct 2021 11:04:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/G5S0Ldzv+uIIlLY3y/hFH8BlCjW29pMhs1+prUlWVGDKuSTmETcY/zMjshc/BDBbrAwM X-Received: by 2002:a05:600c:1c9a:: with SMTP id k26mr5846805wms.169.1633111462701; Fri, 01 Oct 2021 11:04:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633111462; cv=none; d=google.com; s=arc-20160816; b=A/Jw685kuC7R4z4tFxHw7ziEsxribPM8+Ak40vlvYclrZ1OAit1a5dJU29mMsGe2mH 4fjNiGR9cQUw97VO247WsmFj5v4/1Fohm++7uVK2fS0zNRI6MPsK7MM1CKKF9TMoUyku 6BRei6SpsXDYodZNmtB40dl0CPiahTkC/eM6XBtssiLW5eIdrw2RZ+n/TprBEDL/bXxK wVd+pnjJY58Z2he9sqxFEsV9p+/I+4/7loDXKh4VgIfdXQEv2ItBS3J7Aig0PTk2P5gD lmXF8TJsGfuuI8/OAPQO48vdYbZ12UCjx3hVIGj6g4kuidoWE0d0R/tYkhKjaD1hA0cS T+XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=yO3yTTEzbhf/x4NiXg2WSPV6sp86QcJAMc0N5bcX0+w=; b=XTpTC+eh5BEpJfhLXPWQ+joTYRFAG8oX9Mj+X7GBkAXFm0B+1AmOVTbs80mRxi56Gm XJBCZj2aUWRthaK62vrVlpNEDef8u4/ekbqOFcUMIE3YxrUOp5exyOnML55AlQJwzmCu SVh+jDeR2ctklNnA45RuhiLDWHktLYkHBy+DdezWGc4sv8DaHOUIvEalC55SDf+GXhuv JBTcwxd7/Xj/1TzkTU5BS5CN5dsbEiQI1B4nuRhBr1TJ0wW93cLR4BATJ2A1jeYXzJuY oclzVlRuSsFOxUu4zIfsEeoMIX5K1QKgPWsP8BQj7OoWBVb0lCJjGB0GwbrXecENADuC oPLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=B0y+jAY1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v6si592765wrq.433.2021.10.01.11.04.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Oct 2021 11:04:22 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=B0y+jAY1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:36128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWMtR-0008Kx-KA for patch@linaro.org; Fri, 01 Oct 2021 14:04:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60706) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWMUG-0000XQ-1H for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:38:22 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:46669) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWMUA-0000fo-62 for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:38:18 -0400 Received: by mail-wr1-x436.google.com with SMTP id k7so16526513wrd.13 for ; Fri, 01 Oct 2021 10:38:13 -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=yO3yTTEzbhf/x4NiXg2WSPV6sp86QcJAMc0N5bcX0+w=; b=B0y+jAY1R3bsDDR0ds7bcYmxU1Xq6NEl1fRXnVVvBcmTTo8gSreqmxh6/cV2GJfG8U g6GDZMGtPpE5H8gTw1liG/rKJo9wQ/0ZFMr8vODzZRA+IvoCrfaL+jDNpeUprOTPlMLx uU83jm/+TehUGR4IZujs1kpeQr+uk/Su51+/2/PMwQXRr4J5ohonq/NDRRRI/rmQjhV7 ypPc97aarua0C7mUP7bRV/GFvlpewTLcFSuxQ6unP9WFrOO0OwLF/h+AXydPVhqkkfTH 2cmJPDhScFeDw4gEDt2P4HMg0j1YfDfVvLhq2ctVFKx3UQwX1CwpJu5BfdNNGXx9Ctem gsyA== 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=yO3yTTEzbhf/x4NiXg2WSPV6sp86QcJAMc0N5bcX0+w=; b=G2QkwrO2hACPu6I1NVPgO3asMSrHUOFceyuHQLy5T1EMu0HcZv2sOtDaWJfv3qEByS uYSQhgu8ZbA8U2WAk17HdNqrcZW2uq3pgOjDzgh/pS9pIQveLCGvp3/iMUpoGYKs7W4j Cl+NcY1VNMUKFXei1u1Hy+IMrUgQ1iikd+V1wEG21JkQPO/VnV8Iun4/lBJhVWRhqlY6 phud76TBvUVO+Ol/6JD3WcwA0zQyytiyJMbYaK79K4SBLA3gF7gWDDU1il+okchQigSZ B0Tt4rQdamJqZdKc5Z+52IM+gj+jGpqufyfaRxWYXpvyKfg6N/BwGR5z4xnl+VhSNZ1g FpNA== X-Gm-Message-State: AOAM5312B/nGNfClHpYBzXkc+lrmN0oJgF2W7EPkMqJZWckmgwZOiCvg 6KbLHwjIcckGvMhR/YkifMPSMw== X-Received: by 2002:a5d:47cf:: with SMTP id o15mr9926159wrc.394.1633109892789; Fri, 01 Oct 2021 10:38:12 -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 k9sm6186592wrz.22.2021.10.01.10.38.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 10:38:12 -0700 (PDT) From: Jean-Philippe Brucker To: eric.auger@redhat.com, imammedo@redhat.com Subject: [PATCH v4 02/11] hw/arm/virt-acpi-build: Add VIOT table for virtio-iommu Date: Fri, 1 Oct 2021 18:33:50 +0100 Message-Id: <20211001173358.863017-3-jean-philippe@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211001173358.863017-1-jean-philippe@linaro.org> References: <20211001173358.863017-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=jean-philippe@linaro.org; helo=mail-wr1-x436.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: peter.maydell@linaro.org, ehabkost@redhat.com, mst@redhat.com, richard.henderson@linaro.org, qemu-devel@nongnu.org, shannon.zhaosl@gmail.com, Jean-Philippe Brucker , qemu-arm@nongnu.org, ani@anisinha.ca, pbonzini@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.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 --- hw/arm/virt-acpi-build.c | 7 +++++++ hw/arm/Kconfig | 1 + 2 files changed, 8 insertions(+) -- 2.33.0 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 18832abf7d..a05d75faca 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 Fri Oct 1 17:33:51 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: 515100 Delivered-To: patch@linaro.org Received: by 2002:a02:606e:0:0:0:0:0 with SMTP id d46csp1028473jaf; Fri, 1 Oct 2021 10:53:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5/zjrr4iKw/YB8MP+EZGhFPdjlHuhcOgr6uVcHR7ohc0E5IgWzJBF3srB9EDjT3lSxFEP X-Received: by 2002:a67:ce14:: with SMTP id s20mr5481731vsl.34.1633110802823; Fri, 01 Oct 2021 10:53:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633110802; cv=none; d=google.com; s=arc-20160816; b=vKYxrPeFbtO+AJF3nAYC6ZQMQpCN24ULyAb9WdzHHryEOZw9legv+yu7u7l1Z7zzMk JcJEJxRJfgSRp3UxV+uoVi2KI0Kb6hXeldxkfmNVuQKaORp6D1muaAVrN3iJ87m/XUtR L3RG7bDKuAXpo0m6NXAvwlVCbKcbu1cPY7Am1H11Pm48gZAalqWFLUPVkI/yislClb9X 89b4O83AvfBf+EaE1mfiI2a2lHKc5dh3OIrNcUmjyLyw2BN7wOmQ4va0c+KvcIrQrZZV L0lzaJ4Ixm7ngAOzWOpCCnIwR5Ci3XlM40nBbjr9DgdZXKBMT+fpNgH+wslfxV5HhYnZ 6l9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=GfzrfQuCesRig+urnKnz4Z2aAE6Gevuk3T+hVeRIpxs=; b=LByhKXLenDrIVj310JGKBUjt/wmi5i0zodR34uXwvM8Bjc61CBqVbp2DCdPE//noNr K/y6UwJGyoV5OtVnZqxqnQrNZ1TqzEm2ODaOVv5Iw6uHCCGK1ByD5xu0PfZwlyRmed5x gR7BFi4pLEAxyQTsvveooO+EB9yjmPAbYd4Q7wt1jxcqdHwC4bJuFEwYbv80UB83oDaq XOUszc8GfGjUSIpu/LYKWwzM2cDa+cLsH6fGd+Pg8XnRTS9E78sOJIXUETByOy8FM0R1 OXOt3QSNSbB70dz9sR3FctEDZ1qM+qkOybJ/DjB6v40v4iVDJewDBDN07HcV6faqIwlN hcPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=xQ8Jn0vr; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r6si3024946vsj.56.2021.10.01.10.53.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Oct 2021 10:53:22 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=xQ8Jn0vr; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWMio-0003av-6Z for patch@linaro.org; Fri, 01 Oct 2021 13:53:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60882) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWMUO-0000ax-MK for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:38:30 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:38656) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWMUB-0000he-8x for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:38:26 -0400 Received: by mail-wm1-x32c.google.com with SMTP id g193-20020a1c20ca000000b0030d55f1d984so584659wmg.3 for ; Fri, 01 Oct 2021 10:38:14 -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=GfzrfQuCesRig+urnKnz4Z2aAE6Gevuk3T+hVeRIpxs=; b=xQ8Jn0vrk2k89rjJuHqRFACYxlijBivZZRJc8Yex/E0fS8B34rbVAyQuwY69WAZPY8 yLJjlsJxwF3no34xYeFXJdup+O1DGoLPsUto6T90QurgEr8SxmGU65mYC+yw2EtH3Vae WJQbcM/+0e+mQlXQp534eVQUgZa5bI33+VL6/y2mmKZSCRIo9yoqielkI9aq8LolUFHm /o9VYXQzYdOq3o027KGZQIXCFqmgNtbxZ8CDI7Hg5ujnBwgAWOS4V0ciYKqwbfE8E+Dp LBAExP4QY3tnFuyBQ6+iBxEBRvt2TlzEelavoL+vxOdu4SopLWn1IorTe3odWh+g/WxA 4+JA== 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=GfzrfQuCesRig+urnKnz4Z2aAE6Gevuk3T+hVeRIpxs=; b=ZnuDUvJYEjsIlmE595QYXMMJwhkVS1+CqHU0PAqLzhImfiKLRHtFuX7dTY50M7qbFo EqnVKzySaqpAa/8h62LgyVGHR4B/WPOMRZGYB/r+jPmu5dO8nHqYJ2a5rzPMWdn+CPcq Dh2IlorMNgW2LF3d+r8B+SuKKvy5MouOdEs+ROQZzj8m/cwML7CCHPHKu6Qdq1kyKe3f LIcA4qZ7uDSUxl1KBwMkR/CID180dPSDGy4fYkVektL50/wc2lOdWhtzEqRTd8vee/OK 4Q7urY5tJKHqZ9nFTHJEWnsDm1cIqHekkM3qsY7sQp9rTxXPk7VpbmsgsfXbuNJssFBk L4MQ== X-Gm-Message-State: AOAM530wgc5I7pwKZhiCULVr3RcZZdNEO5aJs8E/YV1d6Y2cQzG3BMsB MUayaHkBKpRvckulHZfgq1G8pw== X-Received: by 2002:a05:600c:4e86:: with SMTP id f6mr6076321wmq.52.1633109893772; Fri, 01 Oct 2021 10:38:13 -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 k9sm6186592wrz.22.2021.10.01.10.38.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 10:38:13 -0700 (PDT) From: Jean-Philippe Brucker To: eric.auger@redhat.com, imammedo@redhat.com Subject: [PATCH v4 03/11] hw/arm/virt: Remove device tree restriction for virtio-iommu Date: Fri, 1 Oct 2021 18:33:51 +0100 Message-Id: <20211001173358.863017-4-jean-philippe@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211001173358.863017-1-jean-philippe@linaro.org> References: <20211001173358.863017-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=jean-philippe@linaro.org; helo=mail-wm1-x32c.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: peter.maydell@linaro.org, ehabkost@redhat.com, mst@redhat.com, richard.henderson@linaro.org, qemu-devel@nongnu.org, shannon.zhaosl@gmail.com, Jean-Philippe Brucker , qemu-arm@nongnu.org, ani@anisinha.ca, pbonzini@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.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 --- hw/arm/virt.c | 10 ++-------- hw/virtio/virtio-iommu-pci.c | 7 ------- 2 files changed, 2 insertions(+), 15 deletions(-) -- 2.33.0 diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 1d59f0e59f..56e8fc7059 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..f30eb16cbf 100644 --- a/hw/virtio/virtio-iommu-pci.c +++ b/hw/virtio/virtio-iommu-pci.c @@ -48,16 +48,9 @@ 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"); return; } for (int i = 0; i < s->nb_reserved_regions; i++) { From patchwork Fri Oct 1 17:33:52 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: 515094 Delivered-To: patch@linaro.org Received: by 2002:a02:606e:0:0:0:0:0 with SMTP id d46csp1024362jaf; Fri, 1 Oct 2021 10:48:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDVWXJekfaV7eBq+Dkvvs2gYHcN660fQ129IR7ojWLLHa5jGzagkaXzot4gve1GvbQoTrr X-Received: by 2002:ae9:df82:: with SMTP id t124mr10215257qkf.69.1633110485239; Fri, 01 Oct 2021 10:48:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633110485; cv=none; d=google.com; s=arc-20160816; b=QYLbzvgCclm/ackawou/pQ/Znz7Qf/4Vf7B6CaVByqbyFgzUiSSGckLXIq57vjq9TP yvYtn3UQC+zdqU1EGX+ZCAKimfrv8pGwdCsJi27yU8mqlwfGBV8aBV1sARRmAWKydLpP v6rd7p0HYwls8Sj4+FmjMqfS1fX2siiMh16ZAJzta7ZhHQw5MdvYnc2Yego5Kqo0K9OQ bDsDZ06ByqmbsZC7uKIeEbiyeXKnZ/AF9fZdssyq1cqsnqph9YQnvgv2pm53kplJLDOX j1CFtHWLQ/VncYxlsbAIQKP7eHA6DMycfTLoEKTSLyh033azNIRtH1AsahwpjlwEPIIC jIwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=CgVISSWaN/wiEKluLdhbyhIaueQoVjOwu4O8mNNqFLk=; b=QLoufz20EbscgD4vpESd8VUkjU1VZ215ng7NLLKTOU6Unx08G2FIpfH+TgwW63GjXR TotRAa2JPqCz4lacoYMtEPD8pO7Mvp3EpEL0JaOxmGy2cZHNvuc8C9f8+cdy18/s3xBl +vXpPuTINKNQ2In1ODCWkBl790MZaZzJiporAw8ldONgmJzqgEvXFZRYjhD1pQm+uX/N kIXG1QC1tWRgcrQCv+BLQBdL8T5zMRWxy7m3GYHKxP71iycX1jB2/JXDKIaA7nwnnlW+ YyJFiyUs9MkaXkjTZnEPpUX4Ch4mztiKmaK5f91LXYiiUR8g6p4wfOCoD6Dp2QcLgZTP 5j+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Y6Q+t6MK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id fo9si5737661qvb.144.2021.10.01.10.48.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Oct 2021 10:48:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Y6Q+t6MK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:44304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWMdg-0000VY-Ih for patch@linaro.org; Fri, 01 Oct 2021 13:48:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60660) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWMUE-0000Wo-HU for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:38:22 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:40864) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWMUC-0000hw-5a for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:38:18 -0400 Received: by mail-wr1-x42d.google.com with SMTP id s21so16615739wra.7 for ; Fri, 01 Oct 2021 10:38:15 -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=CgVISSWaN/wiEKluLdhbyhIaueQoVjOwu4O8mNNqFLk=; b=Y6Q+t6MKOupG582+reuc5UPxwBsVyf25MkKQUoLCFrkGWudOXnvCtR30OFL50DDPUu MpqrIq1GeDQBBd2phZcKNJ3oin/19hraall6lX+12dNZFD10YDNVw2yqwAu9NXdGEcdv B4xjkDyAz2HDqEh9zesYLl7VDq4QJIbSvWFx4VJrwfAWTgWXpSTqpNtGm+Qc/BZJKtiZ R4PLK1fFmjPzwZZ0abasNbBVJTtkk1IGgat9ikqoegAbtw9/BHD4Tn9s2Mk8t1Ct16bq BCwOyEQ5BRRaKDB8XeHU0RvfW0lw86TwuoP6VHbi8MCt6sWcQm+MXDXjqK2PytFMLRGb LbdQ== 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=CgVISSWaN/wiEKluLdhbyhIaueQoVjOwu4O8mNNqFLk=; b=oCgK/TcaHFeCBESwkLGDv6H2Ec/YZiEOqlObqXmABFSKVD/e/2GjcwTAj86y/VWOfD Erv35iYZEeX8sX5MsEW8cFjOl10B7f5uMcpU1I1y3NJLhZkuki4S3GBZ10UwaonaIRKV K2uYLaetsKhZHUqsrat8gdEn6iD6mcZpDslGJ5rpvnxb+0CNGTacnaWHj+bbEXMMKH0k jJX/NogOocL8aLDPmfr7ewWB9ZVWIL7m/ItsHaT3d9BG8nULbTLJikrMgB6gMKhZMcow 7GbMHGSJe9+hJYj8yMOSwKIrOVoMW0Wqu6pcm9sBL9khFuNjXwg1OK4FBpw8oRiXt6UA YZ7A== X-Gm-Message-State: AOAM531q/MelKxm4dQuRMBzxOShm+YyP/gI49yrZ25x+AR7y8IcFiJYY Z5TeWEOKfZWMU6OGYzgEjAc3Kg== X-Received: by 2002:adf:eb47:: with SMTP id u7mr14237850wrn.333.1633109894816; Fri, 01 Oct 2021 10:38:14 -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 k9sm6186592wrz.22.2021.10.01.10.38.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 10:38:14 -0700 (PDT) From: Jean-Philippe Brucker To: eric.auger@redhat.com, imammedo@redhat.com Subject: [PATCH v4 04/11] hw/arm/virt: Reject instantiation of multiple IOMMUs Date: Fri, 1 Oct 2021 18:33:52 +0100 Message-Id: <20211001173358.863017-5-jean-philippe@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211001173358.863017-1-jean-philippe@linaro.org> References: <20211001173358.863017-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: peter.maydell@linaro.org, ehabkost@redhat.com, mst@redhat.com, richard.henderson@linaro.org, qemu-devel@nongnu.org, shannon.zhaosl@gmail.com, Jean-Philippe Brucker , qemu-arm@nongnu.org, ani@anisinha.ca, pbonzini@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.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 Signed-off-by: Jean-Philippe Brucker --- hw/arm/virt.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.33.0 Reviewed-by: Igor Mammedov diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 56e8fc7059..36f0261ef4 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 Fri Oct 1 17:33:53 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: 515112 Delivered-To: patch@linaro.org Received: by 2002:a02:606e:0:0:0:0:0 with SMTP id d46csp1034627jaf; Fri, 1 Oct 2021 11:01:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyV8VWXNRefZVS/JV6Fxd6mzX+cglF9lZr32HTSutnF3km0zUFlEF9I3yJ5KzQJQwk4jBe8 X-Received: by 2002:adf:ab4a:: with SMTP id r10mr1993805wrc.48.1633111296763; Fri, 01 Oct 2021 11:01:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633111296; cv=none; d=google.com; s=arc-20160816; b=tcV9mTIIFEZyWBWknPdvo6cH3sx1JDrM2NApLDJrHbGaPwedDyjm7ZQrTF+dGxZ7li uC85fx7X8SWY5hwMydwi9YlByEoa7alE+gTLglk20w6SQKoYEgFHi2o6QQODrEshIu8D 7dn59BwFURLKIPdil2UC5uwmTj5BodRyws5evBryEzHfGMoktT0wrYtIWtlzDwnzoTiW V0fKA6otZCPf1mc3RKiCdFjZ5HzirAfgIIzVVJUfKb/2UThy9UhnlOQSuVq6EwwR7MXF hpTnEVKKD8+M0ERoMnKe7xa3uU5iHReqqG0tQEBiQ975jnwysT85ZKPfchS373LWzsCK p1gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=ezcbvk/+kLD6i+tf1SI+n2SWS5P4d5inXJz75DvTmhM=; b=zjNV6+iObihabXAUYfd4BeSA53HmK0+vBr84PFJ4tdZNTqBHk6esPDGNYJ5R0Br8Rk npB1sG0QoH7mB9WNLQb4gpTLu00TNS5/wPoRlULuEkUmkHhKRqFivzaAmaXhn2vunTcM HUuez4YlVc3IegeYjNrRXZ/lYuOY4b1vsmK156sk1isfS8WMzfQ/4KXUg98uIpSZYTTO NjS+WQVwRadf3D/gO8jrZn6M7sb6w6EUsCP+diKoSCEVJ1Lpw8VMC7NNAsMceTsIlYQr DJkKWaW+nQB9POxZaChSDS61+Q3tcejYaTuh153EVqsy/wHdE1qjskl2h9F+boYRJDVn R7Bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ybZ9ULUb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f7si8752142wri.55.2021.10.01.11.01.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Oct 2021 11:01:36 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ybZ9ULUb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:55704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWMql-0002OH-B1 for patch@linaro.org; Fri, 01 Oct 2021 14:01:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWMUG-0000XP-1G for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:38:22 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:41561) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWMUD-0000jC-7P for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:38:19 -0400 Received: by mail-wm1-x32b.google.com with SMTP id g19-20020a1c9d13000000b003075062d4daso7288599wme.0 for ; Fri, 01 Oct 2021 10:38:16 -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=ezcbvk/+kLD6i+tf1SI+n2SWS5P4d5inXJz75DvTmhM=; b=ybZ9ULUbYc9FQ/tepxzqHXkP07aCwVxeouYzulmVK3/AMQ1oqtjSM4CziQ5LM+xCFo +2nVqlfhP9Ktj4iIv1I4iqBuB5AKLNt0WsMLcZKl9DwENLZCxER4X97euLpjomDwX+Xo XAR6iU6RQhAsBGeK3YHa1ku0KCDFPei5+X7mvlP3nV1aQG0GASk/2sY+YWVZsOgW9iTB RSMvJWQCtcDPqMmrNFnOnk+PmiYlznL7J1+xvEBepKnsV15TRW7z7gP7Movy9hfjNSOR 4cGs88bLTehDlLwrJsX59A/WhzwAkTTMHKBC39dS2D0QteV8GfVYYLJonVvhEoksD4ZB UvaQ== 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=ezcbvk/+kLD6i+tf1SI+n2SWS5P4d5inXJz75DvTmhM=; b=gVRJ5mACik3mr0I60B+DixSoxb76qa7Y+JNK7r39MlMmFyW3L6edI65gSb4Jo2io20 bjaRDwajR0nf5kD/VcAa7Va/B7Fk1eFA92LGhckQUS75YAx2BatohUx99XKakdTUmkoC CZTqLkS9PTNkmJnwArnfPxfEtfLYYyV0kHklY+lAJn8EkZouO+lbOnJxcLZNzxtM78q1 et93fLPY5U8RV9RHFdYvfIVH5y4CyCeuLVAFl3UB3kSAs8IqyAN4H1mwrhcoUeF7dSyF 1MQA19/Bc69DjHq3v1/q0csvNCzOrBls9uwSc/ySxmi15JJmifIccTS21GCztugXGXI3 9tmw== X-Gm-Message-State: AOAM532S/EvgtdZNan+F5Qup1GRImBoPPG2Fts5LhDsIkstryvdRjPGy lzMCqlJZviQA/HAUgAJVrRWQPw== X-Received: by 2002:a1c:1d92:: with SMTP id d140mr6071526wmd.17.1633109895826; Fri, 01 Oct 2021 10:38:15 -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 k9sm6186592wrz.22.2021.10.01.10.38.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 10:38:15 -0700 (PDT) From: Jean-Philippe Brucker To: eric.auger@redhat.com, imammedo@redhat.com Subject: [PATCH v4 05/11] hw/arm/virt: Use object_property_set instead of qdev_prop_set Date: Fri, 1 Oct 2021 18:33:53 +0100 Message-Id: <20211001173358.863017-6-jean-philippe@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211001173358.863017-1-jean-philippe@linaro.org> References: <20211001173358.863017-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=jean-philippe@linaro.org; helo=mail-wm1-x32b.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: peter.maydell@linaro.org, ehabkost@redhat.com, mst@redhat.com, richard.henderson@linaro.org, qemu-devel@nongnu.org, shannon.zhaosl@gmail.com, Jean-Philippe Brucker , qemu-arm@nongnu.org, ani@anisinha.ca, pbonzini@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.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 Signed-off-by: Jean-Philippe Brucker --- hw/arm/virt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.33.0 Reviewed-by: Eric Auger Reviewed-by: Igor Mammedov diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 36f0261ef4..ac307b6030 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 Fri Oct 1 17:33:54 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: 515115 Delivered-To: patch@linaro.org Received: by 2002:a02:606e:0:0:0:0:0 with SMTP id d46csp1039429jaf; Fri, 1 Oct 2021 11:06:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7+ZHegLStANaaAlbI3e5dMT0mGdYNIukSeWbfX/HuOyIRK1dL0YBf1d3I9dKcXgKHN4Ga X-Received: by 2002:a05:600c:21d6:: with SMTP id x22mr6035837wmj.121.1633111613855; Fri, 01 Oct 2021 11:06:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633111613; cv=none; d=google.com; s=arc-20160816; b=TvHnq30YIcgrd7YCCZnwL6u4JkyWhrI83/Ut9FOQ3NWPHgmrxH/k5P4DgZhJ6BsaZ6 AlzFIjnYQiH73JZZQa5iIl9Ojad2i+vTI/ZeYO4Ux/e1W3VOP+/oh1FSNk0ZCiJkI2EK O/nW+8Iuirn+Xo9w3icL0YWtKz/6zYTbU9UAGEZkdSzjm1Cmvuxch2QbwtbqswZfgm+m aPUnezDPM2DuqZZaaNk1g5C2wpnVKScmpGJDhCy4Yi09bb+orM24gvJkOU2sm+0gna1W FVC7W6kMd/eVYQHfPDc7nsOZY9HBFU57yd7bicOppbtjyB36M/NKzOse3wwOYrOwaWk6 sXbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=cdHPQI9tRbF9oA3co/8E8LRH7+4LnLYtNbcNQWk0r9Y=; b=vT2CPMOWszJxiwzJkIVrp0qNN59xaWFyW1rUHO3IVtT9hkbjq3DklpnV6Q8/fY0XGf nuEqesl+60qjOYJ1T+bJm71lmBhFPLPrCM0zaKCWsoEwwf7J1VZitQ+OdU3FB0PAOWIx Hp3tYi8PNt5AFCuJkt1YqZZLETtJuwDgfvt3lNJXDPeOOpU0vNFW9ghLSmnw+V6jqMWy EQ9MA2zbIZIs/NhFrCPFL0jy8Fa70xlZgnhaZga6dXZCtvgvqUUZZN1jTABFe6cBBkZx PL0PlSAPqy+PtD5ydwKppQzwjsxhcVyQODlZ4ba59Jdy0za2/bZ9YcbWoPQeIynIbjTs L5pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=B6uF6YCk; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e14si9477460wrg.229.2021.10.01.11.06.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Oct 2021 11:06:53 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=B6uF6YCk; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:43188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWMvs-0004ey-U9 for patch@linaro.org; Fri, 01 Oct 2021 14:06:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60768) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWMUI-0000Yr-EH for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:38:24 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:54259) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWMUF-0000kw-P7 for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:38:22 -0400 Received: by mail-wm1-x336.google.com with SMTP id z2so7769991wmc.3 for ; Fri, 01 Oct 2021 10:38:18 -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=cdHPQI9tRbF9oA3co/8E8LRH7+4LnLYtNbcNQWk0r9Y=; b=B6uF6YCkgVF8BWzc6Hp8qYtX/8ubIaAe2PgfOsKlYkTC/sI0R8Qq1vZo+gxvE6a6QO ahbhdu6Dh1vymqaSMJhv3KiXcGD9cBT/jDSuTdViWTGO+Xt1niaY+FK8xq12ZE/WB2UP E00vvzJLUOlvoSosXAI67rDLUu/qBrmeUtcOrhEWQDKcQh1HyNH0uftSg80ZLVSIajmA jeCiKGOHOCIKPwQzJ+MN5vjKeskUKwn53+yY7sf/zuMrLrzHNYQQizDHFeYvLkpSAF8x GpEe8zVMLpl7lFj+tOYkoOwSDFozuCjK+1WNmeyu1oQOjsJT0BThBjR4DVEH2XXGV6DH 9myg== 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=cdHPQI9tRbF9oA3co/8E8LRH7+4LnLYtNbcNQWk0r9Y=; b=vex5rinpHk9UCniQv47IneHqUtFRBcVVUX+huN+WjmlA2/itsTovqd2TN9GD1OTp2k G7rSbakSlqi14PWr3AnVFI6dfSGHqFmcAjUbKmTTOtJulGxTx8jQCYG39U8DCBJMnOqi plgVm98f+ZdhuS/Nv5pl73qr+2GccYTbHUL9xpPasdPSwcXnMaSRYW2lELmazLHEZcba PxA/o8O2m6R9N+LYpbJKRMQIrlUOxiAF57ZGIQm/ngxHyuSsrwQ6Vmr60NtfWb1p8Vd6 HSuCspymnbVEE98PA1XxZ05t+UWerFlQdqnmvwzwu9qepP6Wl7ebtXYTkhGRuunGAooP t4TQ== X-Gm-Message-State: AOAM5311qMFwSFEWO8ipWg23vXTnTFX7Y85eyoYI4J9g94hS7dDxZSOp H0yJ2ihIIQcy4Iln60iW6r+UMQ== X-Received: by 2002:a05:600c:214c:: with SMTP id v12mr5888474wml.179.1633109896927; Fri, 01 Oct 2021 10:38:16 -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 k9sm6186592wrz.22.2021.10.01.10.38.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 10:38:16 -0700 (PDT) From: Jean-Philippe Brucker To: eric.auger@redhat.com, imammedo@redhat.com Subject: [PATCH v4 06/11] hw/i386: Move vIOMMU uniqueness check into pc.c Date: Fri, 1 Oct 2021 18:33:54 +0100 Message-Id: <20211001173358.863017-7-jean-philippe@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211001173358.863017-1-jean-philippe@linaro.org> References: <20211001173358.863017-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=jean-philippe@linaro.org; helo=mail-wm1-x336.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: peter.maydell@linaro.org, ehabkost@redhat.com, mst@redhat.com, richard.henderson@linaro.org, qemu-devel@nongnu.org, shannon.zhaosl@gmail.com, Jean-Philippe Brucker , qemu-arm@nongnu.org, ani@anisinha.ca, pbonzini@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We're about to need this check for a third vIOMMU, virtio-iommu, which doesn't inherit X86IOMMUState as it doesn't support IRQ remapping and is a virtio device. Move the check into the pre_plug callback to be shared by all three vIOMMUs. Signed-off-by: Jean-Philippe Brucker --- hw/i386/pc.c | 10 +++++++++- hw/i386/x86-iommu.c | 6 ------ 2 files changed, 9 insertions(+), 7 deletions(-) -- 2.33.0 Reviewed-by: Eric Auger Tested-by: Eric Auger diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 557d49c9f8..789ccb6ef4 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1367,6 +1367,13 @@ static void pc_virtio_md_pci_unplug(HotplugHandler *hotplug_dev, static void pc_machine_device_pre_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp) { + if (object_dynamic_cast(OBJECT(dev), TYPE_X86_IOMMU_DEVICE) && + x86_iommu_get_default()) { + error_setg(errp, "QEMU does not support multiple vIOMMUs " + "for x86 yet."); + return; + } + if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) { pc_memory_pre_plug(hotplug_dev, dev, errp); } else if (object_dynamic_cast(OBJECT(dev), TYPE_CPU)) { @@ -1428,7 +1435,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 86ad03972e..550e551993 100644 --- a/hw/i386/x86-iommu.c +++ b/hw/i386/x86-iommu.c @@ -84,12 +84,6 @@ static void x86_iommu_set_default(X86IOMMUState *x86_iommu) { assert(x86_iommu); - if (x86_iommu_default) { - error_report("QEMU does not support multiple vIOMMUs " - "for x86 yet."); - exit(1); - } - x86_iommu_default = x86_iommu; } From patchwork Fri Oct 1 17:33:55 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: 515113 Delivered-To: patch@linaro.org Received: by 2002:a02:606e:0:0:0:0:0 with SMTP id d46csp1036760jaf; Fri, 1 Oct 2021 11:03:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRbHFwbUeGKwOcXADDfA5ySHNln9rZCRqi9roiud1vWftpO4mq8xNHULV71rqI0ssnDLME X-Received: by 2002:a05:6122:e13:: with SMTP id bk19mr10003371vkb.15.1633111437456; Fri, 01 Oct 2021 11:03:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633111437; cv=none; d=google.com; s=arc-20160816; b=JanIIYp/VCrpKxDSYjo6tMFc0g5aRStQob1RWGRvF0uxQduX3N2y/51AgEIbR5dF7x y8BIP/W4cp0A+miIMhbYWozibns82qvOKeK8FDCbOAAcurx+plmzZoK/3swYNXwuCUdV 2iJw0S3IzFhqMaCGB6PmfKeOWi0M1AgxgS2lmi8BPN2dAm5Q/R00SVpNADMsMqhpgdEv ziaJO8IEKw8KMkTLCRnvMHoX5oh9qnq3oc6AQnAkbrqQWlWXs45ru3aULkIrXsRj98Gb 96dm54VMfJ4x92Srhc1IUebMdkRhKvX5ewh9K+vIT3DVvrcODvYS3ap3qFIrbd10VnF3 6MfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=3ZMT/fPQaI7mMrURnWk+8owajZ9ST42bm/R218dwfdI=; b=1IQpnS5oUPIeF7S/FG7lZpBcwdLSXz6ZaHYLK0mYSNWqTib+GSnict0C9idSUyZJPX nVaAv2ue9UYmrtyWsKjXedOVDTBd13kXPvdt4pOTydjOKetSP3imCyye4aibaXDALABn pJbpmnBKSZWLNtCo77SZMp2dJDrz/RD6EF/oc5wxt7zxaeaxtoZ+pcCs4coe7JXaBMWM 7tk6fMDscCuLXvFbaUpxd3LfoOFc2uEJqi3rdEsPNMupdpHU/0ImtO9WDYEcO2DLRS5N VmMK/Ony+sxviBdyHRvPoXQpkTOE5B5lAg5zSST8xcqqPKjMmMuwlHgiwW8r1t8e28+C I8ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=OU0OdLER; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v3si4547237uae.60.2021.10.01.11.03.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Oct 2021 11:03:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=OU0OdLER; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34348 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWMt2-0007CE-QP for patch@linaro.org; Fri, 01 Oct 2021 14:03:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60836) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWMUM-0000Zj-GE for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:38:26 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:43695) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWMUF-0000l8-Po for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:38:22 -0400 Received: by mail-wr1-x433.google.com with SMTP id r7so1132732wrc.10 for ; Fri, 01 Oct 2021 10:38:19 -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=3ZMT/fPQaI7mMrURnWk+8owajZ9ST42bm/R218dwfdI=; b=OU0OdLERdnfL4cZd4XU1LJBoB+7KHrZ/l641zlG7MT9eKYmX1Ac6+I4nYaLsU0XMtK mtpL2LEFVZk+FeX7Vsd0gtkR0kM6e2wOsr5fduKL3QWhZ2MLKeqDRuu36tLbQThwNXFU ENKbuGKnlfZFd3h/GB1kSkUjQqZ3v+XMMMucdlPtNifzhOdAypZ5J1zt7frRrVeUXzLI OyXST7ruWfTsvuCcKIOKQ0CubD4Dt9uv29KniksEhjQH4L3tFvPAyM5ZhfMM3+JmWkUv 5I2EG/WClctTrSa0IxLKNZqNg8wpIX+lXri9Pn9rYjsXxv7kZKMzRDI2RsuAHE38hE62 2xkw== 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=3ZMT/fPQaI7mMrURnWk+8owajZ9ST42bm/R218dwfdI=; b=Wmclp89ig2xKeegyM2uKNnABaoag7oRTo1rMhcUP1kQi0zjl9z8rRm12eM1mUUbYDr OwOV5OyrVt/ZKIvQxZrtCFdCto0msI5zlqVlgrEq2CceB8w6zW1aaSOrvfU4rRjof//R WjmBPE7XUA5FmpqM2ApXXjyXObZmTp2qsMREpBeXUoGL0b6Khe0nkN3u+EoWA+gK36C3 5XjGKvRhS6Wwez5Qb17vG3/2650EMvEhIT8G3TqPdXphd/uZur9iDrTDxKWB0Xi54Xz1 Bp1aLXrBPEMsVTtsiBy5xRK/LZaf8cv5aYnPDe3YwDtwLfyf0OCiarDm6wSjRoPhAX0G tTdA== X-Gm-Message-State: AOAM533AQClY7rqH2aYWXWCy/ZTz/6/dqfVub2uaHQ+ANemQI+7SNRZ7 9tqVSStqZ2t40D6/eQEUqfpcBQ== X-Received: by 2002:adf:e0cc:: with SMTP id m12mr14263403wri.62.1633109898222; Fri, 01 Oct 2021 10:38:18 -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 k9sm6186592wrz.22.2021.10.01.10.38.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 10:38:17 -0700 (PDT) From: Jean-Philippe Brucker To: eric.auger@redhat.com, imammedo@redhat.com Subject: [PATCH v4 07/11] pc: Allow instantiating a virtio-iommu device Date: Fri, 1 Oct 2021 18:33:55 +0100 Message-Id: <20211001173358.863017-8-jean-philippe@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211001173358.863017-1-jean-philippe@linaro.org> References: <20211001173358.863017-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=jean-philippe@linaro.org; helo=mail-wr1-x433.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: peter.maydell@linaro.org, ehabkost@redhat.com, mst@redhat.com, richard.henderson@linaro.org, qemu-devel@nongnu.org, shannon.zhaosl@gmail.com, Jean-Philippe Brucker , qemu-arm@nongnu.org, ani@anisinha.ca, pbonzini@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.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. Signed-off-by: Jean-Philippe Brucker --- include/hw/i386/pc.h | 2 ++ hw/i386/acpi-build.c | 5 +++++ hw/i386/pc.c | 24 ++++++++++++++++++++++-- hw/i386/Kconfig | 1 + 4 files changed, 30 insertions(+), 2 deletions(-) -- 2.33.0 Reviewed-by: Eric Auger Tested-by: Eric Auger diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 82cf7b7e30..f3ba1ee4c0 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -45,6 +45,8 @@ typedef struct PCMachineState { bool pit_enabled; bool hpet_enabled; bool default_bus_bypass_iommu; + bool virtio_iommu; + uint16_t virtio_iommu_bdf; uint64_t max_fw_size; /* ACPI Memory hotplug IO base address */ diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index d1c28440f4..4e46585709 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -71,6 +71,7 @@ #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 @@ -2593,6 +2594,10 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) build_dmar_q35(tables_blob, tables->linker, x86ms->oem_id, x86ms->oem_table_id); } + } else if (pcms->virtio_iommu) { + acpi_add_table(table_offsets, tables_blob); + build_viot(machine, tables_blob, tables->linker, pcms->virtio_iommu_bdf, + 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 789ccb6ef4..31710bc4fb 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" @@ -1367,8 +1368,11 @@ static void pc_virtio_md_pci_unplug(HotplugHandler *hotplug_dev, static void pc_machine_device_pre_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp) { - if (object_dynamic_cast(OBJECT(dev), TYPE_X86_IOMMU_DEVICE) && - x86_iommu_get_default()) { + PCMachineState *pcms = PC_MACHINE(hotplug_dev); + + if ((object_dynamic_cast(OBJECT(dev), TYPE_X86_IOMMU_DEVICE) || + object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_IOMMU_PCI)) && + (x86_iommu_get_default() || pcms->virtio_iommu)) { error_setg(errp, "QEMU does not support multiple vIOMMUs " "for x86 yet."); return; @@ -1381,6 +1385,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_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); } } @@ -1394,6 +1407,12 @@ static void pc_machine_device_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_plug(hotplug_dev, dev, errp); + } else if (object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_IOMMU_PCI)) { + PCMachineState *pcms = PC_MACHINE(hotplug_dev); + PCIDevice *pdev = PCI_DEVICE(dev); + + pcms->virtio_iommu = true; + pcms->virtio_iommu_bdf = pci_get_bdf(pdev); } } @@ -1436,6 +1455,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 ddedcef0b2..13db05d557 100644 --- a/hw/i386/Kconfig +++ b/hw/i386/Kconfig @@ -54,6 +54,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 Fri Oct 1 17:33:56 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: 515117 Delivered-To: patch@linaro.org Received: by 2002:a02:606e:0:0:0:0:0 with SMTP id d46csp1045369jaf; Fri, 1 Oct 2021 11:13:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDO5KFynBVsD/ruaxNbGfDi3jW+U9VkrGP+HuIXOiyU/6D4pt+OP8PbEw7gV7AGg8mX8Yh X-Received: by 2002:ab0:5ad2:: with SMTP id x18mr11429624uae.125.1633112027155; Fri, 01 Oct 2021 11:13:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633112027; cv=none; d=google.com; s=arc-20160816; b=BCieXpNpyh5VKUe89yLDCHMcZh981C+cf2+55oI2HObmEhLp2sUMjo/Cq/qj1FDFYO crLiwPrFVa5FPgD8sLBFCIuvZpktv/jEKOkTbBxamMr/5hMGIa3ewAERX77/bWEaFzvg FO5rr0YVm7DGwGZ+CdgnhyK3yLf8m6zq9nUSkYsRwlTuM7e/XDrCkTALtGRm+nHRX155 jI8RB/G12AgePOVWvHkuCK078poWTxr+eqqjm9r/RgOeAaTw7kT1HfbRfxhsEn1QxDRi 6RjNEAPsFJB+KpLby5qQrTMY3FRrGpOPIHcB6pW+Xy+t9MjKf6TiIdTf5a12m4qMsAWs 4rcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=tUzjz0DaQh9V/E1AtSG5a0bXdcLZdXoyXVjvZ0SiJck=; b=0eXi1ueOA8AcRw41nW8GqoTdHiyo8DNfIO6+EOp9cOKmfR5Adv9GtzGgGvNhrdttDz NXvDAtGEBOzSGqx2actm7xk69mJKGlk/6iQe+tNOOB6ZPGlyEYg7Tu/3hMkpeCwieOmO ziH5gUllQPUTkvJz75wk7P2NkeAwlp9hmlU9IEA2fM9YvpAsbyHuRkkgEmFYQ8Jo0uX7 v3HXKc3Yx5De/tTV0j+FzGdUD1R2mMzKa29ZqAm3Zx/Vyp7rPzGPEK9v5vYgI3kKqeGX yNpse9y2DIhjEP1Anwa5sJCFZ40xdTzcd7X7O63J7jyEZAccTPCSKNHk8fDDuAjN0d+U 0m8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=MO+jKaoK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w2si5119218vse.263.2021.10.01.11.13.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Oct 2021 11:13:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=MO+jKaoK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:57888 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWN2Y-0006HF-Ia for patch@linaro.org; Fri, 01 Oct 2021 14:13:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60846) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWMUM-0000aT-Ow for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:38:28 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:45589) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWMUG-0000mH-ES for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:38:24 -0400 Received: by mail-wr1-x42e.google.com with SMTP id r10so162257wra.12 for ; Fri, 01 Oct 2021 10:38:20 -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=MO+jKaoKkcl7asXlV2R94xYOsojNok9L8O4LdbJRGQQjI95dY/K2EZQTtgwCvPTISO PEINhcax2ZEddVDNjMuELT6omHNg8pcAe0GVZaLSgm+KPoxQI8Ou6mw+VqqIPZDVQA31 LZAFMgpCy/lw81KqKc+Umuyp8MrDFqaOYOsnUfEl7cgZywqPTMjk1tLMOc29VIyM2ELn yDXPJ7+bo8zgoHC+u9STNs8Jr3u9RTkvIieJ6dgErAS5iJNxrnBAeklPC76jgrlq8ZTL cqAexzm19CR8K4ANE1VRxpRCNJohNHS7Igc1vjLfNggBwNycW0ZodWpXlXmDWLpVjojE 4KVw== 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=DWmGujzdnPI1RUjutZ/iwAqN0XOzYOqFpeRLCw656af4LnMsX+ylfYBBgLNeGHfHVR PLcjLEfxqr16t4VjAGHeKE/u4jLEqx5tbAVf/GY0u5AnBadl4V+lln1B71KNSXtG6APX 9VqxDmfWwQG+J3vBGF/JWqZ37atdEkmTknChmBrLa3QFtFf/Cw9Wp6r4Ke0scaP/rFWA XrRQzCjlBBBfX+0K7cc7tiOqnDTJ1xRnZnPxI+/tGzGTmpuwOTPFgaWQaGoAuH3xOd0o dNtn+aEuEsmDY8/0cHeE5Z4Ho2LxjN/GHMfDzPf19iNgwdC5CBxtAF76+uvZNGx6Do8U 4Erg== X-Gm-Message-State: AOAM5339vDGBstbZVZm1aZe2F0QmJ/nlomZfvXYSoxN9ig4kHwJSPTpg S79uUXxY1Zeq8OOnf5NjoxxRuQ== X-Received: by 2002:adf:e742:: with SMTP id c2mr13997124wrn.18.1633109899187; Fri, 01 Oct 2021 10:38:19 -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 k9sm6186592wrz.22.2021.10.01.10.38.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 10:38:18 -0700 (PDT) From: Jean-Philippe Brucker To: eric.auger@redhat.com, imammedo@redhat.com Subject: [PATCH v4 08/11] tests/acpi: allow updates of VIOT expected data files Date: Fri, 1 Oct 2021 18:33:56 +0100 Message-Id: <20211001173358.863017-9-jean-philippe@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211001173358.863017-1-jean-philippe@linaro.org> References: <20211001173358.863017-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=jean-philippe@linaro.org; helo=mail-wr1-x42e.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: peter.maydell@linaro.org, ehabkost@redhat.com, mst@redhat.com, richard.henderson@linaro.org, qemu-devel@nongnu.org, shannon.zhaosl@gmail.com, Jean-Philippe Brucker , qemu-arm@nongnu.org, ani@anisinha.ca, pbonzini@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Create empty data files and allow updates for the upcoming VIOT tests. Signed-off-by: Jean-Philippe Brucker --- 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/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 -- 2.33.0 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", From patchwork Fri Oct 1 17:33:57 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: 515116 Delivered-To: patch@linaro.org Received: by 2002:a02:606e:0:0:0:0:0 with SMTP id d46csp1043880jaf; Fri, 1 Oct 2021 11:11:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGk63THEIOOmcgyhr6QECZPmpOKMLRfBilN/wvBInQ5ZRkc2YfluJF/evdz7A+TYfqLTDH X-Received: by 2002:ab0:5b03:: with SMTP id u3mr11589376uae.41.1633111917083; Fri, 01 Oct 2021 11:11:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633111917; cv=none; d=google.com; s=arc-20160816; b=NvyzcaRnpUTQZMUmmSVYdOuOFQvlLolrftGZmq851NVmGLg1r++AwmILJ5Ma/10ffB sConA4cw0rAhmPzKrLsCNimJtgVQ7qRyDOkAe/qS8kVvMLDpWuihELO829aG045Xm8OP w+Om4ZAs1GFRiHVdcpz0CeJZT3sbkw9x2Js/qNwaW1qqb+DSb0FInux7OqIEJJRScMBK YZGIE06rFhtkT9mcwioQn+oPbWsTETcE9c2SQd8Nv6uzoWTwyBXxoKBTtlBG9+DBOVM3 /AfrEYuw29cD21GMnjn6RBy3/tcTvY/+GfQjwWuH12v2AliFmncT7po54tkYNKSs1b66 8HQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=39Knl8lMnepL6kcVt9jhZefLZXbFTU/t5RlVQ8xkhKg=; b=fcHb6/9Oh0UrM5YxSwV86LbfLp+c4VO0JH0N9uwFlmvk6jNQgdALp+s+StOY1nlnWY llIhsFqDtaDuUfwsEmaT7UanyUPTk2osWvShVq4RaW6ELPZH6JaMiQZXeFbL7N0SfE3X bXTQnXOcKSHk/Dw4gD2BxcFJVCmj1PgNAbzlak7ISMHcG02Cnl0HWRrPYcmHoPu97ZC7 Yw4zuVq6sMiIZzgSQqbBBeV3oUBmghvxOsbckW55EhJOnY+MYYoJXt6Gx2xIn5349LTG aKaGEIuKhH71l+GldBdBbgE/wg+p0yBp6ecy/eHqoDnrrIg6BtkJBwqIJTo0/lCo+9Ou H1BA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=osDyd0R6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q18si5033710vkn.96.2021.10.01.11.11.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Oct 2021 11:11:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=osDyd0R6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:53562 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWN0m-0003DP-HN for patch@linaro.org; Fri, 01 Oct 2021 14:11:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWMUM-0000aX-Oe for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:38:28 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:39709) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWMUI-0000nB-5g for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:38:25 -0400 Received: by mail-wr1-x42f.google.com with SMTP id d26so16633449wrb.6 for ; Fri, 01 Oct 2021 10:38:21 -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=39Knl8lMnepL6kcVt9jhZefLZXbFTU/t5RlVQ8xkhKg=; b=osDyd0R6KgbdCpelgFoytLwm532Ov3WtmrWBS7gtdFfp+1o+h8w/RExiVQlqlQj34U GBjLiBEHt5r0QqprQa3SSLi+sYVALZf4VYVWNRA9mphAaahv9Av4ba3Uk2fivx6P4mFN vriMUK+Exp/tYQs64E6JhqHoF5fSRN9PZl3gBfZOe8JSnqSbn9kVlnhRfM8Mmgc4r7uC dZjdeeqZP6KS1talvEUWua+QX+8WyAKvXMtDT2phNKMaFCTrbn6AfVA4lzUxvDBVkIuu p0FtFxjFrobqK8ZsEAt6W+cj3KV54eyeM0q0ink/cdyPZUwuVhiUwzSn6pWuoV08OgsV VQSg== 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=39Knl8lMnepL6kcVt9jhZefLZXbFTU/t5RlVQ8xkhKg=; b=LcKu/IwpfF6l/qB1iDXmfxoQuk8rMCizJFsQfRA+gUVwG8S48hJEdPxKSWs6AqkycE NjxgfAvrAW5YCKwuun/ojwj1xQ0dR4/wEDQtHtiYZm1jOqR5PrLICY1p8yVxt8Kq8HFJ Ym8UlvFqts0Qb212CctQEYA3dj7L8SR32zyc9vUkXz9jFVbU3CDJHg+rhzaIGpBbKy4l JtO/Nd2HbWhpspHA/6v4M7CTEP0QdOIgKLDhuOjImLc5zF7SZmAfVZfvrN/QP8suL42M MmlgmdfRvq/G4KJJZ5adSM01nQ12t7YEb1BKRnhoQo7g3Dj/oTCtW81Jy0q9UbA3rKRa 7Fug== X-Gm-Message-State: AOAM531Aa0vdAebOvzKMLcPZh+N7Ztwg7RsQ8SaNfNQe6Ahy/05KiHh9 sBE7/7ipVW3NrThtXDNUfawOPg== X-Received: by 2002:a05:6000:228:: with SMTP id l8mr13914848wrz.413.1633109900241; Fri, 01 Oct 2021 10:38:20 -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 k9sm6186592wrz.22.2021.10.01.10.38.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 10:38:19 -0700 (PDT) From: Jean-Philippe Brucker To: eric.auger@redhat.com, imammedo@redhat.com Subject: [PATCH v4 09/11] tests/acpi: add test cases for VIOT Date: Fri, 1 Oct 2021 18:33:57 +0100 Message-Id: <20211001173358.863017-10-jean-philippe@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211001173358.863017-1-jean-philippe@linaro.org> References: <20211001173358.863017-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=jean-philippe@linaro.org; helo=mail-wr1-x42f.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: peter.maydell@linaro.org, ehabkost@redhat.com, mst@redhat.com, richard.henderson@linaro.org, qemu-devel@nongnu.org, shannon.zhaosl@gmail.com, Jean-Philippe Brucker , qemu-arm@nongnu.org, ani@anisinha.ca, pbonzini@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.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. Signed-off-by: Jean-Philippe Brucker --- tests/qtest/bios-tables-test.c | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) -- 2.33.0 Reviewed-by: Eric Auger Reviewed-by: Igor Mammedov diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 4f11d03055..b6cb383bd9 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 " + "-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", &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 Fri Oct 1 17:33:58 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: 515097 Delivered-To: patch@linaro.org Received: by 2002:a02:606e:0:0:0:0:0 with SMTP id d46csp1026424jaf; Fri, 1 Oct 2021 10:50:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUSQkPjczC383zmgDPZ2mQ8gDlsXOzS+PBFdirOeWJK+9v+kjguSf/DNaw/h7kStvh+GDp X-Received: by 2002:a67:db82:: with SMTP id f2mr5567258vsk.23.1633110650110; Fri, 01 Oct 2021 10:50:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633110650; cv=none; d=google.com; s=arc-20160816; b=zx0V2XsOshrc/EGdUBNw8Uo5wcKyIWjiTF/3t3GuXZwGf9jFMS1CcPxi4H6i5Hbxzp caQAKgmvi0Q19wB6yhJIdCQ7l/R8dFHUTaPzos16D12J0dT1JggNwgcYpsq/zAan+2Xq ewBG+g6+cqtoqfGQmblbd2CiDurVtMt0fGVUpdT8k3ES8JQrA6ApaGZ7xPffckD2UUnv AMwE5xCvtXlMH5jbV4Y3BntTleK6AEWo4Harr+ufs/RIMKYt+LP2uqO/xhoMM6zPEbN4 /YubXdhirl6YHl6VfsLJTBKwDzsl6g03DifDmxW+LGXKZV3MWO50VjDUvnZGm2p/u6SS QLfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=LXRO/fMo8Qw/FWNF0Yyw4kfLM8T681YtQWZQBpSYMfI=; b=pW8/JfBHLbgNV+TZtm9LKUsuoiU+3RNa3ypMg1759KWebD75FgjbicPMsl9VmYrbw5 ejy5MzLcT6ffKQQU5P0XuVin4s8OAq0mEOEWBrU+b+LH6IRcldFZyuHCW3pCHdhILQjQ +dKQ4vFk6Lw2LHVO1ncyR/abwu4KxDlA7ewc4yFmILASs/nD+iBSGPTubbhsyu8BNc6R rci5GV4VCbKxVQn4wbDShBeiOykA2Y4h7fgoBKjb/q8xMKvC1/E3PWYIJjvFiYcsTUWG g9L4D/yT/sYgRmrX97icn8FtlhNydEqSprRWiX849KxWOhCXPGdxZj2UTsjOzCaNWAbF kTPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=wnzB3u40; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n25si3980847vsk.341.2021.10.01.10.50.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Oct 2021 10:50:50 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=wnzB3u40; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:52384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWMgL-0006Ce-AQ for patch@linaro.org; Fri, 01 Oct 2021 13:50:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60854) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWMUM-0000aa-Rk for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:38:28 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:40867) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWMUI-0000nx-H1 for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:38:25 -0400 Received: by mail-wr1-x42f.google.com with SMTP id s21so16616204wra.7 for ; Fri, 01 Oct 2021 10:38:22 -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=LXRO/fMo8Qw/FWNF0Yyw4kfLM8T681YtQWZQBpSYMfI=; b=wnzB3u40kwE25RRbECRmS+b95hw+bozObqSwAyohmKp4lMi85g1vko8yMEgPOfvJb1 BLiZOZC8Z7j/1hdsIXFOxvINCBciiWY5Yo20soVs/KpdQfSO5MWdywxc88oESPF3a+52 swyaG2u2na1J56pQso5jZhrxbmym3O2fkE0EECzyJIc3KyrV+vMpQh07fRZq48EfoFis bCYxGqlMbohM9WcuH8Iby2nHIY11T2vrdKu1n1v5SrtXDkko+gqJTExhLSaXXNya7zSF VGC9dnAp+RWdNfSqzVUa3k/iCUAEPY3Y2lgiVx8bEk2GITTrurZLTkOPLJqKZ1oUe+UA T3Rw== 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=LXRO/fMo8Qw/FWNF0Yyw4kfLM8T681YtQWZQBpSYMfI=; b=vfDaVLXYAH3Tq69TdGhmyfzIqeOARiUwvET3FlJ/Dm+jv/yoNKIO7dS+mLAq2+Oxny bD4YY3oF5+KdSMFLZelQBEUAxHHcDgxCkLcLKGRihdu7qrOWVRpJqPrJwzlj0Mg+VSOP Ysutwlz/2xRukhM+6Nm9u6XSrBfuiPCO+Dcg90ONYKzkOu339SowmbZG4b/KB2hVb/nB Wnc4qdntYq3HFhE1qW6lVHt7emtgkPatU7EruJ5U+l4/Vd5eK7aytNqhr2uGQn451rhC OAVKSEL4npGwRgJc57B8cBVJt6SsHcAWWAfzfHyu8Fu8oR8lzNL+TVFRE0UeOFKzvlb3 ADBw== X-Gm-Message-State: AOAM532As66O1SD1p/dlCAFPLU91iC7oT/purogT0fwmjVippUZwwiPE dUW+AXlquxI/IfTq8SSVspeUxA== X-Received: by 2002:adf:b311:: with SMTP id j17mr13567604wrd.340.1633109901232; Fri, 01 Oct 2021 10:38:21 -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 k9sm6186592wrz.22.2021.10.01.10.38.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 10:38:20 -0700 (PDT) From: Jean-Philippe Brucker To: eric.auger@redhat.com, imammedo@redhat.com Subject: [PATCH v4 10/11] tests/acpi: add expected blob for VIOT test on virt machine Date: Fri, 1 Oct 2021 18:33:58 +0100 Message-Id: <20211001173358.863017-11-jean-philippe@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211001173358.863017-1-jean-philippe@linaro.org> References: <20211001173358.863017-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=jean-philippe@linaro.org; helo=mail-wr1-x42f.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: peter.maydell@linaro.org, ehabkost@redhat.com, mst@redhat.com, richard.henderson@linaro.org, qemu-devel@nongnu.org, shannon.zhaosl@gmail.com, Jean-Philippe Brucker , qemu-arm@nongnu.org, ani@anisinha.ca, pbonzini@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.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 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 -- 2.33.0 Acked-by: Ani Sinha Reviewed-by: Eric Auger 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 Fri Oct 1 17:33:59 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: 515118 Delivered-To: patch@linaro.org Received: by 2002:a02:606e:0:0:0:0:0 with SMTP id d46csp1047265jaf; Fri, 1 Oct 2021 11:16:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy07ZYRFksk1m0j4DhMsF35lpdhRHjGCZFmmwiTMLUiPtjfNZ/26VHimSeeiHUqoP8xtmSB X-Received: by 2002:a7b:cf15:: with SMTP id l21mr6000917wmg.60.1633112160206; Fri, 01 Oct 2021 11:16:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633112160; cv=none; d=google.com; s=arc-20160816; b=HBiofWb1RBnycKCpkE6raMYFqg9QwO/E85FPC9WScqp1xVnT5hE115/pKO68wC7BcG J+VOemp2OXosxqIPkmLjB1gyx6x4sbdplxNEu4XO5zQfDD9kjxWxMDQ2nsZaMrv7g8e2 xoDIzwjiFMat+cE36yVW/E5bEn8zlswDjSuqiMhy8Ivkg2vS375v+P92TNd1eV3IrO5n QJ3l0Y2nLkQE0frWNvKJorMHJeNujAnk7zjBrwHrAMCGE1jj0V9124bwIfTCJvSAFADJ LXdhvfJkM7XFrwg6aWdTlzcX9a0Hq/jnEiG8pWKxxrPFv88jLqJ5tSHPzifceKCMUVcQ 5cjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=aTXfYg5ORJSQaIpcXSaeYV92BiNvYMW6FrbxVaDPykk=; b=pHs8MeaJtp0r45pAOj6o9Zam8mtStEyavnYizi68wFmO34bamjg6RRpHIsfmqglQIg F/EY5cvQ5DKADWM8XOQxfVyu4HttMnYNLvvNcG+DQSGF8yqvob7jEirvHF6VkZAt+Ecs 13FBC5UcxoGrLdLdlX91USXLuR71GAg++EEK4PTE7/EHOiFwRxGhrLf9kG1CBV+BUCzY fE6IrY6sH+6qOLmPsk5qi9hhlpfKc+kn1x7lDAmdpBs1XRT6ZWGVHXFzmh2fxMYgw3Ke wYEGOUiEe99DDT0fHF6dopFAEhFyNtQv2gnoREf4mwjAwV9tmST5ZclRUvYOY/Z8KupO l4ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hDMr53Cv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o12si10323537wms.231.2021.10.01.11.15.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Oct 2021 11:16:00 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hDMr53Cv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWN4h-000833-3x for patch@linaro.org; Fri, 01 Oct 2021 14:15:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60886) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWMUO-0000ay-Na for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:38:30 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:40869) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWMUM-0000oh-8i for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:38:28 -0400 Received: by mail-wr1-x431.google.com with SMTP id s21so16616272wra.7 for ; Fri, 01 Oct 2021 10:38:23 -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=aTXfYg5ORJSQaIpcXSaeYV92BiNvYMW6FrbxVaDPykk=; b=hDMr53Cv01ZfqUABhbVF+hFBVaxJlLTmXUTbCJI1afrCaANOV8UC1JW88Rcf0A+pkX qgbwyCMQIGrUpW3CFLpZ0RmyRytO2IVJ93UUbftNhUDDMj6QLLfEhxbB/is4WKmikvWM H8VGg+C9ZzNXd9AnA6E4zqbeX/+LbziudO4Gs1d6qYycxPjL5gHoTgawmL4LBnEISua9 fnmYvxw0C/yELUwFFOoLq27Vn5qSh0hZYz293xx2jSBfS156+sv0h4IFDiHLLnHZ2h0x W5KHkf4r8JWKd3/vHBhjQYc0nYM9pqxbDhEHVgHUfVGdQSLxBWvJEWU11CD/Y+xsqtNW Q+JA== 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=aTXfYg5ORJSQaIpcXSaeYV92BiNvYMW6FrbxVaDPykk=; b=PenA5um0cUVYLjhH4dJrkl0uvFKDWuXU/+95K7CCy6T/heUg81D8T3QB6zYFJRIBAw g066gdmGBYaQZejUHUQrOUsc/sc9jtU6xALXXVuIP1uw3+peaP1nAQZeyZ2rf99FLCbu 8rt6xT1xhakjSh6W1HnXvgziAQRldT7SYZxT7pDSsjJjdMBoUJ31SoXrC/XzHcy28Tg7 5PlyYRCJmklibEfBvIQkQvETjGn7UQ7Yt03x3YQYmzQWr7QA589LHdak5aN9SJuMEYa2 uwXz/s6RpJ+1RvBIOzjxpFUq95smFOoa+uwgo28tC38rnq+H4GIzvT+QgxL9DemBgFBf xojg== X-Gm-Message-State: AOAM531RvAAPcmLgmxVGja1+xqiZTeRa6zOoSEGXZcpYIJvEQ+IM6pnR YMM0Xyj2uyeNSiO5kHdjgtqILA== X-Received: by 2002:adf:a106:: with SMTP id o6mr4722991wro.127.1633109902193; Fri, 01 Oct 2021 10:38:22 -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 k9sm6186592wrz.22.2021.10.01.10.38.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 10:38:21 -0700 (PDT) From: Jean-Philippe Brucker To: eric.auger@redhat.com, imammedo@redhat.com Subject: [PATCH v4 11/11] tests/acpi: add expected blobs for VIOT test on q35 machine Date: Fri, 1 Oct 2021 18:33:59 +0100 Message-Id: <20211001173358.863017-12-jean-philippe@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211001173358.863017-1-jean-philippe@linaro.org> References: <20211001173358.863017-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: peter.maydell@linaro.org, ehabkost@redhat.com, mst@redhat.com, richard.henderson@linaro.org, qemu-devel@nongnu.org, shannon.zhaosl@gmail.com, Jean-Philippe Brucker , qemu-arm@nongnu.org, ani@anisinha.ca, pbonzini@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.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 (long diff not shown here). 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 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..b41270ff6d63493c2ae379ddd1d3e28f190a6c01 100644 GIT binary patch literal 9398 zcmeHNO>7&-8J*>iv|O&FB}G~OOGG$M|57BBoWHhc5OS9yDTx$CQgH$r;8Idr*-4Q_ z5(9Az1F`}niVsB-#zBvCpa8wKr(7GLxfJNZhXOUwQxCo5S`_gq>icGPq#2R|qEj!C zfZhFO-E)yj*v)_%j$|bWD4v61&3MJ6@sGF_Mv( z(Y~GJ$Ji9i%ul_-ddc|xw*RT`zx{!4bOW~WnR9oe8@#vYZ!iK~-v}&=4xHj-r&;K< zcU`OQR&r*iT=DGueakdEt~iRCoxImzW@o+PvCPVNXSM0Z?!3la@A7=V7VmARrY)yk z{pY1`=FY$P>E*ZcU;gqRzq<396$4-adlUOh0d4%7zBT9fosWB0jax+L=jQvi=J#J~?>_G}@-A=VM7>texw(0?%WX7MbJqC}W*M`obLj6+2L}g# z7KhBa!JMioR2I#0z1Wf}4QL}(?VWPHRb@6~_rFcDSo^j^@$^f@nwPCNyiPXrY^T}E zvw%wcfQq{B`j+GO?T>ms>-oupgMHSY{HWJupLA{Zum8sP*}gR;+Lp2=-%n6m?tjZ- zjG;9@c#>K}{oUR@TWRJyyo-^34o#_78fy{Dw`^y5>Zzy%5~{uX^m4%iSX`qhT8~!A zG^eeZlHoI-8Ai$2Vq4f>h#*^g_hNN*{g5>^t+7liet~+Zy}PhdZ_UfPW8!)n8rHEU zO2#|UccP|wVTaee;I38=IdP!Tn8Og6~%fzLjz(wD!XR-0J?VV(s-yiwD&A+AC-UHoLQ!1- zZTt}HXS}hx*Q`$VSHhuj|GB^ZyZOw!)sJSsuAcdeTMekL*MH;pAM0IX{WHC*Rsr)E9$^!#8~A%&#`e2rz2YvijNQTB2(~G5e*20+ zH;dzb%?EP5(W}h7mC(G{QI&P|ie1Otgk$qns&Q5M{)a(5PSn%9#j>DYIZ) z2`sNC#+ect6HM87gsRTCrZdi&5*imw*?5Gi&M{5r7-vf8n649{s&ib^Ij-p(*L5OP zb()$^Q`2ecIuWWm@dQ$OI-%)I=sFRqIxS77rRlVEod{K(Nlj-`)0xzDB2;zaS*To3 zThnRlIuWWmCp4WCn$8JbCqh-{q^5IH(>bZ@M5yYV(sWK~I;V7<2vwbqrqj`MI=W7T zs?LqMyPoYr(sYdWWOod{K(8BJ$K)0xqAB2;zGXgX&! zoin;lgsRR{n$A<2&QrQhgsM)=Byji1=g_RCb5_@hP}O-_(|KCcd0N+rP}O;cGxOn- z@C;`b!iU`%!E}#8VtOI=tj0X6G0*Bugevo##yqDn&*@BrD)YR?Jg+g&>r8|y^AU~t zh{k+GXChRYk8-ATnMXNOKI0!1O!?qONKAPJ=d_%2TFyB=Cqj|agn{N211&WxNX^aE zz%des28sY_MG!?Glfpm+j$4w!h$Y)+AgO>J8Yn_34F)Q((m)j`8K{6B8Yn`vMjEKV zh7sjd4OBo64HO|-#IZ0?feoWjBZrcK3aAWKoiI>QEoZ_&6(|`fLg|WRpa`W-7^uK< zCJa=8l7R{+&q)S~Q0jz%3M^;BKouw%sDN@N87M-j69y``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-j69y`)?813@y+dqFQO21NRRfE<$jCx}&564|A(8i^WXELn4tQF~akv1jTl+Da^WeuwV z{lracXB&$wiG3@XdAhRZHWC0da;Zrx`QaE#@Rgt&><*P#acnEW&24Ln(GeQaz|zag zIOYg>x#VGExrP>lOfOseBmn(P)G zTRXgDiq@kT5N?CVvz=z6Y24Wk+d%25Jj`Ag$d1L6@0`7$WH0dS1+-7iUdW8jUTE)D zNxN7|!*XA!-HMzby{n{md3tvsy?ac0H%#vhh_|qy^_|swN_vl{_Xg5?$E5ed^u@vS zu@j^(D(Qq%ZUI<$?6&W73zAK1PqS!Ss$uFCQM5R$#b`^;^9xGscHJ zb~LWT>IR3gmC~!jTw|y@Q8u!=p>dhktHT6js5((Lvbv#hh9zJcXHpnuB}3JTvXRvd zjhl>K9i}Qn)rqo^)eVh<8NE8pUxum^Wh1K_y01^^)nQUIRGlarS>4cmI;&TQna)sk zqD-&OId`<4y*t&c7VxSCuT|_Q*8H8-7sT6%vUTNX#lPMtHsxJvVQ|8mCfxdZw*1E1 z!Ryz5oqhAwx8At^=H{z!v9{sXSC+%Ob;7br#sm9-ZP-}VhbPg}`2*Xs+qZv2L7rvZ zda-7>m0Htq8`YN#EP&@|vuLoW>sCE1vZo0db(_VNEZ|+#siM(5{nr zwER9;jAQ}x`)7NDCrCnIO<~!6=*-IUzMrYaN!G~{8G}`!hLQDW7EifNw`LwA!*pxK z%jw8Lz%~P8>oYIi+cE;S6&QZNx}UAszw7zN-Axqv!RBB}E_kpI7o|UYcd!(fW%KiX zqSv(!kmmDX)cO9!p`N4b9&GMW8@ud!7p=PYT>qIN7{4=c`8KU+Fw`+P3EuThda+oH zi8qT>;Rf5JOAc+D?fKE-hU!9lu5XO)=4!%SZMN)Vx_R{7GE_f0FSt6QZvrbaSW3`q zgN5kkk*#aL_dMOx82|Xg@W6d-?$h0k5m3#yQc25XSZ$zrXl4>GO@b)udjGBFD773Ef%CBJAAa%#_x8mo#5TB6=55}%{RLn z_jH^CxURAD*%(^bVgO08=b!miDVuEp;Au03Jb!fQr$?R?m^ zj_6wKzVF%-cCEu`M$7No>Wr{%{+5`3Jh7CtzL2*!V_1s=xMV!EAKHeAas!hT{C$JF z|Dk;tPhik6_87gLyd36nJ-_s^8~)( z2x}8%^!TKg;&_s3e-zVK3vLWgOWYs0BlssFc|0w}T#3q+Ns{=IAt}Z)pCo0+vSSAS z^kFGhFV`ERDnTcWm~ai(^_BgVZJfq4;m22yzImyW9*Y@hJC2|3q|KNW!SjovXXp$m zaei@h8QQx~E?#!UM0jGYSY3y&ED#!Bcc?9P;!d2Vbxt9{AL`DMNmsGGn{4KC;v*7t z$xoWO=S6@kW-!dooAVySR}45jWr F{{VUX)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 -- 2.33.0 Reviewed-by: Eric Auger 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",