From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20BABC433EF for ; Thu, 21 Oct 2021 09:08:36 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9B9CB60FD8 for ; Thu, 21 Oct 2021 09:08:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9B9CB60FD8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:45160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdU3u-0005L9-PD for qemu-devel@archiver.kernel.org; Thu, 21 Oct 2021 05:08:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdTyF-0007Fl-GV for qemu-devel@nongnu.org; Thu, 21 Oct 2021 05:02:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:35875) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdTyA-000642-6R for qemu-devel@nongnu.org; Thu, 21 Oct 2021 05:02:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634806957; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pToZEKYHQv0R2b96Jhl+ZhRHrN2ZTOz6jeiK5EhfBNg=; b=CTh3knNnL230BruIUvQ+17FAmkf2fTbdxvR6cS0u6kOBpwRSQd4F6Ne4G+iG+fkAzdV9ef efQSqyz4y3mEyyOFUN2q41kRjCP9KHZIIuMisIj22ot9BTnI+hdcCB+fNewJv+1509AJUR d8+lTwYj7gsz/TJH2Rt2py5UmPMJRQA= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-335-sUnEutpwM1ibfv-_UoiuQw-1; Thu, 21 Oct 2021 05:02:34 -0400 X-MC-Unique: sUnEutpwM1ibfv-_UoiuQw-1 Received: by mail-wr1-f71.google.com with SMTP id 75-20020adf82d1000000b00160cbb0f800so11109526wrc.22 for ; Thu, 21 Oct 2021 02:02:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:reply-to:subject:to:cc:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=pToZEKYHQv0R2b96Jhl+ZhRHrN2ZTOz6jeiK5EhfBNg=; b=D1VS2qqeYgbps4SIcnY8FApUQGoT2jCWFrT+LluXIUvAZh8zICmRbxAS1J8gOw06/I Mh1QVcSuI5ttpEZN3ArgsE/RPhrdr5apOo73Zb3BMa5XcogJj3RptoBXtay5BzQqXPLC 1eamCOty9E3Ixmv/VHM0ggnuxsznul8cckmG3jCccNWK1xzYL3ZxxAp3sD6ixJ+Z+AtD n2GImoKCD0cfpyT7CLUid9QFWMAmNIeNJCwS20Y5QPZOGomg3WL9KwkS2in0pQRtJAu8 y6nZP6s0VpdTWW39Gs29Mdmz/Sh6NJ/cjCCwCmpEkjDVXJH1186vacW5wp+ntA+pwtBH rMpw== X-Gm-Message-State: AOAM533UrRlXzU8/QB++c5JcvQUeniXh4JGh90oNu+MJAtXoxgG8uCHM hS9kJGT/3N4nRwTzaihd7SAa8AtgDXvfvVoQsJZTqy23XI+XdHXZY7FDdQFWz7q3O1f8tXAhrrT //7TAeVi2Q4Sv0o8= X-Received: by 2002:a05:600c:210a:: with SMTP id u10mr785633wml.139.1634806953195; Thu, 21 Oct 2021 02:02:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKGZD6ojjGiT7tcdRslcg0EPpTuyqlCW5ayR4urhgZ2H1iBb5IdpPQ/JhRIJGnOcBvdtBusg== X-Received: by 2002:a05:600c:210a:: with SMTP id u10mr785619wml.139.1634806953027; Thu, 21 Oct 2021 02:02:33 -0700 (PDT) Received: from ?IPv6:2a01:e0a:59e:9d80:527b:9dff:feef:3874? ([2a01:e0a:59e:9d80:527b:9dff:feef:3874]) by smtp.gmail.com with ESMTPSA id r17sm4845478wmq.47.2021.10.21.02.02.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Oct 2021 02:02:32 -0700 (PDT) Subject: Re: [PATCH v5 10/12] tests/acpi: add test cases for VIOT To: Jean-Philippe Brucker , mst@redhat.com, imammedo@redhat.com, peter.maydell@linaro.org References: <20211020172745.620101-1-jean-philippe@linaro.org> <20211020172745.620101-11-jean-philippe@linaro.org> From: Eric Auger Message-ID: Date: Thu, 21 Oct 2021 11:02:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20211020172745.620101-11-jean-philippe@linaro.org> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=eric.auger@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US Received-SPF: pass client-ip=216.205.24.124; envelope-from=eric.auger@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -50 X-Spam_score: -5.1 X-Spam_bar: ----- X-Spam_report: (-5.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-2.267, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, 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: , Reply-To: eric.auger@redhat.com Cc: ehabkost@redhat.com, jasowang@redhat.com, richard.henderson@linaro.org, qemu-devel@nongnu.org, peterx@redhat.com, shannon.zhaosl@gmail.com, qemu-arm@nongnu.org, ani@anisinha.ca, pbonzini@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Hi Jean, On 10/20/21 7:27 PM, Jean-Philippe Brucker wrote: > 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 small conflict to be resolved since  220ffd949b ("tests: bios-tables-test: use qtest_has_accel() API to register TCG only tests") Eric > --- > tests/qtest/bios-tables-test.c | 38 ++++++++++++++++++++++++++++++++++ > 1 file changed, 38 insertions(+) > > diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c > index 4f11d03055..599b155201 100644 > --- a/tests/qtest/bios-tables-test.c > +++ b/tests/qtest/bios-tables-test.c > @@ -1403,6 +1403,42 @@ static void test_acpi_virt_tcg(void) > free_test_data(&data); > } > > +static void test_acpi_q35_viot(void) > +{ > + test_data data = { > + .machine = MACHINE_Q35, > + .variant = ".viot", > + }; > + > + /* > + * To keep things interesting, two buses bypass the IOMMU. > + * VIOT should only describes the other two buses. > + */ > + test_acpi_one("-machine default_bus_bypass_iommu=on " > + "-device virtio-iommu-pci " > + "-device pxb-pcie,bus_nr=0x10,id=pcie.100,bus=pcie.0 " > + "-device pxb-pcie,bus_nr=0x20,id=pcie.200,bus=pcie.0,bypass_iommu=on " > + "-device pxb-pcie,bus_nr=0x30,id=pcie.300,bus=pcie.0", > + &data); > + free_test_data(&data); > +} > + > +static void test_acpi_virt_viot(void) > +{ > + test_data data = { > + .machine = "virt", > + .uefi_fl1 = "pc-bios/edk2-aarch64-code.fd", > + .uefi_fl2 = "pc-bios/edk2-arm-vars.fd", > + .cd = "tests/data/uefi-boot-images/bios-tables-test.aarch64.iso.qcow2", > + .ram_start = 0x40000000ULL, > + .scan_len = 128ULL * 1024 * 1024, > + }; > + > + test_acpi_one("-cpu cortex-a57 " > + "-device virtio-iommu-pci", &data); > + free_test_data(&data); > +} > + > static void test_oem_fields(test_data *data) > { > int i; > @@ -1567,12 +1603,14 @@ int main(int argc, char *argv[]) > if (strcmp(arch, "x86_64") == 0) { > qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie_tcg); > } > + qtest_add_func("acpi/q35/viot", test_acpi_q35_viot); > } else if (strcmp(arch, "aarch64") == 0) { > qtest_add_func("acpi/virt", test_acpi_virt_tcg); > qtest_add_func("acpi/virt/numamem", test_acpi_virt_tcg_numamem); > qtest_add_func("acpi/virt/memhp", test_acpi_virt_tcg_memhp); > qtest_add_func("acpi/virt/pxb", test_acpi_virt_tcg_pxb); > qtest_add_func("acpi/virt/oem-fields", test_acpi_oem_fields_virt); > + qtest_add_func("acpi/virt/viot", test_acpi_virt_viot); > } > ret = g_test_run(); > boot_sector_cleanup(disk);