From patchwork Fri Dec 10 17:04:09 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: 522747 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp2829192imb; Fri, 10 Dec 2021 09:08:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJyQxEvxGpvZP0SneUMLkng5rzVeqvaxEul/zCp6q9kcFxC6S3CA5tTFkRo7s6ohLp1mAvVV X-Received: by 2002:ac8:5989:: with SMTP id e9mr28122627qte.55.1639156118519; Fri, 10 Dec 2021 09:08:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639156118; cv=none; d=google.com; s=arc-20160816; b=mpfbJw4tm8pyezTm6nSU1y+xvTfg8qTYti4FikER7Hj5mZ/AVR0j8M7oRlkbEYTlcf AX2oWZo3BSR/I/RUEyn8nHDs5Zttm1hpDwj6N5jQfK8emklZ2STKwNdtsz9GcIgEk9bH xv1pDkSR6ndu8cPeIu1ywbCg5X2Rn4ZxhrFYGxTZar5YEcDCcUz164C+4rdz4sEQXt3j xKTLQsrI6aMo7TGz0+hf6OcxsHIBz09XiKo0OyfswJxhnL4uuBHG8QMnR1oO2i2uEiJy vmRKoay8Cfze532gop5qVFHzpdnybgfVa3hxowQlohd001+RMFwi27mPdBYlHwvixkTf v0fA== 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=RZYrOTlTize273kRDCgsOSabJUg4Thn9EplwiX40QqE=; b=yNiiMt3taD+ESfdA2O8vaXsKlyeBQgAN0990tYu1pC/rc9QjdED2xBc3iq+nS+tT2R 8T5kYNlB/RgQ0WYDdClngpkyut0hRl1soc0KEFsqN7o7W9MTUocdpnM918n5vo3yYNDn 36E7oQ2wzn+oRdhaScI8wUkEFK1EnC/gwqV/WiiPhE5revNZis9S/LTmcuytvwwRfU1X ycOiZUXGlx6KAYhvM9Y02sM5jlY0WO1HY0RcpOYZIuv1blAURlGji5TZ1xdW1Eqt18/I sVoV3j2KXsX/8Qe2SgZx+6l/7wXmn+sdttv96Q3A6WUbqpc0IywiuYNLtXZ2N2ZHghqK 8I8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=zRieCPc0; spf=none (google.com: qemu-devel-bounces+patch=linaro.org@nongnu.org does not designate permitted sender hosts) 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 jp14si4360940qvb.374.2021.12.10.09.08.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Dec 2021 09:08:38 -0800 (PST) Received-SPF: none (google.com: qemu-devel-bounces+patch=linaro.org@nongnu.org does not designate permitted sender hosts) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=zRieCPc0; spf=none (google.com: qemu-devel-bounces+patch=linaro.org@nongnu.org does not designate permitted sender hosts) 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]:44008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvjNt-0000Dm-Vl for patch@linaro.org; Fri, 10 Dec 2021 12:08:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvjLL-0005oa-Rh for qemu-devel@nongnu.org; Fri, 10 Dec 2021 12:06:06 -0500 Received: from [2a00:1450:4864:20::534] (port=43790 helo=mail-ed1-x534.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mvjLK-0006QZ-5a for qemu-devel@nongnu.org; Fri, 10 Dec 2021 12:05:59 -0500 Received: by mail-ed1-x534.google.com with SMTP id o20so32376685eds.10 for ; Fri, 10 Dec 2021 09:05:57 -0800 (PST) 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=RZYrOTlTize273kRDCgsOSabJUg4Thn9EplwiX40QqE=; b=zRieCPc0wjXAXswALgOBEXD5yw0zQ/C4scJuDI+y+gHD7LGo9pLaZQNoRhc+3/PyuE +EMJ5+UiduqNSopqv0qdRwnvkalaPbxU1775UlXDIiyaiq5nDfHQpQy5g6/p3CUF9T0J 8DIT+TVkciZz20iQk9dW5vvJYRDHKWfMKaY0pNptP68CWXn15fmOIL7S0M+G/2H9zNkU JTOfCu3akXThV/WhQBZhOnITwwd/9PsPlgGK/exEtqnnZfsAr0aPQslS4jsh1CjvMsX/ UiHDyGBA6luM24R1SX7ciupGLd6NBfMuHfXhT8O4WI1aTstl1IEFtFrEbjOWEmCP6SBk cadA== 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=RZYrOTlTize273kRDCgsOSabJUg4Thn9EplwiX40QqE=; b=OawhWUcyUeyJDjiFYXkbbUax9ySPDBYkMIqrK2nVU+w3LT4pFjpioeTQul5JVB0hw3 pMU4BAxAi2v6pB1TdCPtIM6R9uT40HlJRUpbFU7OYMvA/63XII0L4BVicqlyChV9naRc 81q6QgGWvgfqmj2hxUFUDVWVFdaNe4rYtycY/3q5C/Bijb87KFiE3tz1k05IPhiWsApS 8ORMUtkM3JNtxhl0MD86o+sBN4l2YaDaJ93biVzQ5TjC5m0nDGrf/Yo+XybdZW38R+Tp 3Skt4+rSmCzBBUwUr5MpsxkIuGtiqAhuuVPTX72b3pMH+Yxs7GRnSaWRs63FoM/S3ONM McwQ== X-Gm-Message-State: AOAM532lbNsg6XnDfS7KNxjE9je0+s0d3a8p8Ni7wjgSfdyOBsGzwiks zCrkngGaXcfLt2vmY9S4luXAZg== X-Received: by 2002:a17:906:fa87:: with SMTP id lt7mr25701801ejb.426.1639155952779; Fri, 10 Dec 2021 09:05:52 -0800 (PST) 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 x7sm1860661edd.28.2021.12.10.09.05.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Dec 2021 09:05:52 -0800 (PST) From: Jean-Philippe Brucker To: mst@redhat.com, imammedo@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com Subject: [PATCH v7 1/8] hw/arm/virt-acpi-build: Add VIOT table for virtio-iommu Date: Fri, 10 Dec 2021 17:04:09 +0000 Message-Id: <20211210170415.583179-2-jean-philippe@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211210170415.583179-1-jean-philippe@linaro.org> References: <20211210170415.583179-1-jean-philippe@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::534 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=jean-philippe@linaro.org; helo=mail-ed1-x534.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ani@anisinha.ca, eric.auger@redhat.com, qemu-arm@nongnu.org, qemu-devel@nongnu.org, Jean-Philippe Brucker 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. Acked-by: Igor Mammedov 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(+) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 674f902652..d0f4867fdf 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 @@ -1011,6 +1012,12 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables) } #endif + if (vms->iommu == VIRT_IOMMU_VIRTIO) { + acpi_add_table(table_offsets, tables_blob); + build_viot(ms, tables_blob, tables->linker, vms->virtio_iommu_bdf, + vms->oem_id, vms->oem_table_id); + } + /* XSDT is pointed to by RSDP */ xsdt = tables_blob->len; build_xsdt(tables_blob, tables->linker, table_offsets, vms->oem_id, diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index 2d37d29f02..e652590943 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@ -27,6 +27,7 @@ config ARM_VIRT select DIMM select ACPI_HW_REDUCED select ACPI_APEI + select ACPI_VIOT config CHEETAH bool From patchwork Fri Dec 10 17:04:10 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: 522744 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp2828306imb; Fri, 10 Dec 2021 09:07:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJy5KbwIHWIy2rrsvt+orE5tnl83UgCMVd41MwTsRbpQCnvEPM4JCihQf/7wNYEBIw/8ATSg X-Received: by 2002:a05:622a:1114:: with SMTP id e20mr29875475qty.427.1639156074915; Fri, 10 Dec 2021 09:07:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639156074; cv=none; d=google.com; s=arc-20160816; b=FS5y6GyK7646oHr4dabL25in7ZXxjUxi9GwEIKwoyoZWE8Hi56UpqF3fiuLN9+C/BD zP/96RghOnhWoCOyD/5R8+wJqqhJnibqyvbsUU2VSuEfqU3Vyp8amKbmcmhaEgPYxFeo RrxwnADk+noXCkJhYDbJGHFc/Pudn2Q4HDCzHN4dBfJjZZ8SxHotCf2CLkRjlXuHFc3Z u/+ohslby38W9XMXWdizGLwO70m9bFpZ9ap3yKyk4cdHWXvK3QVQlHhFff/0z142eB+N sJ1M7Qz0QWwajeih7BogjH8AcPz8nmpxO9TmPdqGmAOUVAqAqAa/tLzrZJSneAtSAwr3 Q44A== 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=4yO/WGhytnP1jShdpXsBzF1bUEx6zhOAnxporW8D5r4=; b=ELLe/Le3Orfx7tWb7HAl1KLqqy//QlTfjGiGQZ0sivK0S1kohgx0Mk45kqmge8oUgY 8JfR0kQNopm73aGosSt5ubcmRAGLvAXdK5jf5ouEoqdXOc98PX7wLcZL1F6ebDHzki1k M2ZZJegsfXE38wqyJjDQS8EVHZK0WWltvNhZexOumSblyjbLhI81Ql/NVYKSegymqG/p EE6KlcExMt2G1RNrTPhpdauURr9R5IxLYk/c0voyvZlKvIP34kOCd+5rmMhAgILe/T2o 1STz3TFw7BbaqXmO8NwS3VDiYMB88HgH9FqcdS2lajJQvi6E2a77pCvK90nlGgorZTYW 48pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=MLq0gTYb; spf=none (google.com: qemu-devel-bounces+patch=linaro.org@nongnu.org does not designate permitted sender hosts) 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 eq3si4749855qvb.446.2021.12.10.09.07.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Dec 2021 09:07:54 -0800 (PST) Received-SPF: none (google.com: qemu-devel-bounces+patch=linaro.org@nongnu.org does not designate permitted sender hosts) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=MLq0gTYb; spf=none (google.com: qemu-devel-bounces+patch=linaro.org@nongnu.org does not designate permitted sender hosts) 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]:39864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvjNC-0005sN-Dg for patch@linaro.org; Fri, 10 Dec 2021 12:07:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40248) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvjLN-0005od-FP for qemu-devel@nongnu.org; Fri, 10 Dec 2021 12:06:06 -0500 Received: from [2a00:1450:4864:20::536] (port=41946 helo=mail-ed1-x536.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mvjLK-0006Rc-JL for qemu-devel@nongnu.org; Fri, 10 Dec 2021 12:06:00 -0500 Received: by mail-ed1-x536.google.com with SMTP id g14so31184218edb.8 for ; Fri, 10 Dec 2021 09:05:58 -0800 (PST) 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=4yO/WGhytnP1jShdpXsBzF1bUEx6zhOAnxporW8D5r4=; b=MLq0gTYbuEPiTJ2+4bFOTuCcc+RMqjNDaYHC+KLB4Olf0wCd72IWW8zJyk7QRdhURm AofkYcaW6YVhRHHJwCmE+NGnmnStnRAow0iMkr+uxKlQ0Qd/9g+NIztp2yJv5DMMLESn 030l/VZkW1nHEzAJuW3ciON76FRABxhjSx1Jj15V+k6M21PJrglG8sM3b5V5Nm9qp0AW DmlbWW3zsoeBSqpVtGQfnxOLLIAkKabhML+S5YOw+rymRMpxeZZirGpPL7LOBY3lG11A FOvo/prJbTl5LEOxk1sQYPbnkv8SWVWWFLYou1WXNzUrcUQjMMzWyR9qUC1LwixeUKjZ zWlQ== 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=4yO/WGhytnP1jShdpXsBzF1bUEx6zhOAnxporW8D5r4=; b=3gRcef6zM6g0WkohHFgdnOe8ekSs9WeFv0dA/whASwuyZCGhCLq5WGA5cpAq9Bx2Yv vRdOG4+8HJFxQKCy522ZXow7AXJ4lrEnuBji50vLJYxHkXs9RXGovp3ovjaQcL1TJKQe 5bI2r7kxlf7oBt2fycKvzceKhtvBbFW4bwhhSVd9ayiHKycyOi+zYkYY4diM50mJFpId DF5XyFGtGDeunSt2kX1bb/FehN07tB7LH2wPO55Wvw4r5+1EmCi64UJVqUo0LX5DDz38 89dUtRkpawzSmylDt9HSfUlAAYO+Qb7RxfOnRtkhF9dmbSicnL/6ZLHYH1O7Zp2b+XOd el1g== X-Gm-Message-State: AOAM532EYyT32rN9wUquUDQosLOnNqIrR7upS3krVsRqQv5I08A+JUAj KsmHkLPJ+xZmXse3yAkx5fW59A== X-Received: by 2002:a05:6402:2547:: with SMTP id l7mr40358309edb.301.1639155957105; Fri, 10 Dec 2021 09:05:57 -0800 (PST) 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 x7sm1860661edd.28.2021.12.10.09.05.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Dec 2021 09:05:56 -0800 (PST) From: Jean-Philippe Brucker To: mst@redhat.com, imammedo@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com Subject: [PATCH v7 2/8] hw/arm/virt: Remove device tree restriction for virtio-iommu Date: Fri, 10 Dec 2021 17:04:10 +0000 Message-Id: <20211210170415.583179-3-jean-philippe@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211210170415.583179-1-jean-philippe@linaro.org> References: <20211210170415.583179-1-jean-philippe@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::536 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=jean-philippe@linaro.org; helo=mail-ed1-x536.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ani@anisinha.ca, eric.auger@redhat.com, qemu-arm@nongnu.org, qemu-devel@nongnu.org, Jean-Philippe Brucker 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. Acked-by: Igor Mammedov Reviewed-by: Eric Auger Signed-off-by: Jean-Philippe Brucker --- hw/arm/virt.c | 10 ++-------- hw/virtio/virtio-iommu-pci.c | 12 ++---------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 30da05dfe0..53941e4aac 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2614,16 +2614,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 a160ae6b41..6a1df7fe50 100644 --- a/hw/virtio/virtio-iommu-pci.c +++ b/hw/virtio/virtio-iommu-pci.c @@ -48,16 +48,8 @@ static void virtio_iommu_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp) VirtIOIOMMU *s = VIRTIO_IOMMU(vdev); if (!qdev_get_machine_hotplug_handler(DEVICE(vpci_dev))) { - MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine()); - - error_setg(errp, - "%s machine fails to create iommu-map device tree bindings", - mc->name); - error_append_hint(errp, - "Check your machine implements a hotplug handler " - "for the virtio-iommu-pci device\n"); - error_append_hint(errp, "Check the guest is booted without FW or with " - "-no-acpi\n"); + error_setg(errp, "Check your machine implements a hotplug handler " + "for the virtio-iommu-pci device"); return; } for (int i = 0; i < s->nb_reserved_regions; i++) { From patchwork Fri Dec 10 17:04:11 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: 522749 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp2834183imb; Fri, 10 Dec 2021 09:12:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJyHCC+umAcPuy7zK2TSm+JWo7wjj7KNwokeKxgghgE5YYs8htm5Td0rhRnIf+WgeEVeaIyU X-Received: by 2002:adf:ea8c:: with SMTP id s12mr15366156wrm.535.1639156346551; Fri, 10 Dec 2021 09:12:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639156346; cv=none; d=google.com; s=arc-20160816; b=UJDuqdjjHNqFvINtyGJ99RhgRcf5EaduIGWWdzC/kzjorZnucNtkdpt4VJ8C7jJKn1 s/YLI04NC3RodFF6O7XhtO1Y6FeR5JIcfEXD24fRCWC489dmAmddGvlQMjAavjYf9Ure t2qzHe8pncqEhykm7vU4zuhC1BfSVYd8eRKRflrA9Yh6do/0ifg26FZeqln5wW0sclth IjDQUXWobv+ckXVuoEx49tHH5UWRGjnjTRG9Z4R8sdFIcfSleGsJK5/AP5XBIi1AlHRC fRiIZvzB0+f32cnYu9EOYUR5CJYRM1ggaFqUFdUOWMT6Dh2BACixU/hOb/T87Velobae 4i6w== 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=eT4rNPLFVR6cVRrKRWEc6vQ7I4D2oIIXC1EjnaeFLfw=; b=HBb5P8R8tXg3Zfh39nraBhTTRGOwsGc7+h2wBY428f02DTzRh53ZFDRTl4Br7YMnFf oK7fv97V0HXafCznX57c4mLwNdWqGZXZR213SAXb6ebhPnnwUPjMqX08IX7ZJ8kHDgCe zWY1cqNgRDu2h6f6+YltP0xhew8JTC/7xPWsopro/8LXUli8SUMdgUuycBDeGT55q9iF VEOFkxcfyFO3hCgbyf5NpI2cUyJ0VdGibTmM/lWGryYMs2ucEM61v4Vj1ZdTKMGwcLTM +KXHtEcdGIhMMNURMvNSfAJmdR/O8QBBcj5wkWv05mO/vkIsPYhVoFlWgf1dCAJjaNyZ KeWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=m6VTRGLI; spf=none (google.com: qemu-devel-bounces+patch=linaro.org@nongnu.org does not designate permitted sender hosts) 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 v5si7781622wrx.47.2021.12.10.09.12.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Dec 2021 09:12:26 -0800 (PST) Received-SPF: none (google.com: qemu-devel-bounces+patch=linaro.org@nongnu.org does not designate permitted sender hosts) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=m6VTRGLI; spf=none (google.com: qemu-devel-bounces+patch=linaro.org@nongnu.org does not designate permitted sender hosts) 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]:54372 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvjRZ-0007Hs-HY for patch@linaro.org; Fri, 10 Dec 2021 12:12:25 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40362) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvjLT-0005qP-BF for qemu-devel@nongnu.org; Fri, 10 Dec 2021 12:06:07 -0500 Received: from [2a00:1450:4864:20::529] (port=38910 helo=mail-ed1-x529.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mvjLN-0006Sx-UZ for qemu-devel@nongnu.org; Fri, 10 Dec 2021 12:06:03 -0500 Received: by mail-ed1-x529.google.com with SMTP id x10so14586064edd.5 for ; Fri, 10 Dec 2021 09:06:01 -0800 (PST) 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=eT4rNPLFVR6cVRrKRWEc6vQ7I4D2oIIXC1EjnaeFLfw=; b=m6VTRGLIYPWf6T4kpr0Z9k52Xt/DXBOo27KioYt4qyJ+8XLPC1xYpJi32ElZv2Zvky v5eJPMl+NbMVg55KCd851NYpmsWNLXyJvXZ4SQ4uuoGEGYcO1idzPZxi1zPzi/JXadiZ pMbek/sDtyaLMX+nTl9qwHDo4f4n1uPPsmWN2OJM2j6BnNJYO3TG6brfeIgZvIcbfa9u 1+omUoyqxk4n8LLOkaGxxxGdUr2l/v6BuwTnvhy+Bqfyy/VQsJeFjoBsmNLhyj9Qd6mX L95xU0N1YzOVoNsVo0gl6QrhDBLeaxQfsSeuapbnFnfmuDJF1dVbSNoZeeO1Mb4C9yQc TJgA== 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=eT4rNPLFVR6cVRrKRWEc6vQ7I4D2oIIXC1EjnaeFLfw=; b=rjKPJp4hwEg0/ZLkhmat7PkxC6aYPdpuONvDcV6xERWY40xYYgJ3fChBdX6yHd0qY4 uhv79Ji9EZqBv7RWw2YAPk3UpZ5vyZIe4l9qDpD7pHeQwOfqQ3zNAbsAKsToMiFN+KaH jY54s0u+QjGRRq+JR4ad3bXx1acQ4W2DSEPfe8ChzRGWWhBFcvApNjdmMYbB018RiXCL yEw4hRbQrNw6vf6bYm7IPfjOm0eitSws1juJCDXfQWvNPL7xqFWXpf0bL4gK93fzZM43 88Bh5okESSFqBfNgjjS6jFtztRCVLfmW4jYVfwDCgW8z7tkcYcJ4IDIDJUgY+dPaNgPw Gu+Q== X-Gm-Message-State: AOAM531rzb+Z86LsqYXiD12t+nTcZ4XcOf1X7CFuvUDd8TlVmjFSGFni 7caXrxJQp76a8FPrJ3oaHOT6VA== X-Received: by 2002:a17:906:9253:: with SMTP id c19mr26201996ejx.63.1639155958151; Fri, 10 Dec 2021 09:05:58 -0800 (PST) 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 x7sm1860661edd.28.2021.12.10.09.05.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Dec 2021 09:05:57 -0800 (PST) From: Jean-Philippe Brucker To: mst@redhat.com, imammedo@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com Subject: [PATCH v7 3/8] hw/arm/virt: Reject instantiation of multiple IOMMUs Date: Fri, 10 Dec 2021 17:04:11 +0000 Message-Id: <20211210170415.583179-4-jean-philippe@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211210170415.583179-1-jean-philippe@linaro.org> References: <20211210170415.583179-1-jean-philippe@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::529 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=jean-philippe@linaro.org; helo=mail-ed1-x529.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ani@anisinha.ca, eric.auger@redhat.com, qemu-arm@nongnu.org, qemu-devel@nongnu.org, Jean-Philippe Brucker 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 Reviewed-by: Igor Mammedov Signed-off-by: Jean-Philippe Brucker --- hw/arm/virt.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 53941e4aac..608a0a78f0 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2494,6 +2494,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 Dec 10 17:04:12 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: 522751 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp2837326imb; Fri, 10 Dec 2021 09:14:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJx60uOYCTZmifnMC0lcksBqtHj+ZaJuBmPyPUcTw/Y1XrxSGtzzYMJExyOq6jNFFjyJ1t0z X-Received: by 2002:ab0:3ca0:: with SMTP id a32mr30044060uax.63.1639156497319; Fri, 10 Dec 2021 09:14:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639156497; cv=none; d=google.com; s=arc-20160816; b=K+XDbgt+YcGtQ0QHRu4yAW5gCUBsaxd3CD+uE6n8pBLCFCvYIdrGn9k1aVAMyWmlNH 4oqnO9Dc72xDdfr8r6qGZOxUeDFBUHI8Jzyamh12GL7ahTwwvro+jFiRA64g+zXezMS4 IdiVh47WSoZaxpcHQwdMGbOMnVW5tchRIlJ/ILJK7rwubxfOQYn9+5okYSGCsQSfel8h NyqdmCJ2c08R9YgdIUoQZX1UgyFsW/CeZwDJGGnq6yGXp8sWc+dhpSIzIwgcODip+h2W 8no/k+pSMSeF/eIYeSSOVct6GFXyQAaXauOixQtxirg9ubzus9q3C9EHnxLrGqn8+MRo A3nA== 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=9IY62PSTotbT3b2mMDMBqrDCdhq+HRJSuGZ7/M2iISA=; b=RXlG1a8dqmyrS3j4UMrUgrHvUdP7pKfQoDSmxtydBG9BNxfBzFZHHlNc+1gtgACKS4 B02NIvFHjT348ZZdW5UX+opupHYrVmYeJQeYkktT5jg63SuFK8ESXp+KQgyGiR1picZ4 JgxNgVuF5VWkZixAAf7/93KXkeh3pvT6GIMlFcWMAV1XFsKZ+rvmMlXnKVAHr2agmbuJ jA3SItRXJbpyTqxE1uccPltL7XLbU6exjHZ3Za3jXYJDypYIvtUSyxvQtx54SjeZrK3O fpukHYmxG4Dcqb8OntPr4iEQp0FSvSG9M/bAJ9t8JLIA+lLxQmSgOqipQ8aQGjD1fFHJ dr5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=MlAyKg8S; spf=none (google.com: qemu-devel-bounces+patch=linaro.org@nongnu.org does not designate permitted sender hosts) 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 c22si4560920uap.161.2021.12.10.09.14.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Dec 2021 09:14:57 -0800 (PST) Received-SPF: none (google.com: qemu-devel-bounces+patch=linaro.org@nongnu.org does not designate permitted sender hosts) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=MlAyKg8S; spf=none (google.com: qemu-devel-bounces+patch=linaro.org@nongnu.org does not designate permitted sender hosts) 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]:59290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvjU0-0002Ah-Ps for patch@linaro.org; Fri, 10 Dec 2021 12:14:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvjLT-0005qq-GZ for qemu-devel@nongnu.org; Fri, 10 Dec 2021 12:06:07 -0500 Received: from [2a00:1450:4864:20::52f] (port=38404 helo=mail-ed1-x52f.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mvjLO-0006Tb-BQ for qemu-devel@nongnu.org; Fri, 10 Dec 2021 12:06:06 -0500 Received: by mail-ed1-x52f.google.com with SMTP id x10so14586181edd.5 for ; Fri, 10 Dec 2021 09:06:01 -0800 (PST) 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=9IY62PSTotbT3b2mMDMBqrDCdhq+HRJSuGZ7/M2iISA=; b=MlAyKg8SpwxLFbiGzhFsztNym1SLq9kk7t2etxKr34Lx7YrifeLKMg6VzgD0QiHogx Gc72utugRJ8cxf9eI6jFMQ5dPdxDHl1ASkEZ+zNWJ+wBXNVrDG6SdhG89OwyVVROfxGj GOVndXUBR0WVb0bI0mhfa/yYEXa0IMtwCliHAtxVgrKVFm0URKKgMQoF7Tmc8hPlS7wg YshvxE47j4m+XTWvDZj1mEsejKm/IwcQQ4FJX5dMolRl+6awNmlGFs/mmJ+6pttzxbOH YX3xGcedxBdXtp787m1QqsV/5SvQojBLjx4NHJHSLuw/1azHORWUM1abrVlJYniiL/4C UmXA== 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=9IY62PSTotbT3b2mMDMBqrDCdhq+HRJSuGZ7/M2iISA=; b=D55g6aeLcrPr52LBPdd4AvwsDHUwCrDmUIw8+aR8BNOUQzlpO5WXdHepQ0Mvjoorbf dYzy3Xh0Rz56Fp6pG/98cEP76SAv0aU5h0Kmq9lzUXgMLvXHcNzAueVGPW8tB8z4UyzP qcuOVVGWT+Waz8WiPWidus92SQWuwHZEgN4mD4OFbDB0NMv8OP5jJq4HrWoMDyrJoZz0 REFHIHaxIKsUPvDMwSGMzzudppgi+fA3f+I6Z8o7pcAQI8TCtOOBZHDzq24BoUlBQ8iS t8N4OQ7KO9R4o1R6m2ZCddwiuZjJvAb4UPD6X2GE72a5o8qb/yzzfiSZ5GcjDtZzC+mP 48Zw== X-Gm-Message-State: AOAM533CBbwZt7F3dSJWP2RXd2AA0vwb6J+0J7RdQ0PceY33Zbk29fVa NrErmxzcbtiKOS+Q+0Xl1UwFSg== X-Received: by 2002:a17:907:160a:: with SMTP id hb10mr25801855ejc.83.1639155959337; Fri, 10 Dec 2021 09:05:59 -0800 (PST) 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 x7sm1860661edd.28.2021.12.10.09.05.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Dec 2021 09:05:58 -0800 (PST) From: Jean-Philippe Brucker To: mst@redhat.com, imammedo@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com Subject: [PATCH v7 4/8] hw/arm/virt: Use object_property_set instead of qdev_prop_set Date: Fri, 10 Dec 2021 17:04:12 +0000 Message-Id: <20211210170415.583179-5-jean-philippe@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211210170415.583179-1-jean-philippe@linaro.org> References: <20211210170415.583179-1-jean-philippe@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::52f (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=jean-philippe@linaro.org; helo=mail-ed1-x52f.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ani@anisinha.ca, eric.auger@redhat.com, qemu-arm@nongnu.org, qemu-devel@nongnu.org, Jean-Philippe Brucker 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 Reviewed-by: Eric Auger Reviewed-by: Igor Mammedov Signed-off-by: Jean-Philippe Brucker --- hw/arm/virt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 608a0a78f0..6b51e8ad10 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2518,8 +2518,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 Dec 10 17:04:13 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: 522752 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp2840605imb; Fri, 10 Dec 2021 09:17:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJxg69O8IpQ95K2wujdLOn6Vpjqw4o4SR07GaUEdpMD6aF0yIAucg28ERYamJaAt/B4JpOE/ X-Received: by 2002:a05:6102:6c5:: with SMTP id m5mr17787016vsg.83.1639156666114; Fri, 10 Dec 2021 09:17:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639156666; cv=none; d=google.com; s=arc-20160816; b=n8wxN3a5JBQYDEd1qIiziQI/L+pPuPycCVYA/mZM72dOkAsl7u7bwLuppuIRd4LMr8 /k2wGB4uz82jEKXqVRCY406KiHBD9K+DAsiJL0BXgodED2YlLqwneo7K85J3oRn8f093 f1hfJxdkNqvBWCdLol0FdZB6Iz7Dy9aHGKNUTeFFyi7zAj6a5otVwaHWLSKNO2DLAqDu BRskoaNtSqpq44mTttuZr3l1O8ELkhKUAtYUoo3AevH/kE+6+fNzUreI0wdsls19xoRN mjAB4u/9F/XqjYqPYPei5L7xUn5K7Njyh5QhgsshltX/u0Pv046hCQ1LlHA6HnfiQ2aD WG1g== 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=xA+b4YSvWdX/w+5WGD2ZykAzUJbBu1kLdHNwHXJDTcc=; b=FN0YC8V17L4np9i18VDXfxgFisSmugG5KpbweuL2w+6sUgxgDK3UZ3cXE+NxoFdHsy lm15lNnNpu/vZOd7EHEvUSjAGvfpTfHKtiApfOZbikR0+vwXUmv1i7Fo0Qisb9hx0H+z obdbDv2xJnRBXUfgdHCe/RLUM6rn64ukiNxyMwNRl7xkT1v/udLAMbn20yjGKdBycymQ 40PPKIYEyLRSmg1/mZ2IDobhPA5sL34ZvT1KpOx0hiKyL6NRfYVL5nmrFLKeuFohIxjn PNhu2YmrfXPFS5kB7s0xDHxmo7QO44S6fRqJq5MUKc59JN9dxGZF7RLh28Md3eoBLpDc t1Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=rRNLfYZ8; spf=none (google.com: qemu-devel-bounces+patch=linaro.org@nongnu.org does not designate permitted sender hosts) 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 c14si938148vsk.22.2021.12.10.09.17.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Dec 2021 09:17:46 -0800 (PST) Received-SPF: none (google.com: qemu-devel-bounces+patch=linaro.org@nongnu.org does not designate permitted sender hosts) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=rRNLfYZ8; spf=none (google.com: qemu-devel-bounces+patch=linaro.org@nongnu.org does not designate permitted sender hosts) 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]:35536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvjWj-0005Lc-JL for patch@linaro.org; Fri, 10 Dec 2021 12:17:45 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40364) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvjLT-0005qd-E1 for qemu-devel@nongnu.org; Fri, 10 Dec 2021 12:06:07 -0500 Received: from [2a00:1450:4864:20::533] (port=42754 helo=mail-ed1-x533.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mvjLO-0006T6-1l for qemu-devel@nongnu.org; Fri, 10 Dec 2021 12:06:04 -0500 Received: by mail-ed1-x533.google.com with SMTP id r11so31360087edd.9 for ; Fri, 10 Dec 2021 09:06:01 -0800 (PST) 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=xA+b4YSvWdX/w+5WGD2ZykAzUJbBu1kLdHNwHXJDTcc=; b=rRNLfYZ8N+H3Bmco19njhMhPnZ4mG1SmtU9MgG1dUJhba5eiWoaU2kekGmcsaVd0V0 C5TDitUuro1u5rpQHlYHe+FOYAilME9GwbUtrr1XgZ0nt3b5OPXjw1AkVfHm8TM+RQ4n sAsymWdg+Q7wrIB9sGoqzLFZK53/37M3NHhPYycTrpokas4i1wY7kQbP79ZtT6/peVGu taVakdRJmx0CqQI38YC1cAQHfm6weBd55pkzGRJ35e7/33lp9Z+3lP+mXeoxvAX6LyRV jLdbADl2b36Uxx0BFy+eKleQ86ind4mdcNCuFmGYpRKd4yhmBh0g9KcreqJ3cbMyBYil fHJg== 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=xA+b4YSvWdX/w+5WGD2ZykAzUJbBu1kLdHNwHXJDTcc=; b=8IkceWj48SiSaizQrUVn5SqdeZm2bkMErwgKCD5Q1A2uxqISbvpmoy9s+NOkYRzDBO hpUHllDdjaVut6OVgIEKpCFcPHV0KXAUMSwQlOkDzVSQCnT3onlacpirTDSbf0/6wj8A 9/lKuVG2QxwgZCVKafOiQGCqtYNIH+qAHp+qT9Fa8WdU3w9rmGZs2DUIeDFBOhjPUwzG U+IfKNRt5Mm4o39WnfV4rm5PPjR22zAAXDa5Ss1dqsIdqucBUx5nNA/Z7TfIPRhS14op 5g6jG8H4IrBzt/P1bi23aMb80OrqMWGWk2agmUqCPfIfjgDQ24S1UDFlSvejKc/CieyC 49dQ== X-Gm-Message-State: AOAM533t09SJcsgsUzcBRRoCqm1qZWXQ4TuD8zObnc+DOiIuJr091KHF c05L4TmWPkyy6NZBQaZroYfX7PYTFK1JSg== X-Received: by 2002:a17:906:619:: with SMTP id s25mr25336986ejb.237.1639155960394; Fri, 10 Dec 2021 09:06:00 -0800 (PST) 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 x7sm1860661edd.28.2021.12.10.09.05.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Dec 2021 09:05:59 -0800 (PST) From: Jean-Philippe Brucker To: mst@redhat.com, imammedo@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com Subject: [PATCH v7 5/8] tests/acpi: allow updates of VIOT expected data files Date: Fri, 10 Dec 2021 17:04:13 +0000 Message-Id: <20211210170415.583179-6-jean-philippe@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211210170415.583179-1-jean-philippe@linaro.org> References: <20211210170415.583179-1-jean-philippe@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::533 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=jean-philippe@linaro.org; helo=mail-ed1-x533.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ani@anisinha.ca, eric.auger@redhat.com, qemu-arm@nongnu.org, qemu-devel@nongnu.org, Jean-Philippe Brucker 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. Acked-by: Igor Mammedov Reviewed-by: Eric Auger 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/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..29b5b1eabc 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,4 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/virt/VIOT", +"tests/data/acpi/q35/DSDT.viot", +"tests/data/acpi/q35/VIOT.viot", diff --git a/tests/data/acpi/q35/DSDT.viot b/tests/data/acpi/q35/DSDT.viot new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/data/acpi/q35/VIOT.viot b/tests/data/acpi/q35/VIOT.viot new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/data/acpi/virt/VIOT b/tests/data/acpi/virt/VIOT new file mode 100644 index 0000000000..e69de29bb2 From patchwork Fri Dec 10 17:04:14 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: 522745 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp2828818imb; Fri, 10 Dec 2021 09:08:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJx7Ldv7rqTi2yCS3hVUm13YfXv7ZfcKiv1PrR5bl/i+RPlg/oqm9ywp2gIQw25ATzu8MZIy X-Received: by 2002:a05:6214:624:: with SMTP id a4mr28120388qvx.80.1639156100572; Fri, 10 Dec 2021 09:08:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639156100; cv=none; d=google.com; s=arc-20160816; b=XyamgU706IpCCUsN96fLBAKBYIN/L0T0L4QrMrtSJ6WSJlvmN2MnirAhFstJvY0c/1 SbFPIqilcBmfARWWk3G59E/wZqkv3ffTDhPMUachWVOqqyJ+qaPwEMuFzv/tWuIM06ZU N8iiCFoEKkOSO6nTtcFQzrb14ZNAXxy9FLIP1VGqOn7PBiR1z5BYKA7esJvdM70oxDCx hRmOVjSOAuNYdnH6KXZYaVEQWZtHHxt1m3j089bKtSpfAw813UB0LYUIL+GhhJI2KQHx aFafv0ZF9io2xJlqkzhUEwNgoRETf0BhJYY8XqwEvCqgYQB6Lvia2jvsuJ4TXsH8+qwW ivGw== 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=VfJIAuyEAhLwuhBoYyQnuJQHssBC+STA/z+67u7l1ew=; b=Ct5d+DMDTD7CRo22d0mOGTOS5tsu23496s+ARcT5o+hVoxwjRclZ/lYuCn4fHa/0iV Bqy2FbESa5HhvUEir0xGzw5pE4Uhbog6LDoaEDNjBWID6g6GQwiPiOED713SQj9ee/yv 1udhzWYqfOlg3uoih0tbzqbujgVslBYF8nBFm+mqGCi77/1y2ldZ3zc/H4fQk6r2ldbK ZLP9g/pGN1uUOyjMFGKuh9ExFGselX6+x0p9+JOgxBt1qrmSLBesiy+r7awrSLQOJ1Eo 14+IIM6anVIoO2limA2NrBdN7WF9rAYXCluTRuHQThn4jddLLZspmPZHMbc7cOlKD/Pt BF6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="vG1/pRcx"; spf=none (google.com: qemu-devel-bounces+patch=linaro.org@nongnu.org does not designate permitted sender hosts) 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 6si4079604qvk.167.2021.12.10.09.08.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Dec 2021 09:08:20 -0800 (PST) Received-SPF: none (google.com: qemu-devel-bounces+patch=linaro.org@nongnu.org does not designate permitted sender hosts) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="vG1/pRcx"; spf=none (google.com: qemu-devel-bounces+patch=linaro.org@nongnu.org does not designate permitted sender hosts) 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]:42214 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvjNb-0007V4-1c for patch@linaro.org; Fri, 10 Dec 2021 12:08:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvjLV-0005su-CG for qemu-devel@nongnu.org; Fri, 10 Dec 2021 12:06:11 -0500 Received: from [2a00:1450:4864:20::534] (port=46028 helo=mail-ed1-x534.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mvjLS-0006UX-Oa for qemu-devel@nongnu.org; Fri, 10 Dec 2021 12:06:08 -0500 Received: by mail-ed1-x534.google.com with SMTP id y12so31183021eda.12 for ; Fri, 10 Dec 2021 09:06:03 -0800 (PST) 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=VfJIAuyEAhLwuhBoYyQnuJQHssBC+STA/z+67u7l1ew=; b=vG1/pRcxwFgH8IKCp1EQY2wshzOxXgNabtdOVxRNHdsHvuCSOWtHAQ704k+JbXUmO6 tmi6X9F1AdqAolibGQ52xfWFGO4eYxnEpKJY8RyMXkl5O9o5K62oOtWcntom//Bmjys5 Mn6UOUBLPzvBgCljswxpXvafy92pJjZm47FPsrn0aH6EvHPY5LY/LIWGMBS87lPd4iUJ 3OSQZ0izGM96574n6WDBPJvz57wSmzP4QVimAD7Cr8NF5txA6z7K2vESfzhqnmqEyCdW Fns4iN5DiB3twBXvuQK79p/z8XFIWEc4hlJFNtGvAsnTPicdHrUfZ3o/x+W+O+aZ6dpk YkPw== 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=VfJIAuyEAhLwuhBoYyQnuJQHssBC+STA/z+67u7l1ew=; b=NU+bbEIzttMPueETg+2yi5VVvRSqVyZe+hgZtbEl4iyinDe4ZZbTJaSTN7GdTSzjC3 lpEMB+wn185iHZNHLmnwj+r+K2r8lhODTXIhRH7Wl17HAc0Z/UbK8I3haF9SHrH/a4KU UanjX+IZppTqFY6Fkml60QcT0riIwVHqSYLY1vWkJwxMu1qjE37xiayKFZyue58sLh2G fjyBx5gQOU/ikUtWRE+fN+ZK7PdxZTYQbGUMm71gGSFU2QQ0VTiVGiV94e/E7iOeHnVm uRn0GHGJMTnGdjwJCqG9R/JF2kYP7Dz178yUEkYj+YC1oSL1r+nK53vr5sVhPAbf6DY7 t67A== X-Gm-Message-State: AOAM530PYN8J5oxfvGuMNIR9ZyGj2q2Rwz0iP+R9a+POGDaZHjUCrQ7B pHp3TXYHPei1kLjOvjgB06GXOA== X-Received: by 2002:a17:907:94ce:: with SMTP id dn14mr25764618ejc.85.1639155961350; Fri, 10 Dec 2021 09:06:01 -0800 (PST) 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 x7sm1860661edd.28.2021.12.10.09.06.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Dec 2021 09:06:00 -0800 (PST) From: Jean-Philippe Brucker To: mst@redhat.com, imammedo@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com Subject: [PATCH v7 6/8] tests/acpi: add test case for VIOT Date: Fri, 10 Dec 2021 17:04:14 +0000 Message-Id: <20211210170415.583179-7-jean-philippe@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211210170415.583179-1-jean-philippe@linaro.org> References: <20211210170415.583179-1-jean-philippe@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::534 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=jean-philippe@linaro.org; helo=mail-ed1-x534.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ani@anisinha.ca, eric.auger@redhat.com, qemu-arm@nongnu.org, qemu-devel@nongnu.org, Jean-Philippe Brucker 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. Reviewed-by: Eric Auger Reviewed-by: Igor Mammedov Signed-off-by: Jean-Philippe Brucker --- tests/qtest/bios-tables-test.c | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 258874167e..58df53b15b 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1465,6 +1465,42 @@ static void test_acpi_virt_tcg(void) free_test_data(&data); } +static void test_acpi_q35_viot(void) +{ + test_data data = { + .machine = MACHINE_Q35, + .variant = ".viot", + }; + + /* + * To keep things interesting, two buses bypass the IOMMU. + * VIOT should only describes the other two buses. + */ + test_acpi_one("-machine default_bus_bypass_iommu=on " + "-device virtio-iommu-pci " + "-device pxb-pcie,bus_nr=0x10,id=pcie.100,bus=pcie.0 " + "-device pxb-pcie,bus_nr=0x20,id=pcie.200,bus=pcie.0,bypass_iommu=on " + "-device pxb-pcie,bus_nr=0x30,id=pcie.300,bus=pcie.0", + &data); + free_test_data(&data); +} + +static void test_acpi_virt_viot(void) +{ + test_data data = { + .machine = "virt", + .uefi_fl1 = "pc-bios/edk2-aarch64-code.fd", + .uefi_fl2 = "pc-bios/edk2-arm-vars.fd", + .cd = "tests/data/uefi-boot-images/bios-tables-test.aarch64.iso.qcow2", + .ram_start = 0x40000000ULL, + .scan_len = 128ULL * 1024 * 1024, + }; + + test_acpi_one("-cpu cortex-a57 " + "-device virtio-iommu-pci", &data); + free_test_data(&data); +} + static void test_oem_fields(test_data *data) { int i; @@ -1639,6 +1675,7 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/q35/kvm/xapic", test_acpi_q35_kvm_xapic); qtest_add_func("acpi/q35/kvm/dmar", test_acpi_q35_kvm_dmar); } + qtest_add_func("acpi/q35/viot", test_acpi_q35_viot); } else if (strcmp(arch, "aarch64") == 0) { if (has_tcg) { qtest_add_func("acpi/virt", test_acpi_virt_tcg); @@ -1646,6 +1683,7 @@ int main(int argc, char *argv[]) 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(); From patchwork Fri Dec 10 17:04:15 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: 522750 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp2837264imb; Fri, 10 Dec 2021 09:14:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJwqZdFOGzBjEw1gKXfTCHb2XXrq4yCvsEkRjPkbz1w3i4iC4vxItflQ+li/xg8hUGL3rkja X-Received: by 2002:a05:622a:1002:: with SMTP id d2mr28900842qte.322.1639156493201; Fri, 10 Dec 2021 09:14:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639156493; cv=none; d=google.com; s=arc-20160816; b=b+LKN4OAqxSAWsPuUlJXHKanhr/g7yTdkpBfNAlakfPCj5P3u6qJwu1oww4K7qG894 iXHLuN6yuKEBHhHctBLlt7XSicc8Ziq9N6+wbRhgqcvuxC0KX/vt3nROZX0hLm15CPkB oFOtQfsDts/4eemGQieaFOV+pfMeC8hVXE6bqErwm6RVzvWg/dziZs46jHEp08bf+w0b lYDj0nznD1tuYQUjIvngEdNla2b8IUwDI/PgLM2PoPcffwaSxVij+D1HAden6MtljFVr ptr4iOIJHPtjC1DaF3e6G3y83qVuUJtg6GyOUI9v26SAGlj66a+fqDSZgpWK7LXMUFoS Q75w== 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=RkQSi7slxaHjoXyjPY3O0HWBMei3SVdobkLEOKDI/cQ=; b=ryaLHksRp4OZFHDWLgWl2ow+gvO5WZJUKXpDVPVifZ1f99Wb9zI3VWRouMSpu6BxGW y+fNsEeG5SyWeI7aEVb2krm4O6VSeEQEGcTVdDi9zAwM8xkqGh1sFSkHxX9ZLKL1tIsw AOARrAUvBOZEbhoneahaj9M8FJSka81J6XiRnZ8ACSaCp5fS1LwTblcuXuK2Q5+wiT3B hCCzIkftS6rTdWKCeQMjgnkUFnmMvnfupVR6bNgD7BLzsQbZra0yRy0bPwSZi+Ovr1EE 1Ejm7D3rkU+i1YzYUFhkSoZVgBFRO5K3fJ1G0CsaEmGCdmaDjyHwcFAr1X+dB8O5oOIs 72jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Yy36ys3D; spf=none (google.com: qemu-devel-bounces+patch=linaro.org@nongnu.org does not designate permitted sender hosts) 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 k13si4511077qko.467.2021.12.10.09.14.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Dec 2021 09:14:53 -0800 (PST) Received-SPF: none (google.com: qemu-devel-bounces+patch=linaro.org@nongnu.org does not designate permitted sender hosts) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Yy36ys3D; spf=none (google.com: qemu-devel-bounces+patch=linaro.org@nongnu.org does not designate permitted sender hosts) 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]:58970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvjTw-0001wj-KH for patch@linaro.org; Fri, 10 Dec 2021 12:14:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40460) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvjLY-0005uC-8C for qemu-devel@nongnu.org; Fri, 10 Dec 2021 12:06:13 -0500 Received: from [2a00:1450:4864:20::529] (port=44701 helo=mail-ed1-x529.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mvjLT-0006Un-0i for qemu-devel@nongnu.org; Fri, 10 Dec 2021 12:06:10 -0500 Received: by mail-ed1-x529.google.com with SMTP id l25so32353637eda.11 for ; Fri, 10 Dec 2021 09:06:03 -0800 (PST) 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=RkQSi7slxaHjoXyjPY3O0HWBMei3SVdobkLEOKDI/cQ=; b=Yy36ys3D98PFO/oO0et+a/zIEMvJid9RhB4uWN4F6B1Jp+Ph+8ak567lODObK9lV0f jmBFGYdcpM9oRT3DF7Q9CfG/Dwvhwf4V8bRw6A+a8HFbqvaSEA7VwD/wj+YmgAzgndyr 2uKTR4/o4B9UgWSlZkyxP81voEP1rkWrgbUDVTdNNHhm/RVNqKCOxV0k3f7q1BFgcauq 6VQ8CCYNIYIm7XBqFvtxYr5LVl4i9zDrwozm9DXyDtMuoYk1kmTrSkM1Me3106/ECvVI 0u4cFd3DTLUOMgJzYCZXL2kGbKX7HCvFQISIKMos7WCvFG+vpk9GJbCKYdYMuL42G5P5 mvyA== 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=RkQSi7slxaHjoXyjPY3O0HWBMei3SVdobkLEOKDI/cQ=; b=hOYqJ8DmuUKAY2EK3xIOhkjOqODzPQDIJ9QI8HM/0rh8czIk3BIiudnYp2EgFidxLr WpS/cDMe+lz0EegjiXtk0CNxT4DpFUcCRiGKUzoXMeTfK3X6ZfV6k0mX9+NvzluhcuiB fCqGHe6ILVmxDh/j3a/0n2brBR7ebPiE6aVhSClSwxDiIJNgL7gZBGgJGUCfCfcRwbia jQ1orgXhhwJM+K62qsWaeS/S8NGK6ol+xhcA/GdA94PTyEWtk3C9FYdYyPLDKBydLvwJ bdcvTQ1HGCszQEaPMfTJWz1pWpUufSziqopsT5gTATIxivLagPeSNLALqIhSCCBSFuD9 3dBw== X-Gm-Message-State: AOAM530UpaXsd9GYKKPJAjcsWbhhYts27CghOVFNuewHetul3i6HTvGY nNmow/JXQTsslin6bWuCzMUdPA== X-Received: by 2002:a17:906:b785:: with SMTP id dt5mr25027081ejb.515.1639155962391; Fri, 10 Dec 2021 09:06:02 -0800 (PST) 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 x7sm1860661edd.28.2021.12.10.09.06.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Dec 2021 09:06:01 -0800 (PST) From: Jean-Philippe Brucker To: mst@redhat.com, imammedo@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com Subject: [PATCH v7 7/8] tests/acpi: add expected blobs for VIOT test on q35 machine Date: Fri, 10 Dec 2021 17:04:15 +0000 Message-Id: <20211210170415.583179-8-jean-philippe@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211210170415.583179-1-jean-philippe@linaro.org> References: <20211210170415.583179-1-jean-philippe@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::529 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=jean-philippe@linaro.org; helo=mail-ed1-x529.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ani@anisinha.ca, eric.auger@redhat.com, qemu-arm@nongnu.org, qemu-devel@nongnu.org, Jean-Philippe Brucker 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. The VIOT table generated for the q35 test is: [000h 0000 4] Signature : "VIOT" [Virtual I/O Translation Table] [004h 0004 4] Table Length : 00000070 [008h 0008 1] Revision : 00 [009h 0009 1] Checksum : 3D [00Ah 0010 6] Oem ID : "BOCHS " [010h 0016 8] Oem Table ID : "BXPC " [018h 0024 4] Oem Revision : 00000001 [01Ch 0028 4] Asl Compiler ID : "BXPC" [020h 0032 4] Asl Compiler Revision : 00000001 [024h 0036 2] Node count : 0003 [026h 0038 2] Node offset : 0030 [028h 0040 8] Reserved : 0000000000000000 [030h 0048 1] Type : 03 [VirtIO-PCI IOMMU] [031h 0049 1] Reserved : 00 [032h 0050 2] Length : 0010 [034h 0052 2] PCI Segment : 0000 [036h 0054 2] PCI BDF number : 0010 [038h 0056 8] Reserved : 0000000000000000 [040h 0064 1] Type : 01 [PCI Range] [041h 0065 1] Reserved : 00 [042h 0066 2] Length : 0018 [044h 0068 4] Endpoint start : 00003000 [048h 0072 2] PCI Segment start : 0000 [04Ah 0074 2] PCI Segment end : 0000 [04Ch 0076 2] PCI BDF start : 3000 [04Eh 0078 2] PCI BDF end : 30FF [050h 0080 2] Output node : 0030 [052h 0082 6] Reserved : 000000000000 [058h 0088 1] Type : 01 [PCI Range] [059h 0089 1] Reserved : 00 [05Ah 0090 2] Length : 0018 [05Ch 0092 4] Endpoint start : 00001000 [060h 0096 2] PCI Segment start : 0000 [062h 0098 2] PCI Segment end : 0000 [064h 0100 2] PCI BDF start : 1000 [066h 0102 2] PCI BDF end : 10FF [068h 0104 2] Output node : 0030 [06Ah 0106 6] Reserved : 000000000000 And the DSDT diff is: @@ -5,13 +5,13 @@ * * Disassembling to symbolic ASL+ operators * - * Disassembly of tests/data/acpi/q35/DSDT, Fri Dec 10 15:03:08 2021 + * Disassembly of /tmp/aml-H9Y5D1, Fri Dec 10 15:02:27 2021 * * Original Table Header: * Signature "DSDT" - * Length 0x00002061 (8289) + * Length 0x000024B6 (9398) * Revision 0x01 **** 32-bit table (V1), no 64-bit math support - * Checksum 0xFA + * Checksum 0xA7 * OEM ID "BOCHS " * OEM Table ID "BXPC " * OEM Revision 0x00000001 (1) @@ -3114,6 +3114,339 @@ } } + Scope (\_SB) + { + Device (PC30) + { + Name (_UID, 0x30) // _UID: Unique ID + Name (_BBN, 0x30) // _BBN: BIOS Bus Number + Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */) // _HID: Hardware ID + Name (_CID, EisaId ("PNP0A03") /* PCI Bus */) // _CID: Compatible ID + Method (_OSC, 4, NotSerialized) // _OSC: Operating System Capabilities + { + CreateDWordField (Arg3, Zero, CDW1) + If ((Arg0 == ToUUID ("33db4d5b-1ff7-401c-9657-7441c03dd766") /* PCI Host Bridge Device */)) + { + CreateDWordField (Arg3, 0x04, CDW2) + CreateDWordField (Arg3, 0x08, CDW3) + Local0 = CDW3 /* \_SB_.PC30._OSC.CDW3 */ + Local0 &= 0x1F + If ((Arg1 != One)) + { + CDW1 |= 0x08 + } + + If ((CDW3 != Local0)) + { + CDW1 |= 0x10 + } + + CDW3 = Local0 + } + Else + { + CDW1 |= 0x04 + } + + Return (Arg3) + } + + Method (_PRT, 0, NotSerialized) // _PRT: PCI Routing Table + { + Local0 = Package (0x80){} + Local1 = Zero + While ((Local1 < 0x80)) + { + Local2 = (Local1 >> 0x02) + Local3 = ((Local1 + Local2) & 0x03) + If ((Local3 == Zero)) + { + Local4 = Package (0x04) + { + Zero, + Zero, + LNKD, + Zero + } + } + + If ((Local3 == One)) + { + Local4 = Package (0x04) + { + Zero, + Zero, + LNKA, + Zero + } + } + + If ((Local3 == 0x02)) + { + Local4 = Package (0x04) + { + Zero, + Zero, + LNKB, + Zero + } + } + + If ((Local3 == 0x03)) + { + Local4 = Package (0x04) + { + Zero, + Zero, + LNKC, + Zero + } + } + + Local4 [Zero] = ((Local2 << 0x10) | 0xFFFF) + Local4 [One] = (Local1 & 0x03) + Local0 [Local1] = Local4 + Local1++ + } + + Return (Local0) + } + + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, + 0x0000, // Granularity + 0x0030, // Range Minimum + 0x0030, // Range Maximum + 0x0000, // Translation Offset + 0x0001, // Length + ,, ) + }) + } + } + + Scope (\_SB) + { + Device (PC20) + { + Name (_UID, 0x20) // _UID: Unique ID + Name (_BBN, 0x20) // _BBN: BIOS Bus Number + Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */) // _HID: Hardware ID + Name (_CID, EisaId ("PNP0A03") /* PCI Bus */) // _CID: Compatible ID + Method (_OSC, 4, NotSerialized) // _OSC: Operating System Capabilities + { + CreateDWordField (Arg3, Zero, CDW1) + If ((Arg0 == ToUUID ("33db4d5b-1ff7-401c-9657-7441c03dd766") /* PCI Host Bridge Device */)) + { + CreateDWordField (Arg3, 0x04, CDW2) + CreateDWordField (Arg3, 0x08, CDW3) + Local0 = CDW3 /* \_SB_.PC20._OSC.CDW3 */ + Local0 &= 0x1F + If ((Arg1 != One)) + { + CDW1 |= 0x08 + } + + If ((CDW3 != Local0)) + { + CDW1 |= 0x10 + } + + CDW3 = Local0 + } + Else + { + CDW1 |= 0x04 + } + + Return (Arg3) + } + + Method (_PRT, 0, NotSerialized) // _PRT: PCI Routing Table + { + Local0 = Package (0x80){} + Local1 = Zero + While ((Local1 < 0x80)) + { + Local2 = (Local1 >> 0x02) + Local3 = ((Local1 + Local2) & 0x03) + If ((Local3 == Zero)) + { + Local4 = Package (0x04) + { + Zero, + Zero, + LNKD, + Zero + } + } + + If ((Local3 == One)) + { + Local4 = Package (0x04) + { + Zero, + Zero, + LNKA, + Zero + } + } + + If ((Local3 == 0x02)) + { + Local4 = Package (0x04) + { + Zero, + Zero, + LNKB, + Zero + } + } + + If ((Local3 == 0x03)) + { + Local4 = Package (0x04) + { + Zero, + Zero, + LNKC, + Zero + } + } + + Local4 [Zero] = ((Local2 << 0x10) | 0xFFFF) + Local4 [One] = (Local1 & 0x03) + Local0 [Local1] = Local4 + Local1++ + } + + Return (Local0) + } + + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, + 0x0000, // Granularity + 0x0020, // Range Minimum + 0x0020, // Range Maximum + 0x0000, // Translation Offset + 0x0001, // Length + ,, ) + }) + } + } + + Scope (\_SB) + { + Device (PC10) + { + Name (_UID, 0x10) // _UID: Unique ID + Name (_BBN, 0x10) // _BBN: BIOS Bus Number + Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */) // _HID: Hardware ID + Name (_CID, EisaId ("PNP0A03") /* PCI Bus */) // _CID: Compatible ID + Method (_OSC, 4, NotSerialized) // _OSC: Operating System Capabilities + { + CreateDWordField (Arg3, Zero, CDW1) + If ((Arg0 == ToUUID ("33db4d5b-1ff7-401c-9657-7441c03dd766") /* PCI Host Bridge Device */)) + { + CreateDWordField (Arg3, 0x04, CDW2) + CreateDWordField (Arg3, 0x08, CDW3) + Local0 = CDW3 /* \_SB_.PC10._OSC.CDW3 */ + Local0 &= 0x1F + If ((Arg1 != One)) + { + CDW1 |= 0x08 + } + + If ((CDW3 != Local0)) + { + CDW1 |= 0x10 + } + + CDW3 = Local0 + } + Else + { + CDW1 |= 0x04 + } + + Return (Arg3) + } + + Method (_PRT, 0, NotSerialized) // _PRT: PCI Routing Table + { + Local0 = Package (0x80){} + Local1 = Zero + While ((Local1 < 0x80)) + { + Local2 = (Local1 >> 0x02) + Local3 = ((Local1 + Local2) & 0x03) + If ((Local3 == Zero)) + { + Local4 = Package (0x04) + { + Zero, + Zero, + LNKD, + Zero + } + } + + If ((Local3 == One)) + { + Local4 = Package (0x04) + { + Zero, + Zero, + LNKA, + Zero + } + } + + If ((Local3 == 0x02)) + { + Local4 = Package (0x04) + { + Zero, + Zero, + LNKB, + Zero + } + } + + If ((Local3 == 0x03)) + { + Local4 = Package (0x04) + { + Zero, + Zero, + LNKC, + Zero + } + } + + Local4 [Zero] = ((Local2 << 0x10) | 0xFFFF) + Local4 [One] = (Local1 & 0x03) + Local0 [Local1] = Local4 + Local1++ + } + + Return (Local0) + } + + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, + 0x0000, // Granularity + 0x0010, // Range Minimum + 0x0010, // Range Maximum + 0x0000, // Translation Offset + 0x0001, // Length + ,, ) + }) + } + } + Scope (\_SB.PCI0) { Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings @@ -3121,9 +3454,9 @@ WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, 0x0000, // Granularity 0x0000, // Range Minimum - 0x00FF, // Range Maximum + 0x000F, // Range Maximum 0x0000, // Translation Offset - 0x0100, // Length + 0x0010, // Length ,, ) IO (Decode16, 0x0CF8, // Range Minimum @@ -3278,6 +3611,26 @@ } } + Device (S10) + { + Name (_ADR, 0x00020000) // _ADR: Address + } + + Device (S18) + { + Name (_ADR, 0x00030000) // _ADR: Address + } + + Device (S20) + { + Name (_ADR, 0x00040000) // _ADR: Address + } + + Device (S28) + { + Name (_ADR, 0x00050000) // _ADR: Address + } + Method (PCNT, 0, NotSerialized) { } Reviewed-by: Eric Auger Signed-off-by: Jean-Philippe Brucker --- tests/qtest/bios-tables-test-allowed-diff.h | 2 -- tests/data/acpi/q35/DSDT.viot | Bin 0 -> 9398 bytes tests/data/acpi/q35/VIOT.viot | Bin 0 -> 112 bytes 3 files changed, 2 deletions(-) diff --git a/tests/data/acpi/q35/DSDT.viot b/tests/data/acpi/q35/DSDT.viot index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..1c3b4da5cbe81ecab5e1ef50d383b561c5e0f55f 100644 GIT binary patch literal 9398 zcmeHNO>7&-8J*>iv|O&FB}G~Oi$yp||57BBoWHhc5OS9yDTx$CQgH$r;8Idr*-4Q_ z5(9Az1F`}niVsB-)S~D)a>NF1~WVB6^~_B#yhJ`H+JU@=6aXs`?Yv)J2h=N?drcS zeLZ*n<JRPm3~# z&ICS{+_OayRW-l=Mtk=~uaS3o8z<_udd|(wqg`&JnVPfCe>BUOO`Su3e>pff_^UW% z&JE^NO`)=Amg~iqRB1pPscP?(>#ZuY8GHCmlEvD$9g3%4Db~Dfz2SATnddvrR-Oe^ z;s;dJec!hnzi)ri^I6YN9vtkm{^TdUF8h7gX8-F3atdZn=zv3$#RmZzSHN+6-yyU#8cJb=YDilX&sl}vNm znkgAR^O<3kj4if>{ly5fwRfMWuC5=lrlvKPX~i#654Cp}R_d*JS$9laZ$ra6)LDi%Gxz_v_W8VX$W-Fg-qFWcT}7MCyz{%%{ia7hZ>Law-k6NOr}VI&_48U=2l zwqDKFE8eTwwozDdms#e?x?5a|v>&JF;2_v0L~z5n%BYU^52<*cWuD4|GYUm@1+?)) zte^45>Rz)t*@t@{%?^i#W{i=HAZ*Dc9y59Va-+#P!jrGs;u38a{fLr`N zvT@rUu>DljxJ?^&Z?-?vyJn3C>3D=qux{Y*bs5|5n)Qmi$TD^Zdn4GU$ocJS2Hh-< z`xPI^^+v0nUVdjMos8k`WGl7hA`{03ju%ckUB>FI=~GokB5sOq#dotCE4(sd$KbtW~PNlj-`*NIToiD#j5J#9^= zt?NXn>YUJYPG~wObe#xQos*i*NloXZt`niEb4t@WrRki~bs|)CI+{*L)9L6s5vn>< zn$DD_Go|Z9sOn5>I@6lYw5}7Os&iV?Ij!lO)^#FOb!If38BJ$K*NIToIiu;E(R9w} zIuWWmPiZ<&X*y5oIuWWmF_XaEC!a&Jn$B5WCqh-{X-(&8P3LJ{Cqh-{8P3dyPr@^t zSqL9?X9Uwd3W@23*s~h*tj0X6GZCuHa~kuU#yqDp5vt7d8uPryJg+kms?5hU=3^T3 zF`bD}WnSP+=`t5MQ$FJ_2&Q~+BP6E0f^%BVIW6a$o)e+SX~IDBih-7z6{O~7YTy`& zLjy&Cv?7QikV#>n0>>@MV8oK`Gmun34-FKdlm-J8SZSaNlnhir4-FI{S|bfqV8e)V zss<{chX#reE#g=hsKAC%sF6d-Km}BWs!kZFsFpKfpbC@>6rprQGEjt4Ck#|zITHq| zK*>M_l;3{*fllMEE0)CmI>Sk8ojDo`>|0p(0GP=xY&!axO< zGhv_#lnhirIg<<&q0|Wj6M_lrzad5lWpf zP=V!47^ngz0~JutBm+e#b;3XemNQ|X3X}{~Ksl2P6rt1!0~J`#gn=qhGEf2KOfpb} zQYQ>lU^x>8szAv=1(Y+%KoLrvFi?TzOcu&LjgxD0RX>1(q{mpbC@>R6seC z3>2Z%2?G^a&V+#~P%=;f=3{*fllMEE0)CmI>Sk8ojDo`>|0p(0GP=rz^3{+q_69%e4 z$v_2^Gs!>^N}VuJf#pmXr~)Me6;RG314Srx!axxz28u{EP=u<1B2)}iVZuNaCK;&0 zBm-5LFi?dF167!0pbC==RAItE6($T+VUmF=Ofpb~2?JG_Fi?d_2C6X0Kouqo6p_5T zFi=FeV!SiSKoR0H$dH(_Z(*Q_WZ%L-5y`$K14StNmJAdjmWs}HV4N_U)fP6Qy6Nw5mbt9Y(#emWSi66=>tq#xoh#Ue=0qyhxi8ZOUe5y0V7VfPUhp zwX=;ymc+i5%sg9Ja~lZ&8oAV@mHc>&CHP9v4R(jhtT?un;O4e9#pno)Xkh7OWgK&a zyj=3Iv0OuoK_;5rOr5f(Kb~ZXDBO+V`OWYo#_C08imwChQxnjdd?wZLDou8aj;$SD zGDYiA3<$TuEdF(l3VTOM~ghPLRH&q%ZOGrGfON zW73zx^yR_y<0nX8R??Sw`tm^f@-gYlNFSp|* zVReJU*h=ZuVXiS$ohTbw-O#v9>(yZbGE|)?8(H1ZIKvV!jWa0>vy!3eMA^vdhQ>`s zuMSg{q3T50$m)j1!HixV<}X9liL#N^4c*tL^y)CF8LCc{jjV3yKAqL8!%SzWI#H%q z=bSrQ&)%JCRttF5g4Zf`6l?y@>PzD7MA^D>wBlcH6r1ucwJ`a5r3e|z)wcUaqS>nqFQ-8x}eCF4u`OWUxqst-@1rSmUs%WmKP5e0dcb?e2N z;Z|x*!);VwF|Yuhqs^khqOM!@u*jY!WYldISF(V6`BoNd&6Qfk3>X#SuD^7J>p_D= zBPa51y^_n#=cpOt#Zf$ya$Ae9Mfz56n|KnY%4JQfOYS$*uU%f#@$U6`N8I3N-lV?5ErFCdv~xDmu2(wexld4 z4v^;aVAT2k6GJ^m*FD(Wqc(Qg^)6a-Obg6yV`8o$8_`PyJe_;bY5_EMBfBfWU!Q=*9HsG z%_Cda{@_Krr!oHVhv9+y+T5qR8zZ2aZ>5r!$*|f$^U%yBUYfR&B!+EYy_PwL!BeUi zJH^}r3r9Q+B)X@Z)fk=P13w&7x#wBtXTZ)g>WITPg5r&pQc!nmyrmk#S(>>b9xnNr zx_b#v9Xv-Y>jcOVhS*0rS~RS1dA#xhkv@Nct@#q?LyeKS<$uFec!bw>{@uu$gZ6a zyVen1i{1BKd%~`D7|m$;U0a38zM0sT&6X~cwUxUL8G1KT)_XTp!KAbs;vCp{K3&~_X@+ew=-D}v`2MbFV0 zQsVsL=rXi-pI*G|iiz;VTCutgUs)hDzV1+4?8KcoP3xROfS+TT-130 literal 0 HcmV?d00001 diff --git a/tests/data/acpi/q35/VIOT.viot b/tests/data/acpi/q35/VIOT.viot index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..9b179266ccbf84f1c250ee646812d17e27987764 100644 GIT binary patch literal 112 zcmWIZ^baXu00LVle`k+i1*eDrX9XZ&1PX!JAex!M0Hgv8m>C3sGzdcgBZCA3T-xBj Q0Zb)W9Hva*zW_`e0M!8s0RR91 literal 0 HcmV?d00001 diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index 29b5b1eabc..8367ffe1d4 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,4 +1,2 @@ /* 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 Dec 10 17:04:16 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: 522748 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp2833647imb; Fri, 10 Dec 2021 09:11:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJwBV9UmPrZvzjRwglzx8SOK/MG6PC3AGnA7QJS1hFC9+3g5aDbhTF2rTp4J5N6BYD+pjZJk X-Received: by 2002:a05:6102:126a:: with SMTP id q10mr17047018vsg.42.1639156318824; Fri, 10 Dec 2021 09:11:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639156318; cv=none; d=google.com; s=arc-20160816; b=tukIS5GztEerE5aA7PbakWYtywbUcAW+yA+otJLhZbydF23N8FcY+rFp/AHSF3jSwp LYwoukK6VF9SKNnHIo68fK0PMw0xBvH/XM37U1hDY0A3VcwyGKTqNDo4m8GL8U4QtPCz o6CvncDSO84/YUBTE6gQ1aKPWg2PUcmTsyQJStou/yisR38NDbjJsuKwCe9/qAHW4F7Y w5TkViUhEWSKVJXb7GseYP8H8Ik+08x1DwW3qWjQrgWZEaII0gKObJz72Fb8A5W7zg2X H1hUrHzsUnVDddNvi6MM73Ry44NsS8KLuJh/I4jV6BizwX+VDPjByHCW6onJhqc+8MtF BIKg== 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=Ip5soFw3rjH4l0UOQgeNBDeZEJ7Gl21CxRLwmqCQWdQ=; b=jUAbNX5Msq7/tg4q/c8JhlIZRa9ElpWthFT0Voj1opGycs0r3yEUAXzucXQPdHhT4d m7S2pb1Zq1GZmEqILHt8MfT7cmmDMDDSuYx/rXUgLvSkSJmvQLcRKMFOltTWr8cpmZJX JVd7BbrR7tJoF7aGa1jLyePBe57rLifIuGQ2Uom8WSiop8+WjmLc1mobOnAngRV82mIF att4VG/qXTD0L5FtihRotXWjMZK2DmmdLtSfQbuI6M5hhc8Hk34AGWIeYgg71WIbSlAm zlUe1ziw0JhoVhjyKZTV86ZGYweQJBxPYz5HpUOXZYjEe3UMXaEy67yzW1dcE3wBx2Dv exnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="mgaPOR/o"; spf=none (google.com: qemu-devel-bounces+patch=linaro.org@nongnu.org does not designate permitted sender hosts) 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 z3si3983052uao.114.2021.12.10.09.11.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Dec 2021 09:11:58 -0800 (PST) Received-SPF: none (google.com: qemu-devel-bounces+patch=linaro.org@nongnu.org does not designate permitted sender hosts) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="mgaPOR/o"; spf=none (google.com: qemu-devel-bounces+patch=linaro.org@nongnu.org does not designate permitted sender hosts) 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]:52772 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvjR8-0006Eg-Ag for patch@linaro.org; Fri, 10 Dec 2021 12:11:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvjLY-0005uB-84 for qemu-devel@nongnu.org; Fri, 10 Dec 2021 12:06:13 -0500 Received: from [2a00:1450:4864:20::532] (port=38408 helo=mail-ed1-x532.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mvjLT-0006VI-40 for qemu-devel@nongnu.org; Fri, 10 Dec 2021 12:06:09 -0500 Received: by mail-ed1-x532.google.com with SMTP id x10so14586598edd.5 for ; Fri, 10 Dec 2021 09:06:04 -0800 (PST) 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=Ip5soFw3rjH4l0UOQgeNBDeZEJ7Gl21CxRLwmqCQWdQ=; b=mgaPOR/okEysCyMG+xqVO6Ds5g6KN1gfOs78I+NPLB446dOfoUpzp6q1EEuwHO4gxT HU7hwoauORhUSqsDXswRH0HpGjxK4hrUXo84zxvQdWi9SMrXeiCEuA0+akokuxQw1ubp 6tM3KlQ77zW9arVT3Zo3UbuHtQ/2TW4lTYY4GpH4uHvrjuin8uEPF+5CYMJzrbQY10of MaaOoh7eqZIojUEVZb+ybEEraMUpSvWQtUEsqTn7j16hoc/pDafqE3j9HWPmlpc/ZXNa EkYLUre9iaHhf6dqH6ekeDiGnWz7Amkln+YsMN/F4F4sW/BkIuhxffKmazUh2ml1iAQT KOMw== 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=Ip5soFw3rjH4l0UOQgeNBDeZEJ7Gl21CxRLwmqCQWdQ=; b=ADh5Hg/5slggDsQ6pPOuDUfSCowaQT8rRCoEojsyiqla4YIZpwou9XUclg4Js6kspl hZAQ4BsGlnz7LI1mBNDve4YNB7XQUvz5lT+2CVCq9EKEGRklxbK0qUU8FiVoKmthsbIx 1QpCjtK/6P1w7gk8MUGhhqvtbcRUujbDNSC5XBCnoDz+UAkBk0p86F7qjrQWOWocnmzS WlVsORPEbbdiMoadjv7uDcE5O0gKBMag3ZDYj7KEbjgyP8VWoj9zBRpnF3P86FSMwFU4 ppvfXhS+aaaqSZB5K7Dk+BRNDqcoKSmAjd5tHkqbCPuj5lvG+LemWvFhOblbzzz6HNC/ dmOw== X-Gm-Message-State: AOAM5316GL4UB6eon1vZarqbtKYXXamWLaismIjqd1LzDWC60LdCuOru W4VMPc3wBEF+uxNZGM15xN4MOw== X-Received: by 2002:a17:907:60c9:: with SMTP id hv9mr24663120ejc.482.1639155963486; Fri, 10 Dec 2021 09:06:03 -0800 (PST) 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 x7sm1860661edd.28.2021.12.10.09.06.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Dec 2021 09:06:02 -0800 (PST) From: Jean-Philippe Brucker To: mst@redhat.com, imammedo@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com Subject: [PATCH v7 8/8] tests/acpi: add expected blob for VIOT test on virt machine Date: Fri, 10 Dec 2021 17:04:16 +0000 Message-Id: <20211210170415.583179-9-jean-philippe@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211210170415.583179-1-jean-philippe@linaro.org> References: <20211210170415.583179-1-jean-philippe@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::532 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=jean-philippe@linaro.org; helo=mail-ed1-x532.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ani@anisinha.ca, eric.auger@redhat.com, qemu-arm@nongnu.org, qemu-devel@nongnu.org, Jean-Philippe Brucker 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 Acked-by: Ani Sinha Reviewed-by: Eric Auger Signed-off-by: Jean-Philippe Brucker --- tests/qtest/bios-tables-test-allowed-diff.h | 1 - tests/data/acpi/virt/VIOT | Bin 0 -> 88 bytes 2 files changed, 1 deletion(-) diff --git a/tests/data/acpi/virt/VIOT b/tests/data/acpi/virt/VIOT index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..921f40d88c28ba2171a4d664e119914335309e7d 100644 GIT binary patch literal 88 zcmWIZ^bd((0D?3pe`k+i1*eDrX9XZ&1PX!JAexE60Hgv8m>C3sGzXN&z`)2L0cSHX I{D-Rq0Q5fy0RR91 literal 0 HcmV?d00001 diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index 8367ffe1d4..dfb8523c8b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,2 +1 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/virt/VIOT",