From patchwork Fri Dec 10 17:04:08 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: 522746 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp2829057imb; Fri, 10 Dec 2021 09:08:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJzNLrgN6JUh40Z+inJnZXF0a2a70HRVOsIO52K8FyUvRFugi0XCb6okdn7X+sEDx8hdKWbW X-Received: by 2002:a05:6214:5193:: with SMTP id kl19mr26371449qvb.70.1639156111620; Fri, 10 Dec 2021 09:08:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639156111; cv=none; d=google.com; s=arc-20160816; b=sziJugcbicdvrQDXWFDfq8pTvWig5ub7DZSV0vJCcwGEFuAAw3+aLBFozH/PiP5nfu MuB4MwXg57p3KcPANKkKZT380wY/t8te4t4Sfnwx3lF8EmPRZqKeGEViNfptO04odg0W wVpaNgwBMnV9yPQu2/rQbhhc0c4CrL1kBxcM30ov5v0NVoQjG7n/ztU0xD1hHu7X/N1G fUv6RyS33TgpK/OYcYWbQr6FsvyVxjJXqa7q2ZV66VwB8biVVXME31nCZoPH/EA1Fz/R T2P+/d85de7IaPph4L76OmCjqtFzDk+SfweFhIMlcQwqJPz4DX7UxokqPCqY401jCS8+ lyWQ== 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:message-id:date:subject:to:from:dkim-signature; bh=31SBXr+ll2DgZVzLxTnqIHA7xmVY0g06H2BnonCZLfk=; b=erkqkRLaUSHK1pAwm41vKZQ5xOd8/VIC71NireqElW6hao1nrDZqnPqMPszCWMVTol vfSKIAxzeotsdjFrpqFwQ3pcxf80P48eVGf8nfWy/I6rBGpPi1wPYJQ5WrHYLW9K+s4r h+e3QgwNRwoxm5ptLSexZsfpS3Hzp1rJk0LSUEZfcB88NUFTANp5/oyD8fkg+gXw5JZ/ ouLQMLChE76geM55HBm6JQyxPNizesbQwYi0ULkHMi0z1S1G2b83VxP0Uw0SqBHEK6eQ hj9brtoLnE1o7yCDpEo/Nc0XEN01DUvcfi884MTaxcHJAeiqmsvm3TiC7ciRzQWPG/oF izHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=NTlmLAaY; 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 t10si3455783qvh.274.2021.12.10.09.08.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Dec 2021 09:08:31 -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=NTlmLAaY; 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]:43356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvjNn-0008EQ-3d for patch@linaro.org; Fri, 10 Dec 2021 12:08:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40170) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvjLI-0005ic-UR for qemu-devel@nongnu.org; Fri, 10 Dec 2021 12:05:56 -0500 Received: from [2a00:1450:4864:20::534] (port=46613 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 1mvjLG-0006O5-37 for qemu-devel@nongnu.org; Fri, 10 Dec 2021 12:05:56 -0500 Received: by mail-ed1-x534.google.com with SMTP id y13so31510728edd.13 for ; Fri, 10 Dec 2021 09:05:53 -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:mime-version :content-transfer-encoding; bh=31SBXr+ll2DgZVzLxTnqIHA7xmVY0g06H2BnonCZLfk=; b=NTlmLAaYIxA4ezOLa7mKC01IaImOnCB6gzP4zos8KW7+guHIBJvLLjkjS/CB8uSjIL Z5vjQyHYdO5T/vN3IEmbH0EM7tb5RsLOaDxC30+U+07lr0zp8qXwe60OdrZmX19nPxRq /oU2PZbgUYQMwPVvlAJ5V2XgFcO/lOJxYN0poHkZ8Pe876G6kbDvJU0qk+M+ynV3h1H9 oZjjIqVdlpsAn7NCJ4Ji47SE4i5X1J2QH4lWNkKCLP9H9gep22kay0Qi9LGTGxZv292o XUuuaTyulROMsWObppyruAo3c6ROrF5kaRNlpCpCetfTb7JwrWwaZSXvLx/cYauZNmA6 vrAA== 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:mime-version :content-transfer-encoding; bh=31SBXr+ll2DgZVzLxTnqIHA7xmVY0g06H2BnonCZLfk=; b=TmNdJEG9UQvJn/fUGbsxXEcNiV2BK+5cuj4i6zQKoBK5a46r/4SwXImCbglndAqLTi 7bUM8G1cFQmKSPbwdmY3RuGGmzWhrlWsLvSWlqKjftunyEdK/AHu2q7VEkMiafU9rn4i iCPu9JO8c81xJXWj52dv7c6zHVxi8fDqO892gQ2BmJJHZSc+thvfAJo0boZ6gcPlJNVj dESAVu7Ng4jhHrYFV0jiSOg5XKtgvfZyej+nxdj5GLUvX3NWKd4OBEVsgEIiQ9V3ToMv OYbWzfd89mxyD4vEH87kLTgiRMtp3yELMJ6/x+MKRKD9VhFT0HqqanoPKOceboGSZ+ul jk9g== X-Gm-Message-State: AOAM53254+Br8aDr/DtzRsLaYwMAWKhDosOB3B6rM3QvirqUufUN9P5e uFeEaYeMntHXyal9/vCBLrojyw== X-Received: by 2002:a17:907:8a1b:: with SMTP id sc27mr25574073ejc.572.1639155951758; Fri, 10 Dec 2021 09:05:51 -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.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Dec 2021 09:05:51 -0800 (PST) From: Jean-Philippe Brucker To: mst@redhat.com, imammedo@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com Subject: [PATCH v7 0/8] virtio-iommu: Add ACPI support (Arm part + tests) Date: Fri, 10 Dec 2021 17:04:08 +0000 Message-Id: <20211210170415.583179-1-jean-philippe@linaro.org> X-Mailer: git-send-email 2.34.1 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 ACPI support for virtio-iommu on the virt machine, by instantiating a VIOT table. Also add the tests for the ACPI table. Since last posting [1], I rebased onto v6.2.0-rc4. Note that v6 of this series [2] only contained the table and x86 support, which have been merged. Everything has now been reviewed and should be good to go. * Patches 1-2 add the VIOT table for the virt machine * Patches 3-4 are minor fixes * Patches 5-8 add tests for the VIOT table. They contain the tests for q35 as well, which didn't make it last time because they depended on another fix that has now been merged. [1] https://lore.kernel.org/qemu-devel/20211020172745.620101-1-jean-philippe@linaro.org/ [2] https://lore.kernel.org/qemu-devel/20211026182024.2642038-1-jean-philippe@linaro.org/ Jean-Philippe Brucker (8): hw/arm/virt-acpi-build: Add VIOT table for virtio-iommu hw/arm/virt: Remove device tree restriction for virtio-iommu hw/arm/virt: Reject instantiation of multiple IOMMUs hw/arm/virt: Use object_property_set instead of qdev_prop_set tests/acpi: allow updates of VIOT expected data files tests/acpi: add test case for VIOT tests/acpi: add expected blobs for VIOT test on q35 machine tests/acpi: add expected blob for VIOT test on virt machine hw/arm/virt-acpi-build.c | 7 ++++++ hw/arm/virt.c | 20 ++++++++--------- hw/virtio/virtio-iommu-pci.c | 12 ++--------- tests/qtest/bios-tables-test.c | 38 +++++++++++++++++++++++++++++++++ hw/arm/Kconfig | 1 + tests/data/acpi/q35/DSDT.viot | Bin 0 -> 9398 bytes tests/data/acpi/q35/VIOT.viot | Bin 0 -> 112 bytes tests/data/acpi/virt/VIOT | Bin 0 -> 88 bytes 8 files changed, 58 insertions(+), 20 deletions(-) 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 Acked-by: Michael S. Tsirkin