From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 163464264493352.40417111468503; Tue, 19 Oct 2021 04:24:04 -0700 (PDT) Received: from localhost ([::1]:47106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcnDv-0004wB-TY for importer@patchew.org; Tue, 19 Oct 2021 07:24:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcn9s-0008HB-MW for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:19:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:26361) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcn9n-0001hk-NN for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:19:52 -0400 Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-186-bh0co6WzPU2HJI7rbmc5vQ-1; Tue, 19 Oct 2021 07:19:45 -0400 Received: by mail-ed1-f70.google.com with SMTP id c25-20020a056402143900b003dc19782ea8so13792517edx.3 for ; Tue, 19 Oct 2021 04:19:44 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id bq4sm10170654ejb.43.2021.10.19.04.19.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:19:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CWf29uc3qYZQ1YtyfEGbkZhDDSeIdnNB9/3KYMX/bN4=; b=ZOiRjzFaYYtff0x79tSQlRknyt30daiCTV/ByePjJnqsabc/FFB6TStanyf3Kf+5RYZ3pA LNho5W0FGNqrHTjf6C3ISXCuvT7Y1OpB5b1kBKSAWU2UyPMx47jgjq8YD2fZROxpWTkdqe 1wj8KvduDqOdcZRu+u80LeYpYJseg+w= X-MC-Unique: bh0co6WzPU2HJI7rbmc5vQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=CWf29uc3qYZQ1YtyfEGbkZhDDSeIdnNB9/3KYMX/bN4=; b=breDO3Fz4/ZLIfW0rWvVVh+DdbTIwvbPbBrte9KXJd/r04EVLdqgUms8pYd2MwJXm5 /CWS5cPUzojBv1v552fdzJelZGMhYbMUzRqoJgQS+v6Xol3Vxu6LbZ04SJe2lkPReFyP hi1xgrZSX34kRWtQZoxx3nIncpHEzOaK5JB3I1gf2hrMVfgASzFvXrIauys8ZzM/csuZ aVqsk+zdEYGEN9707YAQoO9sQwwlE2rLlOBYxO7RVOsvmC/UOonjyr0QVf7k6DA2IHV6 Ehvypm0ImoPKFUAbORfS8G/VdJYHy/g3o/2BRHTRtKHteyKptg9euuehbNhKhCWhYI5a puIQ== X-Gm-Message-State: AOAM530TUx2l+q5CfaCGlelqIzyHbz08z8e3Am1OqpNRGdqXeyW6se6n E49I2W1lg8FzK2AjVl9jwxAchs9ejNcnP21THdkFGch3JdP5RBWYxcnPCKNLG4x7ESVF4fN1QBM 3vCqQX/oDGdje229zcikS8OwFwrM8/WXTZ7L8GPpUPkeHeyP+Kwrm46xOxf+a X-Received: by 2002:a17:906:520b:: with SMTP id g11mr37112980ejm.502.1634642383674; Tue, 19 Oct 2021 04:19:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlwNAPewEJ8EJGCcM3Pm22aXQOZ3mqXkuljyJihZe7p/yJJ6i5kKbjnYJAx8HV+fzE7gKwOg== X-Received: by 2002:a17:906:520b:: with SMTP id g11mr37112954ejm.502.1634642383476; Tue, 19 Oct 2021 04:19:43 -0700 (PDT) Date: Tue, 19 Oct 2021 07:19:40 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 01/29] tests: acpi: dump table with failed checksum Message-ID: <20211019111923.679826-2-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, 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: , Cc: Laurent Vivier , Peter Maydell , Thomas Huth , Igor Mammedov , Ani Sinha , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634642646309100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Igor Mammedov Signed-off-by: Igor Mammedov Message-Id: <20210902113551.461632-2-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- tests/qtest/acpi-utils.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/qtest/acpi-utils.c b/tests/qtest/acpi-utils.c index d2a202efca..766c48e3a6 100644 --- a/tests/qtest/acpi-utils.c +++ b/tests/qtest/acpi-utils.c @@ -98,6 +98,20 @@ void acpi_fetch_table(QTestState *qts, uint8_t **aml, ui= nt32_t *aml_len, ACPI_ASSERT_CMP(**aml, sig); } if (verify_checksum) { + if (acpi_calc_checksum(*aml, *aml_len)) { + gint fd, ret; + char *fname =3D NULL; + GError *error =3D NULL; + + fprintf(stderr, "Invalid '%.4s'(%d)\n", *aml, *aml_len); + fd =3D g_file_open_tmp("malformed-XXXXXX.dat", &fname, &error); + g_assert_no_error(error); + fprintf(stderr, "Dumping invalid table into '%s'\n", fname); + ret =3D qemu_write_full(fd, *aml, *aml_len); + g_assert(ret =3D=3D *aml_len); + close(fd); + g_free(fname); + } g_assert(!acpi_calc_checksum(*aml, *aml_len)); } } --=20 MST From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634642876000926.0176708321293; Tue, 19 Oct 2021 04:27:56 -0700 (PDT) Received: from localhost ([::1]:57022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcnHc-0003DG-AR for importer@patchew.org; Tue, 19 Oct 2021 07:27:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50030) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcn9v-0008Li-Gl for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:19:58 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:59359) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcn9s-0001j2-BH for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:19:55 -0400 Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-265-Y13qyBUBPTyfd-XMzMwLGQ-1; Tue, 19 Oct 2021 07:19:48 -0400 Received: by mail-ed1-f71.google.com with SMTP id u17-20020a50d511000000b003daa3828c13so17254969edi.12 for ; Tue, 19 Oct 2021 04:19:47 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id lg3sm9955275ejb.78.2021.10.19.04.19.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:19:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=J4MfM0+HkTOQpE0I/uBk2BJFfKfE/CesWmDc3Xi4A0w=; b=f3JWm/kb6UsXGjNOC5xwcJbvlhRDMK1yCDM73/jxdwaG7e999jqOk5V+24+z7zBFaRurIl GSS+lmrHLbz4DqP0wcom6vp1/hom8u2JPA8aWD/BNLq3xUK5ts9ceH6Thg47UObqLdMRJz GcWQ6ps4FW5CMEHqTFQCtrW0sdb7oZQ= X-MC-Unique: Y13qyBUBPTyfd-XMzMwLGQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=J4MfM0+HkTOQpE0I/uBk2BJFfKfE/CesWmDc3Xi4A0w=; b=f69xEDNCXI+URvMK2bPT8GCgaEkBRBqWUXgIiTMBBp2uizUewtKaKJdrxWHQm6UN3L T+eSQ9MUkTB5IhTeyOUM+UYe86sKBzUvN4x2nhSOjU485Z5cSZApueOmpUpGa1AjEee1 G0Y7rwd8sWgcowbPttUqu9nJbca4p0h3cxwsPi9//YvBaXFbf2PMJIAMQacxnnVkTj/R R6N0A0VXJx0hIYXeYEipvyAdQVAh8XMH6xbzn0YiRivnQKGjYlGySQ25qvVlAxbaZVNq AEDRr+2WClME3WMk2/qjydoGZDuJ8CTP4YnFG8ibLJXRyZRmiqnIzf+2o4W7Zs4ZOrie J2GQ== X-Gm-Message-State: AOAM533GnpI0hBpXmfpebhJjfZjyhZzm9uONzQ+dKHW9F0mC6N+Mkdui NBFSYnsyeoHfmEBznaB7w8SRz0z9raWBB3/5NjS8z8rhvpyu575ZkbPtmVUU5PLb5Dw26L9Yy7S AJwGn8BHiBkzxJIwVl1hfJd4VECnpx8+wCCwp1cce/sZyYifhvsRxikK8m3AF X-Received: by 2002:a17:906:6c8:: with SMTP id v8mr37445852ejb.428.1634642386497; Tue, 19 Oct 2021 04:19:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyCMkaXaJyHk/UaeCVDptIseU2Wb0+kj8kUS66+liIZUlDbL+7sXIy8E9v156iyrW0745MOQ== X-Received: by 2002:a17:906:6c8:: with SMTP id v8mr37445825ejb.428.1634642386237; Tue, 19 Oct 2021 04:19:46 -0700 (PDT) Date: Tue, 19 Oct 2021 07:19:43 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 02/29] tests: qtest: add qtest_has_accel() to check if tested binary supports accelerator Message-ID: <20211019111923.679826-3-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, 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: , Cc: Laurent Vivier , Peter Maydell , Thomas Huth , Paolo Bonzini , Igor Mammedov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634642878684100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Igor Mammedov Currently it is not possible to create tests that have KVM as a hard requirement on a host that doesn't support KVM for tested target binary (modulo going through the trouble of compiling out the offending test case). Following scenario makes test fail when it's run on non x86 host: qemu-system-x86_64 -enable-kvm -M q35,kernel-irqchip=3Don -smp 1,maxcpus= =3D288 This patch introduces qtest_has_accel() to let users check if accel is available in advance and avoid executing non run-able test-cases. It implements detection of TCG and KVM only, the rest could be added later on, when we actually start testing them in qtest. Signed-off-by: Igor Mammedov Message-Id: <20210902113551.461632-3-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- tests/qtest/libqos/libqtest.h | 8 ++++++++ tests/qtest/libqtest.c | 27 +++++++++++++++++++++++++++ meson.build | 6 ++++++ 3 files changed, 41 insertions(+) diff --git a/tests/qtest/libqos/libqtest.h b/tests/qtest/libqos/libqtest.h index a68dcd79d4..59e9271195 100644 --- a/tests/qtest/libqos/libqtest.h +++ b/tests/qtest/libqos/libqtest.h @@ -588,6 +588,14 @@ bool qtest_big_endian(QTestState *s); */ const char *qtest_get_arch(void); =20 +/** + * qtest_has_accel: + * @accel_name: Accelerator name to check for. + * + * Returns: true if the accelerator is built in. + */ +bool qtest_has_accel(const char *accel_name); + /** * qtest_add_func: * @str: Test case path. diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c index 73f6b977a6..25aeea385b 100644 --- a/tests/qtest/libqtest.c +++ b/tests/qtest/libqtest.c @@ -922,6 +922,33 @@ const char *qtest_get_arch(void) return end + 1; } =20 +bool qtest_has_accel(const char *accel_name) +{ + if (g_str_equal(accel_name, "tcg")) { +#if defined(CONFIG_TCG) + return true; +#else + return false; +#endif + } else if (g_str_equal(accel_name, "kvm")) { + int i; + const char *arch =3D qtest_get_arch(); + const char *targets[] =3D { CONFIG_KVM_TARGETS }; + + for (i =3D 0; i < ARRAY_SIZE(targets); i++) { + if (!strncmp(targets[i], arch, strlen(arch))) { + if (!access("/dev/kvm", R_OK | W_OK)) { + return true; + } + } + } + } else { + /* not implemented */ + g_assert_not_reached(); + } + return false; +} + bool qtest_get_irq(QTestState *s, int num) { /* dummy operation in order to make sure irq is up to date */ diff --git a/meson.build b/meson.build index 6b7487b725..266b94644b 100644 --- a/meson.build +++ b/meson.build @@ -72,6 +72,12 @@ else kvm_targets =3D [] endif =20 +kvm_targets_c =3D '' +if not get_option('kvm').disabled() and targetos =3D=3D 'linux' + kvm_targets_c =3D '"' + '" ,"'.join(kvm_targets) + '"' +endif +config_host_data.set('CONFIG_KVM_TARGETS', kvm_targets_c) + accelerator_targets =3D { 'CONFIG_KVM': kvm_targets } =20 if cpu in ['aarch64'] --=20 MST From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634642658532609.7015506861039; Tue, 19 Oct 2021 04:24:18 -0700 (PDT) Received: from localhost ([::1]:48282 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcnE9-0005kD-HI for importer@patchew.org; Tue, 19 Oct 2021 07:24:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50020) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcn9v-0008Lg-91 for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:19:58 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:54831) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcn9s-0001kH-Ho for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:19:55 -0400 Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-309-HELLbFHlNyiub_2oeQKUkQ-1; Tue, 19 Oct 2021 07:19:50 -0400 Received: by mail-ed1-f71.google.com with SMTP id x5-20020a50f185000000b003db0f796903so17263885edl.18 for ; Tue, 19 Oct 2021 04:19:50 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id e30sm10182688ejl.117.2021.10.19.04.19.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:19:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8l2qJYP9VLojED18WIThA5ayhCuizkU4T6ELRj0TeQo=; b=HIdeWfEPU3afRvSx5O3Ld92l25gTrxhuiLIr6HrSJOaaBY/+mCM19G0k185TkMQ+tyQp9u /W2q/MZgRtH1c/WckFyBNZItH865ZSnKphuw5XWWrpF/MYa1XjODtdJ6LaKk2NCle649GD O2ivZAtQEfnVnYXd2K+egOQeB9xiVMc= X-MC-Unique: HELLbFHlNyiub_2oeQKUkQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=8l2qJYP9VLojED18WIThA5ayhCuizkU4T6ELRj0TeQo=; b=kzW1OAJv8jNOV+n4suF7rQX+If3prYfYAburD7OVALmM4dyk51Vmca/lJZafln5Uw1 4qUjSpJeoax8L6PlrEYVc+fDVqrZnTmjXUqOqrdXYlfpltsZMDLVgcD53bqNJyA6T+to ueTaMNDs7CFVdpStHLiWpOE+jtQa85UkGjQov4AC1+dMh7vFNlegIyDlSDDqwk9cj9rs Js0gxNSCJXoZX/DT5V+DIvKlRgZ2iS2tkaEZyITYMxHZoWuEWL+7IVJyWozeuWNamw9B FaYMC5UWJqEgSAqKkbQg7uu2/KBK8orUquD5e2unE4JC7Q6+/tsjDlzLRBCKMHDMVT+t RRig== X-Gm-Message-State: AOAM533Wrn995b6Wk7NxNseUFjIOracysjU+qu4IA07h0aYCfxaNxfbj JS1tmpk4ngB9Kp3F4TqBS5SEDShl2wJa0QCMIMRqkNWuXawTjhmfP3JZ7RzwJ4k20QC7yoAl64z YcEErbenevG1ndtxROqEt0Um7K+qDqBUzz62ALl+340ZpJjparxDnzEOejpmv X-Received: by 2002:a05:6402:95c:: with SMTP id h28mr52979797edz.141.1634642389288; Tue, 19 Oct 2021 04:19:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzs0c/TqVk99JNgbFD5yOIrDajGoE4nhIj5gFwFGbQcy5y9D+JzSKYUB5lqf+fS91XOt6X/5A== X-Received: by 2002:a05:6402:95c:: with SMTP id h28mr52979759edz.141.1634642389062; Tue, 19 Oct 2021 04:19:49 -0700 (PDT) Date: Tue, 19 Oct 2021 07:19:46 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 03/29] tests: acpi: whitelist expected tables for acpi/q35/xapic testcase Message-ID: <20211019111923.679826-4-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, 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: , Cc: Ani Sinha , Peter Maydell , Igor Mammedov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634642659630100003 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Igor Mammedov Signed-off-by: Igor Mammedov Message-Id: <20210902113551.461632-4-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- tests/qtest/bios-tables-test-allowed-diff.h | 4 ++++ tests/data/acpi/q35/APIC.xapic | 0 tests/data/acpi/q35/DSDT.xapic | 0 tests/data/acpi/q35/FACP.xapic | 0 tests/data/acpi/q35/SRAT.xapic | 0 5 files changed, 4 insertions(+) create mode 100644 tests/data/acpi/q35/APIC.xapic create mode 100644 tests/data/acpi/q35/DSDT.xapic create mode 100644 tests/data/acpi/q35/FACP.xapic create mode 100644 tests/data/acpi/q35/SRAT.xapic diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index dfb8523c8b..344eee3acc 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,5 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/q35/DSDT.xapic", +"tests/data/acpi/q35/SRAT.xapic", +"tests/data/acpi/q35/FACP.xapic", +"tests/data/acpi/q35/APIC.xapic", diff --git a/tests/data/acpi/q35/APIC.xapic b/tests/data/acpi/q35/APIC.xapic new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/data/acpi/q35/DSDT.xapic b/tests/data/acpi/q35/DSDT.xapic new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/data/acpi/q35/FACP.xapic b/tests/data/acpi/q35/FACP.xapic new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/data/acpi/q35/SRAT.xapic b/tests/data/acpi/q35/SRAT.xapic new file mode 100644 index 0000000000..e69de29bb2 --=20 MST From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634642857160220.17933857404785; Tue, 19 Oct 2021 04:27:37 -0700 (PDT) Received: from localhost ([::1]:55836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcnHM-0002RQ-4t for importer@patchew.org; Tue, 19 Oct 2021 07:27:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcn9w-0008Lk-Q5 for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:19:58 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:58918) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcn9v-0001mk-9q for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:19:56 -0400 Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-422-fPKnHwXKMuyC2tTj2TAUvA-1; Tue, 19 Oct 2021 07:19:53 -0400 Received: by mail-ed1-f70.google.com with SMTP id f4-20020a50e084000000b003db585bc274so17224290edl.17 for ; Tue, 19 Oct 2021 04:19:53 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id nd36sm10354403ejc.17.2021.10.19.04.19.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:19:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=l+JdS6odhHQCqe4i6vULlhCYcRkCV8MNyhPFF2gnM/c=; b=ChlIrmSUCHmkv7eDcotYKpujxwbpLqwaKUh+MCiCds4tJAis7BknXHSiD9M4IeoAriENJV YrgoQzw+A1qS2bDeDJRLZ/gCZLPfEdcjPev3yKnSiqWK1R96kIlObPXZ0bPW3kMKvcM3mH ZLU4WuMwiKQhz/9QzfM0v9064oC9D2w= X-MC-Unique: fPKnHwXKMuyC2tTj2TAUvA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=l+JdS6odhHQCqe4i6vULlhCYcRkCV8MNyhPFF2gnM/c=; b=fAVKtEmmdQ6fXVjrZdZVPUbl0N9CMZJx7QVe3vuZnhYclxNlVFaKgolAiCAcLrBn0g N8soY3ULQfN4o2X9BL7BSYsqyKzagrasAGOtPFJdqBhU76v1XNSyE3yMpc6a7FrNHsyG viqMbX2nLnE9IgGY0Pkpu/whKLUh8/uyWZJoPMXW4YqyfvjJWQLfoC9F4Esc0E7UyS4v PA5ecwzg1aYlQXTsnahsgtIhxVQSRuIuAJy9H8llH6KziCDEIlW4dQhgOyieq1Q5WBXu FrngdXhiU2H26mLtxjBCEKDH8XPp4RDumQ5iRvABvxiL3Ys1kio42oLm2V7mdMAvSCf0 WbcQ== X-Gm-Message-State: AOAM530NWdiwpGCMU0ExsifKYi5loBcW+dogbSZnwKbl0ZaPDeHmFfL8 nub66dLvlaLg6iez/DuUFMNxmyZsT3fepr7nXgpzhRt6w3EET4jaf6E/7DZZQ9/nCviDBWegHCF rOXe0xZhgKthiPGSVIeoagTdm9S/ZlvzdTHAkIxC/Ldf/0lZ4vi5nSWpY1Zmp X-Received: by 2002:a05:6402:34d1:: with SMTP id w17mr54409033edc.383.1634642391949; Tue, 19 Oct 2021 04:19:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXPeBkZphU8vQkCleq9z69yG8zwmlaPR4v8wXIUFSJQomtiNOZtJbzKEcNJsd2+B3JQKKF+Q== X-Received: by 2002:a05:6402:34d1:: with SMTP id w17mr54409006edc.383.1634642391774; Tue, 19 Oct 2021 04:19:51 -0700 (PDT) Date: Tue, 19 Oct 2021 07:19:49 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 04/29] tests: acpi: q35: test for x2APIC entries in SRAT Message-ID: <20211019111923.679826-5-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, 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: , Cc: Ani Sinha , Peter Maydell , Igor Mammedov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634642858516100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Igor Mammedov Set -smp 1,maxcpus=3D288 to test for ACPI code that deal with CPUs with large APIC ID (>255). PS: Test requires KVM and in-kernel irqchip support, so skip test if KVM is not available. Signed-off-by: Igor Mammedov Message-Id: <20210902113551.461632-5-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- tests/qtest/bios-tables-test.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 4f11d03055..87a94a59fa 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1033,6 +1033,19 @@ static void test_acpi_q35_tcg_numamem(void) free_test_data(&data); } =20 +static void test_acpi_q35_kvm_xapic(void) +{ + test_data data; + + memset(&data, 0, sizeof(data)); + data.machine =3D MACHINE_Q35; + data.variant =3D ".xapic"; + test_acpi_one(" -object memory-backend-ram,id=3Dram0,size=3D128M" + " -numa node -numa node,memdev=3Dram0" + " -machine kernel-irqchip=3Don -smp 1,maxcpus=3D288", &d= ata); + free_test_data(&data); +} + static void test_acpi_q35_tcg_nosmm(void) { test_data data; @@ -1509,6 +1522,7 @@ static void test_acpi_oem_fields_virt(void) int main(int argc, char *argv[]) { const char *arch =3D qtest_get_arch(); + const bool has_kvm =3D qtest_has_accel("kvm"); int ret; =20 g_test_init(&argc, &argv, NULL); @@ -1567,6 +1581,9 @@ int main(int argc, char *argv[]) if (strcmp(arch, "x86_64") =3D=3D 0) { qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie_tcg= ); } + if (has_kvm) { + qtest_add_func("acpi/q35/kvm/xapic", test_acpi_q35_kvm_xapic); + } } else if (strcmp(arch, "aarch64") =3D=3D 0) { qtest_add_func("acpi/virt", test_acpi_virt_tcg); qtest_add_func("acpi/virt/numamem", test_acpi_virt_tcg_numamem); --=20 MST From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634642811972579.0730691099407; Tue, 19 Oct 2021 04:26:51 -0700 (PDT) Received: from localhost ([::1]:53608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcnGc-0000qY-LL for importer@patchew.org; Tue, 19 Oct 2021 07:26:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50128) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnA6-00006n-6m for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:21 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:20199) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcn9z-0001pJ-QM for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:05 -0400 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-232-_I4IpTppO_-n7lkGR29_AA-1; Tue, 19 Oct 2021 07:19:57 -0400 Received: by mail-ed1-f69.google.com with SMTP id d11-20020a50cd4b000000b003da63711a8aso17195526edj.20 for ; Tue, 19 Oct 2021 04:19:57 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id v19sm10350800ejx.26.2021.10.19.04.19.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:19:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642399; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Q8HkFq1zNtlwzux0hXle1dIWLbUMV3WzdovaxjwiAxU=; b=Rt5VoEO63icDpk2Vv8zzoK2FfFOdETULcKpzQXJMan/KnRLLNn94AQJH6UJ/3VetadHdlm dxJ6SCeJeyOdsLKw2A/0cO18G8lyhDeXjA6GcOHF6Zf50agxvONcj4SfH+3aFbGWTVB/T1 0N8coLPJnbp48I/eLtrLst/EXAqHplE= X-MC-Unique: _I4IpTppO_-n7lkGR29_AA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Q8HkFq1zNtlwzux0hXle1dIWLbUMV3WzdovaxjwiAxU=; b=ewsuc1AlHwa+ypzti8tcPE7ySUH6304s/gAYSWnWcaQLmizpjbO6XHvDMPI2tmG0sT v/X5p0+9hl5IZEFPjrInpkU3EcgRzY2I+Pp7rNyclxQJ7r6vKo5xTz7q1pCAMuX0DYyq IVwrL1PpZAsduEnx2pTWXDjtbZvkLQi4iRppMrOMwuT/z0CNWTk/tGZ+JphcyQcAi2cO H0o7TePm4+pFnI1vM+bHyGMt1oar47K0sC61cLHOhfjbNQ4B8SV+sl/rRCeLYokqEMAs itkKzaXM7K+xixGOT+6yDAtetddt+6tD1v6633AIzM48NoPio8RScdvCn0UHOkkylJOo +tHg== X-Gm-Message-State: AOAM532b2Nr1ZGAU9X65aFr92cpk6iFZML9ETTMYk+R8zattYnvhvKFK FxdZ5s3DU2d3WFKLe68txan2p6r5N+v2ale3SBK6SNLpEU2YJRZVxM85XAry4umP1shwtjlFg0y RKyT6yerowknityXMd3zhlkcJu6UQ56CmFanTklNlusG4WT0SPkhlWLneJW3S X-Received: by 2002:a17:906:f8d0:: with SMTP id lh16mr35510460ejb.367.1634642395148; Tue, 19 Oct 2021 04:19:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUH+AlMsjRixhU8Sd68650lBYY1UFMh+AQcZDk3xqg9KnNvItUvdqlv6PUu4eZDtv7Iwt34w== X-Received: by 2002:a17:906:f8d0:: with SMTP id lh16mr35510378ejb.367.1634642394265; Tue, 19 Oct 2021 04:19:54 -0700 (PDT) Date: Tue, 19 Oct 2021 07:19:51 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 05/29] tests: acpi: update expected tables blobs Message-ID: <20211019111923.679826-6-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, 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: , Cc: Ani Sinha , Peter Maydell , Igor Mammedov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634642814162100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Igor Mammedov Update adds CPU entries to MADT/SRAT/FACP and DSDT to cover 288 CPUs. Notable changes are that CPUs with APIC ID 255 and higher use 'Processor Local x2APIC Affinity' structure in SRAT and "Device" element in DSDT. FACP: - Use APIC Cluster Model (V4) : 0 + Use APIC Cluster Model (V4) : 1 SRAT: ... +[1010h 4112 1] Subtable Type : 00 [Processor Local APIC/S= APIC Affinity] +[1011h 4113 1] Length : 10 + +[1012h 4114 1] Proximity Domain Low(8) : 00 +[1013h 4115 1] Apic ID : FE +[1014h 4116 4] Flags (decoded below) : 00000001 + Enabled : 1 +[1018h 4120 1] Local Sapic EID : 00 +[1019h 4121 3] Proximity Domain High(24) : 000000 +[101Ch 4124 4] Clock Domain : 00000000 + +[1020h 4128 1] Subtable Type : 02 [Processor Local x2APIC= Affinity] +[1021h 4129 1] Length : 18 + +[1022h 4130 2] Reserved1 : 0000 +[1024h 4132 4] Proximity Domain : 00000001 +[1028h 4136 4] Apic ID : 000000FF +[102Ch 4140 4] Flags (decoded below) : 00000001 + Enabled : 1 +[1030h 4144 4] Clock Domain : 00000000 +[1034h 4148 4] Reserved2 : 00000000 ... +[1320h 4896 1] Subtable Type : 02 [Processor Local x2APIC= Affinity] +[1321h 4897 1] Length : 18 + +[1322h 4898 2] Reserved1 : 0000 +[1324h 4900 4] Proximity Domain : 00000001 +[1328h 4904 4] Apic ID : 0000011F +[132Ch 4908 4] Flags (decoded below) : 00000001 + Enabled : 1 +[1330h 4912 4] Clock Domain : 00000000 +[1334h 4916 4] Reserved2 : 00000000 DSDT: ... + Processor (C0FE, 0xFE, 0x00000000, 0x00) + { ... + } + + Device (C0FF) + { + Name (_HID, "ACPI0007" /* Processor Device */) // _HID: H= ardware ID + Name (_UID, 0xFF) // _UID: Unique ID ... + } + Device (C11F) + { + Name (_HID, "ACPI0007" /* Processor Device */) // _HID: H= ardware ID + Name (_UID, 0x011F) // _UID: Unique ID ... + } APIC: +[034h 0052 1] Subtable Type : 00 [Processor Local APIC] +[035h 0053 1] Length : 08 +[036h 0054 1] Processor ID : 01 +[037h 0055 1] Local Apic ID : 01 +[038h 0056 4] Flags (decoded below) : 00000000 + Processor Enabled : 0 ... +[81Ch 2076 1] Subtable Type : 00 [Processor Local APIC] +[81Dh 2077 1] Length : 08 +[81Eh 2078 1] Processor ID : FE +[81Fh 2079 1] Local Apic ID : FE +[820h 2080 4] Flags (decoded below) : 00000000 + Processor Enabled : 0 + +[824h 2084 1] Subtable Type : 09 [Processor Local x2APIC] +[825h 2085 1] Length : 10 +[826h 2086 2] Reserved : 0000 +[828h 2088 4] Processor x2Apic ID : 000000FF +[82Ch 2092 4] Flags (decoded below) : 00000000 + Processor Enabled : 0 +[830h 2096 4] Processor UID : 000000FF ... +[A24h 2596 1] Subtable Type : 09 [Processor Local x2APIC] +[A25h 2597 1] Length : 10 +[A26h 2598 2] Reserved : 0000 +[A28h 2600 4] Processor x2Apic ID : 0000011F +[A2Ch 2604 4] Flags (decoded below) : 00000000 + Processor Enabled : 0 +[A30h 2608 4] Processor UID : 0000011F + +[A34h 2612 1] Subtable Type : 01 [I/O APIC] +[A35h 2613 1] Length : 0C +[A36h 2614 1] I/O Apic ID : 00 +[A37h 2615 1] Reserved : 00 +[A38h 2616 4] Address : FEC00000 +[A3Ch 2620 4] Interrupt : 00000000 + +[A40h 2624 1] Subtable Type : 02 [Interrupt Source Overri= de] +[A41h 2625 1] Length : 0A +[A42h 2626 1] Bus : 00 +[A43h 2627 1] Source : 00 +[A44h 2628 4] Interrupt : 00000002 +[A48h 2632 2] Flags (decoded below) : 0000 Polarity : 0 Trigger Mode : 0 -[04Ah 0074 1] Subtable Type : 02 [Interrupt Source Overri= de] -[04Bh 0075 1] Length : 0A -[04Ch 0076 1] Bus : 00 -[04Dh 0077 1] Source : 05 -[04Eh 0078 4] Interrupt : 00000005 -[052h 0082 2] Flags (decoded below) : 000D +[A4Ah 2634 1] Subtable Type : 02 [Interrupt Source Overri= de] +[A4Bh 2635 1] Length : 0A +[A4Ch 2636 1] Bus : 00 +[A4Dh 2637 1] Source : 05 +[A4Eh 2638 4] Interrupt : 00000005 +[A52h 2642 2] Flags (decoded below) : 000D Polarity : 1 Trigger Mode : 3 -[054h 0084 1] Subtable Type : 02 [Interrupt Source Overri= de] -[055h 0085 1] Length : 0A -[056h 0086 1] Bus : 00 -[057h 0087 1] Source : 09 -[058h 0088 4] Interrupt : 00000009 -[05Ch 0092 2] Flags (decoded below) : 000D +[A54h 2644 1] Subtable Type : 02 [Interrupt Source Overri= de] +[A55h 2645 1] Length : 0A +[A56h 2646 1] Bus : 00 +[A57h 2647 1] Source : 09 +[A58h 2648 4] Interrupt : 00000009 +[A5Ch 2652 2] Flags (decoded below) : 000D Polarity : 1 Trigger Mode : 3 -[05Eh 0094 1] Subtable Type : 02 [Interrupt Source Overri= de] -[05Fh 0095 1] Length : 0A -[060h 0096 1] Bus : 00 -[061h 0097 1] Source : 0A -[062h 0098 4] Interrupt : 0000000A -[066h 0102 2] Flags (decoded below) : 000D +[A5Eh 2654 1] Subtable Type : 02 [Interrupt Source Overri= de] +[A5Fh 2655 1] Length : 0A +[A60h 2656 1] Bus : 00 +[A61h 2657 1] Source : 0A +[A62h 2658 4] Interrupt : 0000000A +[A66h 2662 2] Flags (decoded below) : 000D Polarity : 1 Trigger Mode : 3 -[068h 0104 1] Subtable Type : 02 [Interrupt Source Overri= de] -[069h 0105 1] Length : 0A -[06Ah 0106 1] Bus : 00 -[06Bh 0107 1] Source : 0B -[06Ch 0108 4] Interrupt : 0000000B -[070h 0112 2] Flags (decoded below) : 000D +[A68h 2664 1] Subtable Type : 02 [Interrupt Source Overri= de] +[A69h 2665 1] Length : 0A +[A6Ah 2666 1] Bus : 00 +[A6Bh 2667 1] Source : 0B +[A6Ch 2668 4] Interrupt : 0000000B +[A70h 2672 2] Flags (decoded below) : 000D Polarity : 1 Trigger Mode : 3 -[072h 0114 1] Subtable Type : 04 [Local APIC NMI] -[073h 0115 1] Length : 06 -[074h 0116 1] Processor ID : FF -[075h 0117 2] Flags (decoded below) : 0000 +[A72h 2674 1] Subtable Type : 0A [Local x2APIC NMI] +[A73h 2675 1] Length : 0C +[A74h 2676 2] Flags (decoded below) : 0000 Polarity : 0 Trigger Mode : 0 -[077h 0119 1] Interrupt Input LINT : 01 +[A76h 2678 4] Processor UID : FFFFFFFF +[A7Ah 2682 1] Interrupt Input LINT : 01 +[A7Bh 2683 3] Reserved : 000000 Signed-off-by: Igor Mammedov Message-Id: <20210902113551.461632-6-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- tests/qtest/bios-tables-test-allowed-diff.h | 4 ---- tests/data/acpi/q35/APIC.xapic | Bin 0 -> 2686 bytes tests/data/acpi/q35/DSDT.xapic | Bin 0 -> 35652 bytes tests/data/acpi/q35/FACP.xapic | Bin 0 -> 244 bytes tests/data/acpi/q35/SRAT.xapic | Bin 0 -> 5080 bytes 5 files changed, 4 deletions(-) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index 344eee3acc..dfb8523c8b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,5 +1 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/q35/DSDT.xapic", -"tests/data/acpi/q35/SRAT.xapic", -"tests/data/acpi/q35/FACP.xapic", -"tests/data/acpi/q35/APIC.xapic", diff --git a/tests/data/acpi/q35/APIC.xapic b/tests/data/acpi/q35/APIC.xapic index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c1969c35aa12b61d25e0134bbb8= d2187ba42d663 100644 GIT binary patch literal 2686 zcmXZeQ+OOv7=3DYo~aI?wAcAeU0vPDuQZHm;k?bNny+g57ZPHkIh=3Db!JKoA-S43@*-G z{Lu+-N@3~J zSf&g{M`KJ3+H6?1ES4*W<;!D*3K$!UadB9&B37z|l`CVFDp<8D#>Znq0#>Vr)vIG- zBG#yZHEUw6T3EX_CM98=3DI#{tllk*svisYJ`m&W0NM>v?(@ghRvH}ix$|j zCAMmXty^Q8HrTc;wrhv&+hd0g*s&va>V%y;W0x-2wJUb(hTXekj~>{wC-&-vy?bMy zKG?S}_UniJ`{RHCn4F9Q2jZYXICwA)8G=3DKH;;>;jd^nC6fg?xas8Kk2G>#dAW5?pS zaX5ZFPMClbC*q_@IC(NonSxWN;#ZrFeuH{zyExOp>f z*@9cQ;hfjf8Nu3fl$H}2Vkd-vkLeYk%=3D9yovp4`NCR9y)}F595&|c=3DRY9 zJBG)P- zElRtp7Ny-(i_%urqO`keQQAYbDDA0Ql=3Df0BN_(porF~S3(!Q!iX+PDXw7+UmIzY83 z9jIEA4pJ>j2dfsPLsW~>p{hmcFx8@TxN1>4LbYgele0}R{tY{ee%8iO>pNrYvugUz Y81RgpG2$6JW5}~=3D7X9ge`jQv^2Net*5C8xG literal 0 HcmV?d00001 diff --git a/tests/data/acpi/q35/DSDT.xapic b/tests/data/acpi/q35/DSDT.xapic index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..119fc90f1f8a7b6934df6fd9560= 9446e627ce15d 100644 GIT binary patch literal 35652 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 literal 0 HcmV?d00001 diff --git a/tests/data/acpi/q35/FACP.xapic b/tests/data/acpi/q35/FACP.xapic index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..2d3659c9c6753d07c3d48742343= cb8e8cc034de7 100644 GIT binary patch literal 244 zcmZ>BbPo8!z`($~)yd!4BUr&HBEVSz2pEB4AU24G0Y(N+hD|^Y6El!tgNU*~X%LSC z$X0-fGcm9T0LA|E|L2FOWMD7?GM2WmFfej3F#P0!h{7ddihwku0+2v57svwxMxcSn X_QAxFX+{NzJ3wNL4G8yu_%Hwf>QN2> literal 0 HcmV?d00001 diff --git a/tests/data/acpi/q35/SRAT.xapic b/tests/data/acpi/q35/SRAT.xapic index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..1a91cfa65fdbebe1756d63d8002= 2c2af767e5d3f 100644 GIT binary patch literal 5080 zcmaLbd6bS-9KiAS9m_Bb!whB^ODQIzkhDk{WhpVupdq1%l!~-aq1~F4H7%5Avt?^h zSz6I1OVggM&?eD}ni*#ppIrBx=3DiKM>{oOzBdCz;Etjy*eauOqv=3D+gA|Em~*QNYBn_ zQ6qOnBauknd)}V+99jwgbCh`uE`p2VVz@Yt#U*e_9EVHc(l{QM!DVp*E{DtGM4W^x z;EK2sPR1#?GOmJCaaCLmSI7BxqtJagj`{JpCO!e5h-=3D~6I1QhK>)^WhWLyu|$EV;^ zaRb~CH^Qgk#`tvH1fPM=3D#Ao5NaZ`K_Zidgr=3Di%l!9q0ds6uK|xGrs`0#I0~^+y-BW zFT!o{#kd`Ak2CNkI1^{#4!9%kgfGR}xHIm8FT-8&<+vN}j(gxM@RhhH?uDTCW zHSUYA!Pnw`_&R(&z5(~g1MrP_AifFTjBmlW;z4*Yz75}w@4!RwP&^FZiSNR9<9qPE z_&$6;9*#%gk$4myjmO{z@L2pH9)};o599H80-lH`;mLRkegsd&kK)Jh zf&avR;lJ@ecpu)64-|Gx^1*-Z|K@H->v{2LJsRjSfnFrgiw1hJKrbHXv4LJ9&`Sn- zT%eZ<^wNPIALwNQy=3D Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634642594655744.9366113802844; Tue, 19 Oct 2021 04:23:14 -0700 (PDT) Received: from localhost ([::1]:44812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcnD7-0003Py-Hw for importer@patchew.org; Tue, 19 Oct 2021 07:23:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnA4-0008U0-Ro for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:31681) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnA1-0001qw-J3 for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:04 -0400 Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-93-3sH8-4mdM6CeAZQE0I-T8Q-1; Tue, 19 Oct 2021 07:19:59 -0400 Received: by mail-ed1-f71.google.com with SMTP id a3-20020a50da43000000b003dca31dcfc2so859240edk.14 for ; Tue, 19 Oct 2021 04:19:59 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id y30sm10313713ejk.74.2021.10.19.04.19.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:19:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642400; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Ye8xamo/xFWVL8QWKzRp1k9WG6eLXO+rQQkUJvOw6N4=; b=NwekmdHq8is7OMDd9da8iqOLaOh4OVaXsDg8I9sgtDfuoUF8/BJUXsAzZcP5wnPRETPbmd mtcWT6D5bbMJT5bBD7uRY5fXH8SIjFhpJ5uhwvj56KkSJtC/hDFRlHGXqrtCMaK78R4wCg HQRGczRhhFNZx0AM+QyuVavDPb27+1M= X-MC-Unique: 3sH8-4mdM6CeAZQE0I-T8Q-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Ye8xamo/xFWVL8QWKzRp1k9WG6eLXO+rQQkUJvOw6N4=; b=p/c/oRe503rDale/acRBaHRRS/IXg4sdO6lbKpikYYtsTwsJSpHEEd+pLz1+Ri8Cb5 rsQ3+iPVYh93cI6ryOYhVm6KHjft3ID/ObXbRm60SPaIkgEHksF91JQUUKBkEzsvIXz+ A38oyijIe6udcByzTM333KKpSNPF7iWIj+MbF/MgSv+p4UdlvbvpM/8oSkqsHTEMlakX b+TYm4jeb5Zbtc7yWExv2nue/huCIKMwf2k4Nzat5grzUlzS+F1MX5P1y/h5FMyWgpwj NQ4dgaqeiJNljjiZZWra00whloBT7URLzmA7SUqJkKFI5EWcTvBcKn60C9s8Fhqjm9qb MOiA== X-Gm-Message-State: AOAM530oIL9nY/Nhvnuo6GsJLZni0IUPzkK4IyheG/7VymsN6Bmlh23r x/Y+sFpnQppK95J6mAVDDFj7TlVJATxJDBAQ2X/zun20/mSWzUVqwIOwwrwI3TpDdSVI3ZMTRki WlYZIrM6cz8e4LecPAU1PqO8vo/734erVaEV9LcZz2fdsnDfIlnmEObeenfXR X-Received: by 2002:a05:6402:515a:: with SMTP id n26mr189702edd.68.1634642397977; Tue, 19 Oct 2021 04:19:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzW0iw3e5msZ5pMKj4TpL8PmWk5TnznmdI10XI/tb0Y9zXCwWC4SQp0m46ZnFAPiQZxb475/g== X-Received: by 2002:a05:6402:515a:: with SMTP id n26mr189673edd.68.1634642397763; Tue, 19 Oct 2021 04:19:57 -0700 (PDT) Date: Tue, 19 Oct 2021 07:19:54 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 06/29] tests: acpi: whitelist new expected table tests/data/acpi/q35/DMAR.dmar Message-ID: <20211019111923.679826-7-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, 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: , Cc: Ani Sinha , Peter Maydell , Igor Mammedov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634642595878100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Igor Mammedov Signed-off-by: Igor Mammedov Message-Id: <20210902113551.461632-7-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + tests/data/acpi/q35/DMAR.dmar | 0 2 files changed, 1 insertion(+) create mode 100644 tests/data/acpi/q35/DMAR.dmar diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index dfb8523c8b..a2843335c8 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,2 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/q35/DMAR.dmar", diff --git a/tests/data/acpi/q35/DMAR.dmar b/tests/data/acpi/q35/DMAR.dmar new file mode 100644 index 0000000000..e69de29bb2 --=20 MST From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634642968310668.807882267341; Tue, 19 Oct 2021 04:29:28 -0700 (PDT) Received: from localhost ([::1]:34162 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcnJ9-0006k9-AL for importer@patchew.org; Tue, 19 Oct 2021 07:29:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnA7-00009C-Gg for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:21759) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnA4-0001sf-C1 for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:06 -0400 Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-417-gPlFpEI_Ocu0b1JFfc0EYQ-1; Tue, 19 Oct 2021 07:20:01 -0400 Received: by mail-ed1-f71.google.com with SMTP id u23-20020a50a417000000b003db23c7e5e2so17290511edb.8 for ; Tue, 19 Oct 2021 04:20:01 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id ca4sm10280297ejb.1.2021.10.19.04.19.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:19:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642403; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=45RxJNq+cSGim9pNSbreOrNLOePsLo5J2oFWYQMFyvE=; b=hhKgsnP2vyox1WPcEQmnfF4b4O1TXdm7Tl20ttYCVttTiGOsdoGKUqFjWg5HjlTbgxhpik FEzf6CbPh4KVio+fQscP9KNSzj3JkgOd8A31Z3kYwtxqcHnXjZfbdtBJZifBI8vAGD1Rtl OgVAKKB5o+Gb4z3NpHxSF6neny+DxRo= X-MC-Unique: gPlFpEI_Ocu0b1JFfc0EYQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=45RxJNq+cSGim9pNSbreOrNLOePsLo5J2oFWYQMFyvE=; b=xbYciNfSwBRaOPOWjpDoq45RNYEReJ3mxBOFMVLN/mD9NHoBEBclYt7JBJ/qKI3P8N dgvsTpTa6VvyAN+D1izVpcbomyqDmQvrf50Js/Yfc2/C8fUaQU1LXo7LrviM/fXilSyM YyIAW5YtSm6gPvv6BMweIH5BjvBv+cmER8upvLbZapMT+KlBdoOqoR9zqyCEZvJ5QJcR AbFNHZ1QPVrmtMM0PQRXLFHeLAGXZYD6rSftRQjEIuhFJJrPqId5rH3FsI9SqLzoA9dA u3DMUg7tN9cBDhC+XC9JpW5/wuJuoB2q64YjHF5Ewv1p7my13wTSn9G6uouB8ba0vu+7 Fy/g== X-Gm-Message-State: AOAM531A7fQGzGheEuCmvHrnhD673cCKrMRs7MjEUgKBQ2GsDs4kfJ9U tDhoVuMdrzpanUdEPRpH6mCo8YMcXo72W27MF/rjktgyFqsVz+haXejknboGSF1IhaUMhwqvpFs 8Eni5F6fWTiOzQm690Oa29cyhqbSl2BAfRpfDQTKqN5UioYjFv67t7IBHkw8H X-Received: by 2002:a05:6402:4405:: with SMTP id y5mr53522660eda.339.1634642400394; Tue, 19 Oct 2021 04:20:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5vPIKmLmr8WR6cI3ejPu5zbJQlKgwkZJxG4MTVCSmx5CMgkiFbx+nhyWSa1BaYi342YOk0w== X-Received: by 2002:a05:6402:4405:: with SMTP id y5mr53522645eda.339.1634642400247; Tue, 19 Oct 2021 04:20:00 -0700 (PDT) Date: Tue, 19 Oct 2021 07:19:57 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 07/29] tests: acpi: add testcase for intel_iommu (DMAR table) Message-ID: <20211019111923.679826-8-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, 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: , Cc: Ani Sinha , Peter Maydell , Igor Mammedov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634642969395100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Igor Mammedov Signed-off-by: Igor Mammedov Message-Id: <20210902113551.461632-8-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- tests/qtest/bios-tables-test.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 87a94a59fa..0361c84c5e 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1090,6 +1090,18 @@ static void test_acpi_q35_tcg_nohpet(void) free_test_data(&data); } =20 +static void test_acpi_q35_kvm_dmar(void) +{ + test_data data; + + memset(&data, 0, sizeof(data)); + data.machine =3D MACHINE_Q35; + data.variant =3D ".dmar"; + test_acpi_one("-machine kernel-irqchip=3Dsplit -accel kvm" + " -device intel-iommu,intremap=3Don,device-iotlb=3Don", = &data); + free_test_data(&data); +} + static void test_acpi_piix4_tcg_numamem(void) { test_data data; @@ -1583,6 +1595,7 @@ int main(int argc, char *argv[]) } if (has_kvm) { qtest_add_func("acpi/q35/kvm/xapic", test_acpi_q35_kvm_xapic); + qtest_add_func("acpi/q35/kvm/dmar", test_acpi_q35_kvm_dmar); } } else if (strcmp(arch, "aarch64") =3D=3D 0) { qtest_add_func("acpi/virt", test_acpi_virt_tcg); --=20 MST From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634643095104595.8706528853105; Tue, 19 Oct 2021 04:31:35 -0700 (PDT) Received: from localhost ([::1]:38804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcnLB-0001Ku-VR for importer@patchew.org; Tue, 19 Oct 2021 07:31:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50178) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAA-00009J-Ic for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:38201) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnA6-0001tW-KB for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:09 -0400 Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-598-vHPzoyZRNoqKF9WoWK0Cww-1; Tue, 19 Oct 2021 07:20:04 -0400 Received: by mail-ed1-f72.google.com with SMTP id d3-20020a056402516300b003db863a248eso17239509ede.16 for ; Tue, 19 Oct 2021 04:20:04 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id c21sm498824edx.1.2021.10.19.04.20.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:20:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DojFyI8EvkqW3utABMlfyrMcp5+zRY2rAvm55Ie1TK0=; b=WjN8jMsACM4fp31X+iZhmXVbUTGaubDGRPQd3AFT8HtZCh0ZPnwoUfXzJltGYIJ1fOvNWF Mub2r/nySqiDNoAeLVGzxyVW8sZwjodDg5vrsUSYo5HvNYswQp7Tkrb0xsCAAO/cH+LIX3 aLretRxbLJcZxD3D1MLFIk94g4Y6Wbk= X-MC-Unique: vHPzoyZRNoqKF9WoWK0Cww-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=DojFyI8EvkqW3utABMlfyrMcp5+zRY2rAvm55Ie1TK0=; b=KZtQo8GVoOpSZo9o8ZDy+Eoq3a8HlvURvQCQfvjUxknDHb9oLBl18iZQ0K0bnU4Q1j HKNVKTlDNU6JdebdpGdj+NYblSaCmJWXS7FLvmMbwbAiyt4NiLyxTFbBi187wvZcQwzp 2vsikzMh5aAOO4GskpCq+JQvaoRCNnmCru9KcXGooBVOgs+GXdpzoqzYpOR+i229tmh/ I+Fyy6HA8fhwXzYGgQFSn4hX2d8aNOE6KJFT8y0XqCQtCHGPPqqK+g7vv5uuzjhZivH6 KKIbJv4gISM7/kpX/QMhvLmY3uce1douwn9gS6cFezb/OoI4dc9nEzSYKgD7ZetEFXet CcIg== X-Gm-Message-State: AOAM533q7Hf1ZAZ6sydXPjA37822qx8wVgH8MwbJCiNb77W8tDg0Us6L AVv7eO+YTSu8veil60EmNmqU0xKNS7Rqu1ldyswBcn88HehNicnmVgYq+SrkII9hXQqc/Cr1hUI I94JfCZ9VeUcejBfL522/p94xhDdQTAJRl2enquFFOCTFWg+JkjR6frQm3eYO X-Received: by 2002:a05:6402:1908:: with SMTP id e8mr52582552edz.252.1634642403182; Tue, 19 Oct 2021 04:20:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1P0NCYOn3UayVLO+3C+u3DtArcTuB2+OOqWx7YgTy/Hb7v3oIgZjtOrwXNYDYaRU0l7yVKg== X-Received: by 2002:a05:6402:1908:: with SMTP id e8mr52582522edz.252.1634642402995; Tue, 19 Oct 2021 04:20:02 -0700 (PDT) Date: Tue, 19 Oct 2021 07:20:00 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 08/29] tests: acpi: add expected blob for DMAR table Message-ID: <20211019111923.679826-9-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, 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: , Cc: Ani Sinha , Peter Maydell , Igor Mammedov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634643095947100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Igor Mammedov [000h 0000 4] Signature : "DMAR" [DMA Remapping tab= le] [004h 0004 4] Table Length : 00000078 [008h 0008 1] Revision : 01 [009h 0009 1] Checksum : 15 [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 1] Host Address Width : 26 [025h 0037 1] Flags : 01 [026h 0038 10] Reserved : 00 00 00 00 00 00 00 00 00 00 [030h 0048 2] Subtable Type : 0000 [Hardware Unit Definiti= on] [032h 0050 2] Length : 0040 [034h 0052 1] Flags : 00 [035h 0053 1] Reserved : 00 [036h 0054 2] PCI Segment Number : 0000 [038h 0056 8] Register Base Address : 00000000FED90000 [040h 0064 1] Device Scope Type : 03 [IOAPIC Device] [041h 0065 1] Entry Length : 08 [042h 0066 2] Reserved : 0000 [044h 0068 1] Enumeration ID : 00 [045h 0069 1] PCI Bus Number : FF [046h 0070 2] PCI Path : 00,00 [048h 0072 1] Device Scope Type : 01 [PCI Endpoint Device] [049h 0073 1] Entry Length : 08 [04Ah 0074 2] Reserved : 0000 [04Ch 0076 1] Enumeration ID : 00 [04Dh 0077 1] PCI Bus Number : 00 [04Eh 0078 2] PCI Path : 00,00 [050h 0080 1] Device Scope Type : 01 [PCI Endpoint Device] [051h 0081 1] Entry Length : 08 [052h 0082 2] Reserved : 0000 [054h 0084 1] Enumeration ID : 00 [055h 0085 1] PCI Bus Number : 00 [056h 0086 2] PCI Path : 01,00 [058h 0088 1] Device Scope Type : 01 [PCI Endpoint Device] [059h 0089 1] Entry Length : 08 [05Ah 0090 2] Reserved : 0000 [05Ch 0092 1] Enumeration ID : 00 [05Dh 0093 1] PCI Bus Number : 00 [05Eh 0094 2] PCI Path : 1F,00 [060h 0096 1] Device Scope Type : 01 [PCI Endpoint Device] [061h 0097 1] Entry Length : 08 [062h 0098 2] Reserved : 0000 [064h 0100 1] Enumeration ID : 00 [065h 0101 1] PCI Bus Number : 00 [066h 0102 2] PCI Path : 1F,02 [068h 0104 1] Device Scope Type : 01 [PCI Endpoint Device] [069h 0105 1] Entry Length : 08 [06Ah 0106 2] Reserved : 0000 [06Ch 0108 1] Enumeration ID : 00 [06Dh 0109 1] PCI Bus Number : 00 [06Eh 0110 2] PCI Path : 1F,03 [070h 0112 2] Subtable Type : 0002 [Root Port ATS Capabili= ty] [072h 0114 2] Length : 0008 [074h 0116 1] Flags : 01 [075h 0117 1] Reserved : 00 [076h 0118 2] PCI Segment Number : 0000 Signed-off-by: Igor Mammedov Message-Id: <20210902113551.461632-9-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- tests/qtest/bios-tables-test-allowed-diff.h | 1 - tests/data/acpi/q35/DMAR.dmar | Bin 0 -> 120 bytes 2 files changed, 1 deletion(-) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index a2843335c8..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/q35/DMAR.dmar", diff --git a/tests/data/acpi/q35/DMAR.dmar b/tests/data/acpi/q35/DMAR.dmar index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0dca6e68ad8a8ca5b981bcfbc74= 5385a63e9f216 100644 GIT binary patch literal 120 zcmZ?qbquOtU|?Vrb@F%i2v%^42yj*a0!E-1hz+9EKm;5(Kv_5cff&pjK;l18KZphb W2+atk Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634643013002750.667748199747; Tue, 19 Oct 2021 04:30:13 -0700 (PDT) Received: from localhost ([::1]:37860 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcnJr-0000jH-TQ for importer@patchew.org; Tue, 19 Oct 2021 07:30:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50218) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAD-00009O-Im for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:29 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:26265) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAA-000211-94 for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:12 -0400 Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-587-hQ82ZHE7P7Kt6BWEoyq_aw-1; Tue, 19 Oct 2021 07:20:07 -0400 Received: by mail-ed1-f72.google.com with SMTP id u17-20020a50d511000000b003daa3828c13so17255713edi.12 for ; Tue, 19 Oct 2021 04:20:07 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id w15sm9919883ejb.4.2021.10.19.04.20.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:20:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642408; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NYKn9Og3lz4o30x/1JiH1NpvUb3mCz2MPvSBP82Jf0k=; b=WfU5Ct/ko5UfuasrjdMAxfCPnEityAOxZ69fTmO3UOqcCZvEhW7qHhYoSkMVi8VnD3Ht9G sMvjt7tva37FhF7bTzu+VynmhQtR7jijTVfE16GGPge2FU7ffN3YOF+GrM5LIfQjzREw79 bbbzKBoJJ6537aHC3kXHdlVPmk/bkyc= X-MC-Unique: hQ82ZHE7P7Kt6BWEoyq_aw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=NYKn9Og3lz4o30x/1JiH1NpvUb3mCz2MPvSBP82Jf0k=; b=nQj4w0D+OnKQlZgKPV4sLQ1EECoW6+fqSmZuC5ghbv/Oj3jBNaEwuu/UDuxJ+6tLx0 gYH6gGuqum66SgT34L/MAO6nBTkR20A9a/Icc390lcbiMytWNK0b4l4CAWH4XLgVgUzn hl+sQQ44ysta9zN/qNijSgfhQNF1CLjFOSDthQ5yFGLgr6OQJX0wP4GduFn4Fmo9Dayp K7gUkgYKvp1gYL0UZsTp08eZtmFMrUjuFEzKWvVgDDoTZKnqm9IVoSa24E2gpasIUu3e oAvqdlzH7h4TRtNK8J2nhMvHInn3s19Di4UrccruDKSzPa0VV9nyZDInh+cgKYAOwrPr tLDQ== X-Gm-Message-State: AOAM533beu3vyb2mOaTxLV2VjNIZ0nGzoSl8LHDE/Mus3krB3A9vTqKw 5IApymSmmuy2PPCrViWmbV7S9wVNfhswFzpKFAK3znOeZJMzRvezC3otorcYOpUK6GshYqAZbAH Tzw7WesiqZOdhwMycuKwDa6FeTyaWahoWYh+DjEe/yrz2mwg42iOdqWupHNhi X-Received: by 2002:a50:eb92:: with SMTP id y18mr48464049edr.153.1634642406221; Tue, 19 Oct 2021 04:20:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8KleK3vROsemyunYrR7urylwE3fhZJnp/iS0B/urEjRr3Bg+/+ug1A2LECfZWePLvkd9fBw== X-Received: by 2002:a50:eb92:: with SMTP id y18mr48464012edr.153.1634642405998; Tue, 19 Oct 2021 04:20:05 -0700 (PDT) Date: Tue, 19 Oct 2021 07:20:03 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 09/29] tests: acpi: whitelist expected blobs for new acpi/q35/ivrs testcase Message-ID: <20211019111923.679826-10-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, 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: , Cc: Ani Sinha , Peter Maydell , Igor Mammedov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634643015301100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Igor Mammedov Signed-off-by: Igor Mammedov Message-Id: <20210902113551.461632-10-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- tests/qtest/bios-tables-test-allowed-diff.h | 2 ++ tests/data/acpi/q35/DSDT.ivrs | 0 tests/data/acpi/q35/IVRS.ivrs | 0 3 files changed, 2 insertions(+) create mode 100644 tests/data/acpi/q35/DSDT.ivrs create mode 100644 tests/data/acpi/q35/IVRS.ivrs diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index dfb8523c8b..4fe8e8272a 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,3 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/q35/DSDT.ivrs", +"tests/data/acpi/q35/IVRS.ivrs", diff --git a/tests/data/acpi/q35/DSDT.ivrs b/tests/data/acpi/q35/DSDT.ivrs new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/data/acpi/q35/IVRS.ivrs b/tests/data/acpi/q35/IVRS.ivrs new file mode 100644 index 0000000000..e69de29bb2 --=20 MST From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634644882961902.0503675564349; Tue, 19 Oct 2021 05:01:22 -0700 (PDT) Received: from localhost ([::1]:35442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcnnx-0004ki-Fj for importer@patchew.org; Tue, 19 Oct 2021 08:01:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50912) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnD8-0004e1-3u for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:23:14 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:47932) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnD6-00043z-FW for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:23:13 -0400 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-281-9kDyBlCeMhuuKw1uJL1x7w-1; Tue, 19 Oct 2021 07:20:11 -0400 Received: by mail-ed1-f69.google.com with SMTP id t28-20020a508d5c000000b003dad7fc5caeso93248edt.11 for ; Tue, 19 Oct 2021 04:20:11 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id q21sm10608517edi.58.2021.10.19.04.20.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:20:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=JGBYmvhDt6E8gZOldDQh567mQwOZUysQwDU9UgiIntM=; b=JjnjiL/IGr/e3Yb5s+rq/Sk099tu3XD7JdGiPxj0nkJ2SNwacWVJtCwAL/NSatu2gZpiKZ Bs7ECxlqwWa3dqQjAN67oOcSNDB6zLm/1DHsPm8rHj8adkrvBhU7QyNrYEC2dS9XBv3GrN 7aZrVt4n9kA/tlFQHOGDGJEJ3sNORIU= X-MC-Unique: 9kDyBlCeMhuuKw1uJL1x7w-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=JGBYmvhDt6E8gZOldDQh567mQwOZUysQwDU9UgiIntM=; b=kmr89jmFPl3qx7zht93n2qSLHh3jMaChFUH802aKlFhX4HxkEXwTPZ5PKW/ArKb33e J73DmU1nICz8e9pkXe5DINn6rb79sy1R71Y3g51YQ/oKAwe+eEdVmUxzWiA1cnvduLZX s+p5aGbreXDJGHFaCRaIcQ3lR7X9kolLbvs9X2kCFd6kzwwjRqKnGvrGNHB2iqRP/VBR G5SJ6D3u8CAp3La5XERxFsqTna1vz4sbHaUTKSmoM6wK4f8Mr9Qc7qyKCeyECDUDO1E3 y4t3x9aI+DD888YVaYwncpSTvu8AE+PFHGuJZ6XEUHIj3KN6xNFBpfG8V7+v1fQaUhvQ y5nQ== X-Gm-Message-State: AOAM530RIpLfr7Mt91K2WOugsUlFbrUiUWjMXGJncHiCM9WklFPbOosO EcZtPOGw7nixPIOD1m3i4S31oeBIKoReECuQk+H4dZVYd/4dqEhFHYAUcTgFjd8QKtQaZ2eDqvP a2jP8nYIQF/AFeW0pwb7xs/jzkuMze1evAKwRRWFHG5pN/SkFTUkFF778Vzc2 X-Received: by 2002:a17:906:6bce:: with SMTP id t14mr37045958ejs.546.1634642409848; Tue, 19 Oct 2021 04:20:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVz72C7RQQZDWZN7M8rUt0Kuh1n09eSxJK9Ub41D2qVCqtpyZGRsXvMgP8sMj9N8m7g1ObPQ== X-Received: by 2002:a17:906:6bce:: with SMTP id t14mr37045934ejs.546.1634642409625; Tue, 19 Oct 2021 04:20:09 -0700 (PDT) Date: Tue, 19 Oct 2021 07:20:06 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 10/29] tests: acpi: add testcase for amd-iommu (IVRS table) Message-ID: <20211019111923.679826-11-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, 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: , Cc: Ani Sinha , Peter Maydell , Igor Mammedov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634644901267100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Igor Mammedov Signed-off-by: Igor Mammedov Message-Id: <20210902113551.461632-11-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- tests/qtest/bios-tables-test.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 0361c84c5e..ef28bb41f3 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1102,6 +1102,18 @@ static void test_acpi_q35_kvm_dmar(void) free_test_data(&data); } =20 +static void test_acpi_q35_tcg_ivrs(void) +{ + test_data data; + + memset(&data, 0, sizeof(data)); + data.machine =3D MACHINE_Q35; + data.variant =3D ".ivrs"; + data.tcg_only =3D true, + test_acpi_one(" -device amd-iommu", &data); + free_test_data(&data); +} + static void test_acpi_piix4_tcg_numamem(void) { test_data data; @@ -1581,6 +1593,7 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/q35/smm-compat-nosmm", test_acpi_q35_tcg_smm_compat_nosmm); qtest_add_func("acpi/q35/nohpet", test_acpi_q35_tcg_nohpet); + qtest_add_func("acpi/q35/ivrs", test_acpi_q35_tcg_ivrs); qtest_add_func("acpi/piix4/dimmpxm", test_acpi_piix4_tcg_dimm_pxm); qtest_add_func("acpi/q35/dimmpxm", test_acpi_q35_tcg_dimm_pxm); qtest_add_func("acpi/piix4/acpihmat", test_acpi_piix4_tcg_acpi_hma= t); --=20 MST From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 163464295998939.23403482835795; Tue, 19 Oct 2021 04:29:19 -0700 (PDT) Received: from localhost ([::1]:33278 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcnJ1-0006BP-04 for importer@patchew.org; Tue, 19 Oct 2021 07:29:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50302) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAW-0000Cf-H3 for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:27275) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAP-00028I-29 for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:32 -0400 Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-441-6TO03oXCMXOMEqnuZMtBsQ-1; Tue, 19 Oct 2021 07:20:14 -0400 Received: by mail-ed1-f72.google.com with SMTP id h19-20020aa7de13000000b003db6ad5245bso17345313edv.9 for ; Tue, 19 Oct 2021 04:20:14 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id jg21sm6935638ejc.14.2021.10.19.04.20.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:20:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Ny6i22dSZQC3mrPDi4s6PRK4pnVtAekpF8G2Yb/TCEg=; b=iYByZr7crYnfDoqHLGClbnFTNbRoga585ZRq1tIsgo1a0YT7T6CRUFRh5SsRoF4V49q7D8 LX+iYjhKCRjnduzSKmOv4khlczTHveyUU7QkS8H3n8WR+bTxMiBFkEx0bRnr5J+IqKXxSZ 9VUdfA5xJbZsoDksHky5KeTgFp4fu3c= X-MC-Unique: 6TO03oXCMXOMEqnuZMtBsQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Ny6i22dSZQC3mrPDi4s6PRK4pnVtAekpF8G2Yb/TCEg=; b=qsGLOjaQcFjsx3tFVui2ZliE9iusSNQ5iiXPGuGhPhLd1iEhWDjZ/EKmQz9PCp1mVM sdpKZ4bIs6IVN2NkMO7vrKpQAawtu7StFaNKI7sxFD+iEi2NworeJG7dNuoleUFn9EH3 07gUfkNN4UA87B5aeFwmV4DCh3xm2G0yeuGT8YmezbgSw0bcIWWd9Io6CmkCuppQLFyv YxvTmeioJ8rL4v8QsjMQkMbiDQInMOwj0q9fk0nhry7a7ADSGNrWGxaJqSjiYen3pLBO zH/8bYKFyCRBCnS1sGUmNou3l4zVQ5V7aindIdDUL/dN7BN3KjvFE3mycjQP4tvehUqA R32g== X-Gm-Message-State: AOAM530QExMkuZBWwMqMj3v8M5ofLdTU18t1fqern16UWTQ1js/GXu/m kcnBmV3HDUsu2xh9wYHgAX2M6Ew1U4kwStnac6vWfFPkxgTfO8vHqpnr2oKmZfodkFTPhvWb9gP 31L+6NhAKWicNYOmv+Sp928md927Jjci7WwyKuR8RRUcvFsiztZWbMIHdEnwy X-Received: by 2002:a17:906:3784:: with SMTP id n4mr37478171ejc.129.1634642412976; Tue, 19 Oct 2021 04:20:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/1W+ngNm7MZBMSGruAQ+AuF76DnrFBh2Z3tnCJPb3+Bqb56wRYjeoJqTq7v7VyQLd/gQDBg== X-Received: by 2002:a17:906:3784:: with SMTP id n4mr37478132ejc.129.1634642412671; Tue, 19 Oct 2021 04:20:12 -0700 (PDT) Date: Tue, 19 Oct 2021 07:20:10 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 11/29] tests: acpi: update expected blobs Message-ID: <20211019111923.679826-12-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, 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: , Cc: Ani Sinha , Peter Maydell , Igor Mammedov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634642960568100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Igor Mammedov DSDT: + Device (S10) + { + Name (_ADR, 0x00020000) // _ADR: Address + } New IVRS table: [000h 0000 4] Signature : "IVRS" [I/O Virtualizatio= n Reporting Structure] [004h 0004 4] Table Length : 00000068 [008h 0008 1] Revision : 01 [009h 0009 1] Checksum : 43 [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 4] Virtualization Info : 00002800 [028h 0040 8] Reserved : 0000000000000000 [030h 0048 1] Subtable Type : 10 [Hardware Definition Bloc= k] [031h 0049 1] Flags : D1 [032h 0050 2] Length : 0038 [034h 0052 2] DeviceId : 0010 [036h 0054 2] Capability Offset : 0040 [038h 0056 8] Base Address : 00000000FED80000 [040h 0064 2] PCI Segment Group : 0000 [042h 0066 2] Virtualization Info : 0000 [044h 0068 4] Reserved : 00000044 [048h 0072 1] Entry Type : 02 [049h 0073 2] Device ID : 0000 [04Bh 0075 1] Data Setting : 00 [04Ch 0076 1] Entry Type : 02 [04Dh 0077 2] Device ID : 0008 [04Fh 0079 1] Data Setting : 00 [050h 0080 1] Entry Type : 02 [051h 0081 2] Device ID : 0010 [053h 0083 1] Data Setting : 00 [054h 0084 1] Entry Type : 02 [055h 0085 2] Device ID : 00F8 [057h 0087 1] Data Setting : 00 [058h 0088 1] Entry Type : 02 [059h 0089 2] Device ID : 00FA [05Bh 0091 1] Data Setting : 00 [05Ch 0092 1] Entry Type : 02 [05Dh 0093 2] Device ID : 00FB [05Fh 0095 1] Data Setting : 00 [060h 0096 1] Entry Type : 48 [061h 0097 2] Device ID : 0000 [063h 0099 1] Data Setting : 00 [064h 0100 1] Handle : 00 [065h 0101 2] Source Used Device ID : 00A0 [067h 0103 1] Variety : 01 Signed-off-by: Igor Mammedov Message-Id: <20210902113551.461632-12-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- tests/qtest/bios-tables-test-allowed-diff.h | 2 -- tests/data/acpi/q35/DSDT.ivrs | Bin 0 -> 8306 bytes tests/data/acpi/q35/IVRS.ivrs | Bin 0 -> 104 bytes 3 files changed, 2 deletions(-) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index 4fe8e8272a..dfb8523c8b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,3 +1 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/q35/DSDT.ivrs", -"tests/data/acpi/q35/IVRS.ivrs", diff --git a/tests/data/acpi/q35/DSDT.ivrs b/tests/data/acpi/q35/DSDT.ivrs index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..b0eafe90e5832935557ec5e6802= c0147c88f379c 100644 GIT binary patch literal 8306 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 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634642795502590.3749002348118; Tue, 19 Oct 2021 04:26:35 -0700 (PDT) Received: from localhost ([::1]:52892 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcnGM-0000N8-7z for importer@patchew.org; Tue, 19 Oct 2021 07:26:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAW-0000CO-Ec for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:45542) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAO-0002A9-VC for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:27 -0400 Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-85-SUe1npceMLaDko3n7Udp3w-1; Tue, 19 Oct 2021 07:20:17 -0400 Received: by mail-ed1-f70.google.com with SMTP id i7-20020a50d747000000b003db0225d219so12643794edj.0 for ; Tue, 19 Oct 2021 04:20:17 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id i4sm10890129edt.29.2021.10.19.04.20.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:20:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qOZtE7xnygrqomoULUMXxJIooXP/byLxi3JGgtUneLc=; b=feXkDIk5uHA5Ng3A6usKxoBZUByUGXHdMc9f6ixngM/8Y54yth7el1e2y4qI2fPnkwXlNb QsxqOT2kvUagREv9B3/4drxOtRjVLKQTpYPuymj2+B2UmxziKKWBmyrkFmTYW9uoU4bdJQ ETJOes/wO41eZy1CSfu8Ze7poNzbDdM= X-MC-Unique: SUe1npceMLaDko3n7Udp3w-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=qOZtE7xnygrqomoULUMXxJIooXP/byLxi3JGgtUneLc=; b=pEb1sR3hgJL2tMyuJq8Jv+OyHmrUIsl6/Z6Yfp6RSVotpcn4JnBdyH4nbYliSHvBMv K3Luhb/RqtXdkinEgq/nKrYv//GKIee7KTsEIA8a+6E4bg/m3b1eKMycx4VNVZ2NE8SD SKyG56Jh4SH7b6N/D4FTxWj+zO5605Vmj8B6ySRR7KFyQ/vqStQdpeI7MYpGNz3SgRf1 4UVpW/oAJMS0yKxl/3t8nRaXsG0nGPKxf37wUKxBnUfGtwx0FtczohaJQ3/9O8f0puSf kGCx/E6HlupjI2Uszwwmc4b8n7gkwOXl8dg4gSKSmgdBEYucp9KyCwKCXM/fqP5KLTNb 9sLw== X-Gm-Message-State: AOAM533hxr0gyWbjxknXWH0ciFrhc3qy2J+LaRoGEqV3nwNk4401/Los WuZr2tQCN+0/s4R8rpdoVN6myXWiJGZFosg5l6EwCpBHzVmUHHQjY615TjfhuLP89nswXop2JGI RtIZyHQoYvV89q81Mm8E58iLajJ82GefrI8Q7snyfF49giFfkEV0Fcxr64TZE X-Received: by 2002:a17:907:629b:: with SMTP id nd27mr35973415ejc.24.1634642416008; Tue, 19 Oct 2021 04:20:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw02ZXzIQ5JosUQfx4+pa5MiBozIWHFxcHvBTvPaIKTuuN0icQFb7KOw88DCbPSjaPhGXOTVw== X-Received: by 2002:a17:907:629b:: with SMTP id nd27mr35973387ejc.24.1634642415712; Tue, 19 Oct 2021 04:20:15 -0700 (PDT) Date: Tue, 19 Oct 2021 07:20:13 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 12/29] tests: acpi: arm/virt: drop redundant test_acpi_one() in test_acpi_virt_tcg() Message-ID: <20211019111923.679826-13-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=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: , Cc: Ani Sinha , Peter Maydell , Igor Mammedov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634642796586100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Igor Mammedov follow up call with smbios options generates the same ACPI tables, so there is no need to run smbios-less variant at all. Signed-off-by: Igor Mammedov Message-Id: <20210902113551.461632-13-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- tests/qtest/bios-tables-test.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index ef28bb41f3..873eb9c037 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1430,9 +1430,6 @@ static void test_acpi_virt_tcg(void) .scan_len =3D 128ULL * 1024 * 1024, }; =20 - test_acpi_one("-cpu cortex-a57", &data); - free_test_data(&data); - data.smbios_cpu_max_speed =3D 2900; data.smbios_cpu_curr_speed =3D 2700; test_acpi_one("-cpu cortex-a57 " --=20 MST From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634643229375887.9207634543587; Tue, 19 Oct 2021 04:33:49 -0700 (PDT) Received: from localhost ([::1]:42890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcnNM-0004E2-04 for importer@patchew.org; Tue, 19 Oct 2021 07:33:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50296) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAW-0000CL-Co for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:60348) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAO-0002Cv-Us for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:30 -0400 Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-327-Lc7N89e1NLGGzpx5Z6swZg-1; Tue, 19 Oct 2021 07:20:21 -0400 Received: by mail-ed1-f70.google.com with SMTP id t28-20020a508d5c000000b003dad7fc5caeso93607edt.11 for ; Tue, 19 Oct 2021 04:20:21 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id p13sm7328179ejn.12.2021.10.19.04.20.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:20:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=X5r2KJQH0mFVuWmoeGDJsGfJGfPX7snxmFOMGZkQyOY=; b=hXQgUmYKWtKoCxwc733IQKbAXnTDb7PP1TrATfTlfkLcbbMG6IWPTtMb+NRk3tM+kmMU01 U1WHm9swRtqk5W0EMx8pbDqFCkVs49IJ2DL/GGeuPwVoR5a9qeaX7FPnIXylrh2Dg/dfW8 9zAimxKL/wFkj/LWKfqM3hEoHDCRSbk= X-MC-Unique: Lc7N89e1NLGGzpx5Z6swZg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=X5r2KJQH0mFVuWmoeGDJsGfJGfPX7snxmFOMGZkQyOY=; b=MLoVZG+zWyCx/mPEpnXBitJT/0N4VORRlvUQNMErSFWRXQDwXq958REN2PWm/cgGZz VQslk37RWpVwB3lBir35/MmX+orlGhZ5BPK/GX7lbs2KgMHvpgR7epbn8a8fvZ+h5zt5 19q3W0kPHVQGhRGAd2j4DYQpiHU8OeUXNzJdSJ5D0K3zJuCe980EEwkXT2twDB5YE7AE EdwfceYzKNodz6CLCQPG7hBxsjPrsltEwnn7zOT4P6Dn0Tilq9xIq4czS19DbWLaykHM jGPIrsvDzADZJZWx+5vjJVhuV7JQPzvSPl8ibY7uSm+ES5spHKEqeQx6rlqgBKcEMsP9 yzRA== X-Gm-Message-State: AOAM532Jcp8CZoPHMrYuVgwIAvyCmhoYDqdYQWg2Ca1Ky6fNlxfZFxbD 1CgdsaOJ+EpZ3iUSNaD3PcYmNUHStIaLF6a3WpiMyaE9XVPzjvyHJevUgwQaXWUMQDKxyI/uy/y i3JtMre6DRoI0TEz9Lr3C6k99MYTph5i56FqMBhYTj2BFzpu9MtokKTrFOpaZ X-Received: by 2002:a05:6402:35d6:: with SMTP id z22mr52043854edc.227.1634642419922; Tue, 19 Oct 2021 04:20:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPXHbj7GrB1zq2aZDL0pyQuknpzZYQbbrwQYn9EwXdIeYzlBNTo6uylbxlNS9FAP3B37bGBw== X-Received: by 2002:a05:6402:35d6:: with SMTP id z22mr52043824edc.227.1634642419679; Tue, 19 Oct 2021 04:20:19 -0700 (PDT) Date: Tue, 19 Oct 2021 07:20:16 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 13/29] tests: arm-cpu-features: use qtest_has_kvm() API Message-ID: <20211019111923.679826-14-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, 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: , Cc: Laurent Vivier , Peter Maydell , Thomas Huth , qemu-arm@nongnu.org, Igor Mammedov , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634643231537100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Igor Mammedov and drop custom function that were doing the job Signed-off-by: Igor Mammedov Message-Id: <20210902113551.461632-14-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- tests/qtest/arm-cpu-features.c | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c index 90a87f0ea9..f76652143a 100644 --- a/tests/qtest/arm-cpu-features.c +++ b/tests/qtest/arm-cpu-features.c @@ -26,21 +26,6 @@ " 'arguments': { 'type': 'full', " #define QUERY_TAIL "}}" =20 -static bool kvm_enabled(QTestState *qts) -{ - QDict *resp, *qdict; - bool enabled; - - resp =3D qtest_qmp(qts, "{ 'execute': 'query-kvm' }"); - g_assert(qdict_haskey(resp, "return")); - qdict =3D qdict_get_qdict(resp, "return"); - g_assert(qdict_haskey(qdict, "enabled")); - enabled =3D qdict_get_bool(qdict, "enabled"); - qobject_unref(resp); - - return enabled; -} - static QDict *do_query_no_props(QTestState *qts, const char *cpu_type) { return qtest_qmp(qts, QUERY_HEAD "'model': { 'name': %s }" @@ -506,14 +491,6 @@ static void test_query_cpu_model_expansion_kvm(const v= oid *data) =20 qts =3D qtest_init(MACHINE_KVM "-cpu max"); =20 - /* - * These tests target the 'host' CPU type, so KVM must be enabled. - */ - if (!kvm_enabled(qts)) { - qtest_quit(qts); - return; - } - /* Enabling and disabling kvm-no-adjvtime should always work. */ assert_has_feature_disabled(qts, "host", "kvm-no-adjvtime"); assert_set_feature(qts, "host", "kvm-no-adjvtime", true); @@ -637,7 +614,11 @@ int main(int argc, char **argv) * order avoid attempting to run an AArch32 QEMU with KVM on * AArch64 hosts. That won't work and isn't easy to detect. */ - if (g_str_equal(qtest_get_arch(), "aarch64")) { + if (g_str_equal(qtest_get_arch(), "aarch64") && qtest_has_accel("kvm")= ) { + /* + * This tests target the 'host' CPU type, so register it only if + * KVM is available. + */ qtest_add_data_func("/arm/kvm/query-cpu-model-expansion", NULL, test_query_cpu_model_expansion_kvm); } --=20 MST From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634643760467230.7184701004876; Tue, 19 Oct 2021 04:42:40 -0700 (PDT) Received: from localhost ([::1]:58570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcnVv-0006Sw-2j for importer@patchew.org; Tue, 19 Oct 2021 07:42:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAp-0000LR-Cx for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:22361) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAU-0002F7-CL for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:42 -0400 Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-491-CbIy7UM7MQu_W1DTL6HF0A-1; Tue, 19 Oct 2021 07:20:24 -0400 Received: by mail-ed1-f70.google.com with SMTP id l10-20020a056402230a00b003db6977b694so17238096eda.23 for ; Tue, 19 Oct 2021 04:20:24 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id dx2sm9955467ejb.125.2021.10.19.04.20.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:20:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/OOFXRgq8TSDvZxZeGhYdPtX8D2UWjeyH5vg2OkC7lM=; b=T7gg2WgFjq5UIzqFjHosd7W+FN3ZkLTpoBn4djAuLdl+VTRtrzsnovO0dU97WL3MPsPwE5 yUN0FpH3Jz0AXnSO3A6rB+/RXaNVtcZblho8tiDdL7e6ZoHbslH2q/dLZLYWCUpCd1zJ8x WRMzpclKdZpXGpQL8nWVj1BfL6KkjWk= X-MC-Unique: CbIy7UM7MQu_W1DTL6HF0A-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/OOFXRgq8TSDvZxZeGhYdPtX8D2UWjeyH5vg2OkC7lM=; b=UU+FaqY5q2Lg0K4EKzFJBnVjf7XqqGtT8toFWK2cA5IWaNKap0icFcDMmeFuZyF3QZ qo4fyUusi8lhSHpLZ89+UB0OskV2nqUmsoSiB2ZysOB/uwY7HoBN73Lk6ZE9+hTqHbsU jWeGX+iAs2TX5i+QsTw9Ev7IJv0dWmnnq3Q/1UAMNWqcIaI/OHTHNxTh3qJbU13imlsa AGRbhN/rdzIpMzdWr4TdcFDPoZHIj2nFfx60AZqNYEqErXhW7VUy7QOsEzPhj0NPRRQ3 bLzdW6rlEFCi/nXCUOPdoatM0GzvFTwWI/z9qoKu4yiW7WucElHHbwE/VgcwZqknoEiq Uang== X-Gm-Message-State: AOAM530Sd7FomqVSBvYYF0DGxQXgra1eJVVdv0nN5IQugUalTJhEbbTw m/jkeBldeqjE6qOCBR6dj98SkTKQ3uurJPhTP65dkC1yG5PEwlXNjZU4lP+fqMtvqzKsNU4TBgA 5lQsTp1LNJlvzR/2HPy6T20MwJM3z4O8UGPDLHtn4RN5WqWYjq4VKDUoIR8I2 X-Received: by 2002:aa7:c44d:: with SMTP id n13mr53433621edr.34.1634642422904; Tue, 19 Oct 2021 04:20:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztcD81KGN/EeMZrmUd74lpiLk64kBks5gmiHM5gALC+XCXhwHp0if8EUdqUyRmJ4GR9k8zYw== X-Received: by 2002:aa7:c44d:: with SMTP id n13mr53433587edr.34.1634642422622; Tue, 19 Oct 2021 04:20:22 -0700 (PDT) Date: Tue, 19 Oct 2021 07:20:19 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 14/29] tests: migration-test: use qtest_has_accel() API Message-ID: <20211019111923.679826-15-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, 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: , Cc: Laurent Vivier , Peter Maydell , Thomas Huth , Juan Quintela , "Dr. David Alan Gilbert" , Paolo Bonzini , Igor Mammedov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634643761841100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Igor Mammedov Signed-off-by: Igor Mammedov Suggested-by: Thomas Huth Message-Id: <20210902113551.461632-15-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- tests/qtest/migration-test.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index cc5e83d98a..7b42f6fd90 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -1420,6 +1420,7 @@ static bool kvm_dirty_ring_supported(void) int main(int argc, char **argv) { char template[] =3D "/tmp/migration-test-XXXXXX"; + const bool has_kvm =3D qtest_has_accel("kvm"); int ret; =20 g_test_init(&argc, &argv, NULL); @@ -1434,8 +1435,7 @@ int main(int argc, char **argv) * some reason) */ if (g_str_equal(qtest_get_arch(), "ppc64") && - (access("/sys/module/kvm_hv", F_OK) || - access("/dev/kvm", R_OK | W_OK))) { + (!has_kvm || access("/sys/module/kvm_hv", F_OK))) { g_test_message("Skipping test: kvm_hv not available"); return g_test_run(); } @@ -1444,16 +1444,9 @@ int main(int argc, char **argv) * Similar to ppc64, s390x seems to be touchy with TCG, so disable it * there until the problems are resolved */ - if (g_str_equal(qtest_get_arch(), "s390x")) { -#if defined(HOST_S390X) - if (access("/dev/kvm", R_OK | W_OK)) { - g_test_message("Skipping test: kvm not available"); - return g_test_run(); - } -#else - g_test_message("Skipping test: Need s390x host to work properly"); + if (g_str_equal(qtest_get_arch(), "s390x") && !has_kvm) { + g_test_message("Skipping test: s390x host with KVM is required"); return g_test_run(); -#endif } =20 tmpfs =3D mkdtemp(template); --=20 MST From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634644196738982.5612353904569; Tue, 19 Oct 2021 04:49:56 -0700 (PDT) Received: from localhost ([::1]:44964 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcncx-0008R5-Ej for importer@patchew.org; Tue, 19 Oct 2021 07:49:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50878) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnD1-0004Gs-J3 for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:23:07 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.153.124]:42195) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnCz-0003yL-UF for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:23:07 -0400 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-568-mrXGjczBNeepLJTLXm3bEA-1; Tue, 19 Oct 2021 07:20:27 -0400 Received: by mail-ed1-f69.google.com with SMTP id p20-20020a50cd94000000b003db23619472so17313429edi.19 for ; Tue, 19 Oct 2021 04:20:26 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id g8sm12594724edb.60.2021.10.19.04.20.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:20:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+l55gFO3MSoGNl8FmX8HypllSa9dmHDnz4W6+bwhZI4=; b=bv1LpsCuZKxoSrCCxcf94Z3dQpZArCrXJYS4Ku7/T9pOV7NovsKtQW7WgK0A9tbsxZR3t5 FeGe7rVBkqOxCHpoyxOgh3050+daCWDpdr391kKkkKL9PMH9xMk5FvSaxql+tHto33AM0O YhfJAMyLp6CoaslEXd0JRAOsVgLZVGc= X-MC-Unique: mrXGjczBNeepLJTLXm3bEA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=+l55gFO3MSoGNl8FmX8HypllSa9dmHDnz4W6+bwhZI4=; b=hnY5eqZFhWoH5K/rtclHdt3PXh409W4qtJZ077AfEbxph02jlLgrgL7/HJqBESBN8X S0EcqETxUzFEfbhT/7D7u6cBdjzVlCtIR6X3gicNu3J3WdgoQsUnjQwfupwVCvlDdJDb o3U3JPnw4RmSBrTsZPoneLEbBAwPDmYoQ92lK3HV09KjFLW5zL4b9nRuhuU4qXhb9h1K JTyGM1D6WW1vJFYUIVnor5nGhd1XT0IW76QSine2CzvQSFHMY03sAurvwdCtmlO8li69 54ixlFgIEsGZwzzWWAUdb0gzl2iDZwtKjl1V7p5TRbCVDUCrtMtFSaY3bwwPcO3Zghxx oSkw== X-Gm-Message-State: AOAM533gjSdagbfQpOiSsu1jTNiXmY8pRrgD2bUOUgTADLl0ErRGxSkI gBi7CSKZxtdimt0J4szK/Zb+gtc75xF4yblEQ8whdTf5HhaZ6rleNtmA7MGz4nzMXsDEJ5PpBck iJ6MQgyCcUTou5cN+td5PXD6EhgF/SZm20OxE99ccpmLgugh6dh/bPEMgFTYw X-Received: by 2002:a17:906:b311:: with SMTP id n17mr35830315ejz.571.1634642425537; Tue, 19 Oct 2021 04:20:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyW0LM7j6SIwVsT58GmKvqGEeqvb7tU0DjdJPkcVrwkxeZOsEKdtgLzizxFETXtmWYuIpQR/Q== X-Received: by 2002:a17:906:b311:: with SMTP id n17mr35830289ejz.571.1634642425285; Tue, 19 Oct 2021 04:20:25 -0700 (PDT) Date: Tue, 19 Oct 2021 07:20:22 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 15/29] tests: bios-tables-test: use qtest_has_accel() API to register TCG only tests Message-ID: <20211019111923.679826-16-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.153.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ani Sinha , Peter Maydell , Igor Mammedov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634644198779100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Igor Mammedov .. only if TCG is available Signed-off-by: Igor Mammedov Message-Id: <20210902113551.461632-16-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- tests/qtest/bios-tables-test.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 873eb9c037..6e21a650d2 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -722,13 +722,6 @@ static void test_acpi_one(const char *params, test_dat= a *data) char *args; bool use_uefi =3D data->uefi_fl1 && data->uefi_fl2; =20 -#ifndef CONFIG_TCG - if (data->tcg_only) { - g_test_skip("TCG disabled, skipping ACPI tcg_only test"); - return; - } -#endif /* CONFIG_TCG */ - args =3D test_acpi_create_args(data, params, use_uefi); data->qts =3D qtest_init(args); test_acpi_load_tables(data, use_uefi); @@ -1544,6 +1537,7 @@ int main(int argc, char *argv[]) { const char *arch =3D qtest_get_arch(); const bool has_kvm =3D qtest_has_accel("kvm"); + const bool has_tcg =3D qtest_has_accel("tcg"); int ret; =20 g_test_init(&argc, &argv, NULL); @@ -1590,7 +1584,6 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/q35/smm-compat-nosmm", test_acpi_q35_tcg_smm_compat_nosmm); qtest_add_func("acpi/q35/nohpet", test_acpi_q35_tcg_nohpet); - qtest_add_func("acpi/q35/ivrs", test_acpi_q35_tcg_ivrs); qtest_add_func("acpi/piix4/dimmpxm", test_acpi_piix4_tcg_dimm_pxm); qtest_add_func("acpi/q35/dimmpxm", test_acpi_q35_tcg_dimm_pxm); qtest_add_func("acpi/piix4/acpihmat", test_acpi_piix4_tcg_acpi_hma= t); @@ -1600,19 +1593,24 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/microvm/rtc", test_acpi_microvm_rtc_tcg); qtest_add_func("acpi/microvm/ioapic2", test_acpi_microvm_ioapic2_t= cg); qtest_add_func("acpi/microvm/oem-fields", test_acpi_oem_fields_mic= rovm); - if (strcmp(arch, "x86_64") =3D=3D 0) { - qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie_tcg= ); + if (has_tcg) { + qtest_add_func("acpi/q35/ivrs", test_acpi_q35_tcg_ivrs); + if (strcmp(arch, "x86_64") =3D=3D 0) { + qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie= _tcg); + } } if (has_kvm) { qtest_add_func("acpi/q35/kvm/xapic", test_acpi_q35_kvm_xapic); qtest_add_func("acpi/q35/kvm/dmar", test_acpi_q35_kvm_dmar); } } else if (strcmp(arch, "aarch64") =3D=3D 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); + if (has_tcg) { + 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_vi= rt); + } } ret =3D g_test_run(); boot_sector_cleanup(disk); --=20 MST From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634643462472196.05390794014693; Tue, 19 Oct 2021 04:37:42 -0700 (PDT) Received: from localhost ([::1]:50848 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcnR7-0001BR-AO for importer@patchew.org; Tue, 19 Oct 2021 07:37:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50408) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAp-0000LN-Be for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:53 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:22575) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAW-0002Hp-41 for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:41 -0400 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-467-7Jw9fA7qOvubl44icMGXIQ-1; Tue, 19 Oct 2021 07:20:30 -0400 Received: by mail-ed1-f69.google.com with SMTP id s12-20020a50dacc000000b003dbf7a78e88so14235976edj.2 for ; Tue, 19 Oct 2021 04:20:29 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id nd36sm10355069ejc.17.2021.10.19.04.20.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:20:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642431; h=from:from: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=2YfMqludtVxGe6ZQMypK2Vw2Q7PYFz1rFSXdv5+28mU=; b=jM+1v9CtWetwxn3PY0O5PM+jM0yRdiaRwgLa9GwkVJ5I4aoBcTMCRpzp1MIS7RVx00kVVu 7CWemCw6v9sf4CLiW+tuEai9F8PfDj+p+g7esCUAeP59mLet2cHBfqyJS7NV3SUvMJZX40 1xR2beQu98DqcfOjl0Vfr8RxR/HtymY= X-MC-Unique: 7Jw9fA7qOvubl44icMGXIQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=2YfMqludtVxGe6ZQMypK2Vw2Q7PYFz1rFSXdv5+28mU=; b=p2MXl1hfrsD0YmceQQvK2omS+SlYe1oyvLVpqEHUN6gYy2UAWhklw9TdTvynnAKGGa dW+3E12Fr7bw9o9WDYXclDR1HFN8nZa1AqfTMple0SBAW1PCmKnUsXo0vw/6+PVk81XV NMLSoBEydT85TGWGTXt2/l0h9TiOwR/t3NXgW/kkSzF196TaokK37yiJlwilmHMul4Dj J07A0Jmk/ENuAg6pOy7U4Ck+uOwBde6F3MnT5V8LK1kNodPofKRWIJ/gBk18bK7XBhjS 5N92MUeIjh97PLfR2MI4zgUEFPW8C5UCT2hD07lj3IhRxYEhaiI8dVMwWqWqkDqV01LF hr4Q== X-Gm-Message-State: AOAM530zmC3lNfB+Kd5urjbmK0b+b3Th/UKwucvrKNFP3mR1p1gHsp5c worSDuQzjRtLUIAhhabowOuLFUV7g1msmROgKveez+xYtVd6H7SROUift2LrkaLATG+px1B2MYW gZiABSEH8dp7rgcZ9Khw9EY7gW0kQwCudDmyOsXaGFwCcoMv8ENzHlSMOzpVJ X-Received: by 2002:a17:906:eb86:: with SMTP id mh6mr37791589ejb.141.1634642428489; Tue, 19 Oct 2021 04:20:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgI8WK+MVtgTnPilS76zNUChZFMp30RVIW+D5zqVJKEhU9SZc3yAFXGLvFWUZS7x+7z9geoQ== X-Received: by 2002:a17:906:eb86:: with SMTP id mh6mr37791539ejb.141.1634642428040; Tue, 19 Oct 2021 04:20:28 -0700 (PDT) Date: Tue, 19 Oct 2021 07:20:25 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 16/29] vdpa: Skip protected ram IOMMU mappings Message-ID: <20211019111923.679826-17-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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: , Cc: Peter Maydell , Jason Wang , Stefano Garzarella , Eugenio =?utf-8?B?UMOpcmV6?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634643463293100001 From: Eugenio P=C3=A9rez Following the logic of commit 56918a126ae ("memory: Add RAM_PROTECTED flag to skip IOMMU mappings") with VFIO, skip memory sections inaccessible via normal mechanisms, including DMA. Signed-off-by: Eugenio P=C3=A9rez Acked-by: Jason Wang Message-Id: <20211014141236.923287-2-eperezma@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefano Garzarella Reviewed-by: Marcel Apfelbaum --- hw/virtio/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index 47d7a5a23d..ea1aa71ad8 100644 --- a/hw/virtio/vhost-vdpa.c +++ b/hw/virtio/vhost-vdpa.c @@ -28,6 +28,7 @@ static bool vhost_vdpa_listener_skipped_section(MemoryReg= ionSection *section) { return (!memory_region_is_ram(section->mr) && !memory_region_is_iommu(section->mr)) || + memory_region_is_protected(section->mr) || /* vhost-vDPA doesn't allow MMIO to be mapped */ memory_region_is_ram_device(section->mr) || /* --=20 MST From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634643464539902.0521904552762; Tue, 19 Oct 2021 04:37:44 -0700 (PDT) Received: from localhost ([::1]:51108 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcnR9-0001M3-8s for importer@patchew.org; Tue, 19 Oct 2021 07:37:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50376) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAo-0000Gt-8U for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:58310) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAY-0002K4-7k for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:39 -0400 Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-157-apHvNFdZOlu2RRa2rDeoEg-1; Tue, 19 Oct 2021 07:20:32 -0400 Received: by mail-ed1-f72.google.com with SMTP id l22-20020aa7c316000000b003dbbced0731so17280327edq.6 for ; Tue, 19 Oct 2021 04:20:32 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id t19sm10197186ejb.115.2021.10.19.04.20.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:20:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642433; h=from:from: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=QiJ0iHIZ1ouAmADpp/YMcXYNacyY5H2Zjhw9Phv+fQ0=; b=hPUL3plVbmTiiqvRQWHZNHbkjUvGJ0/RrGwFEpEIggrdH8yDswsxKr/4o5aoDrj38q5yYq Xuw0joBbLtCxPIyR8PICBPSWwX8TDr2OR7wTa9CapBWvQpjflHbYL97ETnDR23OtrOEz8E EMe1QgFLVkr046MGOBTwbUvsxbcamHU= X-MC-Unique: apHvNFdZOlu2RRa2rDeoEg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=QiJ0iHIZ1ouAmADpp/YMcXYNacyY5H2Zjhw9Phv+fQ0=; b=pQcDwPCLU2ypEEIJWuomQXpkVs/aGacHUBDcCa6cwDFgY5dedhbeuUAR+MKR3TWMO+ XIDt0Q8ezbF0ukmiF+q89zbGTBAEwKQC3/a29vO6mqxEqkKhv/s2zKqreeO1F5ZuwiqW k3pmfPE8ZKHkZPakgkN+navvoia5dRCYTWKc1yD5TQHnSTlMpUKLOCPsxO3fEMawzBXx 7Gfi1S2/UKQvI3NeS4x2f8yS0LdzWlG7tS2ZJ3bq2TI0twnA8jBVe32rCzz50yZyJH9J 9QrpU724st2OX14EPeazMZrtnSB2+85EoSpq1j5twS0aosXUynBHF3jRAuKoHKDdyP24 38gw== X-Gm-Message-State: AOAM533kiiodCVCk8gPPStM5xdzw8amh/bwMZiiLCO69DfPvBXgH7HiX tejJewls2MF7jkZqPhxIIxQgBhvgX/S1GAB+LRMr5vfZPfDZxASrnrhdhyU3pia+2AmWOaXtq6S P8HAWXO5WHnu4MQfRwLFLkEHZzOdJR8s3KJYursGM+roUElmWcMfVbMaNJFYZ X-Received: by 2002:a17:906:a382:: with SMTP id k2mr35626781ejz.454.1634642430830; Tue, 19 Oct 2021 04:20:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOLqLi92e1f9WPcRVbfPzvmG62YcOx7ArAhySXGwg7CDdN7jxoVFaT4Y2/dhEwBPQa6Jd6yQ== X-Received: by 2002:a17:906:a382:: with SMTP id k2mr35626751ejz.454.1634642430596; Tue, 19 Oct 2021 04:20:30 -0700 (PDT) Date: Tue, 19 Oct 2021 07:20:28 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 17/29] vdpa: Add vhost_vdpa_section_end Message-ID: <20211019111923.679826-18-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, 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: , Cc: Peter Maydell , Jason Wang , Stefano Garzarella , Eugenio =?utf-8?B?UMOpcmV6?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634643465503100001 From: Eugenio P=C3=A9rez Abstract this operation, that will be reused when validating the region against the iova range that the device supports. Signed-off-by: Eugenio P=C3=A9rez Acked-by: Jason Wang Message-Id: <20211014141236.923287-3-eperezma@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefano Garzarella Reviewed-by: Marcel Apfelbaum --- hw/virtio/vhost-vdpa.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index ea1aa71ad8..be7c63b4ba 100644 --- a/hw/virtio/vhost-vdpa.c +++ b/hw/virtio/vhost-vdpa.c @@ -24,6 +24,19 @@ #include "trace.h" #include "qemu-common.h" =20 +/* + * Return one past the end of the end of section. Be careful with uint64_t + * conversions! + */ +static Int128 vhost_vdpa_section_end(const MemoryRegionSection *section) +{ + Int128 llend =3D int128_make64(section->offset_within_address_space); + llend =3D int128_add(llend, section->size); + llend =3D int128_and(llend, int128_exts64(TARGET_PAGE_MASK)); + + return llend; +} + static bool vhost_vdpa_listener_skipped_section(MemoryRegionSection *secti= on) { return (!memory_region_is_ram(section->mr) && @@ -160,10 +173,7 @@ static void vhost_vdpa_listener_region_add(MemoryListe= ner *listener, } =20 iova =3D TARGET_PAGE_ALIGN(section->offset_within_address_space); - llend =3D int128_make64(section->offset_within_address_space); - llend =3D int128_add(llend, section->size); - llend =3D int128_and(llend, int128_exts64(TARGET_PAGE_MASK)); - + llend =3D vhost_vdpa_section_end(section); if (int128_ge(int128_make64(iova), llend)) { return; } @@ -221,9 +231,7 @@ static void vhost_vdpa_listener_region_del(MemoryListen= er *listener, } =20 iova =3D TARGET_PAGE_ALIGN(section->offset_within_address_space); - llend =3D int128_make64(section->offset_within_address_space); - llend =3D int128_add(llend, section->size); - llend =3D int128_and(llend, int128_exts64(TARGET_PAGE_MASK)); + llend =3D vhost_vdpa_section_end(section); =20 trace_vhost_vdpa_listener_region_del(v, iova, int128_get64(llend)); =20 --=20 MST From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634643501620329.14251364264624; Tue, 19 Oct 2021 04:38:21 -0700 (PDT) Received: from localhost ([::1]:51692 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcnRk-0001kG-Gh for importer@patchew.org; Tue, 19 Oct 2021 07:38:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50412) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAp-0000LS-CW for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:24015) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAd-0002OM-0B for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:50 -0400 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-558-r6U8qpQuOuiB0kItxdkmag-1; Tue, 19 Oct 2021 07:20:35 -0400 Received: by mail-ed1-f69.google.com with SMTP id t18-20020a056402021200b003db9e6b0e57so17278945edv.10 for ; Tue, 19 Oct 2021 04:20:34 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id u14sm6009245edj.74.2021.10.19.04.20.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:20:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642436; h=from:from: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=P7q3UpyXdxkl4wmZEwxSUAlEcEFtN8aioRuhwP6BC+s=; b=NF3dTroGQiyt1MEmpCtZuq4h/os3EsfnG7g1oZzsGcdhD+/NADsh901TYybamFuvDw7pUz SgeDbyu9ENsrCQ0Pv3PSVSde3sz7XAptwgqGRfcuddKwVLDDCtr2FUbQh+njRi5kXhJp4z Ykw8zVY43SmKiuuE5sHjf9Kd9YVBXxI= X-MC-Unique: r6U8qpQuOuiB0kItxdkmag-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=P7q3UpyXdxkl4wmZEwxSUAlEcEFtN8aioRuhwP6BC+s=; b=0lKKKMy5sclhMwvZ6xydwY2GH4FJ3MGvmIAfvr7x6WwFtQasfrYMlQfqLvGQ56uyXm igpO7cuplF2oSfrqFSYqzT9bk4H1WaQsMgZ8W6xqbn7AO8KiVIUsLaBn/dl4RL8pnS+2 wDt6ovJNbC9AzUrT2cwlo4JmSxCY17s/GZztJTBzZuLBYCCYxoqk6qG8G4QJeZWZ05rr B2eK6V7Le2abvJ5nOiXf1r/h9EoeGodMWymNQBFFGkU1iW5CpbFqx9uDAIJ/UtNhUilZ 75wNrb5JqJwH2Arn61rC7sYgYuVx3JREZBQd9qghSjfrn/Eq+uG1QIbcH/erw0pr/Dow b0TA== X-Gm-Message-State: AOAM531nx1I2WZ58ajkBsogCJmvpA3eTnydWpv6B4hx+jaKS+milhR1J EpVFxcYJPH2dvJkwC3zZ4nGwVE8Qo4gt1JLHmF/otLNSMEnL1upfGFT5G3ovnIpRpCldxvQdqnh 8Tz+sK/hbGJOTtJjuQEOE/dQYg6Ng/WqvTl/T81vJH1pSTLB2maNETS14MgR1 X-Received: by 2002:a17:906:c1c9:: with SMTP id bw9mr36962874ejb.3.1634642433409; Tue, 19 Oct 2021 04:20:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxXjQpNmq7qvzP/1IDs3jYED5eOcbsC902SqR2eu4WIm1nA4M53gPesLxxDLxnYY59cT4EFg== X-Received: by 2002:a17:906:c1c9:: with SMTP id bw9mr36962843ejb.3.1634642433152; Tue, 19 Oct 2021 04:20:33 -0700 (PDT) Date: Tue, 19 Oct 2021 07:20:30 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 18/29] vdpa: Check for iova range at mappings changes Message-ID: <20211019111923.679826-19-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, 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: , Cc: Peter Maydell , Jason Wang , Stefano Garzarella , Eugenio =?utf-8?B?UMOpcmV6?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634643503487100001 From: Eugenio P=C3=A9rez Check vdpa device range before updating memory regions so we don't add any outside of it, and report the invalid change if any. Signed-off-by: Eugenio P=C3=A9rez Message-Id: <20211014141236.923287-4-eperezma@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Reviewed-by: Stefano Garzarella Reviewed-by: Marcel Apfelbaum --- include/hw/virtio/vhost-vdpa.h | 2 ++ hw/virtio/vhost-vdpa.c | 60 +++++++++++++++++++++++++--------- hw/virtio/trace-events | 1 + 3 files changed, 48 insertions(+), 15 deletions(-) diff --git a/include/hw/virtio/vhost-vdpa.h b/include/hw/virtio/vhost-vdpa.h index a8963da2d9..c288cf7ecb 100644 --- a/include/hw/virtio/vhost-vdpa.h +++ b/include/hw/virtio/vhost-vdpa.h @@ -13,6 +13,7 @@ #define HW_VIRTIO_VHOST_VDPA_H =20 #include "hw/virtio/virtio.h" +#include "standard-headers/linux/vhost_types.h" =20 typedef struct VhostVDPAHostNotifier { MemoryRegion mr; @@ -24,6 +25,7 @@ typedef struct vhost_vdpa { uint32_t msg_type; bool iotlb_batch_begin_sent; MemoryListener listener; + struct vhost_vdpa_iova_range iova_range; struct vhost_dev *dev; VhostVDPAHostNotifier notifier[VIRTIO_QUEUE_MAX]; } VhostVDPA; diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index be7c63b4ba..7691e904ac 100644 --- a/hw/virtio/vhost-vdpa.c +++ b/hw/virtio/vhost-vdpa.c @@ -37,20 +37,34 @@ static Int128 vhost_vdpa_section_end(const MemoryRegion= Section *section) return llend; } =20 -static bool vhost_vdpa_listener_skipped_section(MemoryRegionSection *secti= on) +static bool vhost_vdpa_listener_skipped_section(MemoryRegionSection *secti= on, + uint64_t iova_min, + uint64_t iova_max) { - return (!memory_region_is_ram(section->mr) && - !memory_region_is_iommu(section->mr)) || - memory_region_is_protected(section->mr) || - /* vhost-vDPA doesn't allow MMIO to be mapped */ - memory_region_is_ram_device(section->mr) || - /* - * Sizing an enabled 64-bit BAR can cause spurious mappings to - * addresses in the upper part of the 64-bit address space. Th= ese - * are never accessed by the CPU and beyond the address width of - * some IOMMU hardware. TODO: VDPA should tell us the IOMMU wi= dth. - */ - section->offset_within_address_space & (1ULL << 63); + Int128 llend; + + if ((!memory_region_is_ram(section->mr) && + !memory_region_is_iommu(section->mr)) || + memory_region_is_protected(section->mr) || + /* vhost-vDPA doesn't allow MMIO to be mapped */ + memory_region_is_ram_device(section->mr)) { + return true; + } + + if (section->offset_within_address_space < iova_min) { + error_report("RAM section out of device range (min=3D%lu, addr=3D%= lu)", + iova_min, section->offset_within_address_space); + return true; + } + + llend =3D vhost_vdpa_section_end(section); + if (int128_gt(llend, int128_make64(iova_max))) { + error_report("RAM section out of device range (max=3D%lu, end addr= =3D%lu)", + iova_max, int128_get64(llend)); + return true; + } + + return false; } =20 static int vhost_vdpa_dma_map(struct vhost_vdpa *v, hwaddr iova, hwaddr si= ze, @@ -162,7 +176,8 @@ static void vhost_vdpa_listener_region_add(MemoryListen= er *listener, void *vaddr; int ret; =20 - if (vhost_vdpa_listener_skipped_section(section)) { + if (vhost_vdpa_listener_skipped_section(section, v->iova_range.first, + v->iova_range.last)) { return; } =20 @@ -220,7 +235,8 @@ static void vhost_vdpa_listener_region_del(MemoryListen= er *listener, Int128 llend, llsize; int ret; =20 - if (vhost_vdpa_listener_skipped_section(section)) { + if (vhost_vdpa_listener_skipped_section(section, v->iova_range.first, + v->iova_range.last)) { return; } =20 @@ -288,6 +304,19 @@ static void vhost_vdpa_add_status(struct vhost_dev *de= v, uint8_t status) vhost_vdpa_call(dev, VHOST_VDPA_SET_STATUS, &s); } =20 +static void vhost_vdpa_get_iova_range(struct vhost_vdpa *v) +{ + int ret =3D vhost_vdpa_call(v->dev, VHOST_VDPA_GET_IOVA_RANGE, + &v->iova_range); + if (ret !=3D 0) { + v->iova_range.first =3D 0; + v->iova_range.last =3D UINT64_MAX; + } + + trace_vhost_vdpa_get_iova_range(v->dev, v->iova_range.first, + v->iova_range.last); +} + static int vhost_vdpa_init(struct vhost_dev *dev, void *opaque, Error **er= rp) { struct vhost_vdpa *v; @@ -300,6 +329,7 @@ static int vhost_vdpa_init(struct vhost_dev *dev, void = *opaque, Error **errp) v->listener =3D vhost_vdpa_memory_listener; v->msg_type =3D VHOST_IOTLB_MSG_V2; =20 + vhost_vdpa_get_iova_range(v); vhost_vdpa_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE | VIRTIO_CONFIG_S_DRIVER); =20 diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events index 8ed19e9d0c..650e521e35 100644 --- a/hw/virtio/trace-events +++ b/hw/virtio/trace-events @@ -52,6 +52,7 @@ vhost_vdpa_set_vring_call(void *dev, unsigned int index, = int fd) "dev: %p index: vhost_vdpa_get_features(void *dev, uint64_t features) "dev: %p features: 0= x%"PRIx64 vhost_vdpa_set_owner(void *dev) "dev: %p" vhost_vdpa_vq_get_addr(void *dev, void *vq, uint64_t desc_user_addr, uint6= 4_t avail_user_addr, uint64_t used_user_addr) "dev: %p vq: %p desc_user_add= r: 0x%"PRIx64" avail_user_addr: 0x%"PRIx64" used_user_addr: 0x%"PRIx64 +vhost_vdpa_get_iova_range(void *dev, uint64_t first, uint64_t last) "dev: = %p first: 0x%"PRIx64" last: 0x%"PRIx64 =20 # virtio.c virtqueue_alloc_element(void *elem, size_t sz, unsigned in_num, unsigned o= ut_num) "elem %p size %zd in_num %u out_num %u" --=20 MST From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634643211382971.529683495898; Tue, 19 Oct 2021 04:33:31 -0700 (PDT) Received: from localhost ([::1]:42088 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcnN4-0003fh-3j for importer@patchew.org; Tue, 19 Oct 2021 07:33:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAp-0000Lp-Fp for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:53 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:24766) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAd-0002PG-O2 for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:51 -0400 Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-208-upQCpUxIOb6iGGOhZDc8Uw-1; Tue, 19 Oct 2021 07:20:37 -0400 Received: by mail-ed1-f71.google.com with SMTP id c25-20020a056402143900b003dc19782ea8so13794476edx.3 for ; Tue, 19 Oct 2021 04:20:37 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id y19sm12035659edd.39.2021.10.19.04.20.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:20:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=A7I3owIbz1hLTkvG+O1oeRq8T2bvra3NbCuqdt9S6fE=; b=Ne93fdCCOZwzxQq0sRjJk+ahEp4K/Vw2YTtGzsmLaHem4UuUhXqII4iRW/3Q8KmU6RfHX4 k/5Tm19i4laXz1v7yEPoQBH3cF2WfyJrOzxk2FfmUNwIdsyhvSt/ybjRQ21yTMLdMLhXdT ogLMAKc/nIViCkALsc6g0VvXUGe66ic= X-MC-Unique: upQCpUxIOb6iGGOhZDc8Uw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=A7I3owIbz1hLTkvG+O1oeRq8T2bvra3NbCuqdt9S6fE=; b=sAq8xYRXB6KZjPinr9GJvwoO/D/7sOMHQQCUibVJMJtmdGXA+G4IxBBheTB074oN2E r0LujUbjtqn5neRx08CEND1XDFYCs/Lb6AggSPEbWtnRX4+z2sbwg/tvatR4JAms03qg tcQOkIvTAV/Aaf5tp1tewGzUao0kXIWU8LiAjD9RXyquow/33+0KIAHqeArvUGnhA9fb Vudzwuubgp+LcPVYgvvzzSUN3HU2IEEOx2BIBjOkqhwPWQxsHilNOm4rxEpXh873x+or QI0eSTPvVVL302ILSuegJfAKvKKikfYzDhfaqnkIImKYdKUlyNdP5fzMu4oFoC1t/sMS Zoqg== X-Gm-Message-State: AOAM533M/kt9Eq/brpUBBXc6cajThMqE5c/SK3s0HE7e3SsPiuMLt97K wvtTrJkMhJoBNtjfLDYReySraIB1efZfiwpOzIhrCKmUWYOZYtBmOC9RMad39JEvGe5cG++/PHl a03A6pmz59zOIKSYmwkuEuuxwmGiD+sIem0XeRNCdkyvgdAk8S95z/CbP1QFS X-Received: by 2002:a17:907:16aa:: with SMTP id hc42mr33239746ejc.39.1634642436179; Tue, 19 Oct 2021 04:20:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTwnrMkcR97yMvkiwhdxoHh3HUMF24bWGCENEd+FjBMXivtEzTcK3UX1NvA3hVO32B2Z+LAg== X-Received: by 2002:a17:907:16aa:: with SMTP id hc42mr33239722ejc.39.1634642435886; Tue, 19 Oct 2021 04:20:35 -0700 (PDT) Date: Tue, 19 Oct 2021 07:20:33 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 19/29] virtio-iommu: Remove the non transitional name Message-ID: <20211019111923.679826-20-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, 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: , Cc: Peter Maydell , Jean-Philippe Brucker , Cornelia Huck , Andrea Bolognani , Eric Auger Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634643213405100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Eric Auger Remove the non transitional name for virtio iommu. Like other devices introduced after 1.0 spec, the virtio-iommu does not need it. Signed-off-by: Eric Auger Reported-by: Andrea Bolognani Reviewed-by: Cornelia Huck Message-Id: <20211013191755.767468-2-eric.auger@redhat.com> Reviewed-by: Jean-Philippe Brucker Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- hw/virtio/virtio-iommu-pci.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/virtio/virtio-iommu-pci.c b/hw/virtio/virtio-iommu-pci.c index 770c286be7..86fa4e6c28 100644 --- a/hw/virtio/virtio-iommu-pci.c +++ b/hw/virtio/virtio-iommu-pci.c @@ -100,7 +100,6 @@ static void virtio_iommu_pci_instance_init(Object *obj) static const VirtioPCIDeviceTypeInfo virtio_iommu_pci_info =3D { .base_name =3D TYPE_VIRTIO_IOMMU_PCI, .generic_name =3D "virtio-iommu-pci", - .non_transitional_name =3D "virtio-iommu-pci-non-transitional", .instance_size =3D sizeof(VirtIOIOMMUPCI), .instance_init =3D virtio_iommu_pci_instance_init, .class_init =3D virtio_iommu_pci_class_init, --=20 MST From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634643979409886.977960777148; Tue, 19 Oct 2021 04:46:19 -0700 (PDT) Received: from localhost ([::1]:36682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcnZS-0002OU-8j for importer@patchew.org; Tue, 19 Oct 2021 07:46:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50490) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAs-0000O5-JN for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:27436) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAp-0002Qk-AO for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:54 -0400 Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-511-kALCX2xFP5WRlkzgeVGIrA-1; Tue, 19 Oct 2021 07:20:40 -0400 Received: by mail-ed1-f72.google.com with SMTP id x5-20020a50f185000000b003db0f796903so17265684edl.18 for ; Tue, 19 Oct 2021 04:20:40 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id q14sm8587369edj.42.2021.10.19.04.20.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:20:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2oaB/YSoqgr6XdYYhUq9BpuWK0l58b7kZ1rtp8COlWY=; b=FwoT1wHJARrOgGjArxNawAC+FP9QdrH28QYq9TTfeRjykxsSo0VicDw43iaP0ucHOVQVhJ Fxuh/ryTiuUfqt4Tw4p6iMXA4WLnrQe59kZtPaEPDHbZwpLa4FeG6bLxze3qtHh6QcHmEq 6uSGH7rUkiMExuux+ti1nsia2Eekblk= X-MC-Unique: kALCX2xFP5WRlkzgeVGIrA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=2oaB/YSoqgr6XdYYhUq9BpuWK0l58b7kZ1rtp8COlWY=; b=d6GhKYS0uKxW2JnCdgw7GImQH16gGKNHQxQc3lD9Fhktz023kkfdxU8X8f1B26uGjz MBPT1mZUAxUE9hpgQIjXiob1ro2aoJqN5mbe0y/+nGllZjK3KfKuSMgztjRFd08jxSY1 jZhJSSsz9qHfTZhlOD/68SK1Zey/iko60p47+PEoE1VfvAlrNAoTIlJ0YeggK/Exn3Ua S13rwAJWu3i5+rARDYvhCnp8cqcrwoNI1lyGd/7ddMXlGQhA59+CrexmCyvHOZaSeb6b 0uvkZdVhL8ZMgXzez0hj2etSwDEUqcXh0wGcOk/BTNmjm+QFgUc2g0zcYJI9Lg2TT8/M rW7g== X-Gm-Message-State: AOAM532VFpOg0X6B/gKzG71fwkW771+8f9X+yYC3tIGQ+9SbRzFO5DWQ 74KxWZdsNAGwW3NAwjKACsvJVTUrGKWeam+4ASbrmWlwgq20KKU2xoyQ1s2ie88TVvd1KSZ78XQ t7F0wt5dYP8A2oZAhy+aiCtEAOmC0BX0bN3t9fjLQ7/gyxOREVFm4JQkbKPtD X-Received: by 2002:a17:906:c1da:: with SMTP id bw26mr39353241ejb.253.1634642438848; Tue, 19 Oct 2021 04:20:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxK5RRse9GEUGEW0QyVeHsnPoKEY//WMzCQjGfd+SKSga9B2DZ8xYaXblgVu78GFD0uzQgtA== X-Received: by 2002:a17:906:c1da:: with SMTP id bw26mr39353218ejb.253.1634642438639; Tue, 19 Oct 2021 04:20:38 -0700 (PDT) Date: Tue, 19 Oct 2021 07:20:36 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 20/29] virtio-iommu: Drop base_name and change generic_name Message-ID: <20211019111923.679826-21-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, 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: , Cc: Peter Maydell , Jean-Philippe Brucker , Cornelia Huck , Eric Auger Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634643980598100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Eric Auger Drop base_name and turn generic_name into "virtio-iommu-pci". This is more in line with other modern-only devices. Signed-off-by: Eric Auger Suggested-by: Cornelia Huck Reviewed-by: Cornelia Huck Message-Id: <20211013191755.767468-3-eric.auger@redhat.com> Reviewed-by: Jean-Philippe Brucker Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- include/hw/virtio/virtio-iommu.h | 2 +- hw/virtio/virtio-iommu-pci.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/hw/virtio/virtio-iommu.h b/include/hw/virtio/virtio-io= mmu.h index 273e35c04b..e2339e5b72 100644 --- a/include/hw/virtio/virtio-iommu.h +++ b/include/hw/virtio/virtio-iommu.h @@ -26,7 +26,7 @@ #include "qom/object.h" =20 #define TYPE_VIRTIO_IOMMU "virtio-iommu-device" -#define TYPE_VIRTIO_IOMMU_PCI "virtio-iommu-device-base" +#define TYPE_VIRTIO_IOMMU_PCI "virtio-iommu-pci" OBJECT_DECLARE_SIMPLE_TYPE(VirtIOIOMMU, VIRTIO_IOMMU) =20 #define TYPE_VIRTIO_IOMMU_MEMORY_REGION "virtio-iommu-memory-region" diff --git a/hw/virtio/virtio-iommu-pci.c b/hw/virtio/virtio-iommu-pci.c index 86fa4e6c28..a160ae6b41 100644 --- a/hw/virtio/virtio-iommu-pci.c +++ b/hw/virtio/virtio-iommu-pci.c @@ -98,8 +98,7 @@ static void virtio_iommu_pci_instance_init(Object *obj) } =20 static const VirtioPCIDeviceTypeInfo virtio_iommu_pci_info =3D { - .base_name =3D TYPE_VIRTIO_IOMMU_PCI, - .generic_name =3D "virtio-iommu-pci", + .generic_name =3D TYPE_VIRTIO_IOMMU_PCI, .instance_size =3D sizeof(VirtIOIOMMUPCI), .instance_init =3D virtio_iommu_pci_instance_init, .class_init =3D virtio_iommu_pci_class_init, --=20 MST From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634643790354111.63023944743213; Tue, 19 Oct 2021 04:43:10 -0700 (PDT) Received: from localhost ([::1]:59178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcnWP-0006rE-7F for importer@patchew.org; Tue, 19 Oct 2021 07:43:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAs-0000Nu-E0 for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:54839) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAp-0002SY-3E for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:20:53 -0400 Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-196-Yvubqow8NCCZdMOrlqsNIg-1; Tue, 19 Oct 2021 07:20:43 -0400 Received: by mail-ed1-f71.google.com with SMTP id h19-20020aa7de13000000b003db6ad5245bso17346394edv.9 for ; Tue, 19 Oct 2021 04:20:43 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id jg21sm6936193ejc.14.2021.10.19.04.20.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:20:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642444; h=from:from: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=ZvsHGqUvEzawW0OH5Cw6jRuRtAArFcbkyalTetDkgLs=; b=PriiuFejb3k7e9+H8KSNDLMAt3aAYxJ9vkmIkfVOgAUYS68brAxIcpHEeQUpvlv+9pb0TX Jh0YBwHHT6BAo/0BYvxkFlLoI0l2G94z+lZ29UAURNMyfiLM7C0TiTqRXsTBoIKbgGFaBI wC9vz0nCAkymTcQ+BdKV3xadkQysTSo= X-MC-Unique: Yvubqow8NCCZdMOrlqsNIg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=ZvsHGqUvEzawW0OH5Cw6jRuRtAArFcbkyalTetDkgLs=; b=o4HW88DfkK0zx3fU/JkrU99CxA6jr4Z1odwkdt3u3mWFQwHxt1GTFqmFPiad0GLmXQ xXW1JRazyKS+873PsHbKU7OG3NpGJNMfv8P8x8G42J3OIM7ephnuljOz6xq+d9aXeZnm ZqUGeel8G1K12vRjy7oCuTFIkysRgpbPFkNnqxlQbZl1/1U+ZRomMP9js1dkt/qR0/Cy DRdlPytnn0084cdDMrCXzDYEkKuZ/K9xvGeNDH7glEdKT7WdGcFiszTt++MHTikxaZav QMuJbCRHB5Vq5xfjpCHSdYO3y2UgDPc1hJVF/J1LzfNFN7p6Teiy//7GgE9GIgbx6qNJ IrOA== X-Gm-Message-State: AOAM532nrT6mJwjBHnww/kDSvHKBVLGSef817vKeA2/c4iDLAUhIdTZd XvyScPKvXpmrPElWw4n6Nqv03pB7vmB1LBNzu9RYSDJtUCf3qtw8CfO8OkPYqIJYOjnQciqEhec nxPY4pa1RMWxvBpfZ2bpJq+1tRe9DxYx98jpNv8ld0qo9jEC1VtpWBJhr2MZL X-Received: by 2002:a17:906:2f16:: with SMTP id v22mr36754143eji.126.1634642441818; Tue, 19 Oct 2021 04:20:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIgobyabUkvvho4Lvp1aRwIMh5EU3jn1r0ifzjyzIa1NUCwj9Re5Slor2S3MDLqWuO9TVEBQ== X-Received: by 2002:a17:906:2f16:: with SMTP id v22mr36754116eji.126.1634642441600; Tue, 19 Oct 2021 04:20:41 -0700 (PDT) Date: Tue, 19 Oct 2021 07:20:38 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 21/29] libvhost-user: fix VHOST_USER_REM_MEM_REG skipping mmap_addr Message-ID: <20211019111923.679826-22-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, 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: , Cc: Peter Maydell , David Hildenbrand , qemu-stable@nongnu.org, Coiby Xu , Raphael Norwitz , Stefan Hajnoczi , Paolo Bonzini , =?utf-8?Q?Marc-Andr=C3=A9?= Lureau Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634643792459100001 From: David Hildenbrand We end up not copying the mmap_addr of all existing regions, resulting in a SEGFAULT once we actually try to map/access anything within our memory regions. Fixes: 875b9fd97b34 ("Support individual region unmap in libvhost-user") Cc: qemu-stable@nongnu.org Cc: Michael S. Tsirkin Cc: Raphael Norwitz Cc: "Marc-Andr=C3=A9 Lureau" Cc: Stefan Hajnoczi Cc: Paolo Bonzini Cc: Coiby Xu Signed-off-by: David Hildenbrand Message-Id: <20211011201047.62587-1-david@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Raphael Norwitz Reviewed-by: Stefan Hajnoczi Reviewed-by: Marcel Apfelbaum --- subprojects/libvhost-user/libvhost-user.c | 1 + 1 file changed, 1 insertion(+) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvho= st-user/libvhost-user.c index bf09693255..787f4d2d4f 100644 --- a/subprojects/libvhost-user/libvhost-user.c +++ b/subprojects/libvhost-user/libvhost-user.c @@ -816,6 +816,7 @@ vu_rem_mem_reg(VuDev *dev, VhostUserMsg *vmsg) { shadow_regions[j].gpa =3D dev->regions[i].gpa; shadow_regions[j].size =3D dev->regions[i].size; shadow_regions[j].qva =3D dev->regions[i].qva; + shadow_regions[j].mmap_addr =3D dev->regions[i].mmap_addr; shadow_regions[j].mmap_offset =3D dev->regions[i].mmap_offset; j++; } else { --=20 MST From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634644007961135.85399483070069; Tue, 19 Oct 2021 04:46:47 -0700 (PDT) Received: from localhost ([::1]:38340 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcnZu-0003bp-Rd for importer@patchew.org; Tue, 19 Oct 2021 07:46:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50546) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnB0-0000Sp-Ay for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:21:02 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:43657) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAp-0002YN-CF for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:21:01 -0400 Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-91-no8vIeHGN6ik7DeQdvUndA-1; Tue, 19 Oct 2021 07:20:47 -0400 Received: by mail-ed1-f72.google.com with SMTP id t28-20020a508d5c000000b003dad7fc5caeso94527edt.11 for ; Tue, 19 Oct 2021 04:20:47 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id w3sm29382edj.63.2021.10.19.04.20.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:20:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642449; h=from:from: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=EpF7at57/5nWwGoTd9m+XJz9rpHOa+ik4ru0SH8rVvg=; b=cYiKD8yzBd+zCx3V3Y1Vrls0dMgTcAZVx7SW8HynJbyPIJ3eqVPgraCDyo5oYKcY05w77L 0lwwrm8TGMKr06owolkcEeBSLhSjMr4k1T29c46IrGS3kmrsogRp8hHBMhdlBEnF/IA9P7 tU+uE8m9xKp1lCQe9RZvnLPs8doc2PY= X-MC-Unique: no8vIeHGN6ik7DeQdvUndA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=EpF7at57/5nWwGoTd9m+XJz9rpHOa+ik4ru0SH8rVvg=; b=Ipc+0cIMUqJ6rRYm7S2bskfMdt2zV6x39EBKIl45fNVwskBpAM/JeDPDVZw8pR5a66 jT99YfwNwPM19xWzJtqasrvu8nM+y0gDOLUJ7VvJ8/BxinNvGHySB2+ZNVq8bTUBRu2C /It7ebhM0xj/UJkA0G6JW67nuFlemIPLBm8r4I9dcwCh+zslybI1ahTwm7Z+VIMZH6IK d7vz0pSetfBGyChdYuhOUvNegNdkcwGmgaqKABmSU9PP3iOVeMAOWMh6eNux894aJwTB kfU+WqGmeuZTzjBnPyvNlMe0BNj6tM4NLYmYCFFjl8RkGYwAGjS7BNObU9WNKftuYBPG w/sg== X-Gm-Message-State: AOAM531gpZiORWeJms4vCqDewJTtXzKIBQPRJAIPGx/HXRjdCSI/szFs /124i2GTaHUPHJeJyp8RBZ28baLpqGWmBgb2z/nyiljOGuJQv4gZ78KPaAnvSYyFTTTUWu8bbmg C1Nmq5OYTQpPPK0ns8a9AD1Rh2wMGq60+TYNVlWwAr8f7EWvVerBrkFUBEMP4 X-Received: by 2002:a17:906:2816:: with SMTP id r22mr37724879ejc.158.1634642446020; Tue, 19 Oct 2021 04:20:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyy18a9+B0snzYiEAgsQysFcQSbTjjeIWmXFGanoJsascXpU1e8SBEzhmtz/wIKnR/v8Qo5DQ== X-Received: by 2002:a17:906:2816:: with SMTP id r22mr37724850ejc.158.1634642445697; Tue, 19 Oct 2021 04:20:45 -0700 (PDT) Date: Tue, 19 Oct 2021 07:20:42 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 22/29] vhost-user-rng: Add vhost-user-rng implementation Message-ID: <20211019111923.679826-23-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, 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: , Cc: Peter Maydell , Alex =?utf-8?Q?Benn=C3=A9e?= , Mathieu Poirier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634644009498100001 From: Mathieu Poirier Introduce a random number generator (RNG) backend that communicates with a vhost-user server to retrieve entropy. That way other VMM that comply with the vhost user protocl can use the same vhost-user daemon without having to write yet another RNG driver. Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Mathieu Poirier Message-Id: <20211012205904.4106769-2-mathieu.poirier@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- include/hw/virtio/vhost-user-rng.h | 33 ++++ hw/virtio/vhost-user-rng.c | 289 +++++++++++++++++++++++++++++ hw/virtio/Kconfig | 5 + hw/virtio/meson.build | 1 + 4 files changed, 328 insertions(+) create mode 100644 include/hw/virtio/vhost-user-rng.h create mode 100644 hw/virtio/vhost-user-rng.c diff --git a/include/hw/virtio/vhost-user-rng.h b/include/hw/virtio/vhost-u= ser-rng.h new file mode 100644 index 0000000000..071539996d --- /dev/null +++ b/include/hw/virtio/vhost-user-rng.h @@ -0,0 +1,33 @@ +/* + * Vhost-user RNG virtio device + * + * Copyright (c) 2021 Mathieu Poirier + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef _QEMU_VHOST_USER_RNG_H +#define _QEMU_VHOST_USER_RNG_H + +#include "hw/virtio/virtio.h" +#include "hw/virtio/vhost.h" +#include "hw/virtio/vhost-user.h" +#include "chardev/char-fe.h" + +#define TYPE_VHOST_USER_RNG "vhost-user-rng" +OBJECT_DECLARE_SIMPLE_TYPE(VHostUserRNG, VHOST_USER_RNG) + +struct VHostUserRNG { + /*< private >*/ + VirtIODevice parent; + CharBackend chardev; + struct vhost_virtqueue *vhost_vq; + struct vhost_dev vhost_dev; + VhostUserState vhost_user; + VirtQueue *req_vq; + bool connected; + + /*< public >*/ +}; + +#endif /* _QEMU_VHOST_USER_RNG_H */ diff --git a/hw/virtio/vhost-user-rng.c b/hw/virtio/vhost-user-rng.c new file mode 100644 index 0000000000..209ee5bf9a --- /dev/null +++ b/hw/virtio/vhost-user-rng.c @@ -0,0 +1,289 @@ +/* + * Vhost-user RNG virtio device + * + * Copyright (c) 2021 Mathieu Poirier + * + * Implementation seriously tailored on vhost-user-i2c.c + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "hw/qdev-properties.h" +#include "hw/virtio/virtio-bus.h" +#include "hw/virtio/vhost-user-rng.h" +#include "qemu/error-report.h" +#include "standard-headers/linux/virtio_ids.h" + +static void vu_rng_start(VirtIODevice *vdev) +{ + VHostUserRNG *rng =3D VHOST_USER_RNG(vdev); + BusState *qbus =3D BUS(qdev_get_parent_bus(DEVICE(vdev))); + VirtioBusClass *k =3D VIRTIO_BUS_GET_CLASS(qbus); + int ret; + int i; + + if (!k->set_guest_notifiers) { + error_report("binding does not support guest notifiers"); + return; + } + + ret =3D vhost_dev_enable_notifiers(&rng->vhost_dev, vdev); + if (ret < 0) { + error_report("Error enabling host notifiers: %d", -ret); + return; + } + + ret =3D k->set_guest_notifiers(qbus->parent, rng->vhost_dev.nvqs, true= ); + if (ret < 0) { + error_report("Error binding guest notifier: %d", -ret); + goto err_host_notifiers; + } + + rng->vhost_dev.acked_features =3D vdev->guest_features; + ret =3D vhost_dev_start(&rng->vhost_dev, vdev); + if (ret < 0) { + error_report("Error starting vhost-user-rng: %d", -ret); + goto err_guest_notifiers; + } + + /* + * guest_notifier_mask/pending not used yet, so just unmask + * everything here. virtio-pci will do the right thing by + * enabling/disabling irqfd. + */ + for (i =3D 0; i < rng->vhost_dev.nvqs; i++) { + vhost_virtqueue_mask(&rng->vhost_dev, vdev, i, false); + } + + return; + +err_guest_notifiers: + k->set_guest_notifiers(qbus->parent, rng->vhost_dev.nvqs, false); +err_host_notifiers: + vhost_dev_disable_notifiers(&rng->vhost_dev, vdev); +} + +static void vu_rng_stop(VirtIODevice *vdev) +{ + VHostUserRNG *rng =3D VHOST_USER_RNG(vdev); + BusState *qbus =3D BUS(qdev_get_parent_bus(DEVICE(vdev))); + VirtioBusClass *k =3D VIRTIO_BUS_GET_CLASS(qbus); + int ret; + + if (!k->set_guest_notifiers) { + return; + } + + vhost_dev_stop(&rng->vhost_dev, vdev); + + ret =3D k->set_guest_notifiers(qbus->parent, rng->vhost_dev.nvqs, fals= e); + if (ret < 0) { + error_report("vhost guest notifier cleanup failed: %d", ret); + return; + } + + vhost_dev_disable_notifiers(&rng->vhost_dev, vdev); +} + +static void vu_rng_set_status(VirtIODevice *vdev, uint8_t status) +{ + VHostUserRNG *rng =3D VHOST_USER_RNG(vdev); + bool should_start =3D status & VIRTIO_CONFIG_S_DRIVER_OK; + + if (!vdev->vm_running) { + should_start =3D false; + } + + if (rng->vhost_dev.started =3D=3D should_start) { + return; + } + + if (should_start) { + vu_rng_start(vdev); + } else { + vu_rng_stop(vdev); + } +} + +static uint64_t vu_rng_get_features(VirtIODevice *vdev, + uint64_t requested_features, Error **e= rrp) +{ + /* No feature bits used yet */ + return requested_features; +} + +static void vu_rng_handle_output(VirtIODevice *vdev, VirtQueue *vq) +{ + /* + * Not normally called; it's the daemon that handles the queue; + * however virtio's cleanup path can call this. + */ +} + +static void vu_rng_guest_notifier_mask(VirtIODevice *vdev, int idx, bool m= ask) +{ + VHostUserRNG *rng =3D VHOST_USER_RNG(vdev); + + vhost_virtqueue_mask(&rng->vhost_dev, vdev, idx, mask); +} + +static bool vu_rng_guest_notifier_pending(VirtIODevice *vdev, int idx) +{ + VHostUserRNG *rng =3D VHOST_USER_RNG(vdev); + + return vhost_virtqueue_pending(&rng->vhost_dev, idx); +} + +static void vu_rng_connect(DeviceState *dev) +{ + VirtIODevice *vdev =3D VIRTIO_DEVICE(dev); + VHostUserRNG *rng =3D VHOST_USER_RNG(vdev); + + if (rng->connected) { + return; + } + + rng->connected =3D true; + + /* restore vhost state */ + if (virtio_device_started(vdev, vdev->status)) { + vu_rng_start(vdev); + } +} + +static void vu_rng_disconnect(DeviceState *dev) +{ + VirtIODevice *vdev =3D VIRTIO_DEVICE(dev); + VHostUserRNG *rng =3D VHOST_USER_RNG(vdev); + + if (!rng->connected) { + return; + } + + rng->connected =3D false; + + if (rng->vhost_dev.started) { + vu_rng_stop(vdev); + } +} + +static void vu_rng_event(void *opaque, QEMUChrEvent event) +{ + DeviceState *dev =3D opaque; + + switch (event) { + case CHR_EVENT_OPENED: + vu_rng_connect(dev); + break; + case CHR_EVENT_CLOSED: + vu_rng_disconnect(dev); + break; + case CHR_EVENT_BREAK: + case CHR_EVENT_MUX_IN: + case CHR_EVENT_MUX_OUT: + /* Ignore */ + break; + } +} + +static void vu_rng_device_realize(DeviceState *dev, Error **errp) +{ + VirtIODevice *vdev =3D VIRTIO_DEVICE(dev); + VHostUserRNG *rng =3D VHOST_USER_RNG(dev); + int ret; + + if (!rng->chardev.chr) { + error_setg(errp, "missing chardev"); + return; + } + + if (!vhost_user_init(&rng->vhost_user, &rng->chardev, errp)) { + return; + } + + virtio_init(vdev, "vhost-user-rng", VIRTIO_ID_RNG, 0); + + rng->req_vq =3D virtio_add_queue(vdev, 4, vu_rng_handle_output); + if (!rng->req_vq) { + error_setg_errno(errp, -1, "virtio_add_queue() failed"); + goto virtio_add_queue_failed; + } + + rng->vhost_dev.nvqs =3D 1; + rng->vhost_dev.vqs =3D g_new0(struct vhost_virtqueue, rng->vhost_dev.n= vqs); + ret =3D vhost_dev_init(&rng->vhost_dev, &rng->vhost_user, + VHOST_BACKEND_TYPE_USER, 0, errp); + if (ret < 0) { + error_setg_errno(errp, -ret, "vhost_dev_init() failed"); + goto vhost_dev_init_failed; + } + + qemu_chr_fe_set_handlers(&rng->chardev, NULL, NULL, vu_rng_event, NULL, + dev, NULL, true); + + return; + +vhost_dev_init_failed: + virtio_delete_queue(rng->req_vq); +virtio_add_queue_failed: + virtio_cleanup(vdev); + vhost_user_cleanup(&rng->vhost_user); +} + +static void vu_rng_device_unrealize(DeviceState *dev) +{ + VirtIODevice *vdev =3D VIRTIO_DEVICE(dev); + VHostUserRNG *rng =3D VHOST_USER_RNG(dev); + + vu_rng_set_status(vdev, 0); + + vhost_dev_cleanup(&rng->vhost_dev); + g_free(rng->vhost_dev.vqs); + rng->vhost_dev.vqs =3D NULL; + virtio_delete_queue(rng->req_vq); + virtio_cleanup(vdev); + vhost_user_cleanup(&rng->vhost_user); +} + +static const VMStateDescription vu_rng_vmstate =3D { + .name =3D "vhost-user-rng", + .unmigratable =3D 1, +}; + +static Property vu_rng_properties[] =3D { + DEFINE_PROP_CHR("chardev", VHostUserRNG, chardev), + DEFINE_PROP_END_OF_LIST(), +}; + +static void vu_rng_class_init(ObjectClass *klass, void *data) +{ + DeviceClass *dc =3D DEVICE_CLASS(klass); + VirtioDeviceClass *vdc =3D VIRTIO_DEVICE_CLASS(klass); + + device_class_set_props(dc, vu_rng_properties); + dc->vmsd =3D &vu_rng_vmstate; + set_bit(DEVICE_CATEGORY_INPUT, dc->categories); + + vdc->realize =3D vu_rng_device_realize; + vdc->unrealize =3D vu_rng_device_unrealize; + vdc->get_features =3D vu_rng_get_features; + vdc->set_status =3D vu_rng_set_status; + vdc->guest_notifier_mask =3D vu_rng_guest_notifier_mask; + vdc->guest_notifier_pending =3D vu_rng_guest_notifier_pending; +} + +static const TypeInfo vu_rng_info =3D { + .name =3D TYPE_VHOST_USER_RNG, + .parent =3D TYPE_VIRTIO_DEVICE, + .instance_size =3D sizeof(VHostUserRNG), + .class_init =3D vu_rng_class_init, +}; + +static void vu_rng_register_types(void) +{ + type_register_static(&vu_rng_info); +} + +type_init(vu_rng_register_types) diff --git a/hw/virtio/Kconfig b/hw/virtio/Kconfig index 35ab45e209..c144d42f9b 100644 --- a/hw/virtio/Kconfig +++ b/hw/virtio/Kconfig @@ -63,3 +63,8 @@ config VHOST_USER_I2C bool default y depends on VIRTIO && VHOST_USER + +config VHOST_USER_RNG + bool + default y + depends on VIRTIO && VHOST_USER diff --git a/hw/virtio/meson.build b/hw/virtio/meson.build index bc352a6009..ae6b2cde10 100644 --- a/hw/virtio/meson.build +++ b/hw/virtio/meson.build @@ -27,6 +27,7 @@ virtio_ss.add(when: 'CONFIG_VIRTIO_IOMMU', if_true: files= ('virtio-iommu.c')) virtio_ss.add(when: 'CONFIG_VIRTIO_MEM', if_true: files('virtio-mem.c')) virtio_ss.add(when: 'CONFIG_VHOST_USER_I2C', if_true: files('vhost-user-i2= c.c')) virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_I2C'], if_tru= e: files('vhost-user-i2c-pci.c')) +virtio_ss.add(when: 'CONFIG_VHOST_USER_RNG', if_true: files('vhost-user-rn= g.c')) =20 virtio_pci_ss =3D ss.source_set() virtio_pci_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock-= pci.c')) --=20 MST From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634644167307931.9207885249755; Tue, 19 Oct 2021 04:49:27 -0700 (PDT) Received: from localhost ([::1]:42946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcncT-0006up-Ur for importer@patchew.org; Tue, 19 Oct 2021 07:49:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50544) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnB0-0000S6-1y for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:21:02 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:36994) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAr-0002Zp-26 for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:21:01 -0400 Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-592-Dp5_xeQMNKmbCSmJ5YlS0g-1; Tue, 19 Oct 2021 07:20:50 -0400 Received: by mail-ed1-f72.google.com with SMTP id a3-20020a50da43000000b003dca31dcfc2so861058edk.14 for ; Tue, 19 Oct 2021 04:20:50 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id e23sm10812705edq.88.2021.10.19.04.20.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:20:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642451; h=from:from: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=jYEn3VZIxvZ4Dxo5UlkZgMWK5p2ofZWjA/KPLo/RDe4=; b=YWz0fCYB7PR4aiMdWseeJ9WisfaSXeAhkWBT2U3Z5EyXSmsm6D5oKjPmhKQDuB+JHG/9Yi rMyKIzxFl8LFjlWmwthPTAU3sp82KomBcgHxsZHpTWfhIUix9LxY2a/UoDbolbupYeHfwx 5R/n7hSvWGtQDc9+fHeUzH1mmo2rMpg= X-MC-Unique: Dp5_xeQMNKmbCSmJ5YlS0g-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=jYEn3VZIxvZ4Dxo5UlkZgMWK5p2ofZWjA/KPLo/RDe4=; b=6YuXBMCt1Fn0if4JGmmFhRSMX4+YBxqak+I8AgaQej6yiXM4+m0TIR6ZLE7NpGzL/x sus9HgPXqGmMO/qlv6HqjrRMdySNgTeRX5OfqXLdv+uaGKropA8eIuzZBLckLneTNze4 SVQZsEK90IKKrV/9EeOMCkNoCugq19hlgxrtUS3AIWmYiPej5TAvetLab5sSRSbXu74/ mUUJkBcQ5UzEFCt7qxWmOlP1djpo807RQJ5y+ZHd6XFpmXHN0tTQyVxOVY8H03CkgUgz VSbErH4Gb7GKA4emx65o5ZXy/tMXqtvR1gu0G9qb1oBevHZznAYaH2CZ/uCDeiZhLv5f f1wg== X-Gm-Message-State: AOAM531QuydLl1fcKzKb4052jbWWcG0xtEvSUf6D9VWriv5xYUB4SWdP Qg+1gkbwIP+TYzBDuC9Bl0I4ceuJnH3PyY+PLv1qhSw8KJH0TM7AdanUKVONbNKTyrggV+gLUAz jj8Yn9DRlvGiElkRbanKPVPyLY4h9xBIN9CQMZrcg+fQBn5aJ8nEo5I8SzFzk X-Received: by 2002:a17:907:9870:: with SMTP id ko16mr38608639ejc.99.1634642448762; Tue, 19 Oct 2021 04:20:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4zzMdCvURE69tYMRhKvLAQH670PnYW0yom9rHaTMK4zriWO1Dy/tw00mDie8Rq+JrD5CpbQ== X-Received: by 2002:a17:907:9870:: with SMTP id ko16mr38608596ejc.99.1634642448370; Tue, 19 Oct 2021 04:20:48 -0700 (PDT) Date: Tue, 19 Oct 2021 07:20:46 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 23/29] vhost-user-rng-pci: Add vhost-user-rng-pci implementation Message-ID: <20211019111923.679826-24-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, 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: , Cc: Peter Maydell , Alex =?utf-8?Q?Benn=C3=A9e?= , Mathieu Poirier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634644168979100001 From: Mathieu Poirier This patch provides a PCI bus interface to the vhost-user-rng backend. Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Mathieu Poirier Message-Id: <20211012205904.4106769-3-mathieu.poirier@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- hw/virtio/vhost-user-rng-pci.c | 79 ++++++++++++++++++++++++++++++++++ hw/virtio/meson.build | 1 + 2 files changed, 80 insertions(+) create mode 100644 hw/virtio/vhost-user-rng-pci.c diff --git a/hw/virtio/vhost-user-rng-pci.c b/hw/virtio/vhost-user-rng-pci.c new file mode 100644 index 0000000000..c83dc86813 --- /dev/null +++ b/hw/virtio/vhost-user-rng-pci.c @@ -0,0 +1,79 @@ +/* + * Vhost-user RNG virtio device PCI glue + * + * Copyright (c) 2021 Mathieu Poirier + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "hw/qdev-properties.h" +#include "hw/virtio/vhost-user-rng.h" +#include "virtio-pci.h" + +struct VHostUserRNGPCI { + VirtIOPCIProxy parent_obj; + VHostUserRNG vdev; +}; + +typedef struct VHostUserRNGPCI VHostUserRNGPCI; + +#define TYPE_VHOST_USER_RNG_PCI "vhost-user-rng-pci-base" + +DECLARE_INSTANCE_CHECKER(VHostUserRNGPCI, VHOST_USER_RNG_PCI, + TYPE_VHOST_USER_RNG_PCI) + +static Property vhost_user_rng_pci_properties[] =3D { + DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, + DEV_NVECTORS_UNSPECIFIED), + DEFINE_PROP_END_OF_LIST(), +}; + +static void vhost_user_rng_pci_realize(VirtIOPCIProxy *vpci_dev, Error **e= rrp) +{ + VHostUserRNGPCI *dev =3D VHOST_USER_RNG_PCI(vpci_dev); + DeviceState *vdev =3D DEVICE(&dev->vdev); + + if (vpci_dev->nvectors =3D=3D DEV_NVECTORS_UNSPECIFIED) { + vpci_dev->nvectors =3D 1; + } + + qdev_realize(vdev, BUS(&vpci_dev->bus), errp); +} + +static void vhost_user_rng_pci_class_init(ObjectClass *klass, void *data) +{ + DeviceClass *dc =3D DEVICE_CLASS(klass); + VirtioPCIClass *k =3D VIRTIO_PCI_CLASS(klass); + PCIDeviceClass *pcidev_k =3D PCI_DEVICE_CLASS(klass); + k->realize =3D vhost_user_rng_pci_realize; + set_bit(DEVICE_CATEGORY_INPUT, dc->categories); + device_class_set_props(dc, vhost_user_rng_pci_properties); + pcidev_k->vendor_id =3D PCI_VENDOR_ID_REDHAT_QUMRANET; + pcidev_k->device_id =3D 0; /* Set by virtio-pci based on virtio id */ + pcidev_k->revision =3D 0x00; + pcidev_k->class_id =3D PCI_CLASS_OTHERS; +} + +static void vhost_user_rng_pci_instance_init(Object *obj) +{ + VHostUserRNGPCI *dev =3D VHOST_USER_RNG_PCI(obj); + + virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev), + TYPE_VHOST_USER_RNG); +} + +static const VirtioPCIDeviceTypeInfo vhost_user_rng_pci_info =3D { + .base_name =3D TYPE_VHOST_USER_RNG_PCI, + .non_transitional_name =3D "vhost-user-rng-pci", + .instance_size =3D sizeof(VHostUserRNGPCI), + .instance_init =3D vhost_user_rng_pci_instance_init, + .class_init =3D vhost_user_rng_pci_class_init, +}; + +static void vhost_user_rng_pci_register(void) +{ + virtio_pci_types_register(&vhost_user_rng_pci_info); +} + +type_init(vhost_user_rng_pci_register); diff --git a/hw/virtio/meson.build b/hw/virtio/meson.build index ae6b2cde10..521f7d64a8 100644 --- a/hw/virtio/meson.build +++ b/hw/virtio/meson.build @@ -28,6 +28,7 @@ virtio_ss.add(when: 'CONFIG_VIRTIO_MEM', if_true: files('= virtio-mem.c')) virtio_ss.add(when: 'CONFIG_VHOST_USER_I2C', if_true: files('vhost-user-i2= c.c')) virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_I2C'], if_tru= e: files('vhost-user-i2c-pci.c')) virtio_ss.add(when: 'CONFIG_VHOST_USER_RNG', if_true: files('vhost-user-rn= g.c')) +virtio_ss.add(when: ['CONFIG_VHOST_USER_RNG', 'CONFIG_VIRTIO_PCI'], if_tru= e: files('vhost-user-rng-pci.c')) =20 virtio_pci_ss =3D ss.source_set() virtio_pci_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock-= pci.c')) --=20 MST From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634644332703589.9806657255932; Tue, 19 Oct 2021 04:52:12 -0700 (PDT) Received: from localhost ([::1]:49202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcnf9-00039b-La for importer@patchew.org; Tue, 19 Oct 2021 07:52:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnB4-0000k5-I6 for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:21:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:38190) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAz-0002dS-K7 for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:21:05 -0400 Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-338-PcXqAgkiPV2Y6d7UeInKIA-1; Tue, 19 Oct 2021 07:20:53 -0400 Received: by mail-ed1-f72.google.com with SMTP id v2-20020a50f082000000b003db24e28d59so17255843edl.5 for ; Tue, 19 Oct 2021 04:20:52 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id l23sm10083531ejn.15.2021.10.19.04.20.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:20:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ovgGFzduCrnIeJvjYt5D1svpWOkcO96pV6pxkCNnsKE=; b=e8nIWM32dJSpndpAZYU0iurmtw8oMHL2bo6sHf7dFTlJsXBPJesdVAva08PGsHkBxG27cF WhMI55nzuSpawQbG53ScVtVdLOkK2qNOLiEvt/5Gz3F6cDdyZSmZY6wEk4FODzzskpDI3j zVtxZyqlfytvw1GgVt2NQbDMogRkjPE= X-MC-Unique: PcXqAgkiPV2Y6d7UeInKIA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ovgGFzduCrnIeJvjYt5D1svpWOkcO96pV6pxkCNnsKE=; b=7UH5ow2wDlixb8ogk7QSBsCAdKSq02emFVOaKxHJ3yJ5tSoCj8fWxQqZLLR5ohYayY 8YkYo4IZy1Nkut7thhY9FZe3zCVHkik4hp4L6Zu0WEHvGfZKFFeiXiuUJKDRFJyqy4hC +4hmUd2j2gfDrkCwKkxcjwMOH8rrMqit8fKl3S/hnUThyDVrY8nCBwG0nFzuRan5u0Y5 w0MyVbEdeJZPUtaA1nwyYIbJnghyKeCdj9lWxtLB0n+809q3hMYE1X0UuCtZyFUNZ7w8 o7Rls2BgCut2h5YLCubh00yTtprwTMD4Fbx2v+NAPqjJF7ig+iHp2erINvLMKmzo8I/M Lw+g== X-Gm-Message-State: AOAM53173+9R7Ax+uEP8bE++c5UP1EwgdqpbXA3/5BMlC0zgk3T7j9IO d42u7DdEw078+qxxziLFp8BxS3pjm+7opmmyN3IDyHt7c4kg2l7399sAyggCfuURyjYHyAUOE44 shA6Y6ppHRvOI5uDdqXYrrRxXJOx1LE0z6Cy2xxeHGbNI5+frE5agapBdmcCV X-Received: by 2002:a05:6402:5252:: with SMTP id t18mr51337789edd.129.1634642451436; Tue, 19 Oct 2021 04:20:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyewMuWocjk0/FD+gTzUsib4hz1UpWS737TqpTyqr2q4vpzGyoKpnflaXRZWTGRWYgDbzmdUA== X-Received: by 2002:a05:6402:5252:: with SMTP id t18mr51337756edd.129.1634642451166; Tue, 19 Oct 2021 04:20:51 -0700 (PDT) Date: Tue, 19 Oct 2021 07:20:48 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 24/29] docs: Add documentation for vhost based RNG implementation Message-ID: <20211019111923.679826-25-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, 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: , Cc: Peter Maydell , Alex =?utf-8?Q?Benn=C3=A9e?= , Stefan Hajnoczi , Mathieu Poirier , Markus Armbruster Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634644334159100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Mathieu Poirier Add description and example for the vhost-user based RNG implementation. Signed-off-by: Mathieu Poirier Message-Id: <20211012205904.4106769-4-mathieu.poirier@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- docs/system/device-emulation.rst | 1 + docs/system/devices/vhost-user-rng.rst | 39 ++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 docs/system/devices/vhost-user-rng.rst diff --git a/docs/system/device-emulation.rst b/docs/system/device-emulatio= n.rst index 7afcfd8064..19944f526c 100644 --- a/docs/system/device-emulation.rst +++ b/docs/system/device-emulation.rst @@ -88,3 +88,4 @@ Emulated Devices devices/usb.rst devices/vhost-user.rst devices/virtio-pmem.rst + devices/vhost-user-rng.rst diff --git a/docs/system/devices/vhost-user-rng.rst b/docs/system/devices/v= host-user-rng.rst new file mode 100644 index 0000000000..a145d4105c --- /dev/null +++ b/docs/system/devices/vhost-user-rng.rst @@ -0,0 +1,39 @@ +QEMU vhost-user-rng - RNG emulation +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +Background +---------- + +What follows builds on the material presented in vhost-user.rst - it should +be reviewed before moving forward with the content in this file. + +Description +----------- + +The vhost-user-rng device implementation was designed to work with a random +number generator daemon such as the one found in the vhost-device crate of +the rust-vmm project available on github [1]. + +[1]. https://github.com/rust-vmm/vhost-device + +Examples +-------- + +The daemon should be started first: + +:: + + host# vhost-device-rng --socket-path=3Drng.sock -c 1 -m 512 -p 1000 + +The QEMU invocation needs to create a chardev socket the device can +use to communicate as well as share the guests memory over a memfd. + +:: + + host# qemu-system \ + -chardev socket,path=3D$(PATH)/rng.sock,id=3Drng0 \ + -device vhost-user-rng-pci,chardev=3Drng0 \ + -m 4096 \ + -object memory-backend-file,id=3Dmem,size=3D4G,mem-path=3D/dev/shm,s= hare=3Don \ + -numa node,memdev=3Dmem \ + ... --=20 MST From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634643773530357.74171328863656; Tue, 19 Oct 2021 04:42:53 -0700 (PDT) Received: from localhost ([::1]:58846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcnW8-0006e6-8S for importer@patchew.org; Tue, 19 Oct 2021 07:42:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50594) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnB3-0000f3-3Z for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:21:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:47504) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAz-0002dJ-KA for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:21:03 -0400 Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-155-nUhennd1N_CcEJD_XmpiqA-1; Tue, 19 Oct 2021 07:20:56 -0400 Received: by mail-ed1-f70.google.com with SMTP id u17-20020a50d511000000b003daa3828c13so17257495edi.12 for ; Tue, 19 Oct 2021 04:20:55 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id h10sm603745edk.41.2021.10.19.04.20.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:20:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8WUvKS8fdXJA9x2sA/adDQPr/E4an91R5a8EOdVOfhc=; b=FhcreCOYH0R79ocuZ2rtQ7A956zqHITB1TiiuWYm6wrEi86q9hEv4ZSyykMvg+70uU95jp 1YIjQOhiAOBUPZTSI3og+uayla+qfVpwmptba1kOMBmOPXErEedH4ldK6Sqc6zhf4ow/+n xTO1sAAjcWwAsLY+uUIzPssio+cdI2I= X-MC-Unique: nUhennd1N_CcEJD_XmpiqA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=8WUvKS8fdXJA9x2sA/adDQPr/E4an91R5a8EOdVOfhc=; b=o/S07QQOnKMooVWNzjaB6KXHNtwwBrvePxHhGkrTnLR1D5lBkYsZsXOV1JgCZNNCMt gZBP78qefXgfXvhEq+h3934yT0xb3N/fsthrzovnysbHO6roVIUOkPv7DnOorJjCnFT2 BTgoEOKUmYQy3Y7LyE+njVrNM3UfwmL1Z3OYqzTTwAkNfR4OxbaXPskjACz7nOpqHjiA 8XyRYmTypph01BtUcAmS2reFSTMiTk2zrFjEx4mC80EI5TqazspSK8mgrUWh+DNO4f0d LSEgbKZgQLVQy9kAAd7cW4QvtoKV/IM97EMonOPKxnEvm7qXGIzMpH0nHlhceUwmhCuB lJkw== X-Gm-Message-State: AOAM531wksYBZ58WULKi71dCdK0MlTe+Wyjyue8W/sXk6jVsYRpan9Uw 8giyhlqQWKAmUPk9KWJ8yZTdLe+qauL8CcVmwzM2a3WraJOC3IX+uvs/KJaInGxL8lgzmV4Neat 3IQ24/j3bqLFE2L/O6D+awp2SpUo+soCdFTPtkkb03tSqBBmu//DVelA4LmxG X-Received: by 2002:a17:907:2156:: with SMTP id rk22mr36578443ejb.64.1634642454506; Tue, 19 Oct 2021 04:20:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHgjdXgVhdMwdjXL8JesTPdNM4H1aKPo9EEvo/JLVNBA62Ogcaa7cXfLn6l5AsDTTBpgOGHg== X-Received: by 2002:a17:907:2156:: with SMTP id rk22mr36578423ejb.64.1634642454332; Tue, 19 Oct 2021 04:20:54 -0700 (PDT) Date: Tue, 19 Oct 2021 07:20:51 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 25/29] vhost-user: fix duplicated notifier MR init Message-ID: <20211019111923.679826-26-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, 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: , Cc: Yuwei Zhang , Peter Maydell , tiwei.bie@intel.com, Xueming Li , qemu-stable@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634643774930100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Xueming Li In case of device resume after suspend, VQ notifier MR still valid. Duplicated registrations explode memory block list and slow down device resume. Fixes: 44866521bd6e ("vhost-user: support registering external host notifie= rs") Cc: tiwei.bie@intel.com Cc: qemu-stable@nongnu.org Cc: Yuwei Zhang Signed-off-by: Xueming Li Message-Id: <20211008080215.590292-1-xuemingl@nvidia.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- hw/virtio/vhost-user.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 2c8556237f..bf6e50223c 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -1526,8 +1526,9 @@ static int vhost_user_slave_handle_vring_host_notifie= r(struct vhost_dev *dev, =20 name =3D g_strdup_printf("vhost-user/host-notifier@%p mmaps[%d]", user, queue_idx); - memory_region_init_ram_device_ptr(&n->mr, OBJECT(vdev), name, - page_size, addr); + if (!n->mr.ram) /* Don't init again after suspend. */ + memory_region_init_ram_device_ptr(&n->mr, OBJECT(vdev), name, + page_size, addr); g_free(name); =20 if (virtio_queue_set_host_notifier_mr(vdev, queue_idx, &n->mr, true)) { --=20 MST From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634643985248500.5843368685055; Tue, 19 Oct 2021 04:46:25 -0700 (PDT) Received: from localhost ([::1]:36988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcnZY-0002hI-5b for importer@patchew.org; Tue, 19 Oct 2021 07:46:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnB4-0000k0-I1 for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:21:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:58286) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnAz-0002dY-Jr for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:21:05 -0400 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-247-Y2N7kzKqNcaIcdwph9nDVw-1; Tue, 19 Oct 2021 07:20:58 -0400 Received: by mail-ed1-f69.google.com with SMTP id t18-20020a056402021200b003db9e6b0e57so17279763edv.10 for ; Tue, 19 Oct 2021 04:20:58 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id z16sm12587693edb.16.2021.10.19.04.20.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:20:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MJsmD3QRv8SGmtAedpltN89f3tDK3M7g7adwY4lsG8s=; b=aex6FmnYso9lXU72Qsi2XrrJVeVPluSS6dI3BOYE5pOiC94yD8MwynFEiMCZHKFRxeIyYJ KqVXfuNIvvWRlPImAb3/pfik/UejvrSm6tI33GThBSMILKtvndnFOHgaWSUfgRgPN+tc8Z tcr8UKdmJO3uxBDtjZbmKQyZGDmePPE= X-MC-Unique: Y2N7kzKqNcaIcdwph9nDVw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=MJsmD3QRv8SGmtAedpltN89f3tDK3M7g7adwY4lsG8s=; b=4CyA5M3EpoJbPg8gB0tCQGsC7i4K5tD2LohBcAlc7ALXQ6IL+zq8XNwzgrR571dLuO DNrqmaBHSlAGuFA8NW3MGbqDktwDkcmdWxlj2YzQaDlubIXftJ8VjNHFl+/ojQyxC8Ts KFQDnV3HdeOXCBPxkUD75Z9IGANG9IE4qh40ZhibptEb3kSmn54F/nvLWlI6RgbjVLn3 t136cvmet2pRsjh2aq1qm3jR7A+PYpE+AOgcnuNuvFzlNr9pve3a5LYh5j3RZQLYob3a q6ln0R/0PDyaCcPgFWlN6D2YcVn7gtWv0VrvN2R+gCG/dY/u8x/9oQGlMDoHFc63J0Uk GYaQ== X-Gm-Message-State: AOAM533kR1vWE+0ZLf3iFopaML4MBAVcfN16xpfp9tlLRmAW8mKFNO6N M/rTH2Mo6SoxcSbCalNoZ10Rx/YtVm1xioc8NP1l7MAKsDdFDrI6+5amheT1GmyXBks8J10jWxH DGsFH9lBQn76kekKwF7QpEJ2yZEh10hTjg2KpMbq88kTayAtnSTgFx9QINxby X-Received: by 2002:a05:6402:51cf:: with SMTP id r15mr53206918edd.60.1634642457396; Tue, 19 Oct 2021 04:20:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqlkIqAq6GDv1qipgX2y6zlOYCAoVlxxDBwwkKg933H9hoYiBUlw6nY3fVQsjrdtzdfnPC+g== X-Received: by 2002:a05:6402:51cf:: with SMTP id r15mr53206884edd.60.1634642457126; Tue, 19 Oct 2021 04:20:57 -0700 (PDT) Date: Tue, 19 Oct 2021 07:20:54 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 26/29] tests/acpi/bios-tables-test: add and allow changes to a new q35 DSDT table blob Message-ID: <20211019111923.679826-27-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, 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: , Cc: Ani Sinha , Peter Maydell , Igor Mammedov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634643987199100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Ani Sinha We are adding a new unit test to cover the acpi hotplug support in q35 for multi-function bridges. This test uses a new table DSDT.multi-bridge. We need to allow changes in DSDT acpi table for addition of this new unit test. Signed-off-by: Ani Sinha Message-Id: <20211007135750.1277213-2-ani@anisinha.ca> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Acked-by: Igor Mammedov Reviewed-by: Marcel Apfelbaum --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + tests/data/acpi/q35/DSDT.multi-bridge | 0 2 files changed, 1 insertion(+) create mode 100644 tests/data/acpi/q35/DSDT.multi-bridge diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index dfb8523c8b..dabc024f53 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,2 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/q35/DSDT.multi-bridge", diff --git a/tests/data/acpi/q35/DSDT.multi-bridge b/tests/data/acpi/q35/DS= DT.multi-bridge new file mode 100644 index 0000000000..e69de29bb2 --=20 MST From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634644558243364.46108828694946; Tue, 19 Oct 2021 04:55:58 -0700 (PDT) Received: from localhost ([::1]:55760 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcnin-0007cX-0E for importer@patchew.org; Tue, 19 Oct 2021 07:55:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50628) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnB6-0000pd-D7 for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:21:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:60449) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnB3-0002hY-OT for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:21:08 -0400 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-3-9YQMhya5OpSA6p5tD58wyQ-1; Tue, 19 Oct 2021 07:21:02 -0400 Received: by mail-ed1-f69.google.com with SMTP id cy14-20020a0564021c8e00b003db8c9a6e30so17281094edb.1 for ; Tue, 19 Oct 2021 04:21:01 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id f12sm9453007ejl.5.2021.10.19.04.20.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:20:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642463; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=WgrR0Zghvri1HvC/D72yLegW0CPP8va+3B8LqMlf3so=; b=iJ0T5n+6ABhgIEm9Lk7p8shV9B+6R9qhBnuIOrDAZsXXBDbh5wA8CgqhKv/gz/QaN/MUfx NQ3O8hpVoAQ+SAEdnl8j5hRiBiMOujarUga2/wkuyhNnxlJsgrZRsHr6hBvYfAFgEsvQqR 1POpoToWthFZWwoAyBf97aFYk4wtZbk= X-MC-Unique: 9YQMhya5OpSA6p5tD58wyQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=WgrR0Zghvri1HvC/D72yLegW0CPP8va+3B8LqMlf3so=; b=gGi2B3r7FDQsRPojuDu3JnNibNMI4p6ieHM6Vz1CWEgDamro4DYAeCKu+BtknLuvue 8gJS1eP+d/ryyWQeOUvSOT6gRczCrD5q0bkCbSLHe9FB/FKBms+sXdroMfJdDazOfZBi XD9D79XyJ7m8VpuPdedsghABu0vXg1pACTgDRwaYjMqWZ+LDFAgQi65/Mdz1TbFlUlhA 1wGYRudedj3vHgQmIV74oFdhjpODUn+VY6dwgSPzzuqeGSQJFwMmh0cmo03B5Er/oKyN yBVj5nqycM/6m/wrldLtY/Gsn4knUYmguUTf5jEOHr0ls+uyjBlQhVC4PYv/bIXWRyrt xkiA== X-Gm-Message-State: AOAM531sKrrMHO5AiZiNrXmvPwenW/0UVBMzAbeNr8E2K9VxylpoZdaE G6gRZiivRFsOBmxe8A/A+whU7aCQSuW5AWY8SaDNl5ehtGYra2AwfpbMED7v8viGHwqCVw4waCH 8Qs2GkVqWAxPu4GLcAgSzgCPuzbV1R9Ao+Ajr8TES3ko5GSzDLu2uZdz+kZLI X-Received: by 2002:a50:9e02:: with SMTP id z2mr53248320ede.12.1634642460467; Tue, 19 Oct 2021 04:21:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWZi/JswTCfkAV+2c09DeMipr4boTtpR2YFi0JfGDVACAMFEEUQrCR3QbE6yJG0k6S0zV87A== X-Received: by 2002:a50:9e02:: with SMTP id z2mr53248286ede.12.1634642460183; Tue, 19 Oct 2021 04:21:00 -0700 (PDT) Date: Tue, 19 Oct 2021 07:20:57 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 27/29] tests/acpi/pcihp: add unit tests for hotplug on multifunction bridges for q35 Message-ID: <20211019111923.679826-28-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=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: , Cc: Ani Sinha , Peter Maydell , Igor Mammedov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634644558968100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Ani Sinha commit d7346e614f4ec ("acpi: x86: pcihp: add support hotplug on multifuncti= on bridges") added ACPI hotplug descriptions for cold plugged bridges for functions other than 0. For all other devices, the ACPI hotplug descriptions are limited to function 0 only. This change adds unit tests for this feature. This test adds the following devices to qemu and then checks the changes introduced in the DSDT table due to the addition of the following devices: (a) a multifunction bridge device (b) a bridge device with function 1 (c) a non-bridge device with function 2 In the DSDT table, we should see AML hotplug descriptions for (a) and (b). For (a) we should find a hotplug AML description for function 0. The following diff compares the DSDT table AML with the new unit test before and after the change d7346e614f4ec is introduced. In other words, this diff reflects the changes that occurs in the DSDT table due to the cha= nge d7346e614f4ec . @@ -1,60 +1,38 @@ /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20190509 (64-bit version) * Copyright (c) 2000 - 2019 Intel Corporation * * Disassembling to symbolic ASL+ operators * - * Disassembly of tests/data/acpi/q35/DSDT.multi-bridge, Thu Oct 7 18:56:= 05 2021 + * Disassembly of /tmp/aml-AN0DA1, Thu Oct 7 18:56:05 2021 * * Original Table Header: * Signature "DSDT" - * Length 0x000020FE (8446) + * Length 0x00002187 (8583) * Revision 0x01 **** 32-bit table (V1), no 64-bit math support - * Checksum 0xDE + * Checksum 0x8D * OEM ID "BOCHS " * OEM Table ID "BXPC " * OEM Revision 0x00000001 (1) * Compiler ID "BXPC" * Compiler Version 0x00000001 (1) */ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC ", 0x00000001) { - /* - * iASL Warning: There was 1 external control method found during - * disassembly, but only 0 were resolved (1 unresolved). Additional - * ACPI tables may be required to properly disassemble the code. This - * resulting disassembler output file may not compile because the - * disassembler did not know how many arguments to assign to the - * unresolved methods. Note: SSDTs can be dynamically loaded at - * runtime and may or may not be available via the host OS. - * - * In addition, the -fe option can be used to specify a file containing - * control method external declarations with the associated method - * argument counts. Each line of the file must be of the form: - * External (, MethodObj, ) - * Invocation: - * iasl -fe refs.txt -d dsdt.aml - * - * The following methods were unresolved and many not compile properly - * because the disassembler had to guess at the number of arguments - * required for each: - */ - External (_SB_.PCI0.S19_.PCNT, MethodObj) // Warning: Unknown metho= d, guessing 1 arguments - Scope (\) { OperationRegion (DBG, SystemIO, 0x0402, One) Field (DBG, ByteAcc, NoLock, Preserve) { DBGB, 8 } Method (DBUG, 1, NotSerialized) { ToHexString (Arg0, Local0) ToBuffer (Local0, Local0) Local1 =3D (SizeOf (Local0) - One) Local2 =3D Zero While ((Local2 < Local1)) { @@ -3322,24 +3300,60 @@ Method (DVNT, 2, NotSerialized) { If ((Arg0 & One)) { Notify (S00, Arg1) } } Method (PCNT, 0, NotSerialized) { BNUM =3D One DVNT (PCIU, One) DVNT (PCID, 0x03) } } + Device (S19) + { + Name (_ADR, 0x00030001) // _ADR: Address + Name (BSEL, Zero) + Device (S00) + { + Name (_SUN, Zero) // _SUN: Slot User Number + Name (_ADR, Zero) // _ADR: Address + Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device= , x=3D0-9 + { + PCEJ (BSEL, _SUN) + } + + Method (_DSM, 4, Serialized) // _DSM: Device-Specific= Method + { + Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, _SUN)) + } + } + + Method (DVNT, 2, NotSerialized) + { + If ((Arg0 & One)) + { + Notify (S00, Arg1) + } + } + + Method (PCNT, 0, NotSerialized) + { + BNUM =3D Zero + DVNT (PCIU, One) + DVNT (PCID, 0x03) + } + } + Method (PCNT, 0, NotSerialized) { - ^S19.PCNT (^S10.PCNT ()) + ^S19.PCNT () + ^S10.PCNT () } } } } Signed-off-by: Ani Sinha Message-Id: <20211007135750.1277213-3-ani@anisinha.ca> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Igor Mammedov Reviewed-by: Marcel Apfelbaum --- tests/qtest/bios-tables-test.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 6e21a650d2..a5546180b7 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -852,6 +852,23 @@ static void test_acpi_q35_tcg_bridge(void) free_test_data(&data); } =20 +static void test_acpi_q35_multif_bridge(void) +{ + test_data data =3D { + .machine =3D MACHINE_Q35, + .variant =3D ".multi-bridge", + }; + test_acpi_one("-device pcie-root-port,id=3Dpcie-root-port-0," + "multifunction=3Don," + "port=3D0x0,chassis=3D1,addr=3D0x2,bus=3Dpcie.0 " + "-device pcie-root-port,id=3Dpcie-root-port-1," + "port=3D0x1,chassis=3D2,addr=3D0x3.0x1,bus=3Dpcie.0 " + "-device virtio-balloon,id=3Dballoon0," + "bus=3Dpcie.0,addr=3D0x4.0x2", + &data); + free_test_data(&data); +} + static void test_acpi_q35_tcg_mmio64(void) { test_data data =3D { @@ -1563,6 +1580,7 @@ int main(int argc, char *argv[]) test_acpi_piix4_no_acpi_pci_hotplug); qtest_add_func("acpi/q35", test_acpi_q35_tcg); qtest_add_func("acpi/q35/bridge", test_acpi_q35_tcg_bridge); + qtest_add_func("acpi/q35/multif-bridge", test_acpi_q35_multif_brid= ge); qtest_add_func("acpi/q35/mmio64", test_acpi_q35_tcg_mmio64); qtest_add_func("acpi/piix4/ipmi", test_acpi_piix4_tcg_ipmi); qtest_add_func("acpi/q35/ipmi", test_acpi_q35_tcg_ipmi); --=20 MST From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634643458282807.0052415480676; Tue, 19 Oct 2021 04:37:38 -0700 (PDT) Received: from localhost ([::1]:50672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcnR2-00012b-Ao for importer@patchew.org; Tue, 19 Oct 2021 07:37:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50632) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnBA-0000pf-83 for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:21:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:28561) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnB4-0002iF-To for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:21:11 -0400 Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-244-e2XW7P0WO2y36h4SFdzMqg-1; Tue, 19 Oct 2021 07:21:04 -0400 Received: by mail-ed1-f72.google.com with SMTP id d11-20020a50cd4b000000b003da63711a8aso17197955edj.20 for ; Tue, 19 Oct 2021 04:21:04 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id r22sm10064943ejd.109.2021.10.19.04.21.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:21:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642466; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8YzxcP6eWW0MzKgpH9P2B9MCLwBZUNGvG/OLjjN9aos=; b=GN1CLtCgjET/1kdhAVEvJBtW6nVnuaN8GK1+THMxlhSNCnUvzRXZfeNKbGNJNAOTAvPzrz qAuwOu4UbuZ/JPe4O6M4Uj6JrcBZmyXwT+VkqtYDXDg5qb9sTJAlEsM/Z/ukAbihfgBGzO wcvBsO8FsCq8FwUT8qHZYa+2fwH9wCE= X-MC-Unique: e2XW7P0WO2y36h4SFdzMqg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=8YzxcP6eWW0MzKgpH9P2B9MCLwBZUNGvG/OLjjN9aos=; b=SK+Hz8STIA8QsT5kzWdvReT6AWeuZ0Dkz55f9mRsz1uPBBjJdTF+GxliPRMN+jygQ4 6mmALP1ucPitx7h70hJuHgTVJHRRLVnlACaU15eWHSOHwa5gSXw7TcXse/wCqvenxL7L zsHe5D4hBegrjr4RC12Cz/7ukzvLFkw0rVnXSYq4/ngdAlsoAhJMzYJ/vhzeaOZSpRa4 9gZ/DtwK61bkGPL6HBukxSEQWLc3nQMRKdwfvCFA21SlxU/g1UDaElzZs5X8nDhe6Nd0 L9Ee78YCLLOVx2/vUi0SBqjm08yiivDZzsOpcKWqbVJoGu9AH8DvSlaDAgGpKAEh3XV1 qagg== X-Gm-Message-State: AOAM531YQHUBklVrWcf/eSkhzMPCWlMHxgVaT+u1+LPy3birwpJAPOSJ UY7CqPOzBtrOB7txttsKRke+1UlwBnSn70uMWTCPS73JPhdkIAAZH86xnK6tOlJzgFUjr066D4Q dQtIb9Z8C9I68O27J8WSjBqfI06cVFuG0ciEWefe9vWImyhP1NnnGYqzk3Tas X-Received: by 2002:a17:906:a382:: with SMTP id k2mr35629517ejz.454.1634642463264; Tue, 19 Oct 2021 04:21:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzWxD+gyK0s8ycil+P6j6G/DAkkVQUlhzUv/iPsf85MIdqjUb19PekH2i6MmHX9Jk6MXJUng== X-Received: by 2002:a17:906:a382:: with SMTP id k2mr35629486ejz.454.1634642462966; Tue, 19 Oct 2021 04:21:02 -0700 (PDT) Date: Tue, 19 Oct 2021 07:21:00 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 28/29] tests/acpi/bios-tables-test: update DSDT blob for multifunction bridge test Message-ID: <20211019111923.679826-29-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, 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: , Cc: Ani Sinha , Peter Maydell , Igor Mammedov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634643459111100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Ani Sinha We added a new unit test for testing acpi hotplug on multifunction bridges = in q35 machines. Here, we update the DSDT table gloden master blob for this un= it test. The test adds the following devices to qemu and then checks the changes introduced in the DSDT table due to the addition of the following devices: (a) a multifunction bridge device (b) a bridge device with function 1 (c) a non-bridge device with function 2 In the DSDT table, we should see AML hotplug descriptions for (a) and (b). For (a) we should find a hotplug AML description for function 0. Following is the ASL diff between the original DSDT table and the modified = DSDT table due to the unit test. We see that multifunction bridge on bus 2 and s= ingle function bridge on bus 3 function 1 are described, not the non-bridge ballo= on device on bus 4, function 2. @@ -1,30 +1,30 @@ /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20190509 (64-bit version) * Copyright (c) 2000 - 2019 Intel Corporation * * Disassembling to symbolic ASL+ operators * - * Disassembly of tests/data/acpi/q35/DSDT, Thu Oct 7 18:29:19 2021 + * Disassembly of /tmp/aml-C7JCA1, Thu Oct 7 18:29:19 2021 * * Original Table Header: * Signature "DSDT" - * Length 0x00002061 (8289) + * Length 0x00002187 (8583) * Revision 0x01 **** 32-bit table (V1), no 64-bit math support - * Checksum 0xF9 + * Checksum 0x8D * OEM ID "BOCHS " * OEM Table ID "BXPC " * OEM Revision 0x00000001 (1) * Compiler ID "BXPC" * Compiler Version 0x00000001 (1) */ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC ", 0x00000001) { Scope (\) { OperationRegion (DBG, SystemIO, 0x0402, One) Field (DBG, ByteAcc, NoLock, Preserve) { DBGB, 8 } @@ -3265,23 +3265,95 @@ Method (_S1D, 0, NotSerialized) // _S1D: S1 Device State { Return (Zero) } Method (_S2D, 0, NotSerialized) // _S2D: S2 Device State { Return (Zero) } Method (_S3D, 0, NotSerialized) // _S3D: S3 Device State { Return (Zero) } } + Device (S10) + { + Name (_ADR, 0x00020000) // _ADR: Address + Name (BSEL, One) + Device (S00) + { + Name (_SUN, Zero) // _SUN: Slot User Number + Name (_ADR, Zero) // _ADR: Address + Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device= , x=3D0-9 + { + PCEJ (BSEL, _SUN) + } + + Method (_DSM, 4, Serialized) // _DSM: Device-Specific= Method + { + Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, _SUN)) + } + } + + Method (DVNT, 2, NotSerialized) + { + If ((Arg0 & One)) + { + Notify (S00, Arg1) + } + } + + Method (PCNT, 0, NotSerialized) + { + BNUM =3D One + DVNT (PCIU, One) + DVNT (PCID, 0x03) + } + } + + Device (S19) + { + Name (_ADR, 0x00030001) // _ADR: Address + Name (BSEL, Zero) + Device (S00) + { + Name (_SUN, Zero) // _SUN: Slot User Number + Name (_ADR, Zero) // _ADR: Address + Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device= , x=3D0-9 + { + PCEJ (BSEL, _SUN) + } + + Method (_DSM, 4, Serialized) // _DSM: Device-Specific= Method + { + Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, _SUN)) + } + } + + Method (DVNT, 2, NotSerialized) + { + If ((Arg0 & One)) + { + Notify (S00, Arg1) + } + } + + Method (PCNT, 0, NotSerialized) + { + BNUM =3D Zero + DVNT (PCIU, One) + DVNT (PCID, 0x03) + } + } + Method (PCNT, 0, NotSerialized) { + ^S19.PCNT () + ^S10.PCNT () } } } } Signed-off-by: Ani Sinha Message-Id: <20211007135750.1277213-4-ani@anisinha.ca> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Acked-by: Igor Mammedov Reviewed-by: Marcel Apfelbaum --- tests/qtest/bios-tables-test-allowed-diff.h | 1 - tests/data/acpi/q35/DSDT.multi-bridge | Bin 0 -> 8583 bytes 2 files changed, 1 deletion(-) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index dabc024f53..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/q35/DSDT.multi-bridge", diff --git a/tests/data/acpi/q35/DSDT.multi-bridge b/tests/data/acpi/q35/DS= DT.multi-bridge index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..a24c713d22102a1a1583b5c902e= dffe1694e5cfe 100644 GIT binary patch literal 8583 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 P)}F_He7!|yIezv(me~h+ literal 0 HcmV?d00001 --=20 MST From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634644239922568.3362322134151; Tue, 19 Oct 2021 04:50:39 -0700 (PDT) Received: from localhost ([::1]:45488 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcndZ-0000R1-25 for importer@patchew.org; Tue, 19 Oct 2021 07:50:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnBB-0000py-N1 for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:21:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:44803) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcnB9-0002lK-TY for qemu-devel@nongnu.org; Tue, 19 Oct 2021 07:21:13 -0400 Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-520-bnw1rc2KMZiOuoClS_n9nw-1; Tue, 19 Oct 2021 07:21:07 -0400 Received: by mail-ed1-f70.google.com with SMTP id v2-20020a50f082000000b003db24e28d59so17256326edl.5 for ; Tue, 19 Oct 2021 04:21:07 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id 91sm8257104ede.56.2021.10.19.04.21.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 04:21:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634642470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/9dVY/FdYgobEPIXwfeyLGyGilitrT6maCqqauzoxr8=; b=H6auLDRyHN51G09F6kNJn2rzcB3XbR+CbexCNOO2fivyoZdduiQ0bNkCi0hY2/QyZHMdb6 ZBZraIDcCKHlbT+cOjo+XJS9HrgN7m/AXVS68Z3m3g4i/LLVJIwnmCXu2UWcsR8eNycM1F ZeAK5lObP+zr3sJpg7UX7OjjoaY7JKk= X-MC-Unique: bnw1rc2KMZiOuoClS_n9nw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/9dVY/FdYgobEPIXwfeyLGyGilitrT6maCqqauzoxr8=; b=ooMLGHeAxSzuZ4VUz9R4PBWyEN1rtgS1bWqhDApNac/jvo2xeTAxE9XQ3lNF5dG/bx lQdPs7WOd5o6yI5oNpU5+ZMSnsUli0KY5syr91XYfDv0cEPbexv5tfEk5wmOvsr+V1Nb Swci/5RVSrPQsRCGBjXTG4O9SXLrEereUsDkhHzHuYraoSLJeIkCMRCqBz/YRCjnujgX MO97bTf5Gi+5elm8EOO2x55DiOlz6ngQ1Qm2RwFDCkuj5BZjL5WmYaSVCeCSEvG/iKBM WRG3gVnhlol0Pc7vENRkuh2yIDtb0DjpiTaMVLSK5znqo3noqnH3lTyJI01UV3OLysN/ Akew== X-Gm-Message-State: AOAM532bOShdFlOxCZVOWbkWLL2qcDBuu/UQIurJTmaXD0k0PAiPHmJq T+eXGxFnMn7p8NN84Oral5CPY9GODCqtdySyPgd399LkApmEo8cgORowbqMffqty5ZCR6wl4UTR 6OSIm/rUoJTNuQU9+cDeAFuX8jzRxRg3sH22HSM5XQKxEj8mN73QbwaHuqwuc X-Received: by 2002:a50:e14c:: with SMTP id i12mr52296011edl.125.1634642466058; Tue, 19 Oct 2021 04:21:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjSKTDCl7shTR3Xd/ztKI3yGu/pGFkpkhQKbRxB4xkvX6bMmqNYnq/e0gEHzBeWbJT0MMr/w== X-Received: by 2002:a50:e14c:: with SMTP id i12mr52295985edl.125.1634642465852; Tue, 19 Oct 2021 04:21:05 -0700 (PDT) Date: Tue, 19 Oct 2021 07:21:03 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 29/29] failover: fix a regression introduced by JSON'ification of -device Message-ID: <20211019111923.679826-30-mst@redhat.com> References: <20211019111923.679826-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, 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: , Cc: Laurent Vivier , Peter Maydell , Jason Wang , kwolf@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634644241079100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Laurent Vivier The hide_device helper can be called several times for the same devices as it shouldn't change any state and should only return an information. But not to rely anymore on QemuOpts we have introduced a new field to store the parameters of the device and don't allow to update it once it is done. And as the function is called several times, we ends with: warning: Cannot attach more than one primary device to 'virtio0' That is not only a warning as it prevents to hide the device and breaks failover. Fix that by checking the device id. Now, we fail only if the virtio-net device is really used by two different devices, for instance: -device virtio-net-pci,id=3Dvirtio0,failover=3Don,... \ -device vfio-pci,id=3Dhostdev0,failover_pair_id=3Dvirtio0,... \ -device e1000e,id=3De1000e0,failover_pair_id=3Dvirtio0,... \ will exit with: Cannot attach more than one primary device to 'virtio0': 'hostdev0' and '= e1000e0' Fixes: 259a10dbcb4f ("virtio-net: Store failover primary opts pointer local= ly") Cc: kwolf@redhat.com Signed-off-by: Laurent Vivier Message-Id: <20211019071532.682717-2-lvivier@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Kevin Wolf Reviewed-by: Kevin Wolf Reviewed-by: Marcel Apfelbaum --- hw/net/virtio-net.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 09e173a558..83642c85b2 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -3304,15 +3304,27 @@ static bool failover_hide_primary_device(DeviceList= ener *listener, return false; } =20 + /* + * The hide helper can be called several times for a given device. + * Check there is only one primary for a virtio-net device but + * don't duplicate the qdict several times if it's called for the same + * device. + */ if (n->primary_opts) { - error_setg(errp, "Cannot attach more than one primary device to '%= s'", - n->netclient_name); - return false; + const char *old, *new; + /* devices with failover_pair_id always have an id */ + old =3D qdict_get_str(n->primary_opts, "id"); + new =3D qdict_get_str(device_opts, "id"); + if (strcmp(old, new) !=3D 0) { + error_setg(errp, "Cannot attach more than one primary device t= o " + "'%s': '%s' and '%s'", n->netclient_name, old, new); + return false; + } + } else { + n->primary_opts =3D qdict_clone_shallow(device_opts); + n->primary_opts_from_json =3D from_json; } =20 - n->primary_opts =3D qdict_clone_shallow(device_opts); - n->primary_opts_from_json =3D from_json; - /* failover_primary_hidden is set during feature negotiation */ return qatomic_read(&n->failover_primary_hidden); } --=20 MST From nobody Tue May 21 10:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634653078872297.8119514437707; Tue, 19 Oct 2021 07:17:58 -0700 (PDT) Received: from localhost ([::1]:56716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcpwC-0002TV-Nl for importer@patchew.org; Tue, 19 Oct 2021 10:17:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34478) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcpnP-0008Go-4B for qemu-devel@nongnu.org; Tue, 19 Oct 2021 10:08:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:39221) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcpnI-0006x8-S5 for qemu-devel@nongnu.org; Tue, 19 Oct 2021 10:08:50 -0400 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-281-_PBTGcHcMUuXAfKoTuPNvw-1; Tue, 19 Oct 2021 10:08:42 -0400 Received: by mail-wr1-f70.google.com with SMTP id a15-20020a056000188f00b00161068d8461so10252029wri.11 for ; Tue, 19 Oct 2021 07:08:42 -0700 (PDT) Received: from redhat.com ([2.55.24.172]) by smtp.gmail.com with ESMTPSA id f15sm15162384wrt.38.2021.10.19.07.08.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 07:08:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634652524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Yj3JiZzos9wfmafHbbhWyjt5GZKs2MQbtgHmoUqM9p0=; b=Zlu4t8vEdMmmbdl7maqfVTMxYjFaju5c5EVcaJJNijcw50zUkhMztNWbFlzla/qXYJr32K izmYYiCalL0iF1uGQfOCq1w1rb7GGguHjO09jmUfqwz+2KeLxFcxGrlRoyIRKYadZkQOQ+ qiiydLTMNnmIdqoRkYx7cGnkVbad7gk= X-MC-Unique: _PBTGcHcMUuXAfKoTuPNvw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Yj3JiZzos9wfmafHbbhWyjt5GZKs2MQbtgHmoUqM9p0=; b=WMBj4BTispEA9u9YakSiclb4OJR+QVz2wVlHLqO17GMWRHxOPk5pNawjwdDUyljch+ qPWXtrH1GAc4B9EKo0UtbpwfAT+yPr+MjUhwvRgO9U8HK3NVvWKHA+ofhdVyJjEm5ANT x4PGBB1Re/FcXto5Cp7ScLL/EFi4rB6ntfNiOdBDf6pcTbMPwE6t36THNTDgy64ywrbb xBzMlEe5R7Bo04ziHElCWl3K/OQGERjmgJZolM56xsx/8S38mASuxVtUcjjflBunDzeL /EWukRBloKTlcKQg8dR1hHkN4d6xPnVd5CrUS17K6XsQKWZ2h6u/bzqxQ0vb3ewZcwUD fylw== X-Gm-Message-State: AOAM5333vG2y88Agwhl2azW914w3KSZ9RRSFkloAr00lSVslnHCn7mh1 eUb6Co7Id+GdIVUb0tr9M4Kuh3s+PEM5fAvrd9Ne+Gt75eJThK6wveWMATokf14h52PBHLKEwj9 B2gsJ8IuJp3gJYUeF1Ll9EozD9WnDOqVH7WreDSbc8hgApW1tRD1NEAm9L+83 X-Received: by 2002:a1c:2b04:: with SMTP id r4mr6490248wmr.48.1634652521312; Tue, 19 Oct 2021 07:08:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztb3//ywRJsulbhgbhigY+63A9a2DBu1WHF6nuIYy/65Ha97Sl4OPgAB2MkNZK5eCSDB05Dw== X-Received: by 2002:a1c:2b04:: with SMTP id r4mr6490221wmr.48.1634652521127; Tue, 19 Oct 2021 07:08:41 -0700 (PDT) Date: Tue, 19 Oct 2021 10:08:38 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 30/29] vhost-user-blk-test: pass vhost-user socket fds to QSD Message-ID: <20211019140622.738008-31-mst@redhat.com> References: <20211019140622.738008-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211019111923.679826-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, 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: , Cc: Laurent Vivier , Peter Maydell , Thomas Huth , Coiby Xu , Raphael Norwitz , Stefan Hajnoczi , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634653081379100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Stefan Hajnoczi qemu-storage-daemon is launched with the vhost-user listen socket path. The path is first unlinked before opening the listen socket. This prevents stale UNIX domain socket files from stopping socket initialization. This behavior is undesirable in vhost-user-blk-test and the cause of a bug: There is a race condition in vhost-user-blk-test when QEMU launches before QSD. It connects to the old socket that QSD unlinks and the vhost-user connection is never serviced, resulting in a hang. Pass the listen socket fd to QSD to maintain listen socket continuity and prevent the lost connection. Fixes: 806952026df41939680abe92b329715b9b4e01cc ("test: new qTest case to t= est the vhost-user-blk-server") Cc: Raphael Norwitz Cc: Michael S. Tsirkin Cc: Thomas Huth Cc: Coiby Xu Signed-off-by: Stefan Hajnoczi Message-Id: <20211019135655.83067-1-stefanha@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- tests/qtest/vhost-user-blk-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qtest/vhost-user-blk-test.c b/tests/qtest/vhost-user-blk= -test.c index 6f108a1b62..62e670f39b 100644 --- a/tests/qtest/vhost-user-blk-test.c +++ b/tests/qtest/vhost-user-blk-test.c @@ -906,9 +906,9 @@ static void start_vhost_user_blk(GString *cmd_line, int= vus_instances, img_path =3D drive_create(); g_string_append_printf(storage_daemon_command, "--blockdev driver=3Dfile,node-name=3Ddisk%d,filename=3D%s " - "--export type=3Dvhost-user-blk,id=3Ddisk%d,addr.type=3Dunix,a= ddr.path=3D%s," + "--export type=3Dvhost-user-blk,id=3Ddisk%d,addr.type=3Dfd,add= r.str=3D%d," "node-name=3Ddisk%i,writable=3Don,num-queues=3D%d ", - i, img_path, i, sock_path, i, num_queues); + i, img_path, i, fd, i, num_queues); =20 g_string_append_printf(cmd_line, "-chardev socket,id=3Dchar%d,path= =3D%s ", i + 1, sock_path); --=20 MST