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 3038EC433EF for ; Thu, 21 Oct 2021 09:06:08 +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 AA0AF610CB for ; Thu, 21 Oct 2021 09:06:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AA0AF610CB 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]:39540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdU1W-0001Vs-Kp for qemu-devel@archiver.kernel.org; Thu, 21 Oct 2021 05:06:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdTyA-0007DE-Bz for qemu-devel@nongnu.org; Thu, 21 Oct 2021 05:02:38 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:45285) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdTy6-0005yx-4H for qemu-devel@nongnu.org; Thu, 21 Oct 2021 05:02:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634806952; 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=A78rqAmL4vROopRQqqY/d/L/E6qU9a0792ddVb1RaYY=; b=eabzNeeZFSJaGB6jGYpQFpSgVWmhjB6WKq+3sAD95WuGkHVBUgrKQYai9EiKgs+AKt2e3X 1aJcsQ/ZZAT8W32qyVJEnBi8ePUbKdm1Yy/wjh35rc+URmZpsiAcMXYJubHx1CuPr6Ct0Q bOATe7MvgGusltAsFXL2z1fZnDSUau8= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-518-7zt-bBPLP626TZZazBzUDg-1; Thu, 21 Oct 2021 05:02:31 -0400 X-MC-Unique: 7zt-bBPLP626TZZazBzUDg-1 Received: by mail-wm1-f69.google.com with SMTP id z26-20020a05600c221a00b0030da55bc454so4897138wml.4 for ; Thu, 21 Oct 2021 02:02:30 -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=A78rqAmL4vROopRQqqY/d/L/E6qU9a0792ddVb1RaYY=; b=HTbgQvdPGLyVS5yCiGaCFjFhPWx7JFaVHmS8YHYZ9FEqMTX8Sth40Un4R96+Hgrq5T 9g74sNQxZLmTGEcx2oKfFIkudeO/wJpCILiADMpYIsErJqplTEdTbF1EJi3y3qQG/gZh XqHshQyrQpU5tvVPXolGhKTt/eev+jnuTMWIgIOa+BtpPUIAomv8ETxe5+EvhOXNo9lW 5G59pvRWwnXxsp9pyc7HcewHKtjRhSoDh8snSPbsiPNxa2+j1dsJEdScM0HX+n8YVqmt ixIKXyaiKgV0ZkS9hwm53iPiRFIs8zAnNkcjXJoqSsyhYX4kMc3v+WLfdD8yeL6Ym2WU Ut/A== X-Gm-Message-State: AOAM5301IU7SIjI7ywrTX/P0kM/SPv/iuN1jZGE6MgWH7fUBZV5uqwsC UoCjz4yXCU+yP1+JlJV9rN8JA1lg6DBq6/gEZ+h4J8B7IaYYET/sMnko/EmWPFqnP8Mpe92aDx9 L5sa2augLxnrsdak= X-Received: by 2002:a05:6000:1362:: with SMTP id q2mr5748505wrz.44.1634806950028; Thu, 21 Oct 2021 02:02:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzv44weoACd+Y+M4vVqXO9R8KO+0T34KD2xTCv6nR2K9iluYl4QAYJpCmBuNXSmdhzFwKFRVQ== X-Received: by 2002:a05:6000:1362:: with SMTP id q2mr5748473wrz.44.1634806949805; Thu, 21 Oct 2021 02:02:29 -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 q141sm757480wme.8.2021.10.21.02.02.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Oct 2021 02:02:29 -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:27 +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: 7bit Content-Language: en-US Received-SPF: pass client-ip=170.10.133.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 > --- > 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 " Just a reminder that we still have a dependency on the default_bus_bypass_iommu fix here. Otherwise those tests will fail. So the fix needs to be upstreamed along with that series. Eric > + "-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);