From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673539764; cv=none; d=zohomail.com; s=zohoarc; b=NMgAfF1oKcm62RSHf7j6qz4fJjQB8OWp+GTjfJvZ419IPmKAOxEDBHz3Gnr3E4l2LKpLEoTl30idwyqhB08tzDsNTOASg2JbsooG+1rUvNNeEL+sqrepeViDRGeOu/GtZ31ZqeLQBJyqKhS8aYoLZNtOfmIkf1KxoWUrwglGHTs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673539764; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=F7+dDmXau5wfhL0aDdlppN7+2cYXCTm2sVLTiVci+10=; b=fyQLngaUCCgYhrAnRUtjki/O1UTB+rQjHJpOaVYYZk4OemJghSP2qTPA6lWAb6FyPbandyaIfNjptEMOCMJRL56pvRZptCfbOsnMEMDbcNq/+6SLCqc94JdfrHnmGynpQ38Ui8NR4OPe4vvTPJs+W+LRBpf/zPaqWnL25OjTq4E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673539764334985.4102811708059; Thu, 12 Jan 2023 08:09:24 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBU-0002Sg-Uw; Thu, 12 Jan 2023 09:04:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBG-0002EX-2L for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:46 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBB-0005t3-Ni for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:45 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-354-9nlAcQVvM_yVRCJJFsE0Wg-1; Thu, 12 Jan 2023 09:03:22 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9C07F87A9E6; Thu, 12 Jan 2023 14:03:15 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id D88484085720; Thu, 12 Jan 2023 14:03:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532205; 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=F7+dDmXau5wfhL0aDdlppN7+2cYXCTm2sVLTiVci+10=; b=PHNRvFqrJeWamZM6tGKJ8WMixPV/2eXajheXhVwUiscULe9AhzFyZW8qb6MvUfjmJ9UhZJ +5UUUj5MiuuAwn5Yk+CACQU3FD4rh7CnSaHJs/qnO/87aydQmLws85qx5YKGK+bfRP+6T8 7LFWo02HitThRYlQd1VSMV363dgrhjA= X-MC-Unique: 9nlAcQVvM_yVRCJJFsE0Wg-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha , Thomas Huth , Laurent Vivier Subject: [PATCH 01/40] tests: qtest: print device_add error before failing test Date: Thu, 12 Jan 2023 15:02:33 +0100 Message-Id: <20230112140312.3096331-2-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673539765089100001 Signed-off-by: Igor Mammedov --- CC: Thomas Huth CC: Laurent Vivier --- tests/qtest/libqtest.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c index 5cb38f90da..3dbbdd30b9 100644 --- a/tests/qtest/libqtest.c +++ b/tests/qtest/libqtest.c @@ -1417,6 +1417,10 @@ void qtest_qmp_device_add_qdict(QTestState *qts, con= st char *drv, resp =3D qtest_qmp(qts, "{'execute': 'device_add', 'arguments': %p}", = args); g_assert(resp); g_assert(!qdict_haskey(resp, "event")); /* We don't expect any events = */ + if (qdict_haskey(resp, "error")) { + fprintf(stderr, "error: %s\n", + qdict_get_str(qdict_get_qdict(resp, "error"), "desc")); + } g_assert(!qdict_haskey(resp, "error")); qobject_unref(resp); } --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673540037; cv=none; d=zohomail.com; s=zohoarc; b=PGUq4V3pIjoWwJuxnF8rtBzDFnYuhVv/rmE2ZLNise0YCrL7/2b7CXOnXT0aVdtfIJcOZ/rSD2OQ9+rk6/zWDnRN3wrC3Hiy6axu7u56eT/j1NeffFYliRXNzfiaW1+XeYEA7BrJRYckq7deTEsXCQaNlNOOQDIX+pVNLOa2E8Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673540037; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=IB+X9dds/VOg4iiQyWXLhAaedV6degi+N/6BBVa3SKo=; b=PGIMug6g9rcRKEYT6aQwliyEqonW4fRYoobEASgnGH+CjGt1jn9k64x5JXlro+PKN6aNjcwDM7/+UZWk/7S9YQ0KmnDpx+F/uMlFBW7ZhSgQ2yX/vdFV0rOL4zR0r0yfY1EmavBdGp8kHjz1GiCyFt8h7PaKQoOl84DbGnkPW+Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673540037664721.8082581055581; Thu, 12 Jan 2023 08:13:57 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBI-0002Fv-MS; Thu, 12 Jan 2023 09:03:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB9-00026U-4V for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:42 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB2-0005si-E2 for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:34 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-637-7u28QRWbMUaZpwP2dOiyGg-1; Thu, 12 Jan 2023 09:03:21 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8FEA03C2275C; Thu, 12 Jan 2023 14:03:16 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id CC0E94085721; Thu, 12 Jan 2023 14:03:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532203; 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=IB+X9dds/VOg4iiQyWXLhAaedV6degi+N/6BBVa3SKo=; b=VWCFKXW83BA6Zl3em+t3QI0qTHfQ2pRSevaVGGFyJOXf0R1hURKfM+gtWNhx6DVPMl5Jpj w6F/WHUALOMb9XUf2BEjFvCvM/VErXNQOFcqsHB3mw0vD92N/BbxHh9jNdTPJh/6Pv/kqC Lkno58dxpC8fmlmIcW7//oh6aqO2Byk= X-MC-Unique: 7u28QRWbMUaZpwP2dOiyGg-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha , Thomas Huth , Laurent Vivier Subject: [PATCH 02/40] tests: acpi: cleanup arguments to make them more readable Date: Thu, 12 Jan 2023 15:02:34 +0100 Message-Id: <20230112140312.3096331-3-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673540038688100003 no functional change Signed-off-by: Igor Mammedov --- CC: Thomas Huth CC: Laurent Vivier --- tests/qtest/bios-tables-test.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 8608408213..08b8aee76b 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -951,8 +951,7 @@ static void test_acpi_q35_tcg_bridge(void) data.variant =3D ".bridge"; data.required_struct_types =3D base_required_struct_types; data.required_struct_types_len =3D ARRAY_SIZE(base_required_struct_typ= es); - test_acpi_one("-device pci-bridge,chassis_nr=3D1", - &data); + test_acpi_one("-device pci-bridge,chassis_nr=3D1", &data); free_test_data(&data); } =20 @@ -962,14 +961,12 @@ static void test_acpi_q35_multif_bridge(void) .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); + test_acpi_one( + " -device virtio-balloon,id=3Dballoon0,addr=3D0x4.0x2" + " -device pcie-root-port,id=3Drp0,multifunction=3Don," + "port=3D0x0,chassis=3D1,addr=3D0x2" + " -device pcie-root-port,id=3Drp1,port=3D0x1,chassis=3D2,addr=3D0x= 3.0x1", + &data); free_test_data(&data); } =20 --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673533615; cv=none; d=zohomail.com; s=zohoarc; b=hDcRmuWQnSNZkswleLuMCYelFBXmfv6GrqY9Auz7EoiyGxBiM/tG6VxIzXXFiSx846ueLAjS3evmHSCTyne0lZv80YqJt4Fx76uhDx9F5/NicxOsZ2qIDVibGZsouE11hPFGWCZGJiWcOr9rjOyuBBSfbmubXa3gwKbT3SuGkM0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673533615; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0xy6TarSE4Vuzeph3MaksCcOSraM7Ik8WNsv5mOiSI4=; b=eQwGpNGp8opKXRtIiBJH5R3+OTqDjzI/oVPiysAGh1mOc+fUOwqtnFzRbaO+vlAeYJVwItxahQzoPSaeCzvP/3Co2fOiKmBseu+yozfdMnpzogX/DKcIPvNXnKuKUetiIMl0lnTeGCZ/6p2NA5l3nNCpiRgaGE+azg66i/E62/Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTP id 1673533614999584.8523332421759; Thu, 12 Jan 2023 06:26:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBR-0002OB-V5; Thu, 12 Jan 2023 09:03:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB9-000272-ND for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:42 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB2-0005sT-TC for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:35 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-617-8u0Vbs2EMOiwHdd4U5w20Q-1; Thu, 12 Jan 2023 09:03:19 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5064F87AA0E; Thu, 12 Jan 2023 14:03:17 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id BF3C64085722; Thu, 12 Jan 2023 14:03:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532201; 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=0xy6TarSE4Vuzeph3MaksCcOSraM7Ik8WNsv5mOiSI4=; b=DK/wJrNiB2HnZ4U1use4CZ++8w7xp/axwXJfKoWO1bAMVmrigAXw8Nt/yfkkNiKhCZ9BKN Uhjg0niZDupmqBQsVflemfAPpcbHSDB9fQr4jAs6AY2wCwxWetoho06KoVBzd9oG0FnaAy H4VSS96mGUL2/8yo9rf8QPQiAFMurVU= X-MC-Unique: 8u0Vbs2EMOiwHdd4U5w20Q-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 03/40] tests: acpi: whitelist DSDT blobs for tests that use pci-bridges Date: Thu, 12 Jan 2023 15:02:35 +0100 Message-Id: <20230112140312.3096331-4-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673533615528100001 Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index dfb8523c8b..2602a57c9b 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.multi-bridge", +"tests/data/acpi/pc/DSDT.bridge", +"tests/data/acpi/pc/DSDT.roothp", +"tests/data/acpi/pc/DSDT.hpbridge", --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673535363; cv=none; d=zohomail.com; s=zohoarc; b=NqVCAOcdgeY7gAqCSbONPH9IB22BZqBPI/r9MUoqmTYF4UtRfB+CPzhFSPYwEfzWUdDTEZFF6mMO4bMoK12Sr2cgwNzyQ72Upz3VD+PGK0H8ieiaFz36KkVPtEyZGMTtUnR5alKxQHfRsKv3GP4bX6pPaZW4owED+5uP84dQmLk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673535363; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=AJXz815BdS7g+uY8lVjYJEOlxy0y1KtY4t37lPrhGQ8=; b=PtWsoSFsf5WNIiYjj5jb0EaXEmUHI1K3nZ0rB4ASHRSjSzuxwfZbVnMCnu0CAJmhXpElMVEoB2HfhGvFQ7XrXsytWuajVJQpfm7BsdAnDYijyt9bAEZfUbW23XJC0QmeZbalQ0S0utzbMeKs4B7oMxQY7VpeQYlxqNFLPCdowcU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTP id 1673535363764147.05938212350407; Thu, 12 Jan 2023 06:56:03 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBR-0002Nl-El; Thu, 12 Jan 2023 09:03:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB9-000277-Nh for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:42 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB2-0005sV-Uu for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:37 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-41-WjWj2iiXNqG-n55tOFHr-w-1; Thu, 12 Jan 2023 09:03:18 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 112AA3C38FF2; Thu, 12 Jan 2023 14:03:18 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 803624085723; Thu, 12 Jan 2023 14:03:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532201; 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=AJXz815BdS7g+uY8lVjYJEOlxy0y1KtY4t37lPrhGQ8=; b=Ate9Q+/EWtVPz9ZQ2qDhGz93CrsYQ6nEekM2LMVgd998AKvFMAGrhnndhQuDXvEAnVVQPc /ZWHh9Q3amkSjZm1DiWzlB1qUzR6D6kwKdMPxlf89DMwpBgoGt5ikGMwUMPlNlQNwcmbb/ h5NuKHRLrwrQA1DXx1UuhGe4Zwbu1Gc= X-MC-Unique: WjWj2iiXNqG-n55tOFHr-w-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 04/40] tests: acpi: extend pcihp with nested bridges Date: Thu, 12 Jan 2023 15:02:36 +0100 Message-Id: <20230112140312.3096331-5-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673535364516100001 add nested bridges/root-ports to pcihp tests, to make sure follow up patches don't break nested enumeration of bridges in DSDT. Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 08b8aee76b..6a99b10384 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -863,7 +863,8 @@ static void test_acpi_piix4_tcg_bridge(void) data.variant =3D ".bridge"; data.required_struct_types =3D base_required_struct_types; data.required_struct_types_len =3D ARRAY_SIZE(base_required_struct_typ= es); - test_acpi_one("-device pci-bridge,chassis_nr=3D1", &data); + test_acpi_one("-device pci-bridge,chassis_nr=3D1 " + "-device pci-bridge,bus=3Dpci.1,addr=3D1.0,chassis_nr=3D= 2 ", &data); free_test_data(&data); } =20 @@ -877,7 +878,8 @@ static void test_acpi_piix4_no_root_hotplug(void) data.required_struct_types =3D base_required_struct_types; data.required_struct_types_len =3D ARRAY_SIZE(base_required_struct_typ= es); test_acpi_one("-global PIIX4_PM.acpi-root-pci-hotplug=3Doff " - "-device pci-bridge,chassis_nr=3D1", &data); + "-device pci-bridge,chassis_nr=3D1 " + "-device pci-bridge,bus=3Dpci.1,addr=3D1.0,chassis_nr=3D= 2 ", &data); free_test_data(&data); } =20 @@ -891,7 +893,8 @@ static void test_acpi_piix4_no_bridge_hotplug(void) data.required_struct_types =3D base_required_struct_types; data.required_struct_types_len =3D ARRAY_SIZE(base_required_struct_typ= es); test_acpi_one("-global PIIX4_PM.acpi-pci-hotplug-with-bridge-support= =3Doff " - "-device pci-bridge,chassis_nr=3D1", &data); + "-device pci-bridge,chassis_nr=3D1 " + "-device pci-bridge,bus=3Dpci.1,addr=3D1.0,chassis_nr=3D= 2 ", &data); free_test_data(&data); } =20 @@ -965,8 +968,14 @@ static void test_acpi_q35_multif_bridge(void) " -device virtio-balloon,id=3Dballoon0,addr=3D0x4.0x2" " -device pcie-root-port,id=3Drp0,multifunction=3Don," "port=3D0x0,chassis=3D1,addr=3D0x2" - " -device pcie-root-port,id=3Drp1,port=3D0x1,chassis=3D2,addr=3D0x= 3.0x1", + " -device pcie-root-port,id=3Drp1,port=3D0x1,chassis=3D2,addr=3D0x= 3.0x1" + " -device pcie-root-port,id=3Drp2,port=3D0x0,chassis=3D3,bus=3Drp1= ,addr=3D0.0" + " -device pci-bridge,bus=3Drp2,chassis_nr=3D4,id=3Dbr1" + " -device pcie-root-port,id=3Drphptgt1,port=3D0x0,chassis=3D5,addr= =3D2.1" + " -device pcie-root-port,id=3Drphptgt2,port=3D0x0,chassis=3D6,addr= =3D2.2" + " -device pcie-root-port,id=3Drphptgt3,port=3D0x0,chassis=3D7,addr= =3D2.3", &data); + free_test_data(&data); } =20 --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673532307; cv=none; d=zohomail.com; s=zohoarc; b=ZA/ScsP1QuaR105nCM+hG5GbtzfnYkEIKeeYnx4N0slgqGrjMKz7Ls4LQWnb6DPT/g0LNFWeeRS9ar2ADWMRMaGXLlJWpq4Xfv74XHwMrZlelQ9vvurANqFXhMdtSrt7qo/DNE7bG/ZS599ylwAZDxfGqCPiuDdaEnBXSemsdKI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673532307; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8zmrmc32GvvD5ia8ras46y5O0Gvn/kMw2o+PKdoHVSY=; b=hv7Cqma6DjNl8O8E5jtHJwCJL/VIL0UX6l0bQqJOeZ31Etixyxqw1HFwUuy4lR0jb0JiBoVZhgm3WnCOSDH2/f5a2OuL2o1SEUMf9Kpejcit5G8ehS3w7NcDsEvuD1m5sPpbiJMQf7C14Ulv8c03DZHlcEBos7yVR3Qsgee2TWs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTP id 1673532307596960.1943025212202; Thu, 12 Jan 2023 06:05:07 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBG-0002Eo-Sp; Thu, 12 Jan 2023 09:03:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB9-000273-N9 for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:42 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB2-0005sk-TS for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:36 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-173-kySwdgXFOnGw7x82ed7wlg-1; Thu, 12 Jan 2023 09:03:21 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C631985C093; Thu, 12 Jan 2023 14:03:18 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 412114085721; Thu, 12 Jan 2023 14:03:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532203; 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=8zmrmc32GvvD5ia8ras46y5O0Gvn/kMw2o+PKdoHVSY=; b=GX3QCPR5wBNkYlASFk6h6zm3dNGqvU4idwyBJcZ/ksYwT0P8TSGSxwkczMtDbXCT6NMWdR pMRlPltAMZRJX/dMKM24L0BATQnXoPutjdHMIV+bKCUfXvAlbNCyPHtcqW2r0ajvevPWMy 7eTDktUNF1IpHeA50oVLFKQ4BChcK8k= X-MC-Unique: kySwdgXFOnGw7x82ed7wlg-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 05/40] tests: acpi: update expected blobs Date: Thu, 12 Jan 2023 15:02:37 +0100 Message-Id: <20230112140312.3096331-6-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673532309596100003 add extra nested bridges/root ports to blobs so it would be posible to check how follow up patches would affect it. Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 4 ---- tests/data/acpi/pc/DSDT.bridge | Bin 9532 -> 12608 bytes tests/data/acpi/pc/DSDT.roothp | Bin 6656 -> 9732 bytes tests/data/acpi/q35/DSDT.multi-bridge | Bin 8630 -> 12301 bytes 4 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 2602a57c9b..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.multi-bridge", -"tests/data/acpi/pc/DSDT.bridge", -"tests/data/acpi/pc/DSDT.roothp", -"tests/data/acpi/pc/DSDT.hpbridge", diff --git a/tests/data/acpi/pc/DSDT.bridge b/tests/data/acpi/pc/DSDT.bridge index 75016fd4b72aae544658e51c06a2940da31c81da..d1b019754bb03fa7d815ab57304= ddb2376a4c8af 100644 GIT binary patch delta 153 zcmdnvbs&k$CD$rprJH)ru3^cR4nzD~mD#0L(Zn ArT_o{ delta 67 zcmV-J0KEUeV!TQUL{mgmJS6}C0c5cXcMA-QmjPT~Q$k-5f|miajSFi60z$=3D;`wfP( Z2@k6a2p>>GPE-JJ0h8Y_7qd<#@(RdT6?p&v diff --git a/tests/data/acpi/pc/DSDT.roothp b/tests/data/acpi/pc/DSDT.roothp index 545512adfa0f9af81a7fafd353679f64f75e501e..14473ab4c91d68af88fff45e703= f572c387d0af7 100644 GIT binary patch delta 137 zcmZoLY4PE533dr#QDb0W{I-#+oSUb431duruv5H1*J8%a-Q3?9nfsdGC3Zd z{G8XA)hXE3hjH@^-v8VZj81-`zAj;YApy>wp^Q+53m5ZdBfff0K}T7T2-5=3DY>I_DP jwqOH;&F94rGBRpTo+v5D6{i<$U=3DbhS>=3D!b5y<{K&C!r|o delta 55 zcmZqiX)xh(33dr#kYZq9WZ%eD&dufjI3_;WDPF++@#bFc?~F{ohbFi4CT`B>+r&M2 LqN>E?&8mR_$Sx8n diff --git a/tests/data/acpi/q35/DSDT.multi-bridge b/tests/data/acpi/q35/DS= DT.multi-bridge index 3dba4d84369f1f2850fbdc771072519d34f58072..f045438b4e794406316418074c6= d319261bfcd9e 100644 GIT binary patch delta 2396 zcmZ|R&2rLU6b9fV1R4UAzqCLp368Fuu|nw&UD+1sqAFH{Zt66SE8MwtSb!{WTy({_ z?=3D3jacm?jc|p2))*Ftr_b@&8YT?Q@uhip} z#y=3D|!SlLK#^D1Nc+r7+mcuHu-@`LxOKKSLg590SpaAV?pe)@Cy$9-srAHY1HKl_1W zDjbv0^0<0Fe`@-zE?YP!%{ua54)x`=3Dd-s9vl!C!&OF!!kPSFIAz?+!2P7i@?pxCkv zC6NyJd?85?NvO!Se2FF#lZdG#(voD7B$8B-j$C zC6SgilQfaEitI{@&BP{RD~YsZm}H1#RAf(DvP`l>vPvQ?IVL$GIThKLmQ^OJL{^nV zTJlWtMDi-qm6igN0+E7}NK27Pkw{TR4y2{Tq(r2oB+^o5QYKPXkt1nwm^efnC6Sgj zCTm32RODD%)|spmSyvKisW7P!si;U#TB=3DN{M5;<6Ej1=3DJA~hB1OUnk64I&##A}w_$ zbs}{Y8A!_}lT9Lmx)WnRT63On0QF0w)Y?63>*Dd!;x{7nT&O9 z;kR1ByQ}PEY#TUqc`#vsyB{SM4pCBo0k(8Xnm9zsAq=3Dn$Q!>*QQ@?{zZZgim4Qb)S z=3DE)OQ?Zg>&!IsAvmhHwFw!ucl8P@H^8TP^U!Wk6$`^c<87UomBXPJNNma#l)lai!J=3D=3D@zCu& gfw?XDw`=3Dc0zt;^l9Bp?(g|D{bSMBiC^6j0`U&gLNmH+?% delta 97 zcmeB8*yhaT66_MPO_70t@xex}Mma8Ty_oo5r+5Kpy~)$%?8RI-gAEPhIpQ5%f_NAh wm>4*mf?a(WC%=3D`8pIoh=3D%54diVq{>Ryjr1sv!z}PBb!u!vtJ0q (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673535050830793.8942549948805; Thu, 12 Jan 2023 06:50:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBO-0002L4-Gk; Thu, 12 Jan 2023 09:03:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB9-00027L-R5 for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:44 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB2-0005sf-Uu for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:37 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-563-KTfRKUOdP7-shjQ8pvtrGw-1; Thu, 12 Jan 2023 09:03:21 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 89792889059; Thu, 12 Jan 2023 14:03:19 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0207D4085720; Thu, 12 Jan 2023 14:03:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532203; 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=MCgnBchHbmuCfitzzKhfB+DjCrVb5oaS27a4Mv6Dsxk=; b=KNgYohk4SUSoG6Csrv0bTpgDv2RofYAfhJpmi3cwqf5w+rxYgFhevN1fEJI+lu5SRe2XDg Bg2MGxmB791IZ9wRZQwamsA0PwCAkJ+YR7lwVLRU0sf3agZywG9KQlVaDxoKyTCUEC99cX fQSLspcF21Q3yNm6OpZyb9RgpMVu2iQ= X-MC-Unique: KTfRKUOdP7-shjQ8pvtrGw-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 06/40] tests: acpi: cleanup use_uefi argument usage Date: Thu, 12 Jan 2023 15:02:38 +0100 Message-Id: <20230112140312.3096331-7-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673535053483100001 'use_uefi' is used for the flag is a part of 'test_data *data' argument that is passed to the same functions, which makes use_uefi argument redundant. Drop it and use 'data::uefi_*' directly, instead. Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 35 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 6a99b10384..cb95f687fe 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -748,9 +748,9 @@ static void test_smbios_structs(test_data *data, Smbios= EntryPointType ep_type) } } =20 -static void test_acpi_load_tables(test_data *data, bool use_uefi) +static void test_acpi_load_tables(test_data *data) { - if (use_uefi) { + if (data->uefi_fl1 && data->uefi_fl2) { /* use UEFI */ g_assert(data->scan_len); data->rsdp_addr =3D acpi_find_rsdp_address_uefi(data->qts, data->ram_start, data->scan_len); @@ -766,12 +766,11 @@ static void test_acpi_load_tables(test_data *data, bo= ol use_uefi) test_acpi_fadt_table(data); } =20 -static char *test_acpi_create_args(test_data *data, const char *params, - bool use_uefi) +static char *test_acpi_create_args(test_data *data, const char *params) { char *args; =20 - if (use_uefi) { + if (data->uefi_fl1 && data->uefi_fl2) { /* use UEFI */ /* * TODO: convert '-drive if=3Dpflash' to new syntax (see e33763be7= cd3) * when arm/virt boad starts to support it. @@ -809,11 +808,10 @@ static char *test_acpi_create_args(test_data *data, c= onst char *params, static void test_acpi_one(const char *params, test_data *data) { char *args; - bool use_uefi =3D data->uefi_fl1 && data->uefi_fl2; =20 - args =3D test_acpi_create_args(data, params, use_uefi); + args =3D test_acpi_create_args(data, params); data->qts =3D qtest_init(args); - test_acpi_load_tables(data, use_uefi); + test_acpi_load_tables(data); =20 if (getenv(ACPI_REBUILD_EXPECTED_AML)) { dump_aml_files(data, true); @@ -826,7 +824,7 @@ static void test_acpi_one(const char *params, test_data= *data) * Bug on uefi-test-tools to provide entry point: * https://bugs.launchpad.net/qemu/+bug/1821884 */ - if (!use_uefi) { + if (!(data->uefi_fl1 && data->uefi_fl2)) { SmbiosEntryPointType ep_type =3D test_smbios_entry_point(data); test_smbios_structs(data, ep_type); } @@ -1904,10 +1902,9 @@ static void test_acpi_piix4_oem_fields(void) data.required_struct_types =3D base_required_struct_types; data.required_struct_types_len =3D ARRAY_SIZE(base_required_struct_typ= es); =20 - args =3D test_acpi_create_args(&data, - OEM_TEST_ARGS, false); + args =3D test_acpi_create_args(&data, OEM_TEST_ARGS); data.qts =3D qtest_init(args); - test_acpi_load_tables(&data, false); + test_acpi_load_tables(&data); test_oem_fields(&data); qtest_quit(data.qts); free_test_data(&data); @@ -1924,10 +1921,9 @@ static void test_acpi_q35_oem_fields(void) data.required_struct_types =3D base_required_struct_types; data.required_struct_types_len =3D ARRAY_SIZE(base_required_struct_typ= es); =20 - args =3D test_acpi_create_args(&data, - OEM_TEST_ARGS, false); + args =3D test_acpi_create_args(&data, OEM_TEST_ARGS); data.qts =3D qtest_init(args); - test_acpi_load_tables(&data, false); + test_acpi_load_tables(&data); test_oem_fields(&data); qtest_quit(data.qts); free_test_data(&data); @@ -1942,9 +1938,9 @@ static void test_acpi_microvm_oem_fields(void) test_acpi_microvm_prepare(&data); =20 args =3D test_acpi_create_args(&data, - OEM_TEST_ARGS",acpi=3Don", false); + OEM_TEST_ARGS",acpi=3Don"); data.qts =3D qtest_init(args); - test_acpi_load_tables(&data, false); + test_acpi_load_tables(&data); test_oem_fields(&data); qtest_quit(data.qts); free_test_data(&data); @@ -1964,10 +1960,9 @@ static void test_acpi_virt_oem_fields(void) }; char *args; =20 - args =3D test_acpi_create_args(&data, - "-cpu cortex-a57 "OEM_TEST_ARGS, true); + args =3D test_acpi_create_args(&data, "-cpu cortex-a57 "OEM_TEST_ARGS); data.qts =3D qtest_init(args); - test_acpi_load_tables(&data, true); + test_acpi_load_tables(&data); test_oem_fields(&data); qtest_quit(data.qts); free_test_data(&data); --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673538968; cv=none; d=zohomail.com; s=zohoarc; b=X2Q2SVUW4QKgvJRm1I+2b4wqB1tbHmOqsjcPWz8E9YNXFGyvgWsW+ALjXLtnmdtgpt6U3eALHqYe6bDUZ5ltyY2tA65dSe7Z+fzpMj3SEEBO7xB562yN/KYqJl+DyJ6FV4DLgt+OkSeIhRhU28uGmtZVQLw3ns2EiRWoiuHpc00= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673538968; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BaDOILO968VGwVlmRQxOtexsT+EBL1HoMsuja1yvdFE=; b=gwvL/sq3J+09RCkbYYQui/gQ13CL25/bmXbDvTA/kdJiNi+yqzvSJyyafu0o41KialiT8VePZCzY6/yx2tlTbWssCEVqMfPe2RjNbljdrC9S0k60yb8iLdpxT20l+2semTQzr/j6bfPb/QZ/Lt7q798RJOwpHMuCBTfO2AMBx34= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673538968286600.4654848494015; Thu, 12 Jan 2023 07:56:08 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBK-0002H8-4j; Thu, 12 Jan 2023 09:03:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB9-00026T-4G for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:41 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB2-0005sh-Ss for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:34 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-122-rwr2EaWfMG-x5EfF1WHQXg-1; Thu, 12 Jan 2023 09:03:20 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4A123385F365; Thu, 12 Jan 2023 14:03:20 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id B929B4085722; Thu, 12 Jan 2023 14:03:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532203; 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=BaDOILO968VGwVlmRQxOtexsT+EBL1HoMsuja1yvdFE=; b=ANOzRp4iNOuIovARteH47v2q97x8DUZtA7wVvajlRkfWCRE0RD4brp1pYAGdd1Cd+anSaw Vvjx88ns+q7lTiAPK9OZ1UBZZ2dweoVQfYprus+USDQyEu62f1tOmQD53QPOKeWxyeNd4h 4ovTiWlpTBnyR/i6uJ2w/a462zlVzIg= X-MC-Unique: rwr2EaWfMG-x5EfF1WHQXg-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 07/40] pci_bridge: remove whitespace Date: Thu, 12 Jan 2023 15:02:39 +0100 Message-Id: <20230112140312.3096331-8-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673538969297100001 Signed-off-by: Igor Mammedov --- hw/pci-bridge/pci_bridge_dev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/pci-bridge/pci_bridge_dev.c b/hw/pci-bridge/pci_bridge_dev.c index 3435df8d73..4b2696ea7f 100644 --- a/hw/pci-bridge/pci_bridge_dev.c +++ b/hw/pci-bridge/pci_bridge_dev.c @@ -186,7 +186,6 @@ static Property pci_bridge_dev_properties[] =3D { res_reserve.mem_pref_32, -1), DEFINE_PROP_SIZE("pref64-reserve", PCIBridgeDev, res_reserve.mem_pref_64, -1), - DEFINE_PROP_END_OF_LIST(), }; =20 --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673534620; cv=none; d=zohomail.com; s=zohoarc; b=BCzgkE7G4x5qNGlDNoGlZI3RYehA9/WgfOUw5r6FJEGN5TqTkyc0pU/o7TrpMrZ/tGY1CSoOkO1iqa2JUoA1e8yfGnfOmwQzkkqyMg2B0/3dZfnUhbZQiWS+coeYOZaW+91e1w84peL+Lasd2B4uAOG4ihGz1ZqRsENAvl5p2K4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673534620; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=P/bLKepI/SoqzWOveKxQ8X6sOwM/vG4TSDpaK1z/Yjk=; b=dOWRGxHcifkD4LFyGUgGt9OwR5sw8IL42uzMrhIRHDhZ30wHbf6IQH/eo6W2ABJPke+EACsNLVHpaU4RliCZPdje3qN7ynwvQl55m/WTVbOD/cRFE6LJGfpMlsmPLNUCn7oPr3FNngEqL/9EfEhh204adqV1FpnR3VEKWaZKoJw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTP id 1673534620424431.1668918143365; Thu, 12 Jan 2023 06:43:40 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBL-0002Hh-HH; Thu, 12 Jan 2023 09:03:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB9-000270-JU for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:42 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB2-0005tF-Ue for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:37 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-651-xdlekOwZNxuFwrU-A_GjIw-1; Thu, 12 Jan 2023 09:03:22 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0AAB619711D7; Thu, 12 Jan 2023 14:03:21 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 799A84085721; Thu, 12 Jan 2023 14:03:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532206; 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=P/bLKepI/SoqzWOveKxQ8X6sOwM/vG4TSDpaK1z/Yjk=; b=f/P2OQIgF/MxrLm9HtyA1R7YvQnKAg0OtmvmeiRpbXZO6jwWJ2GAx1EOVRSSCEdpsHoVdT pExIRA7yzuGndMSi2KjYMtTmyjMm9nz8tlRHXXhVHhwoPHeDowfFiKtJUo6Gl3yhQZWZeD 7vvbZSVghjXumm6QUEwGEBBfDBUTwaE= X-MC-Unique: xdlekOwZNxuFwrU-A_GjIw-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 08/40] x86: acpi: pcihp: clean up duplicate bridge_in_acpi assignment Date: Thu, 12 Jan 2023 15:02:40 +0100 Message-Id: <20230112140312.3096331-9-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673534621648100001 Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 127c4e2d50..8a35c3cad0 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -466,7 +466,6 @@ static void build_append_pci_bus_devices(Aml *parent_sc= ope, PCIBus *bus, =20 call_dev_aml_func(DEVICE(pdev), dev); =20 - bridge_in_acpi =3D cold_plugged_bridge && pcihp_bridge_en; if (bridge_in_acpi) { /* * device is coldplugged bridge, --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673534084; cv=none; d=zohomail.com; s=zohoarc; b=XtVgaBn3EE2dbjeMMGsAmdcapSH1dTEWSPc3GAISHb4DCgFgzKWN9KxbyQtwhpDG3vUr2RusvPlrSj9PcukNzBfd7AKWbRgAGmFN5ZaplQkvq+uMPISW55Xg9cgIDK6IIWwf+g707kIsSZ5L5lsr0l4/PBv2DUsrn+Z3aLdptjo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673534084; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uWmUch0RpAK468vAHU3M2aMsKzVZnTBevu4b1+SMQFw=; b=RCKLoFxrPMlRWPM/p7Ysu+hEl5o2493zywQ/wgzUKyk72DjgO6yd0JggJ8r8R1diKL1du5UPVluR434CIOkGMOH+kHzGeeX94ifqItsoUtAHsTEMqZW7/ZgDx6LIOpEbikkJ4//Z1ta2UyKL3++0mpN4SZ+JRDgofrDUzWMrda8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673534084574951.0433634470037; Thu, 12 Jan 2023 06:34:44 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBJ-0002Gn-Pd; Thu, 12 Jan 2023 09:03:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB9-000275-NL for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:42 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB2-0005tJ-Tc for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:36 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-135-0pSCWcibO6SeBj-OlPebaQ-1; Thu, 12 Jan 2023 09:03:22 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BF06588B7B1; Thu, 12 Jan 2023 14:03:21 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3A8E94085720; Thu, 12 Jan 2023 14:03:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532207; 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=uWmUch0RpAK468vAHU3M2aMsKzVZnTBevu4b1+SMQFw=; b=jMPsrNQMrgz6ZJO9FaBVjrxDzpajaeIktFesB3/uO3IYjDJ2RvkIsdsWQNH18X/3kvwlvg OmZRs3o3rl5PBWbcBFg8N+Wvun6ccgzH/mX1VQi140dddw4uK83qD+GA/fZ6y3ktpY//Cu NOQC9S90lVYvMxmLrDCSjRh9mw4WhM8= X-MC-Unique: 0pSCWcibO6SeBj-OlPebaQ-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 09/40] pci: acpi hotplug: rename x-native-hotplug to x-do-not-expose-native-hotplug-cap Date: Thu, 12 Jan 2023 15:02:41 +0100 Message-Id: <20230112140312.3096331-10-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673534085674100001 When ACPI PCI hotplug for Q35 was introduced (6.1), it was implemented by hiding HPC capability on PCIE slot. That however led to a number of regressions and to fix it, it was decided to keep HPC cap exposed in ACPI PCI hotplug case and force guest in ACPI PCI hotplug mode by other means [1]. That reduced meaning of x-native-hotplug to a compat knob [2] for broken 6.1 machine type. Rename property to match its current purpose. 1) 211afe5c69 (hw/i386/acpi-build: Deny control on PCIe Native Hot-plug in = _OSC) 2) c318bef762 (hw/acpi/ich9: Add compat prop to keep HPC bit set for 6.1 ma= chine type) Signed-off-by: Igor Mammedov --- include/hw/pci/pcie_port.h | 3 ++- hw/i386/pc_q35.c | 5 +++-- hw/pci-bridge/gen_pcie_root_port.c | 7 ++++++- hw/pci/pcie.c | 6 +++--- hw/pci/pcie_port.c | 3 ++- 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/include/hw/pci/pcie_port.h b/include/hw/pci/pcie_port.h index fd484afb30..6c40e3733f 100644 --- a/include/hw/pci/pcie_port.h +++ b/include/hw/pci/pcie_port.h @@ -63,7 +63,8 @@ struct PCIESlot { /* Indicates whether any type of hot-plug is allowed on the slot */ bool hotplug; =20 - bool native_hotplug; + /* broken ACPI hotplug compat knob to preserve 6.1 ABI intact */ + bool hide_native_hotplug_cap; =20 QLIST_ENTRY(PCIESlot) next; }; diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 67ceb04bcc..f6b9688964 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -256,8 +256,9 @@ static void pc_q35_init(MachineState *machine) NULL); =20 if (!keep_pci_slot_hpc && acpi_pcihp) { - object_register_sugar_prop(TYPE_PCIE_SLOT, "x-native-hotplug", - "false", true); + object_register_sugar_prop(TYPE_PCIE_SLOT, + "x-do-not-expose-native-hotplug-cap", + "true", true); } =20 /* irq lines */ diff --git a/hw/pci-bridge/gen_pcie_root_port.c b/hw/pci-bridge/gen_pcie_ro= ot_port.c index 20099a8ae3..1ce4e7beba 100644 --- a/hw/pci-bridge/gen_pcie_root_port.c +++ b/hw/pci-bridge/gen_pcie_root_port.c @@ -87,7 +87,12 @@ static void gen_rp_realize(DeviceState *dev, Error **err= p) return; } =20 - if (grp->res_reserve.io =3D=3D -1 && s->hotplug && !s->native_hotplug)= { + /* + * reserving IO space led to worse issues in 6.1, when this hunk was + * introduced. (see commit: 211afe5c69b59). Keep this broken for 6.1 + * machine type ABI compatibility only + */ + if (s->hide_native_hotplug_cap && grp->res_reserve.io =3D=3D -1 && s->= hotplug) { grp->res_reserve.io =3D GEN_PCIE_ROOT_DEFAULT_IO_RANGE; } int rc =3D pci_bridge_qemu_reserve_cap_init(d, 0, diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index 68a62da0b5..924fdabd15 100644 --- a/hw/pci/pcie.c +++ b/hw/pci/pcie.c @@ -611,11 +611,11 @@ void pcie_cap_slot_init(PCIDevice *dev, PCIESlot *s) PCI_EXP_SLTCAP_ABP); =20 /* - * Enable native hot-plug on all hot-plugged bridges unless - * hot-plug is disabled on the slot. + * Expose native hot-plug on all bridges if hot-plug is enabled on the= slot. + * (unless broken 6.1 ABI is enforced for compat reasons) */ if (s->hotplug && - (s->native_hotplug || DEVICE(dev)->hotplugged)) { + (!s->hide_native_hotplug_cap || DEVICE(dev)->hotplugged)) { pci_long_test_and_set_mask(dev->config + pos + PCI_EXP_SLTCAP, PCI_EXP_SLTCAP_HPS | PCI_EXP_SLTCAP_HPC); diff --git a/hw/pci/pcie_port.c b/hw/pci/pcie_port.c index 687e4e763a..65a397ad23 100644 --- a/hw/pci/pcie_port.c +++ b/hw/pci/pcie_port.c @@ -173,7 +173,8 @@ static Property pcie_slot_props[] =3D { DEFINE_PROP_UINT8("chassis", PCIESlot, chassis, 0), DEFINE_PROP_UINT16("slot", PCIESlot, slot, 0), DEFINE_PROP_BOOL("hotplug", PCIESlot, hotplug, true), - DEFINE_PROP_BOOL("x-native-hotplug", PCIESlot, native_hotplug, true), + DEFINE_PROP_BOOL("x-do-not-expose-native-hotplug-cap", PCIESlot, + hide_native_hotplug_cap, false), DEFINE_PROP_END_OF_LIST() }; =20 --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673538665; cv=none; d=zohomail.com; s=zohoarc; b=Hgfzlapfixw+pqy2HwgvypNWW8P4tbKM9MVLW2k8PSMOwfLnu/HVcEyCgkRMCYz3wLQBPFQtVS7orMMBGaKizarjgJYGuE/AhAY1JJyeg5o3Iq6kp1Sl4jAmvSmGTRM95U6GVsCTZ6qMB8bBWXTYsVg6i/NcGlMGK9LGVoQEDac= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673538665; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5y+uFhppFRUUtN2ntgLPTXb9aS86BpPqJCSdEEZZAQs=; b=ft6HoIEUEwnQGjVvRhIRRBu2vUXZLpoMtuJt+aKVwpXHdFDgk6F/FexF1iG+XgoDh/duqbJ4+O/lBliRIVkvika0icI34wgh8DqPfJoA/yYG/DIhxGCounFWfRYsO6UQKEAsidlx7cphbr0STLZ2mN6dccHVuJr4zVoCrCw8jQs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673538665127394.88694315868315; Thu, 12 Jan 2023 07:51:05 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBZ-0002cY-JY; Thu, 12 Jan 2023 09:04:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBE-0002Cf-Rw for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:45 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB9-0005t5-Gl for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:44 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-137-UhJgAn0yMui0JGWhlgVxzQ-1; Thu, 12 Jan 2023 09:03:24 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9934185C6FD; Thu, 12 Jan 2023 14:03:22 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id EF26A4085720; Thu, 12 Jan 2023 14:03:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532206; 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=5y+uFhppFRUUtN2ntgLPTXb9aS86BpPqJCSdEEZZAQs=; b=BqBGm5m/iHmbWFQ+IrTtjwbdJy6EXT6JTzu2B202mk74KnmhQdcDRutxMIyNhXKds1mMJI 6lLMw9AH5ef0G27ClLLtwC9ynYaQzNfK30Y1jc2mdAda+f78BB4ie053YFi1dPPiSpsr+D L3bA3BL0VDv5AkG1KoyUrEMpEto8FVM= X-MC-Unique: UhJgAn0yMui0JGWhlgVxzQ-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 10/40] pcihp: piix4: do not call acpi_pcihp_reset() when ACPI PCI hotplug is disabled Date: Thu, 12 Jan 2023 15:02:42 +0100 Message-Id: <20230112140312.3096331-11-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673538667192100003 piix4_pm_reset() is calling acpi_pcihp_reset() when ACPI PCI hotplug is disabled, which leads to assigning BSEL properties to bridges on path acpi_set_bsel() ... if (qbus_is_hotpluggable(BUS(bus))) { // above happens to be true by default (though it's SHPC hotplug = handler) // set BSEL } At the moment the issue is masked by the fact that we use not only BSEL, to decide if we should generated hoplug AML but also pcihp_bridge_en knob. However the later patches will drop dependency on pcihp_bridge_en, and use only BSEL exclusively to decide if hotplug AML for slots should be = built, which exposes issue. We should not ever call acpi_pcihp_reset() if ACPI PCI hotplug is disabled, make it so. PS: * Q35 does the right thing (i.e. it calls acpi_pcihp_reset only when pcihp= is enabled) * the issue also makes acpi_pcihp_update() logic run on SHPC enabled bridg= es, which seems to be harmless Fixes: 3d7e78aa777 ("Introduce a new flag for i440fx to disable PCI hotplug= on the root bus") Signed-off-by: Igor Mammedov --- CC: "Philippe Mathieu-Daud=C3=A9" --- hw/acpi/piix4.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index 0a81f1ad93..f256761e55 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c @@ -305,7 +305,9 @@ static void piix4_pm_reset(DeviceState *dev) acpi_update_sci(&s->ar, s->irq); =20 pm_io_space_update(s); - acpi_pcihp_reset(&s->acpi_pci_hotplug, !s->use_acpi_root_pci_hotplug); + if (s->use_acpi_hotplug_bridge || s->use_acpi_root_pci_hotplug) { + acpi_pcihp_reset(&s->acpi_pci_hotplug, !s->use_acpi_root_pci_hotpl= ug); + } } =20 static void piix4_pm_powerdown_req(Notifier *n, void *opaque) --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673534183; cv=none; d=zohomail.com; s=zohoarc; b=S2yBV35xUUc8Z3yD52Pt3jfLDteQc4W6CksaDpz1pOMHQREUyrk9MOU5z1pnnRlpiS+HKejXIdybrGCeKQrxyYNHb4LfSLpZY4URbDXczYwkN37kRuLYmiluAQj9va3/CToqt0T5fQ6jHjb8+LbcL6rIElaCqtoO+3AnG62QGdE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673534183; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rnkNn5C/1yFkMatHbixrCzwP9G2an3F9waSDwdE8/ts=; b=d4cc6scqwPz5AXwOQXOUV5fE+ckfg4TBLuXFS5E6/UOYO+l1w7wG+o5wB+De+KWaG+j6658/n5qe9EBUlNPZsjowcOw5Lcq8PMPwd9Uif07tVPd37dO+7LALBPhP2z/hK3Uhak0p6kzwLIQnPVTnS5ZpKFBALsUPNNP9Uomxinw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTP id 1673534183283942.877230875661; Thu, 12 Jan 2023 06:36:23 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBO-0002L8-MT; Thu, 12 Jan 2023 09:03:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBG-0002Ea-42 for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:46 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBB-0005tt-MW for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:45 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-180-H-2H_1U7M3CU4SNgYc813Q-1; Thu, 12 Jan 2023 09:03:24 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 59A743C4221A; Thu, 12 Jan 2023 14:03:23 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id C93AB4085720; Thu, 12 Jan 2023 14:03:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532212; 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=rnkNn5C/1yFkMatHbixrCzwP9G2an3F9waSDwdE8/ts=; b=Kk4cvY7o0ERGY4h13Gv3ti0DgHQWXzr/pknn+RbZ7KCq3IRp5TwJPcljAu1Jxn2JYW1DJK wOIX/QqBdi6ztvo0COGNpK4XFL8pvMg4FSu4oLA5Zb+U/e9E3b/WHTPSlslmnDhmNxk8o/ ZWGLHm0vnRSTE0vW6FRMVPO9sxnd/8Y= X-MC-Unique: H-2H_1U7M3CU4SNgYc813Q-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 11/40] pci: acpihp: assign BSEL only to coldplugged bridges Date: Thu, 12 Jan 2023 15:02:43 +0100 Message-Id: <20230112140312.3096331-12-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673534184460100002 ACPI PCI hotplug would broken after bridge hotplug and then migration if hotplugged bridge were specified on target at command line. Currently it's not possible since, 'hotplugged' property was made read-only for some time now. The issue would happen due to BSEL being assigned to all bridges during 1st 'reset': source seq: 1. start 'pc' machine =3D> sets BSEL to 0 on pci.0 (host-bridge) 2. hotplug bridge, no bsel is assigned (so far is ok) target seq: 1. start 'pc' machine with -S -device pci-bridge,id=3Dhp_br,hotplugged=3Don BSEL gets assigned to as follows hp_br: 0 pci.0: 1 as result hotplug requests with migrated AML generated on source would be misdirected to 'hp_br' instead of intended pci.0 While it's not issue at the moment, it's based on implicit assumptions * 'hotplugged' property is read-only * 1st reset happens before QEMU drops into monitor mode which lets add hotplugged on source bridges as hotplugged ones (anything added at that stage counts as hotplugged (yet another assumption)) All of it looks too fragile to me, so lets restrict BSEL only to cold-plugged bridges explicitly. Migration wise it shouldn't break anything since assignment order stays the same: * user can't specify 'hotplugged=3Don' on CLI * user can't specify 'hotplugged=3Doff' at monitor stage or later on older QEMU versions where 'hotplugged' is RW, hotplug is broken after migration anyways and we cannot do anything to fix that. Signed-off-by: Igor Mammedov --- hw/acpi/pcihp.c | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c index 99a898d9ae..5dc7377411 100644 --- a/hw/acpi/pcihp.c +++ b/hw/acpi/pcihp.c @@ -85,31 +85,40 @@ static int acpi_pcihp_get_bsel(PCIBus *bus) } } =20 -/* Assign BSEL property to all buses. In the future, this can be changed - * to only assign to buses that support hotplug. - */ +typedef struct { + unsigned bsel_alloc; + bool has_bridge_hotplug; +} BSELInfo; + +/* Assign BSEL property only to buses that support hotplug. */ static void *acpi_set_bsel(PCIBus *bus, void *opaque) { - unsigned *bsel_alloc =3D opaque; + BSELInfo *info =3D opaque; unsigned *bus_bsel; + DeviceState *br =3D bus->qbus.parent; + bool is_bridge =3D IS_PCI_BRIDGE(br); =20 + /* hotplugged bridges can't be described in ACPI ignore them */ if (qbus_is_hotpluggable(BUS(bus))) { - bus_bsel =3D g_malloc(sizeof *bus_bsel); + if (!is_bridge || (!br->hotplugged && info->has_bridge_hotplug)) { + bus_bsel =3D g_malloc(sizeof *bus_bsel); =20 - *bus_bsel =3D (*bsel_alloc)++; - object_property_add_uint32_ptr(OBJECT(bus), ACPI_PCIHP_PROP_BSEL, - bus_bsel, OBJ_PROP_FLAG_READ); + *bus_bsel =3D info->bsel_alloc++; + object_property_add_uint32_ptr(OBJECT(bus), ACPI_PCIHP_PROP_BS= EL, + bus_bsel, OBJ_PROP_FLAG_READ); + } } =20 - return bsel_alloc; + return info; } =20 -static void acpi_set_pci_info(void) +static void acpi_set_pci_info(bool has_bridge_hotplug) { static bool bsel_is_set; Object *host =3D acpi_get_i386_pci_host(); PCIBus *bus; - unsigned bsel_alloc =3D ACPI_PCIHP_BSEL_DEFAULT; + BSELInfo info =3D { .bsel_alloc =3D ACPI_PCIHP_BSEL_DEFAULT, + .has_bridge_hotplug =3D has_bridge_hotplug }; =20 if (bsel_is_set) { return; @@ -123,7 +132,7 @@ static void acpi_set_pci_info(void) bus =3D PCI_HOST_BRIDGE(host)->bus; if (bus) { /* Scan all PCI buses. Set property to enable acpi based hotplug. = */ - pci_for_each_bus_depth_first(bus, acpi_set_bsel, NULL, &bsel_alloc= ); + pci_for_each_bus_depth_first(bus, acpi_set_bsel, NULL, &info); } } =20 @@ -287,7 +296,7 @@ void acpi_pcihp_reset(AcpiPciHpState *s, bool acpihp_ro= ot_off) if (acpihp_root_off) { acpi_pcihp_disable_root_bus(); } - acpi_set_pci_info(); + acpi_set_pci_info(!s->legacy_piix); acpi_pcihp_update(s); } =20 --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673539733; cv=none; d=zohomail.com; s=zohoarc; b=OWG4kwHRfLfh/7X4xuzGPSdQQxU9KTM9jN5QFzMYTMJ0F98EuhRQqlsLm0C5ytlUbx/0NkQOZuDIQcxL3U3J4QhsjioTeZgds80A5PBLCTAS0jxJAb68aVmYe+iADjcNNdzKSNscniUouCyIB/gEZs8BzMmQjjTrciwisJKHPec= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673539733; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=dcGsRMmDLHLMvXZoMK4rumw8aWt8WQSlzF+bbXq4spI=; b=XUe/Whsm+M7FgokBc95g7X/nhLlP+Pvg2srrxpQSeHHVWGGkuHDBG5uJOF/n7DfU4hmFC2OantlXfHrkHQmZVXHceAVNU8nHgZ7v9mWgU1fEKoT/oia104VxBv7/tmb6Z1CyOXMDiNiG0xHj+jdvl0kZJE1pbpYEO+8/hLzllJ8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673539733591625.1103124398568; Thu, 12 Jan 2023 08:08:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBN-0002Jc-Rl; Thu, 12 Jan 2023 09:03:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB9-000276-OL for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:44 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB2-0005tc-EG for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:35 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-111-FEMSx41KP86s-sWcSBWcaQ-1; Thu, 12 Jan 2023 09:03:28 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1B8711039626; Thu, 12 Jan 2023 14:03:24 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 89D114085720; Thu, 12 Jan 2023 14:03:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532211; 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=dcGsRMmDLHLMvXZoMK4rumw8aWt8WQSlzF+bbXq4spI=; b=V8HfK658Dhx5cocR6dzdJnICpxAjEA44mHPqUdqP+FmM7Gi7KuK3gsyaFKGmKuI7A2oBdC DyXcTqbTAUBxnBZzkDdhFIiJQlQGowGDkQZnmxB6X2Vr8Tf2Gohu3FKbbGhMNgQjO5nOFx DT0f2v56dRDjPkdfyI5etKf4fHELojo= X-MC-Unique: FEMSx41KP86s-sWcSBWcaQ-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 12/40] x86: pcihp: fix invalid AML PCNT calls to hotplugged bridges Date: Thu, 12 Jan 2023 15:02:44 +0100 Message-Id: <20230112140312.3096331-13-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673539734926100001 When QEMU is started with hotplugged bridges (think migration): QEMU -S -monitor stdio \ -device pci-bridge,chassis_nr=3D1 \ -device pci-bridge,bus=3Dpci.1,addr=3D1.0,chassis_nr=3D2 (qemu) device_add pci-bridge,id=3Dhpbr,bus=3Dpci.1,addr=3D2.0,chassis_nr= =3D3 (qemu) cont it will generate AML calls to hpbr's PCNT, which doesn't exists since it's hotplugged bridge. As result DSDT becomes malformed, with consequences that hotplug might stop working at best or crash guest OS at worst, when it attempts to call non existing PCNT method or during OS guest reboot when parsing DSDT again. IASL de-compiles malformed AML of above config DSDT as: + External (_SB_.PCI0.S18_.S10_.PCNT, MethodObj) // Warning: Unkno= wn method, guessing 1 arguments + External (_SB_.PCI0.S18_.S19_.PCNT, MethodObj) // Warning: Unkno= wn method, guessing 2 arguments ... BNUM =3D One DVNT (PCIU, One) DVNT (PCID, 0x03) - ^S08.PCNT () + ^S19.PCNT (^S10.PCNT (^S08.PCNT ())) } } With BSEL assignment limited only to coldplugged bridges [1], it should be possible to add PCNT call to a child bridge only if the child has BSEL property, otherwise ignore it since it's hotplugged. Which should fix the issue. 1) ("pci: acpihp: assign BSEL only to coldplugged bridges") Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 8a35c3cad0..71899de37a 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -517,7 +517,8 @@ static void build_append_pci_bus_devices(Aml *parent_sc= ope, PCIBus *bus, /* Notify about child bus events in any case */ if (pcihp_bridge_en) { QLIST_FOREACH(sec, &bus->child, sibling) { - if (pci_bus_is_root(sec)) { + if (pci_bus_is_root(sec) || + !object_property_find(OBJECT(sec), ACPI_PCIHP_PROP_BSE= L)) { continue; } =20 --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673533686; cv=none; d=zohomail.com; s=zohoarc; b=YcaxedrzZ+3W9ITzLvTLEEva8MMSs7Srj7bXkfMRvglCNCkPcsSWdE+iX10B0PDisr/dUIYDqqHeGIoPqAO8F5q7q1C/012QJOxCKcU6RcxTYB9JbXlyeImMeoKYdKJI2+TIOjdv6rr2Yv8znn/VQ2Q1VBqzAD+5JbSY7vprM9o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673533686; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=JsFI+zscfLJvCX02h4l8pIliGywTrfoZtd66SghtoTY=; b=NlGlPIyhr+CUIxvZqeKcgf5N5eFLTrWPqLHs3/bH22/F8EIMSopAe84dpAErTRh4gWlJ44pxLUJYE9/4sr333wyAZu/jLf5BwxiWNQHFiwBcmNQFmD0fkl+6IClrsyMyBDz1IHLyeobU6C+Is7jOZGYHKqEjGJ8rxlxpYG/Yr/w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTP id 1673533686826869.7308943752122; Thu, 12 Jan 2023 06:28:06 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBU-0002RX-4K; Thu, 12 Jan 2023 09:04:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBE-0002Cg-Ra for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:45 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBB-0005vi-MN for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:44 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-670-mVucXNBLOmOjDapxMJixig-1; Thu, 12 Jan 2023 09:03:31 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0E8F23804082; Thu, 12 Jan 2023 14:03:25 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4B7764085720; Thu, 12 Jan 2023 14:03:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532215; 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=JsFI+zscfLJvCX02h4l8pIliGywTrfoZtd66SghtoTY=; b=B3nmSTJlKCkCaJOGu2fBTPjWO+1DaQTUUU7MbvbySTVq1hDk+2cbFYzj/vdHJQWY5WdDYH QLa3yuNUSBAN3grMaQf06Ujbq/Ek/L91LnLA9yhzkLaerEKUasORcLxEjI2BncDHQCxPfv qgkOMDofpYnPql6Y8HKWr26wIe6560c= X-MC-Unique: mVucXNBLOmOjDapxMJixig-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha , Thomas Huth , Laurent Vivier Subject: [PATCH 13/40] tests: boot_sector_test: avoid crashing if status is not available yet Date: Thu, 12 Jan 2023 15:02:45 +0100 Message-Id: <20230112140312.3096331-14-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673533687790100001 If test case was started in paused mode (-S CLI option) and then allowed to continue via QMP, boot_sector_test could assert on transient state with following error: assertion failed (qdict_get_try_str(qret, "status") =3D=3D "running"): (= NULL =3D=3D "running") Instead of crashing test if 'status' is not available yet, skip check and repeat iteration again after TEST_DELAY has elapsed. Signed-off-by: Igor Mammedov --- CC: Thomas Huth CC: Laurent Vivier --- tests/qtest/boot-sector.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/qtest/boot-sector.c b/tests/qtest/boot-sector.c index 44a109abd8..d3f68018e7 100644 --- a/tests/qtest/boot-sector.c +++ b/tests/qtest/boot-sector.c @@ -160,7 +160,9 @@ void boot_sector_test(QTestState *qts) qrsp =3D qtest_qmp(qts, "{ 'execute': 'query-status' }"); qret =3D qdict_get_qdict(qrsp, "return"); g_assert_nonnull(qret); - g_assert_cmpstr(qdict_get_try_str(qret, "status"), =3D=3D, "runnin= g"); + if (qdict_get_try_str(qret, "status")) { + g_assert_cmpstr(qdict_get_try_str(qret, "status"), =3D=3D, "ru= nning"); + } qobject_unref(qrsp); =20 g_usleep(TEST_DELAY); --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673535474; cv=none; d=zohomail.com; s=zohoarc; b=bIjB8gdTB8/k5WZoggi5RgJmu/KWNxWhxPbflw/DElnH7qgNb91KWeP9a4WdZ6j8StcTyEiV5ILEj63QRixlI82lLqHnyj+sMjIqE99vG3MMktM5hb31DeTOj6YL660NQ15x/CaEKyy/qZxJJhIJ1hafl22TVQ43z9+DJrg5jTc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673535474; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Ned3Y83Tpb+x6d2IOOb4JL2MT1vgFSygrjY7rXYPS9g=; b=TOryweiml6jY066HuZsg3dNrungNdTjM0UDELI2BaltxB34Z7klHVd5WQy4aTFGG8fQJAo1LVJFeXT8j1vpZ+X4xdKKKQYJq+YeSP1Vkgbjl23hzgVms6nV/Rus0XqoLFPlNQVBEKTH3rB7CW7FL8jQL4cQ+pc0BEqV+vsW6Me4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673535474785810.1560194285861; Thu, 12 Jan 2023 06:57:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBS-0002Om-8Z; Thu, 12 Jan 2023 09:03:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB9-00027K-Ph for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:44 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB2-0005tS-Sf for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:36 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-486-ReU688PHOyev2VqMRjMmZw-1; Thu, 12 Jan 2023 09:03:26 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C49BD8030D0; Thu, 12 Jan 2023 14:03:25 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3ED8C4085720; Thu, 12 Jan 2023 14:03:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532210; 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=Ned3Y83Tpb+x6d2IOOb4JL2MT1vgFSygrjY7rXYPS9g=; b=eY4Pke3X7eSXtPB5OPPOJKwNXytGHUpjeIjnXypvHmuhot5ap62WddqBt1xxFMoFCVRn7t pZWB+lecUMjEfYRx+E/2+Nwfq/V9GR5hNxPor1f3QygKzeqdNscRoBXcMMIRXnL76dOwEu 1Ti6Rik7QFWBC/H1yl73jI5P1oy+72Y= X-MC-Unique: ReU688PHOyev2VqMRjMmZw-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 14/40] tests: acpi: extend bridge tests with hotplugged bridges Date: Thu, 12 Jan 2023 15:02:46 +0100 Message-Id: <20230112140312.3096331-15-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673535475227100001 with previous commit fixing malformed PCNT calls to hotplugged bridges, it should be possible add coldplug/hotplug test when describing PCI topology in DSDT without breeaking CI. Signed-off-by: Igor Mammedov --- PS: no need to update expected blobs as hotplugged bridges shouldn't be visible (i.e. have its own slots described) --- tests/qtest/bios-tables-test.c | 48 ++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index cb95f687fe..b65e864a9c 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -805,12 +805,15 @@ static char *test_acpi_create_args(test_data *data, c= onst char *params) return args; } =20 -static void test_acpi_one(const char *params, test_data *data) +static void test_vm_prepare(const char *params, test_data *data) { - char *args; - - args =3D test_acpi_create_args(data, params); + char *args =3D test_acpi_create_args(data, params); data->qts =3D qtest_init(args); + g_free(args); +} + +static void process_acpi_tables(test_data *data) +{ test_acpi_load_tables(data); =20 if (getenv(ACPI_REBUILD_EXPECTED_AML)) { @@ -830,7 +833,12 @@ static void test_acpi_one(const char *params, test_dat= a *data) } =20 qtest_quit(data->qts); - g_free(args); +} + +static void test_acpi_one(const char *params, test_data *data) +{ + test_vm_prepare(params, data); + process_acpi_tables(data); } =20 static uint8_t base_required_struct_types[] =3D { @@ -861,8 +869,21 @@ static void test_acpi_piix4_tcg_bridge(void) data.variant =3D ".bridge"; data.required_struct_types =3D base_required_struct_types; data.required_struct_types_len =3D ARRAY_SIZE(base_required_struct_typ= es); - test_acpi_one("-device pci-bridge,chassis_nr=3D1 " - "-device pci-bridge,bus=3Dpci.1,addr=3D1.0,chassis_nr=3D= 2 ", &data); + test_vm_prepare("-S" + " -device pci-bridge,chassis_nr=3D1" + " -device pci-bridge,bus=3Dpci.1,addr=3D1.0,chassis_nr=3D2", &data= ); + + /* hotplugged bridges section */ + qtest_qmp_device_add(data.qts, "pci-bridge", "hpbr", + "{'bus': 'pci.1', 'addr': '2.0', 'chassis_nr': 3 }"); + qtest_qmp_device_add(data.qts, "pci-bridge", "hpbr_multifunc", + "{'bus': 'pci.1', 'addr': '0xf.1', 'chassis_nr': 4 }"); + qtest_qmp_device_add(data.qts, "pci-bridge", "hpbrhost", + "{'bus': 'pci.0', 'addr': '4.0', 'chassis_nr': 5 }"); + qtest_qmp_send(data.qts, "{'execute':'cont' }"); + qtest_qmp_eventwait(data.qts, "RESUME"); + + process_acpi_tables(&data); free_test_data(&data); } =20 @@ -962,7 +983,7 @@ static void test_acpi_q35_multif_bridge(void) .machine =3D MACHINE_Q35, .variant =3D ".multi-bridge", }; - test_acpi_one( + test_vm_prepare("-S" " -device virtio-balloon,id=3Dballoon0,addr=3D0x4.0x2" " -device pcie-root-port,id=3Drp0,multifunction=3Don," "port=3D0x0,chassis=3D1,addr=3D0x2" @@ -974,6 +995,17 @@ static void test_acpi_q35_multif_bridge(void) " -device pcie-root-port,id=3Drphptgt3,port=3D0x0,chassis=3D7,addr= =3D2.3", &data); =20 + /* hotplugged bridges section */ + qtest_qmp_device_add(data.qts, "pci-bridge", "hpbr1", + "{'bus': 'br1', 'addr': '6.0', 'chassis_nr': 128 }"); + qtest_qmp_device_add(data.qts, "pci-bridge", "hpbr2-multiif", + "{ 'bus': 'br1', 'addr': '2.2', 'chassis_nr': 129 }"); + qtest_qmp_device_add(data.qts, "pcie-pci-bridge", "hpbr3", + "{'bus': 'rp0', 'addr': '0.0' }"); + qtest_qmp_send(data.qts, "{'execute':'cont' }"); + qtest_qmp_eventwait(data.qts, "RESUME"); + + process_acpi_tables(&data); free_test_data(&data); } =20 --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673537928; cv=none; d=zohomail.com; s=zohoarc; b=QbIGzHL4RR59SVuIwdXLp1C5SxziiDvwDKypkyqNVHh1HIq6j8o/f+RXh6oYRKzgl5gyOvhTpoubUbtaIMeTPjSwf7xmiQ19yHEmg3iagR3B/aiZW8apzAScNYmYlOaUWh4HJM/uspKA1M0Ow2u5wHe2op4We1SEE2UoNUXnMEU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673537928; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=yMjb4iAhFx/d60nuJYZ8m86PInpCUfFMHjzGv5toOsc=; b=ZKpchbAMD95Vb9uOPms6VxyS2E729J1W7HsTk9qilEr21Zmbc+vqticPj+XWGHSZ6zGudpmyFDdtGI570IA98A+bpsRu1JigLrqR6qVYppungtULHFSnghS4ofSMXaIGWpQg7oLTQ518aJYe0nZjU8w0Owq/TlaIMczisilsL3o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673537928966967.6133940006767; Thu, 12 Jan 2023 07:38:48 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBG-0002EQ-3f; Thu, 12 Jan 2023 09:03:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB9-000278-Nx for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:42 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB2-0005tg-UT for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:36 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-447-7Fv9fscIOO-_R2u4HGXd0A-1; Thu, 12 Jan 2023 09:03:29 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B786485C6F1; Thu, 12 Jan 2023 14:03:26 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id F41C54085720; Thu, 12 Jan 2023 14:03:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532211; 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=yMjb4iAhFx/d60nuJYZ8m86PInpCUfFMHjzGv5toOsc=; b=UrhCCeuV15LhQ2F0yDpKqReB/ycqOfwBCypwhXnCSAQ+td/9ciT7Rr9nOXvZK6bJn7Ys64 ZhIfl84P6erAneMRQp+H4le8UP7GgbcQj1Ymq0pPtEpHVHrsvvteACPf0U5KYgHw7wbE4K y5f0hClW3JYM/xL8J5EBwXt4qABb9M0= X-MC-Unique: 7Fv9fscIOO-_R2u4HGXd0A-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha , Thomas Huth , Laurent Vivier Subject: [PATCH 15/40] tests: boot_sector_test(): make it multi-shot Date: Thu, 12 Jan 2023 15:02:47 +0100 Message-Id: <20230112140312.3096331-16-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673537931300100003 if the function is called the 2nd time within the same qtest session, it will prematurely return before boot sector is executed due to remaining signature. Follow up patch will add VM reboot to a test case and will call boot_sector_test() again within the same qtest env, which may lead to above issue. To fix it make sure signature in VM RAM is no more before exiting boot_sector_test(), so next time it's called it will wait boot sector is completed again. Signed-off-by: Igor Mammedov --- CC: Thomas Huth CC: Laurent Vivier --- tests/qtest/boot-sector.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qtest/boot-sector.c b/tests/qtest/boot-sector.c index d3f68018e7..679ee17e2a 100644 --- a/tests/qtest/boot-sector.c +++ b/tests/qtest/boot-sector.c @@ -153,6 +153,8 @@ void boot_sector_test(QTestState *qts) signature_high =3D qtest_readb(qts, SIGNATURE_ADDR + 1); signature =3D (signature_high << 8) | signature_low; if (signature =3D=3D SIGNATURE) { + /* wipe signature */ + qtest_writeb(qts, SIGNATURE_ADDR, 0x00); break; } =20 --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673537622; cv=none; d=zohomail.com; s=zohoarc; b=XBjUtVxRBCBN0nY5+dhPbEr4ZDGmXt9AHkjuBwQ8Pfi8Dg85t6NN83cC5v4XmtG+3w/bsSOoksxTW4/ZThr9At8vtYap+w1FwMXI5/5gyK8iVWrkbLzwfnjj7fufE7LLwWEG0HQFii2wFS9BUFv2WGC1kl/gIai6EwWsSkjLJ0Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673537622; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=YeZBW8hQfVtgBQC5YyazjW8Oz3umG81OOxn1gCFh8rQ=; b=iYV4AGrASmeu62J6GlHkxmEjLx6ncw2gHAf8YfmmOQxrInT4sL0xZ5kcT5TBio4Ap5itwnQ2+oIMnwcXRA5huTmza7nm5O9ammprKPu+qeM7jRiIM9BGpaDkT9kJxp8MHT9IiD8yZ+pE21EIH5pP0umJuDIU9MfltH7pHxKqX3U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16735376225941001.166931935262; Thu, 12 Jan 2023 07:33:42 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBP-0002LH-AO; Thu, 12 Jan 2023 09:03:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB9-000274-Ms for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:42 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB3-0005tX-2e for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:37 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-600-VepHKZrTMdOkmax5cEvMlg-1; Thu, 12 Jan 2023 09:03:27 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7915E3C42231; Thu, 12 Jan 2023 14:03:27 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id E798C4085720; Thu, 12 Jan 2023 14:03:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532210; 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=YeZBW8hQfVtgBQC5YyazjW8Oz3umG81OOxn1gCFh8rQ=; b=KNWITcm8KCGgH+wm7XqxYN2AJIuqDFtz9LhFbtYKnElpFMbAKCT1qRHrMViNqFA1x4TDb9 4oc7kGEs7ZodxlrkP5I3QTehX0Pb4jWoTNw9Y9zaEK6wb5SPwYug2YEteCqU7RAGprLTp6 rw6XDkMA/ObRFAUI1JnaEzz9VhfNeLE= X-MC-Unique: VepHKZrTMdOkmax5cEvMlg-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 16/40] tests: acpi: add reboot cycle to bridge test Date: Thu, 12 Jan 2023 15:02:48 +0100 Message-Id: <20230112140312.3096331-17-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673537624084100001 hotplugged bridges should not be described in DSDT, while it works on cold boot, some ACPPI PCI code are invoked during reboot. This patch will let us catch unexpected AML if hotplug checks are broken. Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index b65e864a9c..a8c17461c8 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -812,7 +812,7 @@ static void test_vm_prepare(const char *params, test_da= ta *data) g_free(args); } =20 -static void process_acpi_tables(test_data *data) +static void process_acpi_tables_noexit(test_data *data) { test_acpi_load_tables(data); =20 @@ -831,7 +831,11 @@ static void process_acpi_tables(test_data *data) SmbiosEntryPointType ep_type =3D test_smbios_entry_point(data); test_smbios_structs(data, ep_type); } +} =20 +static void process_acpi_tables(test_data *data) +{ + process_acpi_tables_noexit(data); qtest_quit(data->qts); } =20 @@ -883,6 +887,11 @@ static void test_acpi_piix4_tcg_bridge(void) qtest_qmp_send(data.qts, "{'execute':'cont' }"); qtest_qmp_eventwait(data.qts, "RESUME"); =20 + process_acpi_tables_noexit(&data); + free_test_data(&data); + + /* check that reboot/reset doesn't change any ACPI tables */ + qtest_qmp_send(data.qts, "{'execute':'system_reset' }"); process_acpi_tables(&data); free_test_data(&data); } @@ -1005,6 +1014,11 @@ static void test_acpi_q35_multif_bridge(void) qtest_qmp_send(data.qts, "{'execute':'cont' }"); qtest_qmp_eventwait(data.qts, "RESUME"); =20 + process_acpi_tables_noexit(&data); + free_test_data(&data); + + /* check that reboot/reset doesn't change any ACPI tables */ + qtest_qmp_send(data.qts, "{'execute':'system_reset' }"); process_acpi_tables(&data); free_test_data(&data); } --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673539953; cv=none; d=zohomail.com; s=zohoarc; b=aAGSN8huX9JdJxj9q0EIaKd1V9WukBrGzKadHSuzrrwx7tuRe/M04lVKXFuM+NoNlP34Giz/9qt6Jq9AVsNseHdCQOcFtuamnPcxDldgVlIC/5mCZuhULoGN2QY/JlseeJ6JKjFm38ceJ1NiXNPnWUWRbtoIjL3DyxR5pOqhJLU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673539953; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=L+QnaVe5NDBJ+H7tW7WkUGKlfBJmEJMy5rtLMVft+Ww=; b=bDu1kt2XpqEd2WDeEG2YJF4Vpq4aP5xuQOMdcKbLYpbC5Zn+d8WGLePpWTVb417RdMYVnz2RPHOFCz7g9TmtG07vMst6QaCPiXU6va/2wMJMQ4+rN9pSi7bYQ2HsMr21wdDvwDZjHW7hZ1ShQPPBB0K7XyC9FoJkcYJgHA/O0xQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673539953118974.759668311671; Thu, 12 Jan 2023 08:12:33 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBT-0002QJ-1k; Thu, 12 Jan 2023 09:03:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBC-00028y-3a for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:44 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB7-0005vM-35 for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:40 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-614-HdIHWFtRMS-AwANqnFoo4w-1; Thu, 12 Jan 2023 09:03:31 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3A1673C4222A; Thu, 12 Jan 2023 14:03:28 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id A8F444085721; Thu, 12 Jan 2023 14:03:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532213; 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=L+QnaVe5NDBJ+H7tW7WkUGKlfBJmEJMy5rtLMVft+Ww=; b=bW1wc/ONKaK4tHf2YPmbnfgiQyLfgFS2fj/QUg0CVf83mjGw53MXLQslYPbWNe5nDjtMZV Ze55kuFbMAikfPTEhagvxoaedfGXPvQM8//b+IckJD5uzjTO/MakzuQ8NeJeWo20SD2Cbd 46ol/U/+9Xl7X2Gp3SLIKQhELB8+V8A= X-MC-Unique: HdIHWFtRMS-AwANqnFoo4w-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 17/40] tests: acpi: whitelist DSDT before refactoring acpi based PCI hotplug machinery Date: Thu, 12 Jan 2023 15:02:49 +0100 Message-Id: <20230112140312.3096331-18-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673539953754100001 Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index dfb8523c8b..dea61d94f1 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/pc/DSDT.hpbrroot", --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673539958; cv=none; d=zohomail.com; s=zohoarc; b=f5FRRNkWrK76PCYh5kz/6nd1sJHmDnhlYkJPEljkcyUUKpUGT/bpBKlb1HvT9zimjGZ4oGJI4MWbVBLU5+IQ/P0NTMbp26C8TWiZgBno5sxm4vPRCSc6NsNdOZNUKjULMclkU3Oq9FvIGFZxIci63/Pyjk4efvYd3UP6t6X2mQQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673539958; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=vQz3l+BCIz60arNhkUQxkFwAmcifUfyBnIaQlBYi4Nk=; b=JvHN5yaTZ0Zq80dxpachfgXeQ7TPjGGIuk9LTKatrtLPsQmKK/A5jTtvqyJfXhcQB2niezVCiIPiyD0iTPMMTvbVZ2LqUTVjT51vZmO2YJ/QqpWIi51IQlcqWcEqtX1+XP6zgehgfcCx9hS+0oxcBcDHMoi+K2O6PwjrSFTQJSA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673539958627669.5459795537521; Thu, 12 Jan 2023 08:12:38 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBM-0002It-IN; Thu, 12 Jan 2023 09:03:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBB-00027v-2R for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:44 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB4-0005tl-Ib for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:38 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-438-rhSTtPeXOIyC5nE2iBZXqg-1; Thu, 12 Jan 2023 09:03:30 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F019F3802B8E; Thu, 12 Jan 2023 14:03:28 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6A1EA4085720; Thu, 12 Jan 2023 14:03:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532212; 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=vQz3l+BCIz60arNhkUQxkFwAmcifUfyBnIaQlBYi4Nk=; b=RG+wURwjiUCBGsPMHq9Xj5PYdKBe5g5cT0SuutfvsweLF4bLq4qwbs98PgugoJuOM/bZTc X1/hlBgc/Myb2BJwLTVwC1/VvadycYBlC3j4/ZXwpuJ6s0PxnMDFYXQ6ym+oy4+IXru+iQ YFGuRB8F+Eu8n5M/CBZ/p19RCvmUooo= X-MC-Unique: rhSTtPeXOIyC5nE2iBZXqg-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 18/40] pcihp: drop pcihp_bridge_en dependency when composing PCNT method Date: Thu, 12 Jan 2023 15:02:50 +0100 Message-Id: <20230112140312.3096331-19-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673539959928100004 .. and use only BSEL presence to decide on how PCNT should be composed. That simplifies possible combinations to consider, but mainly it makes PCIHP AML be governed only by BSEL, which is property of PCIBus (aka part of bridge) and as result it opens possibility to convert build_append_pci_bus_devices() into AcpiDevAmlIf::build_dev_aml callback to make bridges self describing. PS: used approach leaves unused PCNT, when ACPI hotplug is completely disabled but that's harmless and followup commits will get rid of it later. Scope (PCI0) ... Method (PCNT, 0, NotSerialized) { } ... } Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 47 ++++++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 71899de37a..146f48e4ac 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -496,39 +496,34 @@ static void build_append_pci_bus_devices(Aml *parent_= scope, PCIBus *bus, aml_append(parent_scope, notify_method); } =20 - /* Append PCNT method to notify about events on local and child buses. - * Add this method for root bus only when hotplug is enabled since DSDT - * expects it. + /* + * Append PCNT method to notify about events on local and child buses. */ - if (bsel || pcihp_bridge_en) { - method =3D aml_method("PCNT", 0, AML_NOTSERIALIZED); - - /* If bus supports hotplug select it and notify about local events= */ - if (bsel) { - uint64_t bsel_val =3D qnum_get_uint(qobject_to(QNum, bsel)); + method =3D aml_method("PCNT", 0, AML_NOTSERIALIZED); =20 - aml_append(method, aml_store(aml_int(bsel_val), aml_name("BNUM= "))); - aml_append(method, aml_call2("DVNT", aml_name("PCIU"), - aml_int(1))); /* Device Check */ - aml_append(method, aml_call2("DVNT", aml_name("PCID"), - aml_int(3))); /* Eject Request */ - } + /* If bus supports hotplug select it and notify about local events */ + if (bsel) { + uint64_t bsel_val =3D qnum_get_uint(qobject_to(QNum, bsel)); =20 - /* Notify about child bus events in any case */ - if (pcihp_bridge_en) { - QLIST_FOREACH(sec, &bus->child, sibling) { - if (pci_bus_is_root(sec) || - !object_property_find(OBJECT(sec), ACPI_PCIHP_PROP_BSE= L)) { - continue; - } + aml_append(method, aml_store(aml_int(bsel_val), aml_name("BNUM"))); + aml_append(method, aml_call2("DVNT", aml_name("PCIU"), + aml_int(1))); /* Device Check */ + aml_append(method, aml_call2("DVNT", aml_name("PCID"), + aml_int(3))); /* Eject Request */ + } =20 - aml_append(method, aml_name("^S%.02X.PCNT", - sec->parent_dev->devfn)); - } + /* Notify about child bus events in any case */ + QLIST_FOREACH(sec, &bus->child, sibling) { + if (pci_bus_is_root(sec) || + !object_property_find(OBJECT(sec), ACPI_PCIHP_PROP_BSEL)) { + continue; } =20 - aml_append(parent_scope, method); + aml_append(method, aml_name("^S%.02X.PCNT", sec->parent_dev->devfn= )); } + + aml_append(parent_scope, method); + qobject_unref(bsel); } =20 --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673534964; cv=none; d=zohomail.com; s=zohoarc; b=lAqCdEDUTtmuhulrlT6cMrIaAiDgsaX/OrojNCf+SuRoMmOiHmq5p32MwmQUWGFXLFPpa4FIrEafI3ePxRV3ghUutuGnaedVvdd4KkSMPUVqPTk1d9db+Xi2moW+lL9aJgt3WPNyPBIlbRtiU0ZTK0J9Mtqx6nxllRu+Htas6ow= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673534964; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=S2BVy/ciyiMpNSy2lQJt/a5sygVpbdAOlkXpgaprtpo=; b=H4wiCqvqFvgMyk8dy1yRRONOUI/FYG2k5QUwx2txOe6s+cNKIbVBtblAly0CQIrqttqutszbYSk+XqumYLrcJQCfuXgAsXaB9TjFxXcRykwDrQNqVejPVe4h3Nv08+29Zl1zDGLJfNOYNGN9O0IvCQjJJ/EajJR2EArD5I/+s7Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673534964568208.04110179035433; Thu, 12 Jan 2023 06:49:24 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBS-0002Pn-QX; Thu, 12 Jan 2023 09:03:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBE-0002Cc-QT for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:45 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBA-0005wA-SB for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:44 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-593-NMvfraJ4Pie3ZnwWcOyLPQ-1; Thu, 12 Jan 2023 09:03:31 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B0E803C42221; Thu, 12 Jan 2023 14:03:29 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2BA324085720; Thu, 12 Jan 2023 14:03:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532217; 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=S2BVy/ciyiMpNSy2lQJt/a5sygVpbdAOlkXpgaprtpo=; b=bTirY8XWmoXfm2Sd72H/pWWGDKsOIU38V4h+6GGJjv51tcox6G6SHQgu+9SXpZzBBsrdbW iajuzvRBGNIhrgD/WciEd0MXQAnu0ibc4/yTIAjNKhhffOHuDSIBLp+hbwssG0H0z4egTY sTCXEQfX8AFy4wuGkUfA2Vp+10zEAvQ= X-MC-Unique: NMvfraJ4Pie3ZnwWcOyLPQ-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 19/40] tests: acpi: update expected blobs Date: Thu, 12 Jan 2023 15:02:51 +0100 Message-Id: <20230112140312.3096331-20-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673534966473100001 expected change: Scope (PCI0) ... Method (PCNT, 0, NotSerialized) { } ... } Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 1 - tests/data/acpi/pc/DSDT.hpbrroot | Bin 3064 -> 3071 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 dea61d94f1..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/pc/DSDT.hpbrroot", diff --git a/tests/data/acpi/pc/DSDT.hpbrroot b/tests/data/acpi/pc/DSDT.hpb= rroot index 578468f4f00a9373366c92926b512c192dd6675b..42d923ef3fcc17898955ff30a1d= da1bfd7da0947 100644 GIT binary patch delta 42 ycmew%{$HHSCD (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673533619219509.5680471189628; Thu, 12 Jan 2023 06:26:59 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBM-0002Is-Hh; Thu, 12 Jan 2023 09:03:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBH-0002Fc-9p for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:48 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBB-0005uL-OH for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:47 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-468-ulZ9AZe6NYmSEADe5JKvig-1; Thu, 12 Jan 2023 09:03:30 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 731AA1C004E7; Thu, 12 Jan 2023 14:03:30 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id E0C924085720; Thu, 12 Jan 2023 14:03:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532212; 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=0sQGJ06775n0SRKoUOGHrjHIfY/981UT2MYr0PzzvsA=; b=BvzsitkGRdJdq4v1LcEdj2t7tPR3Hx7VukYE+3IYcaztlECn9+2gzP0IG3cydpPP9Ylhe9 uypi8bK8gNoiTzEF3wYz8kYv5YlKPcj56yUO3WuBGuyPaaOoCN9AdezxXu654hWovF3R2N B9+8cKwQfoDBDUCH1fG5Jn9uSLf2dXg= X-MC-Unique: ulZ9AZe6NYmSEADe5JKvig-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 20/40] tests: acpi: whitelist DSDT before refactoring acpi based PCI hotplug machinery Date: Thu, 12 Jan 2023 15:02:52 +0100 Message-Id: <20230112140312.3096331-21-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673533619503100001 Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 36 +++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index dfb8523c8b..4be20b2cd1 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,37 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/pc/DSDT", +"tests/data/acpi/pc/DSDT.bridge", +"tests/data/acpi/pc/DSDT.ipmikcs", +"tests/data/acpi/pc/DSDT.cphp", +"tests/data/acpi/pc/DSDT.memhp", +"tests/data/acpi/pc/DSDT.numamem", +"tests/data/acpi/pc/DSDT.nohpet", +"tests/data/acpi/pc/DSDT.dimmpxm", +"tests/data/acpi/pc/DSDT.acpihmat", +"tests/data/acpi/pc/DSDT.acpierst", +"tests/data/acpi/pc/DSDT.roothp", +"tests/data/acpi/pc/DSDT.hpbrroot", +"tests/data/acpi/pc/DSDT.hpbridge", +"tests/data/acpi/q35/DSDT", +"tests/data/acpi/q35/DSDT.tis.tpm2", +"tests/data/acpi/q35/DSDT.tis.tpm12", +"tests/data/acpi/q35/DSDT.bridge", +"tests/data/acpi/q35/DSDT.multi-bridge", +"tests/data/acpi/q35/DSDT.mmio64", +"tests/data/acpi/q35/DSDT.ipmibt", +"tests/data/acpi/q35/DSDT.cphp", +"tests/data/acpi/q35/DSDT.memhp", +"tests/data/acpi/q35/DSDT.numamem", +"tests/data/acpi/q35/DSDT.nohpet", +"tests/data/acpi/q35/DSDT.dimmpxm", +"tests/data/acpi/q35/DSDT.acpihmat", +"tests/data/acpi/q35/DSDT.acpierst", +"tests/data/acpi/q35/DSDT.applesmc", +"tests/data/acpi/q35/DSDT.pvpanic-isa", +"tests/data/acpi/q35/DSDT.ivrs", +"tests/data/acpi/q35/DSDT.viot", +"tests/data/acpi/q35/DSDT.cxl", +"tests/data/acpi/q35/DSDT.ipmismbus", +"tests/data/acpi/q35/DSDT.xapic", +"tests/data/acpi/q35/DSDT.acpihmat-noinitiator", +"tests/data/acpi/q35/DSDT.core-count2", --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673535736; cv=none; d=zohomail.com; s=zohoarc; b=IouMzJ2AcZ1HDP+1Mfh/ZZiDuogCWFFHtw16MmfTrA0iPl7w2DqQTFGKCw1vhhjRa2H3Cjfkc43SUBAuaXgGx2FFCQoiWEi56PJDlr5ZF8rZhCWZnfj/pOBJ0qWKncjnAqO5jWy8NMrJuT8uwMub7IK6j42EVCDFC+FGrBuH2bw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673535736; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BtltWnpSd8SC3NoMRoDesq/JaByxUxGKbfhTdChR8L4=; b=MchjWmr7vPJNgd/FThbT260TjvqTHzE1uY3W0ZRi4j5px23Kg/NnlpjzFvDIFtbV/oK2vwcpI8RCPNFVyCU8QlLGjyvc5lTbdsG3k2KLAwjr2DJDTzxJA3IFSqxy5L4nMy/nwZFaD2d2Llq9berf8QzjhRmyBYb1gvNTUjSDKG0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTP id 1673535736572329.9098025253559; Thu, 12 Jan 2023 07:02:16 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBP-0002Lm-Du; Thu, 12 Jan 2023 09:03:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBG-0002El-6p for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:46 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBB-0005uu-Mc for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:45 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-647-o0iRLk9uP5a6CKnQ52znbg-1; Thu, 12 Jan 2023 09:03:31 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 34A07857A84; Thu, 12 Jan 2023 14:03:31 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id A34ED4085720; Thu, 12 Jan 2023 14:03:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532213; 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=BtltWnpSd8SC3NoMRoDesq/JaByxUxGKbfhTdChR8L4=; b=MntU3281v3TVnk5RPRoY8itYdqifY0qPbIdS2WZs7nUwu+2Q47OdT1YDApcUV/FSIIp5CM V7JA71PXvF+/nwg5gni0mbUxVywN/2GAUOiR4M6HRQK/ohg9/9N+mDUuZE1PY9PIvTPwb4 j8797zGWPjrANSH3wyCXlMyeY0b2Wzg= X-MC-Unique: o0iRLk9uP5a6CKnQ52znbg-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 21/40] pcihp: compose PCNT callchain right before its user _GPE._E01 Date: Thu, 12 Jan 2023 15:02:53 +0100 Message-Id: <20230112140312.3096331-22-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673535739938100003 it's a stepping stone to making build_append_pci_bus_devices() suitable for AcpiDevAmlIfClass:build_dev_aml callback and lets further simplify it by separating PCNT generation from slots descriptions. It also makes PCNT callchain ASL much more readable since callchain not longer cluttered by slots descriptors. Plus, move will let next patch easily drop empty PCNT (pc/q35) when there is nothing hotpluggable. Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 146f48e4ac..509a4c500d 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -390,7 +390,6 @@ static void build_append_pci_bus_devices(Aml *parent_sc= ope, PCIBus *bus, { Aml *dev, *notify_method =3D NULL, *method; QObject *bsel; - PCIBus *sec; int devfn; =20 bsel =3D object_property_get_qobject(OBJECT(bus), ACPI_PCIHP_PROP_BSEL= , NULL); @@ -496,12 +495,35 @@ static void build_append_pci_bus_devices(Aml *parent_= scope, PCIBus *bus, aml_append(parent_scope, notify_method); } =20 + qobject_unref(bsel); +} + +static void build_append_notfication_callback(Aml *parent_scope, + const PCIBus *bus) +{ + Aml *method; + PCIBus *sec; + QObject *bsel; + + QLIST_FOREACH(sec, &bus->child, sibling) { + Aml *br_scope =3D aml_scope("S%.02X", sec->parent_dev->devfn); + if (pci_bus_is_root(sec) || + !object_property_find(OBJECT(sec), ACPI_PCIHP_PROP_BSEL)) { + continue; + } + build_append_notfication_callback(br_scope, sec); + aml_append(parent_scope, br_scope); + } + /* * Append PCNT method to notify about events on local and child buses. + * ps: hostbridge might not have hotplug (bsel) enabled but might have + * child bridges that do have bsel. */ method =3D aml_method("PCNT", 0, AML_NOTSERIALIZED); =20 /* If bus supports hotplug select it and notify about local events */ + bsel =3D object_property_get_qobject(OBJECT(bus), ACPI_PCIHP_PROP_BSEL= , NULL); if (bsel) { uint64_t bsel_val =3D qnum_get_uint(qobject_to(QNum, bsel)); =20 @@ -523,7 +545,6 @@ static void build_append_pci_bus_devices(Aml *parent_sc= ope, PCIBus *bus, } =20 aml_append(parent_scope, method); - qobject_unref(bsel); } =20 @@ -1723,6 +1744,13 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, aml_append(dsdt, sb_scope); =20 if (pm->pcihp_bridge_en || pm->pcihp_root_en) { + Object *pci_host =3D acpi_get_i386_pci_host(); + PCIBus *bus =3D PCI_HOST_BRIDGE(pci_host)->bus; + + scope =3D aml_scope("\\_SB.PCI0"); + build_append_notfication_callback(scope, bus); + aml_append(dsdt, scope); + scope =3D aml_scope("_GPE"); { method =3D aml_method("_E01", 0, AML_NOTSERIALIZED); --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673535106; cv=none; d=zohomail.com; s=zohoarc; b=iOBHKSObTbtbWmBJ+Tt4t4dh0r+9TiemxWZzBDtnIE+AgLhCm45xKicSGxqr4uD9olfZZHVYeKgZ0X+hjVQ/SBJu9tLknm9q7jMSfePrWihqXJZAT/Bnq13yG78hd0KtpCOeFXZN25yeQP5xYxsVRLXUooaP0DbmfJ/d9DfmoJE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673535106; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=cpd+L+e8tfIbdW2dfBneIXiktjk4fSoDV822NGXpYHE=; b=kzUQ/o9zSM73T67YkQIHCOh8husGPlwcoRNbtngorDMuiQ7GtfChQEoG/rK895aJ+HyremxGSBdiNhm62p2jx7RDmzrqbxvwFXSLLYB7hgwg/vJyCrEz7qNhHDU8+S/eF2JfB7kPSTOBg6rYaj4X3HpIsovIBrQ3VxbczV7aixc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673535106441479.8630304890428; Thu, 12 Jan 2023 06:51:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBR-0002Nq-G9; Thu, 12 Jan 2023 09:03:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBC-00028j-25 for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:44 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB8-0005vf-91 for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:40 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-619-Mg7Q9klJP1KBUEjSJ2Kz7w-1; Thu, 12 Jan 2023 09:03:32 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E996C802D2A; Thu, 12 Jan 2023 14:03:31 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 64AAB4085720; Thu, 12 Jan 2023 14:03:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532215; 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=cpd+L+e8tfIbdW2dfBneIXiktjk4fSoDV822NGXpYHE=; b=hSZaMKskvuSJSMq31xcj3xBmQPeCpB0vtf98glFJXehMqhCI2qDmYMsW1uLuozpIF60OQs rO51zpW+ujnXOJ1hvThMDgBO4zamK8xxp1hup8wDhjnbrGcJZib5U2jYzIoVSgsdalWyfz VKLPvOk3RfF1Pq1g5Hyj4ofu6Ar3tfg= X-MC-Unique: Mg7Q9klJP1KBUEjSJ2Kz7w-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 22/40] pcihp: do not put empty PCNT in DSDT Date: Thu, 12 Jan 2023 15:02:54 +0100 Message-Id: <20230112140312.3096331-23-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673535108443100001 count number of PCNT methods that actually call Notify and if there aren't any, drop PCNT altogether. It mostly affects 'Q35' tests where there is no root-ports /bridges attached and 'PC' machine when ACPI PCI hotplug is completely disabled. Expected ASL change: - Method (PCNT, 0, NotSerialized) - { - } ... Method (_E01, 0, NotSerialized) // _Exx: Edge-Triggered GPE { - Acquire (\_SB.PCI0.BLCK, 0xFFFF) - \_SB.PCI0.PCNT () - Release (\_SB.PCI0.BLCK) } Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 509a4c500d..9edd7bf38e 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -498,12 +498,13 @@ static void build_append_pci_bus_devices(Aml *parent_= scope, PCIBus *bus, qobject_unref(bsel); } =20 -static void build_append_notfication_callback(Aml *parent_scope, +static bool build_append_notfication_callback(Aml *parent_scope, const PCIBus *bus) { Aml *method; PCIBus *sec; QObject *bsel; + int nr_notifiers =3D 0; =20 QLIST_FOREACH(sec, &bus->child, sibling) { Aml *br_scope =3D aml_scope("S%.02X", sec->parent_dev->devfn); @@ -511,7 +512,8 @@ static void build_append_notfication_callback(Aml *pare= nt_scope, !object_property_find(OBJECT(sec), ACPI_PCIHP_PROP_BSEL)) { continue; } - build_append_notfication_callback(br_scope, sec); + nr_notifiers =3D nr_notifiers + + build_append_notfication_callback(br_scope, sec); aml_append(parent_scope, br_scope); } =20 @@ -532,6 +534,7 @@ static void build_append_notfication_callback(Aml *pare= nt_scope, aml_int(1))); /* Device Check */ aml_append(method, aml_call2("DVNT", aml_name("PCID"), aml_int(3))); /* Eject Request */ + nr_notifiers++; } =20 /* Notify about child bus events in any case */ @@ -546,6 +549,7 @@ static void build_append_notfication_callback(Aml *pare= nt_scope, =20 aml_append(parent_scope, method); qobject_unref(bsel); + return !!nr_notifiers; } =20 static Aml *aml_pci_pdsm(void) @@ -1744,20 +1748,26 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, aml_append(dsdt, sb_scope); =20 if (pm->pcihp_bridge_en || pm->pcihp_root_en) { + bool has_pcnt; + Object *pci_host =3D acpi_get_i386_pci_host(); PCIBus *bus =3D PCI_HOST_BRIDGE(pci_host)->bus; =20 scope =3D aml_scope("\\_SB.PCI0"); - build_append_notfication_callback(scope, bus); - aml_append(dsdt, scope); + has_pcnt =3D build_append_notfication_callback(scope, bus); + if (has_pcnt) { + aml_append(dsdt, scope); + } =20 scope =3D aml_scope("_GPE"); { method =3D aml_method("_E01", 0, AML_NOTSERIALIZED); - aml_append(method, - aml_acquire(aml_name("\\_SB.PCI0.BLCK"), 0xFFFF)); - aml_append(method, aml_call0("\\_SB.PCI0.PCNT")); - aml_append(method, aml_release(aml_name("\\_SB.PCI0.BLCK"))); + if (has_pcnt) { + aml_append(method, + aml_acquire(aml_name("\\_SB.PCI0.BLCK"), 0xFFFF)); + aml_append(method, aml_call0("\\_SB.PCI0.PCNT")); + aml_append(method, aml_release(aml_name("\\_SB.PCI0.BLCK")= )); + } aml_append(scope, method); } aml_append(dsdt, scope); --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673536003; cv=none; d=zohomail.com; s=zohoarc; b=G85cMLodMjlzglQkr5hPKndgEdefP/Sy86ljP/CkWghnXQIT7UzLTbBufyS8fPD7Xp4SY76J8ES5x9jS48g+gs9aZXIHkl3yGxLgiK1CdbnSHARD9N6UYXluDrJFp6jXd7ROkoLaDABUwy7xMAgfGsgpVAHOub4z7e1Vck4jA7Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673536003; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=71jBgKLGY3qam16z66+DEGohf+J+3tkn+2BoTBilfZU=; b=KK2qjVSC/GOG5DqPxI6qUzKB4DI7/tT52AuvG+kF0ukgTm2KMliBgv2y+fy2kgqOVGufhkPtSiXe/7Tm7kEzLeF+q4/ofQvx4E1ngOTjq+jzzc0uhHX6yFguA6ct7RgZX72BJ0WfPKCcgY9JVUoaM1+cLbv3iQ6ifHODlj1f4FI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673536003061322.56145568978684; Thu, 12 Jan 2023 07:06:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBP-0002MA-W0; Thu, 12 Jan 2023 09:03:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBE-0002CV-O0 for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:45 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyB9-0005vu-AU for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:44 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-633-V8uXH8cTM7e9UCVN4ZVqFg-1; Thu, 12 Jan 2023 09:03:33 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C536F8030DF; Thu, 12 Jan 2023 14:03:32 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 263234085720; Thu, 12 Jan 2023 14:03:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532216; 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=71jBgKLGY3qam16z66+DEGohf+J+3tkn+2BoTBilfZU=; b=PU4QfTL6L8w/dzu7x9jx1KyYtNpTytPWB3KfSk6svViBNtl4RPvA0OY0XEufAjy6aUY8RH DXUcTO+huFbM+p8j8xxJFz2TdxstIoV+/yBI/r6qOo7FNblKrFjkmMBIM5TMS2ypD/DU6N RNiE8O9UkKVkU44mB3v/Qdths8quwYE= X-MC-Unique: V8uXH8cTM7e9UCVN4ZVqFg-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 23/40] tests: acpi: update expected blobs Date: Thu, 12 Jan 2023 15:02:55 +0100 Message-Id: <20230112140312.3096331-24-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673536004540100003 Expected changes: * pc/bridge testcase due to ("pcihp: compose PCNT callchain right before its user _GPE._E01") ... + Scope (\_SB.PCI0) + { + Scope (S18) + { + Scope (S08) + { + Method (PCNT, 0, NotSerialized) + { + BNUM =3D 0x02 + DVNT (PCIU, One) + DVNT (PCID, 0x03) + } + } Method (PCNT, 0, NotSerialized) { - BNUM =3D Zero + BNUM =3D One DVNT (PCIU, One) DVNT (PCID, 0x03) - ^S18.PCNT () + ^S08.PCNT () } } + + Method (PCNT, 0, NotSerialized) + { + BNUM =3D Zero + DVNT (PCIU, One) + DVNT (PCID, 0x03) + ^S18.PCNT () + } } Scope (_GPE) * due to ("pcihp: do not put empty PCNT in DSDT") in the most Q35 tests ... { Name (_ADR, 0x001F0003) // _ADR: Address } - - Method (PCNT, 0, NotSerialized) - { - } } } ... { Method (_E01, 0, NotSerialized) // _Exx: Edge-Triggered GPE { - Acquire (\_SB.PCI0.BLCK, 0xFFFF) - \_SB.PCI0.PCNT () - Release (\_SB.PCI0.BLCK) } } Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 36 ------------------ tests/data/acpi/pc/DSDT | Bin 6458 -> 6470 bytes tests/data/acpi/pc/DSDT.acpierst | Bin 6418 -> 6430 bytes tests/data/acpi/pc/DSDT.acpihmat | Bin 7783 -> 7795 bytes tests/data/acpi/pc/DSDT.bridge | Bin 12608 -> 12634 bytes tests/data/acpi/pc/DSDT.cphp | Bin 6922 -> 6934 bytes tests/data/acpi/pc/DSDT.dimmpxm | Bin 8112 -> 8124 bytes tests/data/acpi/pc/DSDT.hpbridge | Bin 6418 -> 6430 bytes tests/data/acpi/pc/DSDT.hpbrroot | Bin 3071 -> 3064 bytes tests/data/acpi/pc/DSDT.ipmikcs | Bin 6530 -> 6542 bytes tests/data/acpi/pc/DSDT.memhp | Bin 7817 -> 7829 bytes tests/data/acpi/pc/DSDT.nohpet | Bin 6316 -> 6328 bytes tests/data/acpi/pc/DSDT.numamem | Bin 6464 -> 6476 bytes tests/data/acpi/pc/DSDT.roothp | Bin 9732 -> 9758 bytes tests/data/acpi/q35/DSDT | Bin 8310 -> 8252 bytes tests/data/acpi/q35/DSDT.acpierst | Bin 8327 -> 8269 bytes tests/data/acpi/q35/DSDT.acpihmat | Bin 9635 -> 9577 bytes tests/data/acpi/q35/DSDT.acpihmat-noinitiator | Bin 8589 -> 8531 bytes tests/data/acpi/q35/DSDT.applesmc | Bin 8356 -> 8298 bytes tests/data/acpi/q35/DSDT.bridge | Bin 11439 -> 11458 bytes tests/data/acpi/q35/DSDT.core-count2 | Bin 32450 -> 32392 bytes tests/data/acpi/q35/DSDT.cphp | Bin 8774 -> 8716 bytes tests/data/acpi/q35/DSDT.cxl | Bin 9636 -> 9578 bytes tests/data/acpi/q35/DSDT.dimmpxm | Bin 9964 -> 9906 bytes tests/data/acpi/q35/DSDT.ipmibt | Bin 8385 -> 8327 bytes tests/data/acpi/q35/DSDT.ipmismbus | Bin 8398 -> 8340 bytes tests/data/acpi/q35/DSDT.ivrs | Bin 8327 -> 8269 bytes tests/data/acpi/q35/DSDT.memhp | Bin 9669 -> 9611 bytes tests/data/acpi/q35/DSDT.mmio64 | Bin 9440 -> 9382 bytes tests/data/acpi/q35/DSDT.multi-bridge | Bin 12301 -> 12358 bytes tests/data/acpi/q35/DSDT.nohpet | Bin 8168 -> 8110 bytes tests/data/acpi/q35/DSDT.numamem | Bin 8316 -> 8258 bytes tests/data/acpi/q35/DSDT.pvpanic-isa | Bin 8411 -> 8353 bytes tests/data/acpi/q35/DSDT.tis.tpm12 | Bin 8916 -> 8858 bytes tests/data/acpi/q35/DSDT.tis.tpm2 | Bin 8942 -> 8884 bytes tests/data/acpi/q35/DSDT.viot | Bin 9419 -> 9361 bytes tests/data/acpi/q35/DSDT.xapic | Bin 35673 -> 35615 bytes 37 files changed, 36 deletions(-) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index 4be20b2cd1..dfb8523c8b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,37 +1 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/pc/DSDT", -"tests/data/acpi/pc/DSDT.bridge", -"tests/data/acpi/pc/DSDT.ipmikcs", -"tests/data/acpi/pc/DSDT.cphp", -"tests/data/acpi/pc/DSDT.memhp", -"tests/data/acpi/pc/DSDT.numamem", -"tests/data/acpi/pc/DSDT.nohpet", -"tests/data/acpi/pc/DSDT.dimmpxm", -"tests/data/acpi/pc/DSDT.acpihmat", -"tests/data/acpi/pc/DSDT.acpierst", -"tests/data/acpi/pc/DSDT.roothp", -"tests/data/acpi/pc/DSDT.hpbrroot", -"tests/data/acpi/pc/DSDT.hpbridge", -"tests/data/acpi/q35/DSDT", -"tests/data/acpi/q35/DSDT.tis.tpm2", -"tests/data/acpi/q35/DSDT.tis.tpm12", -"tests/data/acpi/q35/DSDT.bridge", -"tests/data/acpi/q35/DSDT.multi-bridge", -"tests/data/acpi/q35/DSDT.mmio64", -"tests/data/acpi/q35/DSDT.ipmibt", -"tests/data/acpi/q35/DSDT.cphp", -"tests/data/acpi/q35/DSDT.memhp", -"tests/data/acpi/q35/DSDT.numamem", -"tests/data/acpi/q35/DSDT.nohpet", -"tests/data/acpi/q35/DSDT.dimmpxm", -"tests/data/acpi/q35/DSDT.acpihmat", -"tests/data/acpi/q35/DSDT.acpierst", -"tests/data/acpi/q35/DSDT.applesmc", -"tests/data/acpi/q35/DSDT.pvpanic-isa", -"tests/data/acpi/q35/DSDT.ivrs", -"tests/data/acpi/q35/DSDT.viot", -"tests/data/acpi/q35/DSDT.cxl", -"tests/data/acpi/q35/DSDT.ipmismbus", -"tests/data/acpi/q35/DSDT.xapic", -"tests/data/acpi/q35/DSDT.acpihmat-noinitiator", -"tests/data/acpi/q35/DSDT.core-count2", diff --git a/tests/data/acpi/pc/DSDT b/tests/data/acpi/pc/DSDT index b688686dc3614f56582991c0974f6ef1964ee6ce..c99179b35254725daeebb416400= b1b6f9f1d74c4 100644 GIT binary patch delta 51 zcmdmGbj*m$CDWCDp4a&GRf0H&DuV5fM2#(>Q|+&N54-3^m}@wPKL9iDuK z+i3GvzJJ`C!}#ktHwUX+WZdkh*1@GB;Kvc82htPZ>}eq2&KhiJ5ig(?Y+w;Dq7dNh f7s61$#WeZ8fjFm#CWOlfG9=3DLflg2PAv-l6)2(#cWs{xbnFltGUA!z^r diff --git a/tests/data/acpi/pc/DSDT.cphp b/tests/data/acpi/pc/DSDT.cphp index 53eb0dd7d422e880a668cf3ea01b8b288004042a..659ad3d6b9026c090e0d8d8e21e= ce5df44249ec0 100644 GIT binary patch delta 51 zcmeA&n`Xx466_KpCe6UWxPBv-2QTNT(W8#CI;sqS9Ze|qn=3Dj9R5j?n`N1UP#dOb(Dw F005}751ar1 delta 38 ucmdmEzrmi%CDsxPLG*^*2p!<4tBfI=3DPU~ zc(W|uA8rK^`2c6X5QYLqC%;f%moUGO0B6roMkvFDi+S@NzIx8hGn6kfPF}294FFm9 BAYA|e diff --git a/tests/data/acpi/q35/DSDT b/tests/data/acpi/q35/DSDT index 2771bcea89b531549557a19538606219a8e222b1..d68c472b460e4609a64ea67de3c= 4cebfca76164d 100644 GIT binary patch delta 49 zcmez7u*ZSRCDqa2sFR7`xZQ@nt))aI#jvl!h)*aDpWLKp<>(C*0P66_MvuE4;+D7ulWQI5+;Iwn5YDPF)udh=3DAd)r{^UYyr-GAq)cc@$Lbx nB9`&428ImL$}#%PAXNd*o(4`n&ffq3BME@iN2?CD_ diff --git a/tests/data/acpi/q35/DSDT.core-count2 b/tests/data/acpi/q35/DSD= T.core-count2 index 375aceed6b16528f7986fad46b045eba76af9760..0603db8cc63cfc562f83e55eaf5= 162e7c29bf4d1 100644 GIT binary patch delta 51 zcmX@~m$Bn7BbQ6COGrl@0|VoRja+AIxLl-S;)9*y1$-noKdhO>$Sc4T?;hYP!WQpp HV8{Rf*RK!t delta 109 zcmeD9%XsK7BbQ6COUR)*1_s6n8@bNbaCu9`#0NXY3ph({epoY$(OrZsz}YW^LBKxV pJ-}7OGTzm|kRe(*MxPm^D!|#(z{$ti`~QC=3D0g(D=3DbtD0h3IKv5Auj*` diff --git a/tests/data/acpi/q35/DSDT.cphp b/tests/data/acpi/q35/DSDT.cphp index a0ecafc36c57c6d4791b511f3febe210713d253c..beeb83c33b385fc8b41d44f299b= 8d9ba7203d935 100644 GIT binary patch delta 49 zcmX@+(&NJA66_Mfqr||#_;VvypaPeRR7`xZQ@ntW-&MH0rDEcPo#F+Yr8aY`&SG>IVGD5f3tf66_LkP=3DSGgan?qzMmbJ5`Iz`%r+5Ls%~Rx_F}jPe1vvYKFbLSky9c<6 mSjM{=3D7&1gF$LKSI6a_eY8aVkld;kBBBmhz$t&SuBQUL&4{~kpE diff --git a/tests/data/acpi/q35/DSDT.ipmismbus b/tests/data/acpi/q35/DSDT.= ipmismbus index 3f32dffdbf3cd7e3791155530cf89417d8f2ec90..6c5d1afe443d9261d3b93801711= f8d5b267696f3 100644 GIT binary patch delta 48 zcmX@-IK`36CD(C*0P66_MvuE4;+D7ulWQI5+;Iwn5YDPF)udh=3DAd)r{^UYyr-GAq)cc@$Lbx nB9`&428ImL$}#%PAXNd*o(4`n&ffq3BME@iN2?(3`;J66_MfYrw$3D7cZUQI5MwgfS*Q*ePD1Q+V<;IR_>;&dE3AiYKqpS7eE9 z0&@K2izolm194n9Cm)k9ntVl10m89SD4M)ZPeC@i$@N08p=3DCTryrWAH4%f@R`r4cAbYmGO IpVhAf00jg!7ytkO diff --git a/tests/data/acpi/q35/DSDT.nohpet b/tests/data/acpi/q35/DSDT.noh= pet index b116947dacd4fe9b563ecc7e1510cdb2474011cb..9ff9983a80a7487470ccd02ce58= 7200444675816 100644 GIT binary patch delta 49 zcmaE1zs{b^CDpumw2#g)j)%$GZo( nide?G8W=3DJ}E63g4F Cg$w8a delta 105 zcmZ4Jc-xW7CDeV`_A&9nPVoYMcAFQeW>_A&9nPVoY+_L~>Vyd~0-XIq7zFI&-2+@j mEaP1b3>l)8WAvFpiUOQH4V-+Oz5oA55&)@>R!0&5sQ>^^$sO$g diff --git a/tests/data/acpi/q35/DSDT.viot b/tests/data/acpi/q35/DSDT.viot index 6b436f9cd95776c26bec09066eb621bf97219dc6..eeb40b360f7c1de93501e1ddcd7= dab306a51113b 100644 GIT binary patch delta 48 zcmX@@Ink5LCD$Fl2~Uj?rfZDGG4*G;s29_Wu7LNdTliS{+FMqyhj-gB}zB diff --git a/tests/data/acpi/q35/DSDT.xapic b/tests/data/acpi/q35/DSDT.xapic index f47f09122287bdd20d7762d3d6dee6e05d944285..3aa86f07243f0449c7dc2456507= 15d729744e3ee 100644 GIT binary patch delta 51 zcmcaPjcNWgCN7s?mk{}G1_nm&ja(_6TrN^E@xe~<0zQ(PD>`Q}@(S?8y9c<6u*JI? H7%~6=3Di=3DGYM delta 109 zcmbO~jp^nzCN7s?mypPA1_nm$ja(_6T;5VK@xe~<0?tyKD>`Q}x{I&{IQxY#2-wHF p2e^t@#=3D9CAGDIuK=3Dre;<1vq;eIQckx|NoC908$^VjwAq50RX(s9~b}t --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673533700; cv=none; d=zohomail.com; s=zohoarc; b=LmZQ0Synt3rl9C/pkbC1Od3h/7uVinbGByoCKFSVuy2cWqOpxIwabW+R1RDDeFMsk4U590QdVwEIwGNhbI80v6tosXxgD1HKMQuKdUfc7fWRhqrA9OWCAD+dPILfAapAIhx2GBvEXrcfZjAdCTOc/aVrjrbJmDUN6EEKXJj7aCM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673533700; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=EVcPmMglC1nUk5OaFfl1zcmU2E1ysXcSVZ7DI4rp9mw=; b=lnddRB5oRUUDfqLPGvELiQNaZVbtTZQ7HZ2pu3HRPnTY1jiyTySMjyAMKLGcWFjKIWmyR0X6Fbvk8BiSDkq62zdirLSmL9MFZIFAKz5fMoBhXQDTYVYuSj29XEzduYRvqqmxpGCtwrkZwPMJ2mCDTI49Y3rlc5sE9+60TTZDaoM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673533700673443.08919649345376; Thu, 12 Jan 2023 06:28:20 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBa-0002fy-UB; Thu, 12 Jan 2023 09:04:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBH-0002Fd-Bw for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:48 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBB-0005wK-OE for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:47 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-625-nIP7XEJwPXCJUSk73PL-hg-1; Thu, 12 Jan 2023 09:03:34 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 85BB685C6E9; Thu, 12 Jan 2023 14:03:33 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 00D724085721; Thu, 12 Jan 2023 14:03:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532217; 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=EVcPmMglC1nUk5OaFfl1zcmU2E1ysXcSVZ7DI4rp9mw=; b=FxbLkBkBvwaK4tEDSwDQ23NcGV1ngnkO8uIay6ocz/HZu/iuE0lThwR83qMkd/kwfXhjYj ka1E9G3xd3LBPignbCMD+PAgBss6RNjampmbghL5c4LFBSjwmphhbc5wV2f8b+8HP61IRN FXxtRzZET3C3+vqjoASP4OqNyK+IYFE= X-MC-Unique: nIP7XEJwPXCJUSk73PL-hg-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 24/40] whitelist DSDT before adding endpoint devices to bridge testcases Date: Thu, 12 Jan 2023 15:02:56 +0100 Message-Id: <20230112140312.3096331-25-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673533701940100001 Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index dfb8523c8b..571f14fd59 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/pc/DSDT.roothp", +"tests/data/acpi/pc/DSDT.hpbrroot", +"tests/data/acpi/q35/DSDT.bridge", +"tests/data/acpi/q35/DSDT.multi-bridge", --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673533573; cv=none; d=zohomail.com; s=zohoarc; b=FwfWFYGO6y/BwLCd0+DjnMWgxqF/biL6Fvb8zMNbz8r1LZRg2DGoc7+wkO5TyJ8Np3UX5uiMTRnb7uhCCObDSW5Z/5/mkJqUc9Q4Lyn9U4qSbtRJLc3WzSmK9AT48oRgzWYVTsV8QL+AyzC3SjKM5QF6pvtQxeJ5Z4EtaEfg2QA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673533573; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=OxFmAYd2+zXcLOnFuQzyDe+Z10qJZBdfnZtIvf0a/JI=; b=hQfgccMoQT66YmGoulkBk96erxG9JU+yQDrpAZPhg3oGJGqdvPurNYlqOsu4S3iV0rseS8Ve0CFunT6ErkTMsT5th92BZa+QMKVALkCt8Q+kK4Yi+XwrhFDKZJqJlAHriXQL0zwc4RMziBT+7QnmkRoK9+UPV9d4KYxjJSWY7fI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673533573792170.32524101523495; Thu, 12 Jan 2023 06:26:13 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBQ-0002MM-90; Thu, 12 Jan 2023 09:03:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBH-0002Fw-QJ for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:48 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBC-0005yK-1T for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:47 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-45-CsPZQr8oPp6zipOXhH-RFw-1; Thu, 12 Jan 2023 09:03:38 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 488C51991C4C; Thu, 12 Jan 2023 14:03:34 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id B61F34085720; Thu, 12 Jan 2023 14:03:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532221; 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=OxFmAYd2+zXcLOnFuQzyDe+Z10qJZBdfnZtIvf0a/JI=; b=gICHTZRbjJdMUz7gp3yYAAOnM3cstKD7hX8LNG2mRk1NSo81ZxIVLtje6TLXOp/5XK52wC lyHtnQ7/TirwIXPvdlHJmP61ZGvPUh7ACt+pyExO0HCiiI52ZMIm5KdZDXEruT/DcASIvy yGjH746npRn4rZ/NiGq5ONcGJcJrGBg= X-MC-Unique: CsPZQr8oPp6zipOXhH-RFw-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 25/40] tests: acpi: add endpoint devices to bridges Date: Thu, 12 Jan 2023 15:02:57 +0100 Message-Id: <20230112140312.3096331-26-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673533575232100003 to make sure that they are enumerated or ignored as expected Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 37 ++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index a8c17461c8..22b22c403d 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -875,7 +875,9 @@ static void test_acpi_piix4_tcg_bridge(void) data.required_struct_types_len =3D ARRAY_SIZE(base_required_struct_typ= es); test_vm_prepare("-S" " -device pci-bridge,chassis_nr=3D1" - " -device pci-bridge,bus=3Dpci.1,addr=3D1.0,chassis_nr=3D2", &data= ); + " -device pci-bridge,bus=3Dpci.1,addr=3D1.0,chassis_nr=3D2" + " -device pci-testdev,bus=3Dpci.0,addr=3D5.0" + " -device pci-testdev,bus=3Dpci.1", &data); =20 /* hotplugged bridges section */ qtest_qmp_device_add(data.qts, "pci-bridge", "hpbr", @@ -884,6 +886,10 @@ static void test_acpi_piix4_tcg_bridge(void) "{'bus': 'pci.1', 'addr': '0xf.1', 'chassis_nr': 4 }"); qtest_qmp_device_add(data.qts, "pci-bridge", "hpbrhost", "{'bus': 'pci.0', 'addr': '4.0', 'chassis_nr': 5 }"); + qtest_qmp_device_add(data.qts, "pci-testdev", "d1", "{'bus': 'pci.0' }= "); + qtest_qmp_device_add(data.qts, "pci-testdev", "d2", "{'bus': 'pci.1' }= "); + qtest_qmp_device_add(data.qts, "pci-testdev", "d3", "{'bus': 'hpbr', " + "'addr': '1.0' }"); qtest_qmp_send(data.qts, "{'execute':'cont' }"); qtest_qmp_eventwait(data.qts, "RESUME"); =20 @@ -907,7 +913,9 @@ static void test_acpi_piix4_no_root_hotplug(void) data.required_struct_types_len =3D ARRAY_SIZE(base_required_struct_typ= es); test_acpi_one("-global PIIX4_PM.acpi-root-pci-hotplug=3Doff " "-device pci-bridge,chassis_nr=3D1 " - "-device pci-bridge,bus=3Dpci.1,addr=3D1.0,chassis_nr=3D= 2 ", &data); + "-device pci-bridge,bus=3Dpci.1,addr=3D1.0,chassis_nr=3D= 2 " + "-device pci-testdev,bus=3Dpci.0 " + "-device pci-testdev,bus=3Dpci.1", &data); free_test_data(&data); } =20 @@ -922,7 +930,9 @@ static void test_acpi_piix4_no_bridge_hotplug(void) data.required_struct_types_len =3D ARRAY_SIZE(base_required_struct_typ= es); test_acpi_one("-global PIIX4_PM.acpi-pci-hotplug-with-bridge-support= =3Doff " "-device pci-bridge,chassis_nr=3D1 " - "-device pci-bridge,bus=3Dpci.1,addr=3D1.0,chassis_nr=3D= 2 ", &data); + "-device pci-bridge,bus=3Dpci.1,addr=3D1.0,chassis_nr=3D= 2 " + "-device pci-testdev,bus=3Dpci.0 " + "-device pci-testdev,bus=3Dpci.1,addr=3D2.0", &data); free_test_data(&data); } =20 @@ -937,7 +947,9 @@ static void test_acpi_piix4_no_acpi_pci_hotplug(void) data.required_struct_types_len =3D ARRAY_SIZE(base_required_struct_typ= es); test_acpi_one("-global PIIX4_PM.acpi-root-pci-hotplug=3Doff " "-global PIIX4_PM.acpi-pci-hotplug-with-bridge-support= =3Doff " - "-device pci-bridge,chassis_nr=3D1", &data); + "-device pci-bridge,chassis_nr=3D1 " + "-device pci-testdev,bus=3Dpci.0 " + "-device pci-testdev,bus=3Dpci.1", &data); free_test_data(&data); } =20 @@ -982,7 +994,9 @@ static void test_acpi_q35_tcg_bridge(void) data.variant =3D ".bridge"; data.required_struct_types =3D base_required_struct_types; data.required_struct_types_len =3D ARRAY_SIZE(base_required_struct_typ= es); - test_acpi_one("-device pci-bridge,chassis_nr=3D1", &data); + test_acpi_one("-device pci-bridge,chassis_nr=3D1,id=3Dbr1" + " -device pci-testdev,bus=3Dpcie.0" + " -device pci-testdev,bus=3Dbr1", &data); free_test_data(&data); } =20 @@ -1001,8 +1015,11 @@ static void test_acpi_q35_multif_bridge(void) " -device pci-bridge,bus=3Drp2,chassis_nr=3D4,id=3Dbr1" " -device pcie-root-port,id=3Drphptgt1,port=3D0x0,chassis=3D5,addr= =3D2.1" " -device pcie-root-port,id=3Drphptgt2,port=3D0x0,chassis=3D6,addr= =3D2.2" - " -device pcie-root-port,id=3Drphptgt3,port=3D0x0,chassis=3D7,addr= =3D2.3", - &data); + " -device pcie-root-port,id=3Drphptgt3,port=3D0x0,chassis=3D7,addr= =3D2.3" + " -device pci-testdev,bus=3Dpcie.0,addr=3D2.4" + " -device pci-testdev,bus=3Dpcie.0,addr=3D5.0" + " -device pci-testdev,bus=3Drp0,addr=3D0.0" + " -device pci-testdev,bus=3Dbr1", &data); =20 /* hotplugged bridges section */ qtest_qmp_device_add(data.qts, "pci-bridge", "hpbr1", @@ -1010,7 +1027,11 @@ static void test_acpi_q35_multif_bridge(void) qtest_qmp_device_add(data.qts, "pci-bridge", "hpbr2-multiif", "{ 'bus': 'br1', 'addr': '2.2', 'chassis_nr': 129 }"); qtest_qmp_device_add(data.qts, "pcie-pci-bridge", "hpbr3", - "{'bus': 'rp0', 'addr': '0.0' }"); + "{'bus': 'rphptgt1', 'addr': '0.0' }"); + qtest_qmp_device_add(data.qts, "pcie-root-port", "hprp", + "{'bus': 'rphptgt2', 'addr': '0.0' }"); + qtest_qmp_device_add(data.qts, "pci-testdev", "hpnic", + "{'bus': 'rphptgt3', 'addr': '0.0' }"); qtest_qmp_send(data.qts, "{'execute':'cont' }"); qtest_qmp_eventwait(data.qts, "RESUME"); =20 --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673533417; cv=none; d=zohomail.com; s=zohoarc; b=Iwj1nCTn90Tr8vJ1f0z1ZAFBEQS/8QXUo0AAxajSafPRnSVEwFVaOX1fcVTT1zUTSQHJgElF+cD9QAkBrh4Y8caeodb/dsTeSuTOR8w+WOQSGbY/kCXAV5sjjjvXUPdNpTUCudCsPLkjsF6UpE7Sal41mBLUzUEvnkaYwmRNnPk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673533417; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pMcUzqTFMtCIAqM4iCWHRMb4pCN4HlQGwY2Bu5OxbjI=; b=JOeXBkEXBjGWqouB/X0Uc6AiAq1piqQ5o17dt22oocFzLWDvogu3Wly0S2DYN5ARJN8iTB3NkpQmwslosw8O7SNGkNUHoomwb7yjRPhdtu62i6UpQq1Aisq+RmiWTBzZqQp7lScbfFbJczBQey8x+v3NOX/GbXptLxgyaDMg+zk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 167353341769757.86079128738197; Thu, 12 Jan 2023 06:23:37 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBY-0002Yu-1I; Thu, 12 Jan 2023 09:04:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBL-0002Hi-FH for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:51 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBI-000629-5r for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:51 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-163-GU7GeyP4OAyYDoQRWqe3Gg-1; Thu, 12 Jan 2023 09:03:35 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0908C3811F4C; Thu, 12 Jan 2023 14:03:35 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 782744085720; Thu, 12 Jan 2023 14:03:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532227; 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=pMcUzqTFMtCIAqM4iCWHRMb4pCN4HlQGwY2Bu5OxbjI=; b=cjCvLOa6CpuZNH7lFJ2IVGOyAVQ+Qa5/TDVqzwXHna8xymFEbEvGn1mYOZrj0AOaXZeDSU 8UoqkEZAuOKt1bTKUfEduZ46v/Txu1F/wgRrqXLPO9LHktbpqFDUDtv1O8kpfsVu/SxLVW 0cMczTHeTSQfdpwSzhAbieuIKGiZc7w= X-MC-Unique: GU7GeyP4OAyYDoQRWqe3Gg-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 26/40] tests: acpi: update expected blobs Date: Thu, 12 Jan 2023 15:02:58 +0100 Message-Id: <20230112140312.3096331-27-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673533418856100001 previous commit added endpoint devices to bridge testcases, which exposes extra non-hotpluggable slot in DSDT on bus where hotplug is not available. It should look like this (numbers may vary): + Device (S28) + { + Name (_ADR, 0x00050000) // _ADR: Address + } Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 4 ---- tests/data/acpi/pc/DSDT.hpbrroot | Bin 3064 -> 3081 bytes tests/data/acpi/pc/DSDT.roothp | Bin 9758 -> 9775 bytes tests/data/acpi/q35/DSDT.bridge | Bin 11458 -> 11475 bytes tests/data/acpi/q35/DSDT.multi-bridge | Bin 12358 -> 12375 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 571f14fd59..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/pc/DSDT.roothp", -"tests/data/acpi/pc/DSDT.hpbrroot", -"tests/data/acpi/q35/DSDT.bridge", -"tests/data/acpi/q35/DSDT.multi-bridge", diff --git a/tests/data/acpi/pc/DSDT.hpbrroot b/tests/data/acpi/pc/DSDT.hpb= rroot index 578468f4f00a9373366c92926b512c192dd6675b..a71ed4fbaa14be655c28a5e03e5= 0157b4476e480 100644 GIT binary patch delta 53 zcmew%-YLQ566_Mf$-}_Fcyc4xJx(r1rI`3&r+5KR#m%2M*_Z^QoA`r`4B|QB9bJNe Hs#q8RhyD!~ delta 35 qcmeB__#w{a66_N4gPVbYQFkNPJx(qM#hCbDr+5Jmh0UKh*_Z&l3JL`P diff --git a/tests/data/acpi/pc/DSDT.roothp b/tests/data/acpi/pc/DSDT.roothp index fe502ed97751950cc245d728c873065f062c76b2..d58f4d2f0adbb86f8f6403a1cf9= b13e1cabed035 100644 GIT binary patch delta 58 zcmbQ|v)+fxCDaNm`jT&21d00Qm}$^ZZW diff --git a/tests/data/acpi/q35/DSDT.bridge b/tests/data/acpi/q35/DSDT.bri= dge index c38b121ad90ecb896a906a50340ad5bd7d5453f9..3a01bb196b047b875be07be28d0= 7f3139716e82f 100644 GIT binary patch delta 56 zcmX>Uc{!5HCDM9f^W)*?4>q)j=3DZJT73F2X3 MU}o6-Q0pNh002i2`~Uy| delta 40 wcmcZ{c_@<0CDa6N&`CD)hUqa1ewBV$Z_uv5H1JHzH_a;x|@2kNph0{{nL3+(^^ --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673535804; cv=none; d=zohomail.com; s=zohoarc; b=CqyDt18xYevzmjAsA0AfMVrjvK43L9CP/dYc82WohaVvfbUH60OYr+aRMh/N+2fDaof5NXnMQ3Bo1PeoWZ8OZG3O42cmLTL3DhfbQObXinTP1+4ulhQsxJBafl4fGAoWEyAn/p0rLBD+1euWuRCSCW0t9mMPk8U0W3iIyavLxk0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673535804; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=L3HY/sdzrVRQnzygoIwtu86GBD7w7rHZZZ9ArsNoKKw=; b=Jv2aXPSxuOpc/ejSOLS6rXRUdGoQKF9LMr/likX3V4Z9o2+qoWM30Dhr2sPNNlHE5oY531uGAlBHpqi8WCpKJO8zMWhz10p2JutRikNKwcmHdDf2zNPA7ylhdXo6fJg4xl5gP0ZnR/zg504q6L9hnxMWzr1vWZomqXUbTWfESl8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673535804070984.1780194782624; Thu, 12 Jan 2023 07:03:24 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBO-0002L9-Ml; Thu, 12 Jan 2023 09:03:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBG-0002Et-GU for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:46 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBB-0005y1-Ne for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:46 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-125-ZlDrrf3zP7ScDrL4OyJA9w-1; Thu, 12 Jan 2023 09:03:36 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BDC7F88B7A7; Thu, 12 Jan 2023 14:03:35 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 38FD64085720; Thu, 12 Jan 2023 14:03:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532220; 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=L3HY/sdzrVRQnzygoIwtu86GBD7w7rHZZZ9ArsNoKKw=; b=e/oePyu7vOsivQuwwtu2mflI/TVqOHUozWi/hV+6zQeQiWDs02tgxorWhnJy0GvUk5YRGu zWb+akm5FRctkSXtiwFrjVtmKqHa1KyCOxV50nG49Vr7mdL5eFsInDts4mXnYgqpYO5LFR k542GNr+ms0zJbIq/LzNwYigIZDmjww= X-MC-Unique: ZlDrrf3zP7ScDrL4OyJA9w-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 27/40] x86: pcihp: acpi: prepare slot ignore rule to work with self describing bridges Date: Thu, 12 Jan 2023 15:02:59 +0100 Message-Id: <20230112140312.3096331-28-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673535805316100003 Before switching pci bridges to AcpiDevAmlIf interface, ensure that ignored slots are handled correctly. (existing rule works but only if bridge doesn't have AcpiDevAmlIf interface= ). While at it rewrite related comments to be less confusing (hopefully). Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 9edd7bf38e..466f90c9e6 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -425,14 +425,22 @@ static void build_append_pci_bus_devices(Aml *parent_= scope, PCIBus *bus, hotpluggbale_slot =3D bsel && dc->hotpluggable && !cold_plugged_bridge; =20 - /* - * allow describing coldplugged bridges in ACPI even if they a= re not - * on function 0, as they are not unpluggable, for all other d= evices - * generate description only for function 0 per slot, and for = other - * functions if device on function provides its own AML - */ - if (func && !bridge_in_acpi && !get_dev_aml_func(DEVICE(pdev))= ) { - continue; + if (func) { + if (IS_PCI_BRIDGE(pdev)) { + /* + * Ignore only hotplugged PCI bridges on !0 functions,= but + * allow describing cold plugged bridges on all functi= ons + */ + if (DEVICE(pdev)->hotplugged) { + continue; + } + } else if (!get_dev_aml_func(DEVICE(pdev))) { + /* + * Ignore all other devices on !0 functions unless they + * have AML description (i.e have get_dev_aml_func() != =3D 0) + */ + continue; + } } } else { /* --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673534183; cv=none; d=zohomail.com; s=zohoarc; b=ei/tFCTiodFT1YviC9p0kcPpK8A76iTvll1q5kS1vJsamB0sUerBB9/GpFq3XTLuvGJG0RwrVIiz17NzCs6VcMjREcS3tVQ70HgT1dpdExsnJOfJKSt5PDMHCXOI0PInHfYxSAyNjdeXI7F5fRv1GYmzv5aeXhVJXKiPxmXo2sU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673534183; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=VthWbx4sxaRMwtf9xjcTHrh3ZjzOsvLEK7E+aaxf5p0=; b=LtXyFQregTFGrV7JyCJrdBKz6oSlbvd4YsYSRVYAZwibeixqKe1l9jokbIcPsXSL2hV85sweWEeVcUobcDWkVy92zfRbtx3IbIn695jkMDSBb4XorzfP+qr3sGSzBQrxeoTuPVMpDWJ2goPfeSlhp9SnQW80UKMMENeOI+Nc8zI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTP id 1673534183331524.1477888200903; Thu, 12 Jan 2023 06:36:23 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBP-0002Ln-FY; Thu, 12 Jan 2023 09:03:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBF-0002ES-W0 for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:46 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBB-0005xS-Ml for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:45 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-496-VHxEg5LFMp68liGEJpKIRQ-1; Thu, 12 Jan 2023 09:03:37 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7FD952807D6F; Thu, 12 Jan 2023 14:03:36 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id EDD2E4085720; Thu, 12 Jan 2023 14:03:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532219; 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=VthWbx4sxaRMwtf9xjcTHrh3ZjzOsvLEK7E+aaxf5p0=; b=c7vaajxErXvKkorGQkg8Dg9jRyZha2KtFMm81cOYbyitJQ3hwJB5/+pUIWvMGMHEi6cN8b x5M2XaLOHYbJ36OtoZdE4HyiT8eE7Vfoj5E1bbCkiITstsiLhRBEAwfuIFGyqZZ6DcJzYo 56/mrChUglO++GCYZzbWe/wz80CslcU= X-MC-Unique: VHxEg5LFMp68liGEJpKIRQ-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 28/40] pci: acpi: wire up AcpiDevAmlIf interface to generic bridge Date: Thu, 12 Jan 2023 15:03:00 +0100 Message-Id: <20230112140312.3096331-29-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673534184448100001 ... so that the concrete impl. won't has to duplicate it every time. By default it doesn't do anything unless leaf class defines and sets AcpiDevAmlIfClass::build_dev_aml handler. Signed-off-by: Igor Mammedov --- hw/pci/pci_bridge.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c index b2b180edd6..a1a1cc861e 100644 --- a/hw/pci/pci_bridge.c +++ b/hw/pci/pci_bridge.c @@ -36,6 +36,7 @@ #include "qemu/module.h" #include "qemu/range.h" #include "qapi/error.h" +#include "hw/acpi/acpi_aml_interface.h" =20 /* PCI bridge subsystem vendor ID helper functions */ #define PCI_SSVID_SIZEOF 8 @@ -472,6 +473,10 @@ static const TypeInfo pci_bridge_type_info =3D { .parent =3D TYPE_PCI_DEVICE, .instance_size =3D sizeof(PCIBridge), .abstract =3D true, + .interfaces =3D (InterfaceInfo[]) { + { TYPE_ACPI_DEV_AML_IF }, + { }, + }, }; =20 static void pci_bridge_register_types(void) --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673533786; cv=none; d=zohomail.com; s=zohoarc; b=fqf0BjNK739VF/4DCC/Yan8UJ1io8YSNUsaBxS3j5uz2p6mC2bx1dGBK+Ev4zCI7Si5wMX68GvCyvoADgnW+ZiZrsdoTTQKXdgaLSAH0SxapafJPz0uSoNRQ6wxSNCSIR8Le+eipHTEhSwdyqk5HdFafYQFrL3H6K74BGspSf2c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673533786; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=wgf3pwVBV6YzXUJ06idJSCNWM/aWshsUDrWlCrZi4y4=; b=ZVjlSRtnpCtUeDe3mKbCw7IP4i4/Pwh8oCSKjTWWm9i+OWIrB6tBLxrlDXq6MZwyKUJbXPm4/AazsUN85DMu2qsUrG8JyApdcjeqt5Zfa+U4sE35beUE+g3qlQct1F1W+L+RorqwsDtmoPhPAlq4jeFjPXPWGgJ+Ix+f3XDjrR0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673533786211588.3121481009312; Thu, 12 Jan 2023 06:29:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBQ-0002ML-7N; Thu, 12 Jan 2023 09:03:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBF-0002D8-7D for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:45 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBB-0005y4-Lq for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:44 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-56-HXZGiNvgPPWwDvB6MR7WEg-1; Thu, 12 Jan 2023 09:03:38 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 40E8A8030D4; Thu, 12 Jan 2023 14:03:37 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id AFD664085720; Thu, 12 Jan 2023 14:03:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532220; 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=wgf3pwVBV6YzXUJ06idJSCNWM/aWshsUDrWlCrZi4y4=; b=Ah2udlXxERqVrf2zhAwgHgdYLL5F/eHTJiKfgqqbXu+vZGft8lExI7kAYHUngo+UlqnN0T tSbsmTaVGxkcEiCHTIxU1DCJS2mivUEWKkGIfLxa1kxI8kKP1JdLwHYxlUeYAu9MaMMwgl 4F7mA4N35lRQDsnv3O3iaGb8SVmuFbs= X-MC-Unique: HXZGiNvgPPWwDvB6MR7WEg-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 29/40] pcihp: make bridge describe itself using AcpiDevAmlIfClass:build_dev_aml Date: Thu, 12 Jan 2023 15:03:01 +0100 Message-Id: <20230112140312.3096331-30-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673533786547100001 simplify build_append_pci_bus_devices() a bit by handling bridge specific logic in bridge dedicated AcpiDevAmlIfClass::build_dev_aml callback. Signed-off-by: Igor Mammedov --- include/hw/acpi/pci.h | 4 ++++ hw/acpi/Kconfig | 4 ++++ hw/acpi/meson.build | 4 +++- hw/acpi/pci-bridge-stub.c | 20 ++++++++++++++++++++ hw/acpi/pci-bridge.c | 27 +++++++++++++++++++++++++++ hw/i386/Kconfig | 1 + hw/i386/acpi-build.c | 17 ++--------------- hw/pci/pci_bridge.c | 9 +++++++++ 8 files changed, 70 insertions(+), 16 deletions(-) create mode 100644 hw/acpi/pci-bridge-stub.c create mode 100644 hw/acpi/pci-bridge.c diff --git a/include/hw/acpi/pci.h b/include/hw/acpi/pci.h index b5deee0a9d..467a99461c 100644 --- a/include/hw/acpi/pci.h +++ b/include/hw/acpi/pci.h @@ -27,6 +27,7 @@ #define HW_ACPI_PCI_H =20 #include "hw/acpi/bios-linker-loader.h" +#include "hw/acpi/acpi_aml_interface.h" =20 typedef struct AcpiMcfgInfo { uint64_t base; @@ -36,4 +37,7 @@ typedef struct AcpiMcfgInfo { void build_mcfg(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info, const char *oem_id, const char *oem_table_id); Aml *aml_pci_device_dsm(void); + +void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus); +void build_pci_bridge_aml(AcpiDevAmlIf *adev, Aml *scope); #endif diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig index 1f7803fdab..e07d3204eb 100644 --- a/hw/acpi/Kconfig +++ b/hw/acpi/Kconfig @@ -39,6 +39,10 @@ config ACPI_PCIHP bool depends on ACPI =20 +config ACPI_PCI_BRIDGE + bool + depends on ACPI && PCI && ACPI_PCIHP + config ACPI_HMAT bool depends on ACPI diff --git a/hw/acpi/meson.build b/hw/acpi/meson.build index 30054a8cdc..50b73129b4 100644 --- a/hw/acpi/meson.build +++ b/hw/acpi/meson.build @@ -19,6 +19,7 @@ acpi_ss.add(when: 'CONFIG_ACPI_HW_REDUCED', if_true: file= s('generic_event_device acpi_ss.add(when: 'CONFIG_ACPI_HMAT', if_true: files('hmat.c')) acpi_ss.add(when: 'CONFIG_ACPI_APEI', if_true: files('ghes.c'), if_false: = files('ghes-stub.c')) acpi_ss.add(when: 'CONFIG_ACPI_PIIX4', if_true: files('piix4.c')) +acpi_ss.add(when: 'CONFIG_ACPI_PCI_BRIDGE', if_true: files('pci-bridge.c')) acpi_ss.add(when: 'CONFIG_ACPI_PCIHP', if_true: files('pcihp.c')) acpi_ss.add(when: 'CONFIG_ACPI_PCIHP', if_false: files('acpi-pci-hotplug-s= tub.c')) acpi_ss.add(when: 'CONFIG_ACPI_VIOT', if_true: files('viot.c')) @@ -30,9 +31,10 @@ if have_tpm acpi_ss.add(files('tpm.c')) endif softmmu_ss.add(when: 'CONFIG_ACPI', if_false: files('acpi-stub.c', 'aml-bu= ild-stub.c', 'ghes-stub.c', 'acpi_interface.c')) +softmmu_ss.add(when: 'CONFIG_ACPI_PCI_BRIDGE', if_false: files('pci-bridge= -stub.c')) softmmu_ss.add_all(when: 'CONFIG_ACPI', if_true: acpi_ss) softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('acpi-stub.c', 'aml-buil= d-stub.c', 'acpi-x86-stub.c', 'ipmi= -stub.c', 'ghes-stub.c', 'acpi-mem-hotplug-stub.c= ', 'acpi-cpu-hotplug-stub.c', 'acpi-pci-hotplug-stub.c= ', 'acpi-nvdimm-stub.c', - 'cxl-stub.c')) + 'cxl-stub.c', 'pci-bridg= e-stub.c')) diff --git a/hw/acpi/pci-bridge-stub.c b/hw/acpi/pci-bridge-stub.c new file mode 100644 index 0000000000..9d78638c48 --- /dev/null +++ b/hw/acpi/pci-bridge-stub.c @@ -0,0 +1,20 @@ +/* + * QEMU ACPI PCI bridge stub + * + * Copyright (c) 2023 Red Hat, Inc. + * + * Author: + * Igor Mammedov + * + * SPDX-License-Identifier: GPL-2.0-or-later + * + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. + */ + +#include "qemu/osdep.h" +#include "hw/acpi/pci.h" + +void build_pci_bridge_aml(AcpiDevAmlIf *adev, Aml *scope) +{ +} diff --git a/hw/acpi/pci-bridge.c b/hw/acpi/pci-bridge.c new file mode 100644 index 0000000000..5f3ee5157f --- /dev/null +++ b/hw/acpi/pci-bridge.c @@ -0,0 +1,27 @@ +/* + * QEMU ACPI PCI bridge + * + * Copyright (c) 2023 Red Hat, Inc. + * + * Author: + * Igor Mammedov + * + * SPDX-License-Identifier: GPL-2.0-or-later + * + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. + */ + +#include "qemu/osdep.h" +#include "hw/acpi/pci.h" +#include "hw/pci/pci_bridge.h" +#include "hw/acpi/pcihp.h" + +void build_pci_bridge_aml(AcpiDevAmlIf *adev, Aml *scope) +{ + PCIBridge *br =3D PCI_BRIDGE(adev); + + if (object_property_find(OBJECT(&br->sec_bus), ACPI_PCIHP_PROP_BSEL)) { + build_append_pci_bus_devices(scope, pci_bridge_get_sec_bus(br)); + } +} diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig index c4fb5b49bd..1bf47b0b0b 100644 --- a/hw/i386/Kconfig +++ b/hw/i386/Kconfig @@ -58,6 +58,7 @@ config PC_ACPI select ACPI_X86 select ACPI_CPU_HOTPLUG select ACPI_MEMORY_HOTPLUG + select ACPI_PCI_BRIDGE select ACPI_VIOT select SMBUS_EEPROM select PFLASH_CFI01 diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 466f90c9e6..5b4f453395 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -385,8 +385,7 @@ static void build_append_pcihp_notify_entry(Aml *method= , int slot) aml_append(method, if_ctx); } =20 -static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus, - bool pcihp_bridge_en) +void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus) { Aml *dev, *notify_method =3D NULL, *method; QObject *bsel; @@ -408,7 +407,6 @@ static void build_append_pci_bus_devices(Aml *parent_sc= ope, PCIBus *bus, /* ACPI spec: 1.0b: Table 6-2 _ADR Object Bus Types, PCI type */ int adr =3D slot << 16 | func; bool hotpluggbale_slot =3D false; - bool bridge_in_acpi =3D false; bool cold_plugged_bridge =3D false; =20 if (pdev) { @@ -420,7 +418,6 @@ static void build_append_pci_bus_devices(Aml *parent_sc= ope, PCIBus *bus, */ cold_plugged_bridge =3D IS_PCI_BRIDGE(pdev) && !DEVICE(pdev)->hotplugged; - bridge_in_acpi =3D cold_plugged_bridge && pcihp_bridge_en; =20 hotpluggbale_slot =3D bsel && dc->hotpluggable && !cold_plugged_bridge; @@ -473,16 +470,6 @@ static void build_append_pci_bus_devices(Aml *parent_s= cope, PCIBus *bus, =20 call_dev_aml_func(DEVICE(pdev), dev); =20 - if (bridge_in_acpi) { - /* - * device is coldplugged bridge, - * add child device descriptions into its scope - */ - PCIBus *sec_bus =3D pci_bridge_get_sec_bus(PCI_BRIDGE(pdev)); - - build_append_pci_bus_devices(dev, sec_bus, pcihp_bridge_en); - } - if (hotpluggbale_slot) { aml_append(dev, aml_name_decl("_SUN", aml_int(slot))); /* add _EJ0 to make slot hotpluggable */ @@ -1706,7 +1693,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, PCIBus *bus =3D PCI_HOST_BRIDGE(pci_host)->bus; Aml *scope =3D aml_scope("PCI0"); /* Scan all PCI buses. Generate tables to support hotplug. */ - build_append_pci_bus_devices(scope, bus, pm->pcihp_bridge_en); + build_append_pci_bus_devices(scope, bus); aml_append(sb_scope, scope); } } diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c index a1a1cc861e..dd5af508f9 100644 --- a/hw/pci/pci_bridge.c +++ b/hw/pci/pci_bridge.c @@ -37,6 +37,7 @@ #include "qemu/range.h" #include "qapi/error.h" #include "hw/acpi/acpi_aml_interface.h" +#include "hw/acpi/pci.h" =20 /* PCI bridge subsystem vendor ID helper functions */ #define PCI_SSVID_SIZEOF 8 @@ -468,10 +469,18 @@ int pci_bridge_qemu_reserve_cap_init(PCIDevice *dev, = int cap_offset, return 0; } =20 +static void pci_bridge_class_init(ObjectClass *klass, void *data) +{ + AcpiDevAmlIfClass *adevc =3D ACPI_DEV_AML_IF_CLASS(klass); + + adevc->build_dev_aml =3D build_pci_bridge_aml; +} + static const TypeInfo pci_bridge_type_info =3D { .name =3D TYPE_PCI_BRIDGE, .parent =3D TYPE_PCI_DEVICE, .instance_size =3D sizeof(PCIBridge), + .class_init =3D pci_bridge_class_init, .abstract =3D true, .interfaces =3D (InterfaceInfo[]) { { TYPE_ACPI_DEV_AML_IF }, --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673539975; cv=none; d=zohomail.com; s=zohoarc; b=TbLyo3VhOFtoO5cJMTAIM5fuEiIobMMYGwyA3Gbi7oJH/zO5t+RJ+kFn342CTStVVce3nDPRS63mxc7LYl/W0N7Ax3HaggsrOSEKtqNm2Nn5bpb5CdsLqL5+qdkw0PG7ol/vMoqSc5UNBVmFPIfP/E3qLlT9Pq7Yu39dltvJnTI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673539975; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=GVQiKVw6MJBuuGI6pkVSha182xhBXcyZ0y2Q/EzAKJ4=; b=VdPbSaPfOMITB50NBOguOyS0HatkgIbbVfYkePu7LYBcsp20x1TO24t6au8xBGp88HIEtG8WNnkPbhys+MU6vUB8RpeOrDx3kscKFEZ+ompBw3NhYnd2DL4FTfHqhzgl/O1nZL3UMKol6YgPM/gATCyx26DPyMroFBYhqUTg5i4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673539975250497.34664321615764; Thu, 12 Jan 2023 08:12:55 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBR-0002NQ-3q; Thu, 12 Jan 2023 09:03:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBI-0002G9-F2 for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:48 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBD-0005zF-Tl for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:48 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-379-KwPAErGgMtOtMtmHAOlqAA-1; Thu, 12 Jan 2023 09:03:38 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 016341991C55; Thu, 12 Jan 2023 14:03:38 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 708DA4085720; Thu, 12 Jan 2023 14:03:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532222; 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=GVQiKVw6MJBuuGI6pkVSha182xhBXcyZ0y2Q/EzAKJ4=; b=gjJk/U0zMEVGySQRl/XCm8cQ+LqfkYFSuu8AcLQ54KaKD7AYj2JG8uVDgvj3mmXAezKius XpiU5JzFyimS8GBZeeK6Lr3KRmUUJtRa9HkAgFAmV+Teyh4shslSaNu5nBPZRkdwE0JRzr Gu9zltP/ym1TFj4qc0Po2MGzqt27Kdc= X-MC-Unique: KwPAErGgMtOtMtmHAOlqAA-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 30/40] =?UTF-8?q?pci:=20make=20sure=20pci=5Fbus=5Fis=5Fexp?= =?UTF-8?q?ress()=20won't=20error=20out=20with=20=20"discards=20=E2=80=98c?= =?UTF-8?q?onst=E2=80=99=20qualifier"?= Date: Thu, 12 Jan 2023 15:03:02 +0100 Message-Id: <20230112140312.3096331-31-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673539976016100001 Content-Type: text/plain; charset="utf-8" function doesn't need RW aceess to passed in bus pointer, make it const. Signed-off-by: Igor Mammedov --- include/hw/pci/pci.h | 2 +- hw/pci/pci.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index 7048a373d1..03e8d614ad 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -270,7 +270,7 @@ typedef void (*pci_bus_dev_fn)(PCIBus *b, PCIDevice *d,= void *opaque); typedef void (*pci_bus_fn)(PCIBus *b, void *opaque); typedef void *(*pci_bus_ret_fn)(PCIBus *b, void *opaque); =20 -bool pci_bus_is_express(PCIBus *bus); +bool pci_bus_is_express(const PCIBus *bus); =20 void pci_root_bus_init(PCIBus *bus, size_t bus_size, DeviceState *parent, const char *name, diff --git a/hw/pci/pci.c b/hw/pci/pci.c index c2fb88f9a3..e725a771e3 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -482,7 +482,7 @@ static void pci_bus_uninit(PCIBus *bus) pci_host_bus_unregister(BUS(bus)->parent); } =20 -bool pci_bus_is_express(PCIBus *bus) +bool pci_bus_is_express(const PCIBus *bus) { return object_dynamic_cast(OBJECT(bus), TYPE_PCIE_BUS); } --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673534633; cv=none; d=zohomail.com; s=zohoarc; b=ELGtXDEAFLCeFlavTwR6TfcDmacaa1IvtK1Yp6UB8mTUWrJlSseBl1K/XbCAOWmH75c6ZE9VgHdFCn4SKnEfzCYOME0CftMfUXlt4NtXV3E1ppyNqzwWkXoEkMPH0ImcdboV6ZbjAdHVhGr88fEqoGkNw+ADhhFVuL+yeWabYu8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673534633; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=N0LoJubiwngY0cGmDQ2qAFVnXQZj4+qFljL/53gTU1E=; b=RWW0haSXKXSObdLdjq2J4W2sNg47OmN0Rt8XafABqwZfbLisXzC+aLEKiOmwHPSQBtdoUpBBrWi6dR1pcc3swxBp4yPi2/FcDb+VNYABcdiK1wO2xwvDYFe2bdvcZPAZIgOspKb2xF/+Kjn8yQbdwdrrT0B0cYIq3gWX03LsMEw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTP id 1673534633200554.0795619453463; Thu, 12 Jan 2023 06:43:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBU-0002R4-0i; Thu, 12 Jan 2023 09:04:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBH-0002Fi-F6 for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:48 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBB-0005yI-Qg for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:47 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-158-dfwfM-EqMfC1Mrl0NnmzUg-1; Thu, 12 Jan 2023 09:03:40 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B7D8A2807D77; Thu, 12 Jan 2023 14:03:38 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3230B4085720; Thu, 12 Jan 2023 14:03:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532221; 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=N0LoJubiwngY0cGmDQ2qAFVnXQZj4+qFljL/53gTU1E=; b=dU0NH9i0lFsAK7QYcxJW67nv7Y/ayQu1uO6E6Wh9wK7ZozeD6f5x511pu0X4cs11D5qqOg gKkjrRFqLjTFDDNFw0Hly5Pgy3j5fJ1/wIOLRm2RqrU2qWZm3EqyKLcD76hp2FkIi9gj1p +P/pLErDPmp9+Ub1rpCHyhMqj3MmlNc= X-MC-Unique: dfwfM-EqMfC1Mrl0NnmzUg-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 31/40] pcihp: isolate rule whether slot should be described in DSDT Date: Thu, 12 Jan 2023 15:03:03 +0100 Message-Id: <20230112140312.3096331-32-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673534633847100001 Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 83 +++++++++++++++++++++++--------------------- 1 file changed, 43 insertions(+), 40 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 5b4f453395..56a4d0549c 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -385,6 +385,42 @@ static void build_append_pcihp_notify_entry(Aml *metho= d, int slot) aml_append(method, if_ctx); } =20 +static bool is_devfn_ignored(const int devfn, const PCIBus *bus, + bool bus_has_hotplug) +{ + const PCIDevice *pdev =3D bus->devices[devfn]; + + if (pdev) { + if (PCI_FUNC(devfn)) { + if (IS_PCI_BRIDGE(pdev)) { + /* + * Ignore only hotplugged PCI bridges on !0 functions, but + * allow describing cold plugged bridges on all functions + */ + if (DEVICE(pdev)->hotplugged) { + return true; + } + } else if (!get_dev_aml_func(DEVICE(pdev))) { + /* + * Ignore all other devices on !0 functions unless they + * have AML description (i.e have get_dev_aml_func() !=3D = 0) + */ + return true; + } + } + } else { /* non populated slots */ + /* + * hotplug is supported only for non-multifunction device + * so generate device description only for function 0 + */ + if (!bus_has_hotplug || PCI_FUNC(devfn) || + (pci_bus_is_express(bus) && PCI_SLOT(devfn) > 0)) { + return true; + } + } + return false; +} + void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus) { Aml *dev, *notify_method =3D NULL, *method; @@ -400,59 +436,26 @@ void build_append_pci_bus_devices(Aml *parent_scope, = PCIBus *bus) } =20 for (devfn =3D 0; devfn < ARRAY_SIZE(bus->devices); devfn++) { - DeviceClass *dc; PCIDevice *pdev =3D bus->devices[devfn]; int slot =3D PCI_SLOT(devfn); int func =3D PCI_FUNC(devfn); /* ACPI spec: 1.0b: Table 6-2 _ADR Object Bus Types, PCI type */ int adr =3D slot << 16 | func; - bool hotpluggbale_slot =3D false; - bool cold_plugged_bridge =3D false; + bool hotpluggbale_slot =3D true; =20 - if (pdev) { - dc =3D DEVICE_GET_CLASS(pdev); + if (is_devfn_ignored(devfn, bus, !!bsel)) { + continue; + } =20 + if (pdev) { /* * Cold plugged bridges aren't themselves hot-pluggable. * Hotplugged bridges *are* hot-pluggable. */ - cold_plugged_bridge =3D IS_PCI_BRIDGE(pdev) && + bool cold_plugged_bridge =3D IS_PCI_BRIDGE(pdev) && !DEVICE(pdev)->hotplugged; - - hotpluggbale_slot =3D bsel && dc->hotpluggable && + hotpluggbale_slot =3D bsel && DEVICE_GET_CLASS(pdev)->hotplugg= able && !cold_plugged_bridge; - - if (func) { - if (IS_PCI_BRIDGE(pdev)) { - /* - * Ignore only hotplugged PCI bridges on !0 functions,= but - * allow describing cold plugged bridges on all functi= ons - */ - if (DEVICE(pdev)->hotplugged) { - continue; - } - } else if (!get_dev_aml_func(DEVICE(pdev))) { - /* - * Ignore all other devices on !0 functions unless they - * have AML description (i.e have get_dev_aml_func() != =3D 0) - */ - continue; - } - } - } else { - /* - * hotplug is supported only for non-multifunction device - * so generate device description only for function 0 - */ - if (bsel && !func) { - if (pci_bus_is_express(bus) && slot > 0) { - break; - } - /* mark it as empty hotpluggable slot */ - hotpluggbale_slot =3D true; - } else { - continue; - } } =20 /* start to compose PCI device descriptor */ --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673536931; cv=none; d=zohomail.com; s=zohoarc; b=F6WLee6EIjqZa7Qw5lT9fCg69/oiChvNxNxNcYhjHq4HmMDuDAmOt1W+7LyNdNSJWSTpv1W4wifbDT0u/RJgMsyj9KjVLk9UyNkMPGeoMANgZiMrsLHg0RagdIbtS7eUtkYJnX2E4zvKZ07dFxSmEdP/GkUqVFo2QiAH2i7CbGE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673536931; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=b8CbcFljb6Nanuw3LJQXErQPn7YQ0Wmw0F6SR59ao2A=; b=MRZv7dKY+oBlOOUV59Pv8ekcJW8oVNtimGB7a76qgACGVyIjA0sWk8BTm+A9gvvip2aOEIrkMKOJCJoiqrF5n0DhAqoTBA0yGfqAwayaHoKNL8uv7bPCZMJF6lx8u6eUlzcpnsPJ9LO1YgE1tW8aEiRKs58qjaw3OKLDVf1xqDw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTP id 1673536931207894.2496524262099; Thu, 12 Jan 2023 07:22:11 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBW-0002Vb-7p; Thu, 12 Jan 2023 09:04:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBO-0002Ko-02 for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:54 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBM-000641-85 for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:53 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-627-E56eu7qFNXmGa_kYWj3qpA-1; Thu, 12 Jan 2023 09:03:41 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 79156100F904; Thu, 12 Jan 2023 14:03:39 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id E7DB24085720; Thu, 12 Jan 2023 14:03:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532231; 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=b8CbcFljb6Nanuw3LJQXErQPn7YQ0Wmw0F6SR59ao2A=; b=iQz+yNNVuTIHEBGjVvtIfDr7sl+XEjR76U82OAqL3PowDHGohO2q2n2XjJXOrA5uXsn5Ad sWe47oBqeXVuZqg+5Tk5yK3MDQDMbbd9Li0l9M8yoBo0cCAdgL/iVE0H1GhHseAyZQUr2F 5SZUGr0Pxrvw93AG6NIznIc/UQXzEbU= X-MC-Unique: E56eu7qFNXmGa_kYWj3qpA-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 32/40] tests: acpi: whitelist DSDT before decoupling PCI hotplug code from basic slots description Date: Thu, 12 Jan 2023 15:03:04 +0100 Message-Id: <20230112140312.3096331-33-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673536932835100001 Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index dfb8523c8b..1983fa596b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,15 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/pc/DSDT", +"tests/data/acpi/pc/DSDT.acpierst", +"tests/data/acpi/pc/DSDT.acpihmat", +"tests/data/acpi/pc/DSDT.bridge", +"tests/data/acpi/pc/DSDT.cphp", +"tests/data/acpi/pc/DSDT.dimmpxm", +"tests/data/acpi/pc/DSDT.hpbridge", +"tests/data/acpi/pc/DSDT.ipmikcs", +"tests/data/acpi/pc/DSDT.memhp", +"tests/data/acpi/pc/DSDT.nohpet", +"tests/data/acpi/pc/DSDT.numamem", +"tests/data/acpi/pc/DSDT.roothp", +"tests/data/acpi/q35/DSDT.bridge", +"tests/data/acpi/q35/DSDT.multi-bridge", --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673533437; cv=none; d=zohomail.com; s=zohoarc; b=htjM2+CD/BWCWkn+ofyWhWpHmwGSE8O5R2gAAY85wCeu9nELch7BJa/8kI3FqmCFALcb/OXHugNINONsLArVstIHMCGEehktfqfgumMXhmUzyQYfZ3420w50q/2SZMQHjkGnhjZWMRChzKPj4NUMTT8+BpBCqiKR0/PsOMsfbZY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673533437; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=phRzmiDzg4jqp88p3MuTm/AcgGzZs7mH5KQjmTL9e20=; b=mDQqCSxjcRo8+WpMVV0fQLro+8fdFzoMPG9OuHgodQ0k+7JcnQ/1dKzbPzjOVrSC9StaQ6Xcc+ptqiWpAqrqBrJWCBGLYCfzbdRmSu8UMRfR+fWlaSrGi7w8o6nKzURBf/666n6SQvjQGYP5Jy1LWArHKksB/ezKPGnNAlHZJ9w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673533437354805.6203827829144; Thu, 12 Jan 2023 06:23:57 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBX-0002XX-BX; Thu, 12 Jan 2023 09:04:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBK-0002HZ-Dp for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:51 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBG-00061S-HS for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:50 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-594-hXCzG826MTq_aIGnuLa5xA-1; Thu, 12 Jan 2023 09:03:44 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3A9848030D4; Thu, 12 Jan 2023 14:03:40 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id A91F64085721; Thu, 12 Jan 2023 14:03:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532226; 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=phRzmiDzg4jqp88p3MuTm/AcgGzZs7mH5KQjmTL9e20=; b=KivSnmC461ZluZe0OltKj3CcUGUFwsiwGzAcx143X+3bVAfcCR+mev5p6P4tNJIMmI05Xm eV5AO9hkh8BUMiv7JF8VfYUFruMmzUJ9u3hG96hz/MZnOlzbRBSc2QXPKU/Rk2pzJh4nq1 sgOPZff/EK/B0FabHl5dOXVaELhb8os= X-MC-Unique: hXCzG826MTq_aIGnuLa5xA-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 33/40] pcihp: acpi: decouple hotplug and generic slots description Date: Thu, 12 Jan 2023 15:03:05 +0100 Message-Id: <20230112140312.3096331-34-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673533439009100001 Split build_append_pci_bus_devices() onto generic part that builds AML descriptions only for populated slots which is applicable to both hotplug disabled and enabled bridges. And a hotplug only part that complements generic AML with hotplug depended bits (that depend on BSEL), like _SUN/_EJ0 entries, dynamic _DSM. Hotplug part, will generate full 'Device' descriptors for non-populated slots (like it used to be) and complementary 'Scope' descriptors for populated slots that are hotplug capable. i.e. something like this: - ... + Name (BSEL, 0x03) + Scope (S00) + { + Name (ASUN, Zero) + Method (_DSM, 4, Serialized) // _DSM: Device-Specif= ic Method + { + Local0 =3D Package (0x02) + { + BSEL, + ASUN + } + Return (PDSM (Arg0, Arg1, Arg2, Arg3, Local0)) + } + [ ... other hotplug depended bits ] + } While generic build_append_pci_bus_devices() still calls hotplug part at its end it doesn't really depend on any hotplug bits anymore and later both could be completely separated when it's necessary. Main benefit though is that both build_append_pci_bus_devices() and build_append_pcihp_slots() become more readable and it makes easier to modify them with less risk of affecting another part. Also it opens possibility to re-use generic part elsewhere (microvm, arm/virt). Signed-off-by: Igor Mammedov --- PS: All that comes at cost of some code duplication and extra AML (Scope), but I think simpler and more resuable code well worth of it. --- hw/i386/acpi-build.c | 121 +++++++++++++++++++++++++------------------ 1 file changed, 72 insertions(+), 49 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 56a4d0549c..a4f882dc72 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -385,35 +385,40 @@ static void build_append_pcihp_notify_entry(Aml *meth= od, int slot) aml_append(method, if_ctx); } =20 -static bool is_devfn_ignored(const int devfn, const PCIBus *bus, - bool bus_has_hotplug) +static bool is_devfn_ignored_generic(const int devfn, const PCIBus *bus) { const PCIDevice *pdev =3D bus->devices[devfn]; =20 - if (pdev) { - if (PCI_FUNC(devfn)) { - if (IS_PCI_BRIDGE(pdev)) { - /* - * Ignore only hotplugged PCI bridges on !0 functions, but - * allow describing cold plugged bridges on all functions - */ - if (DEVICE(pdev)->hotplugged) { - return true; - } - } else if (!get_dev_aml_func(DEVICE(pdev))) { - /* - * Ignore all other devices on !0 functions unless they - * have AML description (i.e have get_dev_aml_func() !=3D = 0) - */ + if (PCI_FUNC(devfn)) { + if (IS_PCI_BRIDGE(pdev)) { + /* + * Ignore only hotplugged PCI bridges on !0 functions, but + * allow describing cold plugged bridges on all functions + */ + if (DEVICE(pdev)->hotplugged) { return true; } + } else if (!get_dev_aml_func(DEVICE(pdev))) { + /* + * Ignore all other devices on !0 functions unless they + * have AML description (i.e have get_dev_aml_func() !=3D 0) + */ + return true; } + } + return false; +} + +static bool is_devfn_ignored_hotplug(const int devfn, const PCIBus *bus) +{ + if (bus->devices[devfn]) { + return is_devfn_ignored_generic(devfn, bus); } else { /* non populated slots */ - /* + /* * hotplug is supported only for non-multifunction device * so generate device description only for function 0 */ - if (!bus_has_hotplug || PCI_FUNC(devfn) || + if (PCI_FUNC(devfn) || (pci_bus_is_express(bus) && PCI_SLOT(devfn) > 0)) { return true; } @@ -421,29 +426,23 @@ static bool is_devfn_ignored(const int devfn, const P= CIBus *bus, return false; } =20 -void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus) +static void build_append_pcihp_slots(Aml *parent_scope, PCIBus *bus, + QObject *bsel) { - Aml *dev, *notify_method =3D NULL, *method; - QObject *bsel; int devfn; + Aml *dev, *notify_method =3D NULL, *method; + uint64_t bsel_val =3D qnum_get_uint(qobject_to(QNum, bsel)); =20 - bsel =3D object_property_get_qobject(OBJECT(bus), ACPI_PCIHP_PROP_BSEL= , NULL); - if (bsel) { - uint64_t bsel_val =3D qnum_get_uint(qobject_to(QNum, bsel)); - - aml_append(parent_scope, aml_name_decl("BSEL", aml_int(bsel_val))); - notify_method =3D aml_method("DVNT", 2, AML_NOTSERIALIZED); - } + aml_append(parent_scope, aml_name_decl("BSEL", aml_int(bsel_val))); + notify_method =3D aml_method("DVNT", 2, AML_NOTSERIALIZED); =20 for (devfn =3D 0; devfn < ARRAY_SIZE(bus->devices); devfn++) { PCIDevice *pdev =3D bus->devices[devfn]; int slot =3D PCI_SLOT(devfn); - int func =3D PCI_FUNC(devfn); - /* ACPI spec: 1.0b: Table 6-2 _ADR Object Bus Types, PCI type */ - int adr =3D slot << 16 | func; + int adr =3D slot << 16 | PCI_FUNC(devfn); bool hotpluggbale_slot =3D true; =20 - if (is_devfn_ignored(devfn, bus, !!bsel)) { + if (is_devfn_ignored_hotplug(devfn, bus)) { continue; } =20 @@ -454,24 +453,20 @@ void build_append_pci_bus_devices(Aml *parent_scope, = PCIBus *bus) */ bool cold_plugged_bridge =3D IS_PCI_BRIDGE(pdev) && !DEVICE(pdev)->hotplugged; - hotpluggbale_slot =3D bsel && DEVICE_GET_CLASS(pdev)->hotplugg= able && + hotpluggbale_slot =3D DEVICE_GET_CLASS(pdev)->hotpluggable && !cold_plugged_bridge; + dev =3D aml_scope("S%.02X", devfn); + } else { + dev =3D aml_device("S%.02X", devfn); + aml_append(dev, aml_name_decl("_ADR", aml_int(adr))); } =20 - /* start to compose PCI device descriptor */ - dev =3D aml_device("S%.02X", devfn); - aml_append(dev, aml_name_decl("_ADR", aml_int(adr))); - - if (bsel) { - /* - * Can't declare _SUN here for every device as it changes 'slo= t' - * enumeration order in linux kernel, so use another variable = for it - */ - aml_append(dev, aml_name_decl("ASUN", aml_int(slot))); - aml_append(dev, aml_pci_device_dsm()); - } - - call_dev_aml_func(DEVICE(pdev), dev); + /* + * Can't declare _SUN here for every device as it changes 'slot' + * enumeration order in linux kernel, so use another variable for = it + */ + aml_append(dev, aml_name_decl("ASUN", aml_int(slot))); + aml_append(dev, aml_pci_device_dsm()); =20 if (hotpluggbale_slot) { aml_append(dev, aml_name_decl("_SUN", aml_int(slot))); @@ -488,9 +483,37 @@ void build_append_pci_bus_devices(Aml *parent_scope, P= CIBus *bus) /* device descriptor has been composed, add it into parent context= */ aml_append(parent_scope, dev); } + aml_append(parent_scope, notify_method); +} + +void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus) +{ + QObject *bsel; + int devfn; + Aml *dev; + + bsel =3D object_property_get_qobject(OBJECT(bus), ACPI_PCIHP_PROP_BSEL= , NULL); + + for (devfn =3D 0; devfn < ARRAY_SIZE(bus->devices); devfn++) { + /* ACPI spec: 1.0b: Table 6-2 _ADR Object Bus Types, PCI type */ + int adr =3D PCI_SLOT(devfn) << 16 | PCI_FUNC(devfn); + + if (!bus->devices[devfn] || is_devfn_ignored_generic(devfn, bus)) { + continue; + } + + /* start to compose PCI device descriptor */ + dev =3D aml_device("S%.02X", devfn); + aml_append(dev, aml_name_decl("_ADR", aml_int(adr))); + + call_dev_aml_func(DEVICE(bus->devices[devfn]), dev); + + /* device descriptor has been composed, add it into parent context= */ + aml_append(parent_scope, dev); + } =20 if (bsel) { - aml_append(parent_scope, notify_method); + build_append_pcihp_slots(parent_scope, bus, bsel); } =20 qobject_unref(bsel); --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673539544; cv=none; d=zohomail.com; s=zohoarc; b=PlqSlkFz5VbXslpbKCRB5mlLI5icKCGBQ3ugCvNs0gRt+9Wt5mX+Ul4j1ir4MT16E4dgDQyQx/QwCSQ1lGj7BUUgf3fn8imJuoE5094V0trgvxyapQzuMVk9jwfVfwIuHnNJ7hL2dGTMGnpD3xTx2KgAiCmaW0eEzAqRIifQKJY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673539544; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=tW1AvKFkmZl6sisdkjUtvBrw/5FvIVXoFUvEpjKpcaw=; b=NN/Y0AwptDNs2Ibo1MoOnndw7CzDwyWD+pJrpgOJqOuHtNTbXZd/HUiXvAmmvPoZOOmK2Mygj1FIFdONhfHP6PPnqaITNV0f9SPkNncSyLAExobFjcH8zcq85EDtaa0Y9Ig00DEL6eVVK/eZxpS7EPJczZYFbkRfXPFaTVSOPGA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673539544148227.48691387809595; Thu, 12 Jan 2023 08:05:44 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBc-0002jE-Aj; Thu, 12 Jan 2023 09:04:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBL-0002Hf-FY for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:51 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBH-00061h-AG for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:51 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-673-c0ilJF5KOVCZv60mTiVTzg-1; Thu, 12 Jan 2023 09:03:43 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F0CA81C0041E; Thu, 12 Jan 2023 14:03:40 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6AE224085720; Thu, 12 Jan 2023 14:03:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532226; 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=tW1AvKFkmZl6sisdkjUtvBrw/5FvIVXoFUvEpjKpcaw=; b=GUut1GSI3DrSKrlKPav4ZSggOnJAOoc+sXC5CY3ILebIkNNudILBh3ItKYrsWccOVlAObH i0OlRxsejI6IQpprtHirBug3nb+cKcX2aY34mJPrzrLirw9KUsxNfAQrfKbIiv0mF7nUII IEZnQCbYtZLCxIAyi0z/J/S8YhwKWOo= X-MC-Unique: c0ilJF5KOVCZv60mTiVTzg-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 34/40] tests: acpi: update expected blobs Date: Thu, 12 Jan 2023 15:03:06 +0100 Message-Id: <20230112140312.3096331-35-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673539545336100001 Expected change for non-populated slots is that thay are moved after non-hotpluggable PCI tree description. And expected change for hotplug capable populated slots is: - ... + Name (BSEL, 0x03) + Scope (S00) + { + Name (ASUN, Zero) + Method (_DSM, 4, Serialized) // _DSM: Device-Specif= ic Method + { + Local0 =3D Package (0x02) + { + BSEL, + ASUN + } + Return (PDSM (Arg0, Arg1, Arg2, Arg3, Local0)) + } [ ... other hotplug depended bits ] + } Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 14 -------------- tests/data/acpi/pc/DSDT | Bin 6470 -> 6487 bytes tests/data/acpi/pc/DSDT.acpierst | Bin 6430 -> 6453 bytes tests/data/acpi/pc/DSDT.acpihmat | Bin 7795 -> 7812 bytes tests/data/acpi/pc/DSDT.bridge | Bin 12634 -> 12699 bytes tests/data/acpi/pc/DSDT.cphp | Bin 6934 -> 6951 bytes tests/data/acpi/pc/DSDT.dimmpxm | Bin 8124 -> 8141 bytes tests/data/acpi/pc/DSDT.hpbridge | Bin 6430 -> 6459 bytes tests/data/acpi/pc/DSDT.ipmikcs | Bin 6542 -> 6559 bytes tests/data/acpi/pc/DSDT.memhp | Bin 7829 -> 7846 bytes tests/data/acpi/pc/DSDT.nohpet | Bin 6328 -> 6345 bytes tests/data/acpi/pc/DSDT.numamem | Bin 6476 -> 6493 bytes tests/data/acpi/pc/DSDT.roothp | Bin 9775 -> 9787 bytes tests/data/acpi/q35/DSDT.bridge | Bin 11475 -> 11481 bytes tests/data/acpi/q35/DSDT.multi-bridge | Bin 12375 -> 12423 bytes 15 files changed, 14 deletions(-) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index 1983fa596b..dfb8523c8b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,15 +1 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/pc/DSDT", -"tests/data/acpi/pc/DSDT.acpierst", -"tests/data/acpi/pc/DSDT.acpihmat", -"tests/data/acpi/pc/DSDT.bridge", -"tests/data/acpi/pc/DSDT.cphp", -"tests/data/acpi/pc/DSDT.dimmpxm", -"tests/data/acpi/pc/DSDT.hpbridge", -"tests/data/acpi/pc/DSDT.ipmikcs", -"tests/data/acpi/pc/DSDT.memhp", -"tests/data/acpi/pc/DSDT.nohpet", -"tests/data/acpi/pc/DSDT.numamem", -"tests/data/acpi/pc/DSDT.roothp", -"tests/data/acpi/q35/DSDT.bridge", -"tests/data/acpi/q35/DSDT.multi-bridge", diff --git a/tests/data/acpi/pc/DSDT b/tests/data/acpi/pc/DSDT index c99179b35254725daeebb416400b1b6f9f1d74c4..1bc656f2a4897d2932d593e8768= 173e0d2597d45 100644 GIT binary patch delta 153 zcmX?Rblr%{CDvjwd^<$VE$S=3DnO c5&#+i5?}-g@CraQg9NykKq8yJ@CI=3DM05Z-dWdHyG delta 145 zcmca^bj*m$CDVFY6sgBY7x`GU9s%t#|s diff --git a/tests/data/acpi/pc/DSDT.acpierst b/tests/data/acpi/pc/DSDT.acp= ierst index b0ae8c2cf52616836dae14c0a971f56fcfa7cdc8..0d4639906ddce689b3dcd9d749c= 79e3a511d548a 100644 GIT binary patch delta 186 zcmbPdwAF~qCD3oGPVoW`R|1?p4WgU4gAEMgIpQ5%f*7Kk z+@ymIEFe4{pbm!3f4EmL@@oYfLX`jonHVPDm+7WM<%S3U>8j5YPl0<`^96 p$1r)LkQ@(40H_Qkzz7oH6@Zup65wKji$IldF@r=3DlYw>;I0st<`Evf(j delta 162 zcmdmLG|!03CD2gC##=3DolR8$2hrARE|vmY}n+7LaLh;g@d>OKjtUM delta 151 zcmZp%{cOYK66_LEEXTmW$gz=3DYiGaH2)tLBTr+5L!s{ziQ1{_You09OWP5QwG2Jsy6 zjxIqA9FD=3DEehiZhMdc)-o4jO$4J;rMJU}BLl8hk9&9?(0_B+)Ci4ob bN{evB2OGLDEMWjKj9?675M#5Ea1b{De|;nj diff --git a/tests/data/acpi/pc/DSDT.bridge b/tests/data/acpi/pc/DSDT.bridge index 783a9d7b2964612626268905837d108679603432..4c2d77b8051de2ed21fe43c8283= 003d8083747f7 100644 GIT binary patch delta 429 zcmcbWG&`BgCDcc4D%mQ|kV{oV+!(>4L<;mH6B5VShAOj~)OosSeO|ky!i?LM~=3D-#Dwi3Z`GbuReqaH*7ASzQniVWyj8MVG z0Co!l$X1{z%qen6&fpb*gbUmia$pf;2gtF5oC>sfGM9iogbnmUG?WdrZu1%eO^(eE H^s1NuJu71d delta 124 zcmbQ8d@G5|CDp4a&F140H&DuV5fM2#sH=3DOXHNqTr(jnfhUg~!$@_Wr zSfZP}WG8d+8ExLcy@HX+fpu~upYh~$URmbu2FA&&_)J(qsu?Hm=3DJjQAIt)~3ym>3{ bf9}oUe6^gLH!5Fd-29X8HpgZ~{VFB^@bxCy diff --git a/tests/data/acpi/pc/DSDT.cphp b/tests/data/acpi/pc/DSDT.cphp index 659ad3d6b9026c090e0d8d8e21ece5df44249ec0..ef487176e117acf8f271d0a54bf= ad8dfa33ef696 100644 GIT binary patch delta 153 zcmbPcw%m-%CDvjwd^<$WFU40m$oAiSX4B|QB z9bJMLCdcrrNJKYz$p#x(K!kXJni)78gG2ooCqERB+g!)Hf>FSMHP{fU1t`zNFnI&N csC5E4mL1|=3DZJT731WzD za+3}=3Duz>J*fI1j97YVIkvjwd^<$W9C?dxO Z60nG$>?fqcCIHqpSxZE9bCyUDHvq0iBSHWG delta 128 zcmX?WzsH`-CDm_q PNZ;h!!qS_oMS{2i7_T9@ diff --git a/tests/data/acpi/pc/DSDT.hpbridge b/tests/data/acpi/pc/DSDT.hpb= ridge index b0ae8c2cf52616836dae14c0a971f56fcfa7cdc8..ce2e1430a38b467b212573a896b= 94c306caa12fb 100644 GIT binary patch delta 211 zcmbPdwA+ZwCDmiY DjxaJ> delta 203 zcmdmOG|!03CD=3Dr+5L+n*q+A1{_You09OWP5QwG2Jsy6 zjxIqA9FD=3DEehiZz3d#vZH#sQ<8(2Ujcz{MQO#a8KvUwf%2S#xR)?h=3DZ7N86hL>m_q PNZ;hOywaO}`GU9s3acV^ diff --git a/tests/data/acpi/pc/DSDT.memhp b/tests/data/acpi/pc/DSDT.memhp index b2a7c042a902d1bbac79961639e27d302ad8799f..45b434d485444750cf00ebc1b26= 58f2fa40f0884 100644 GIT binary patch delta 169 zcmbPgyUdo$CDo#F+Yt_3)I8bmj72OAi~bHqEk1TjQ6 zxk(2bSU`9@KphO5y#-e=3DnrQ_aLX`jonHWSk;)4xc7?yw;Mlgmkh{53$?CQfHpb0W_ l@<#y`9uN~~pkr{TALHbYB67R}5W_$MTudO5&CbF>+yIwfDo6kT delta 145 zcmZ2xJJpuUCDB^zvD0TJQ>YG&YY3=3DZ{UocvHoZu4J(6^sH7tigs*EkJoDhROQE cs?s7H@xg{J3`-b53?mrB7{u5dA{@jG06rHa#Q*>R diff --git a/tests/data/acpi/pc/DSDT.nohpet b/tests/data/acpi/pc/DSDT.nohpet index b64da36b14edd13270dfd9db040a3b99219a36a0..dbed1404bb70eebf1c3cf0f882d= 3b4b7cccd53a8 100644 GIT binary patch delta 153 zcmdmCc+!x|CDo#F+Yt_3)I8bmj72OAi~bHqEk1TjQ6 zxk(2bSU`9@KphO5^SD=3DZM2{3{Lcm*JuK>}P%Ad$^!yg}Rm8F(bN delta 152 zcmX?UxWkakCDB^zvD0TJQ>YG&YY3=3DZ{UocxeiZnFaS3Py1U)?h=3DZ7N9&6M4pQY cq(EAPBR<&Bg<%N;h+za{7=3Dsv_%Xx#i0ZK(CPXGV_ diff --git a/tests/data/acpi/pc/DSDT.numamem b/tests/data/acpi/pc/DSDT.numa= mem index f554b0b09db33fa90d65267c2687e90d4ab7d92e..6ee52f1230445c0dff01c77e72a= 74ca37e5864f1 100644 GIT binary patch delta 140 zcmX?Obk~T>CDbjFCwCDFU40m$oAiSX4B|QB z9bJMLI2?mR{TL=3DY3dspYH+jhh8(2Ujcz{MQOy0w*vUv;l3Py1U)?h=3DZ7N86hL>m_q PNZ;gaUg^!;d_mj*>(n5J diff --git a/tests/data/acpi/pc/DSDT.roothp b/tests/data/acpi/pc/DSDT.roothp index d58f4d2f0adbb86f8f6403a1cf9b13e1cabed035..578de7540f6f09c05ad81f62abd= 142be8cb288ee 100644 GIT binary patch delta 128 zcmZ4Qv)hNuCD^cS3y&i8 delta 80 zcmV-W0I&bMOs`A|L{mgmFD3v00g8j5O8Jz3poad`Y}v?sGz)AQGOFI0QXoKo&W#< delta 76 zcmcZ^c{!5HCDb1Op<{LrPGhtQFh_2ii zs+<|Cat0*j5pJh~4K3lWVFtS1=3DP1JY(M@g#k$Ffyi*Di%Hb(fH4eC`^gyFWETNEcV z@(H-IfE79hhx&1`O>R_H*&L#Lhm#i)G%Ny|(2!9P5n*!)^9x~uNH8NLHk<1zFarSE CJzC`e delta 344 zcmZoqyq>`266_KZZot66_;w>#lN=3DWlV@!OoQ@lV2=3DQZp?+L!lRqk}Y*tdf!^tkf<`U)?!n8SESAiJ-)N@Yo --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673535283; cv=none; d=zohomail.com; s=zohoarc; b=CwbnLut2rLdZPhr4D9+kgdGNFKp4LRX+ALw2WDfjMY7gImc94r4p2n7XSmaRqm1SBk6GSmgu7suVY2veDfUl67LNkkz/2UVEnk9TR8hcdJBx/hOZUp2gxrS36fcVfz2IwAHCncVbGFr2GnVrnRsJpYMyskHN/AMwWNBO9zov1Wc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673535283; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=CgGEM/tjOJra+hEBYCjhm5bbO93vSve+ChXCGRrVqcE=; b=MzOGBE2hyTl2DxbGE31n5Fc/EmldxCnQHon+cULoT7EP58ZPAdZKGLAImnZVLLTkh6DIXfTzgUGy7YxbLlAJgNv/NALNuyalFsBBPLnUWYgGMONxHxtYevD5D/RxKzh7b4e6qgPrbywtIKOxgWxCj0RncPpLtIq+pksFRheaPZM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673535283331485.6363315570088; Thu, 12 Jan 2023 06:54:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBV-0002TE-6o; Thu, 12 Jan 2023 09:04:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBJ-0002H3-Jn for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:49 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBF-00060K-2V for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:49 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-440-Ak_3c_GlPhiDfzPwRD_BSA-1; Thu, 12 Jan 2023 09:03:42 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B04001991C56; Thu, 12 Jan 2023 14:03:41 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2BDC74085720; Thu, 12 Jan 2023 14:03:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532224; 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=CgGEM/tjOJra+hEBYCjhm5bbO93vSve+ChXCGRrVqcE=; b=EeVK78WpR6/kIJOUawrJF1753yODGCljARkkbjm7TJcIWIbhJvnJlBTco8unHe+x26blks +Fe+A0MV9bmnFjLKUKXWhYS4cuknH/NGIQGk3b33ZyYlffSVybIr/egn5pvvJlhuKfKOhA gidysuySFtxviujewG6k8zVwTzxTjMQ= X-MC-Unique: Ak_3c_GlPhiDfzPwRD_BSA-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 35/40] tests: acpi: whitelist DSDT blobs before removing dynamic _DSM on coldplugged bridges Date: Thu, 12 Jan 2023 15:03:07 +0100 Message-Id: <20230112140312.3096331-36-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673535284172100003 Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index dfb8523c8b..a83322cb08 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/pc/DSDT.bridge", +"tests/data/acpi/pc/DSDT.roothp", +"tests/data/acpi/pc/DSDT.hpbridge", +"tests/data/acpi/q35/DSDT.multi-bridge", --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673537506; cv=none; d=zohomail.com; s=zohoarc; b=KGY6idCPLW+RAXCZQsolgFIuUw3osaU9jou4NLTC1wsuczpuErd3YO9ls8f0+mHCLPKb7MBafggMKoW1263mGqe3/6XTapZ1pYjbbM9dYISoCSYORoODAY7T3Qh6DaHJcvbWVUyGBSeHBzZOKbEEbPNlMKTV7Ozl/smVauuZhno= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673537506; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Z13F7ZxPepmju0UlhSUBoJZaNYceLXa2mu0PfuDyxYI=; b=QhR27zh/dhfdOG8qVlxWwUgcejkCq5wo30mmip//HOFtQLmCJQMINOGcqTpPbN1rlqxpgzDM/PwKDMNn0TwOkwmrDFw0rNfICFpEQDGx3j0MKUmw/2xIV/WkqkV0hGMnKO+ihpTB+pBh1x7StVRj9qdg7kU3XxDUz9iIIyO9L7o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 167353750631620.40440501670696; Thu, 12 Jan 2023 07:31:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBW-0002WG-JG; Thu, 12 Jan 2023 09:04:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBK-0002HN-3K for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:50 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBF-00060v-QS for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:49 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-351--Yx9fLy1PyOk5Ge_T9sCNQ-1; Thu, 12 Jan 2023 09:03:43 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 718E02807D7B; Thu, 12 Jan 2023 14:03:42 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id E06294085720; Thu, 12 Jan 2023 14:03:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532225; 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=Z13F7ZxPepmju0UlhSUBoJZaNYceLXa2mu0PfuDyxYI=; b=W2Ojg89WZr/cP540qFsrmUCu78lQyqk7C8W1/nNduMPPPHl1kO88dOT7uawlJ/0P29Iqtd mTuSZK0jxV6Y29LcyOXeMJXyMs93oLgZwXiNpkKZq+5q27mnjdayqhyR/IH9u0rchP9ZpJ D5wcHzNGaXxeklJdXBZ1bEuwynTjHpk= X-MC-Unique: -Yx9fLy1PyOk5Ge_T9sCNQ-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 36/40] pcihp: acpi: ignore coldplugged bridges when composing hotpluggable slots Date: Thu, 12 Jan 2023 15:03:08 +0100 Message-Id: <20230112140312.3096331-37-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673537507029100003 coldplugged bridges are not unpluggable, so there is no need to describe slots where they are plugged as hotpluggable. To that effect we have a condition that marks slot as non-hotpluggable if it's populated by coldplugged bridge and prevents generation _SUN/_EJ0 objects for it. That leaves dynamic _DSM method on such slot (which also depends on BSEL and pcihp hardware). This _DSM method provides only dynamic acpi-index support so far, which is not actually used/supported by linux kernel for bridges and it's doubtful there will be need for it at all. So it's rather pointless to generate acpi-index related AML for bridges and we can simplify hotplug slots generator a bit more by completely ignoring coldplugged bridges on hotplug path. Another point in favor of dropping dynamic _DSM support, is that we can replace it with static _DSM if necessary since a slot with bridge can't change during VM runtime and without any dependency on ACPI PCI hotplug at that. Later I plan to implement bridge specific static _DSM PCI Firmware Specification 3.2 4.6.5. _DSM for Ignoring PCI Boot Configurations part of spec, to fix longstanding issue with fixed IO/MEM resource assignment that often leads to hotplugged device being in-operational within the guest due limited IO/MEM windows programmed on bridge at boot time. Expected change when coldplugged bridge is ignored by hotplug code, should look like: - Scope (S18) - { - Name (ASUN, 0x03) - Method (_DSM, 4, Serialized) // _DSM: Device-Specific Met= hod - { - Local0 =3D Package (0x02) - { - BSEL, - ASUN - } - Return (PDSM (Arg0, Arg1, Arg2, Arg3, Local0)) - } - } Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index a4f882dc72..50504578b9 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -411,8 +411,11 @@ static bool is_devfn_ignored_generic(const int devfn, = const PCIBus *bus) =20 static bool is_devfn_ignored_hotplug(const int devfn, const PCIBus *bus) { - if (bus->devices[devfn]) { - return is_devfn_ignored_generic(devfn, bus); + PCIDevice *pdev =3D bus->devices[devfn]; + if (pdev) { + return is_devfn_ignored_generic(devfn, bus) || + /* Cold plugged bridges aren't themselves hot-pluggable */ + (IS_PCI_BRIDGE(pdev) && !DEVICE(pdev)->hotplugged); } else { /* non populated slots */ /* * hotplug is supported only for non-multifunction device @@ -447,14 +450,7 @@ static void build_append_pcihp_slots(Aml *parent_scope= , PCIBus *bus, } =20 if (pdev) { - /* - * Cold plugged bridges aren't themselves hot-pluggable. - * Hotplugged bridges *are* hot-pluggable. - */ - bool cold_plugged_bridge =3D IS_PCI_BRIDGE(pdev) && - !DEVICE(pdev)->hotplugged; - hotpluggbale_slot =3D DEVICE_GET_CLASS(pdev)->hotpluggable && - !cold_plugged_bridge; + hotpluggbale_slot =3D DEVICE_GET_CLASS(pdev)->hotpluggable; dev =3D aml_scope("S%.02X", devfn); } else { dev =3D aml_device("S%.02X", devfn); --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673533736; cv=none; d=zohomail.com; s=zohoarc; b=nl0WN5NUkVK5cYZ3yzliZ/BV1lwHBQy7sOSyM4NHwkVgvb1P3G7pFNruW/rVoRXcyoLDJuMxckdVsZ2D5q3tZEkMvNiGASbq39hvqLukldy71MVnlq9zpfiV/DGKz66Tlm0Sa1IKN3uJOEkezmyagecvVKvIy/R4K7j1i9AeE6s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673533736; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=KLCtpuuKUwCCPYPde+dgPmG7uJCNWQPdUnIrpvJyvB4=; b=CgKud6pxH/XodBpGkJYPwLLL7uizuerv5rE5fdLOXhDEiO1NMMbLcZoG7s6gmBVs8QgZ0yGGS0Aw/Y9+Sy5q55G+Z0gksU5aVoSkJLkLXT0yZIrVtaJc94p+LDUhBpU1Bz5X5wS5NaFe0TO0TazkBaNAMbhD4O6hfPq99pb0sto= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673533736391932.9329537607258; Thu, 12 Jan 2023 06:28:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBb-0002iA-N1; Thu, 12 Jan 2023 09:04:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBK-0002HY-Ba for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:51 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBG-00061P-I4 for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:50 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-471-yBh8iV6NNqW9d7HUFW43ag-1; Thu, 12 Jan 2023 09:03:43 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 33D301C0041B; Thu, 12 Jan 2023 14:03:43 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id A11444085720; Thu, 12 Jan 2023 14:03:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532226; 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=KLCtpuuKUwCCPYPde+dgPmG7uJCNWQPdUnIrpvJyvB4=; b=ga82GAXiRsXsEkxyia8ssLAWMLavUzdAgBRCaA7uILKyVUpG9W676KgUn+JuDoDoVb/LWZ fJbUH4u26jYGA5v7K0EoCHCGyaQn19/5WrnqwxHIGXtD+1ErtO3wAxyuxNHJMXB673A8kJ ZjimPGmtn/8TIv9tiZXJ7WdJft+gibI= X-MC-Unique: yBh8iV6NNqW9d7HUFW43ag-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 37/40] tests: acpi: update expected blobs Date: Thu, 12 Jan 2023 15:03:09 +0100 Message-Id: <20230112140312.3096331-38-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673533738124100001 expected change is removal of dynamic _DSM bits from slots populated by coldplugged bridges (something like): - Scope (S18) - { - Name (ASUN, 0x03) - Method (_DSM, 4, Serialized) // _DSM: Device-Specific= Method - { - Local0 =3D Package (0x02) - { - BSEL, - ASUN - } - Return (PDSM (Arg0, Arg1, Arg2, Arg3, Local0)) - } - } Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 4 ---- tests/data/acpi/pc/DSDT.bridge | Bin 12699 -> 12614 bytes tests/data/acpi/pc/DSDT.hpbridge | Bin 6459 -> 6416 bytes tests/data/acpi/pc/DSDT.roothp | Bin 9787 -> 9745 bytes tests/data/acpi/q35/DSDT.multi-bridge | Bin 12423 -> 12337 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 a83322cb08..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/pc/DSDT.bridge", -"tests/data/acpi/pc/DSDT.roothp", -"tests/data/acpi/pc/DSDT.hpbridge", -"tests/data/acpi/q35/DSDT.multi-bridge", diff --git a/tests/data/acpi/pc/DSDT.bridge b/tests/data/acpi/pc/DSDT.bridge index 4c2d77b8051de2ed21fe43c8283003d8083747f7..d65d9f053910d4ef8a77fe7f901= 5768dd48a53f8 100644 GIT binary patch delta 65 zcmbQ8d@PB}CDtZT5319@y_I7a%Gt; VsHQpj0zcd4Dyf6qo72=3DxxdF4y6yg8? delta 64 zcmV-G0KfmnVw+g7N3-|#7j(@X;4Ves+ Wyd^5L9~$xt0VMlAQdeD diff --git a/tests/data/acpi/pc/DSDT.hpbridge b/tests/data/acpi/pc/DSDT.hpb= ridge index ce2e1430a38b467b212573a896b94c306caa12fb..c8b388a85c8d7472a5370c9657f= a2b4e1a897e38 100644 GIT binary patch delta 40 wcmdmOG{K0=3DCD=3D5C;GN diff --git a/tests/data/acpi/pc/DSDT.roothp b/tests/data/acpi/pc/DSDT.roothp index 578de7540f6f09c05ad81f62abd142be8cb288ee..657c8263f0c649abc806a67576f= d74cb32af60c3 100644 GIT binary patch delta 58 zcmdn(Gtr03CDq3sF=3DHcFIX8FrT*jFAV5fM2rn#GYxPLG*wbyKJ<1OWxtRTd? OIg+o6bMq4A=3D}Z6+RuYx~ delta 66 zcmbQ}v)hNuCDpS6(Bxqf(41VLpdlc_<`U)?!o=3DYe?CQhC3=3D!NcsH?yX0Mzgp3IG5A --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673539548; cv=none; d=zohomail.com; s=zohoarc; b=NaNV2Wu/XqGex5vc9Y/2XXm9TdjpUTuafRNG0Cux5vMOJRAnj9kE+s6GRXcMbf3DJNb+wlFxtqrhZL0TKNVanbBF9tH9vdZrb26I1V0hJwZ8BvAHLzyg5MMjKJu+f1n7SkgyziR8NtznTrXl0p0QcAAML9OrXBpUUzW3QoZxpM8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673539548; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=EIMLUhnBGVg4Dq7zvz0zYH9RL2fG/0G5jmMEOEFhK+Y=; b=nMIBQrTzwJv1wVoHfo+yQkGDt7yazxzpTPocdjrSfJ7Tv2CYdV/ARweubbbLlimdeuK2UFC00UimphCaWG3UUVSLJY+diUt73tgxZqcc+CQYlqYuqwwPNHXiKFptTyJ6yWKfI01+KDcs5umPkAqB5rJfISSMXHTg7R6VhDsPQyo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673539548362443.4497129502512; Thu, 12 Jan 2023 08:05:48 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBY-0002aY-Oz; Thu, 12 Jan 2023 09:04:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBL-0002Hz-Kf for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:51 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBI-00062P-N6 for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:51 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-377-kweIkroBM0CrTIUJbOGKfw-1; Thu, 12 Jan 2023 09:03:44 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 22D081C0041E; Thu, 12 Jan 2023 14:03:44 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 640124085720; Thu, 12 Jan 2023 14:03:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532228; 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=EIMLUhnBGVg4Dq7zvz0zYH9RL2fG/0G5jmMEOEFhK+Y=; b=e2zU36WaZ+HogHoj4/vkgGAvQD8qtdPYdv2DIOF966ug82mGNXIra7JuiLMDVYJM/nRe4d w81kzuGeShIqkAAJkflje8K1FRYz1ijCmd4Dhis2J+HoDMEFunOQ9jH7Vgk+GHk1JcQbia tHGDwUsEuvPPZHX2/BYGqsvd8mKF9Y0= X-MC-Unique: kweIkroBM0CrTIUJbOGKfw-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 38/40] tests: acpi: whitelist DSDT before moving non-hotpluggble slots description from hotplug path Date: Thu, 12 Jan 2023 15:03:10 +0100 Message-Id: <20230112140312.3096331-39-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673539549256100001 Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index dfb8523c8b..0adf61bac3 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,12 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/pc/DSDT", +"tests/data/acpi/pc/DSDT.acpierst", +"tests/data/acpi/pc/DSDT.acpihmat", +"tests/data/acpi/pc/DSDT.bridge", +"tests/data/acpi/pc/DSDT.cphp", +"tests/data/acpi/pc/DSDT.dimmpxm", +"tests/data/acpi/pc/DSDT.hpbridge", +"tests/data/acpi/pc/DSDT.ipmikcs", +"tests/data/acpi/pc/DSDT.memhp", +"tests/data/acpi/pc/DSDT.nohpet", +"tests/data/acpi/pc/DSDT.numamem", --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673533952; cv=none; d=zohomail.com; s=zohoarc; b=c7K/IfuK3k6bhdnXfIh4t5YNEAj5Mv8P4Psk7PLFJIebxiYs1XItvLeuQZ9FVXokoh1fAz3Pdc3ByJYxinsxSWm7kjP5CH2OEUwsHqyZnPujv6VZNJwUZ72oo8fvBbAFJBB5vCU/yWJfry6HyJYp90+3HLJkiNSMvBGOYj0Fy/g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673533952; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7brEE8KbU/icKbuJywLodwZB28Qr2jpZI5OqQ0Eti9s=; b=QMyq0aalIUviQBCJYZSl7Mo1c9EW9Q4R81tjWFUwzwLEFRNm1lUWZy99j5EkgdD6s8qf+fgVZ3DPXe6YauvAyci0QXFDY1We0dDRSeBeQ9V1aWXqC+YfEDEKWbzP8l6pf3VohOyPz7nCLyU+yyq9AvaRXfAUxDqYVOle2Uc5wMA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673533952079711.8013688818655; Thu, 12 Jan 2023 06:32:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBc-0002jV-V0; Thu, 12 Jan 2023 09:04:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBP-0002M4-NH for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:55 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBO-00064J-1B for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:55 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-16-AjC1-yrqOA6I0NCtwngTpg-1; Thu, 12 Jan 2023 09:03:51 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D8D392807D77; Thu, 12 Jan 2023 14:03:44 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 530C84085720; Thu, 12 Jan 2023 14:03:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532233; 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=7brEE8KbU/icKbuJywLodwZB28Qr2jpZI5OqQ0Eti9s=; b=dWJhYQoBY36PHhlgY5VmNZAZAT8pm7sK78/O/0VqBM0eF779Vu0AtMHQmlGqB7wuzDF9w9 QKkC0O9Gy3zyAv2iz3uNsrKzL9zDeyIuXFZo9DBp2Hp6J/+HSP6SDrkTr/BBr0VhtsHNvE UDNz5rsf6Z+w+P1myPPrjZeZtMyC6ks= X-MC-Unique: AjC1-yrqOA6I0NCtwngTpg-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 39/40] pcihp: generate populated non-hotpluggble slot descriptions on non-hotplug path Date: Thu, 12 Jan 2023 15:03:11 +0100 Message-Id: <20230112140312.3096331-40-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673533954309100005 Generating slots descriptions populated by non-hotpluggable devices is akward at best and complicates hotplug path (build_append_pcihp_slots) needlessly, and builds only dynamic _DSM for such slots which is overlkill. Clean it up and let non-hotplug path (build_append_pci_bus_devices) to handle that task. Such clean up effectively drops dynamic _DSM methods on non-hotpluggable slots (even though bus itself is hotpluggable), but in practice it affects only built-in devices (ide controllers/various bridges) that don't use acpi-index anyways so effectively it doesn't matter (NICs are hotpluggb= le). Follow up series will add static _DSM for non-hotpluggble devices/buses that will not depend on ACPI PCI hotplug at all, and potentially would allows us to reuse non-hotplug path elsewhere (PBX/microvm/arm-virt), including new support for acpi-index for non-hotpluggable devices. Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 50504578b9..c085bf7812 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -414,6 +414,7 @@ static bool is_devfn_ignored_hotplug(const int devfn, c= onst PCIBus *bus) PCIDevice *pdev =3D bus->devices[devfn]; if (pdev) { return is_devfn_ignored_generic(devfn, bus) || + !DEVICE_GET_CLASS(pdev)->hotpluggable || /* Cold plugged bridges aren't themselves hot-pluggable */ (IS_PCI_BRIDGE(pdev) && !DEVICE(pdev)->hotplugged); } else { /* non populated slots */ @@ -440,17 +441,14 @@ static void build_append_pcihp_slots(Aml *parent_scop= e, PCIBus *bus, notify_method =3D aml_method("DVNT", 2, AML_NOTSERIALIZED); =20 for (devfn =3D 0; devfn < ARRAY_SIZE(bus->devices); devfn++) { - PCIDevice *pdev =3D bus->devices[devfn]; int slot =3D PCI_SLOT(devfn); int adr =3D slot << 16 | PCI_FUNC(devfn); - bool hotpluggbale_slot =3D true; =20 if (is_devfn_ignored_hotplug(devfn, bus)) { continue; } =20 - if (pdev) { - hotpluggbale_slot =3D DEVICE_GET_CLASS(pdev)->hotpluggable; + if (bus->devices[devfn]) { dev =3D aml_scope("S%.02X", devfn); } else { dev =3D aml_device("S%.02X", devfn); @@ -464,17 +462,15 @@ static void build_append_pcihp_slots(Aml *parent_scop= e, PCIBus *bus, aml_append(dev, aml_name_decl("ASUN", aml_int(slot))); aml_append(dev, aml_pci_device_dsm()); =20 - if (hotpluggbale_slot) { - aml_append(dev, aml_name_decl("_SUN", aml_int(slot))); - /* add _EJ0 to make slot hotpluggable */ - method =3D aml_method("_EJ0", 1, AML_NOTSERIALIZED); - aml_append(method, - aml_call2("PCEJ", aml_name("BSEL"), aml_name("_SUN")) - ); - aml_append(dev, method); + aml_append(dev, aml_name_decl("_SUN", aml_int(slot))); + /* add _EJ0 to make slot hotpluggable */ + method =3D aml_method("_EJ0", 1, AML_NOTSERIALIZED); + aml_append(method, + aml_call2("PCEJ", aml_name("BSEL"), aml_name("_SUN")) + ); + aml_append(dev, method); =20 - build_append_pcihp_notify_entry(notify_method, slot); - } + build_append_pcihp_notify_entry(notify_method, slot); =20 /* device descriptor has been composed, add it into parent context= */ aml_append(parent_scope, dev); @@ -493,8 +489,9 @@ void build_append_pci_bus_devices(Aml *parent_scope, PC= IBus *bus) for (devfn =3D 0; devfn < ARRAY_SIZE(bus->devices); devfn++) { /* ACPI spec: 1.0b: Table 6-2 _ADR Object Bus Types, PCI type */ int adr =3D PCI_SLOT(devfn) << 16 | PCI_FUNC(devfn); + PCIDevice *pdev =3D bus->devices[devfn]; =20 - if (!bus->devices[devfn] || is_devfn_ignored_generic(devfn, bus)) { + if (!pdev || is_devfn_ignored_generic(devfn, bus)) { continue; } =20 --=20 2.31.1 From nobody Thu Apr 25 07:51:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673533638; cv=none; d=zohomail.com; s=zohoarc; b=X5OViuiZxUCZllVwd0T8mFT/valQxIaJrRVMWaVizjzjuHRUbuAQAx43q+oalRXIksmh+JhcaJCBHh0hNUaDNxCS5drLYqL4RSsElBOJrFVVECL/Uld/gqceD9vMYi4YvA47GtI9eNOZb4EpmFTTTU/KBhG6IGEgHlyahZnRE8E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673533638; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=iRXNZcrAKzLcv6sbR6mR0bElefVEIs0jwpufh6V8hv4=; b=jXxPlmbaU+HekJFWe7bwnLo99Dq6jggCdY98MPfpFEMVOwV+3fD1Mr1+RtwGOO1Tes6/0gtm5RSFlM1s8k7sxTC2sU1Qd6muv0c7BcbKJl3qpEFZi8tF7ThHnZ/TKBBzMdHeYFh0MZb544L1YyO7WbqR8zAZgldPTew9vTjBHRM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1673533638533857.960668408257; Thu, 12 Jan 2023 06:27:18 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyBU-0002Rg-9g; Thu, 12 Jan 2023 09:04:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBM-0002IE-1L for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:52 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBI-00062F-7Z for qemu-devel@nongnu.org; Thu, 12 Jan 2023 09:03:51 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-657--nFzPlnmNei9y4AZgrXX1w-1; Thu, 12 Jan 2023 09:03:46 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9A6392807D76; Thu, 12 Jan 2023 14:03:45 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 14AA84085720; Thu, 12 Jan 2023 14:03:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673532227; 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=iRXNZcrAKzLcv6sbR6mR0bElefVEIs0jwpufh6V8hv4=; b=IMBfIfnqQLEObzx6n1we2HKY5tnxK+A3Enyq4N7QKC27P1WScFYTsYJSWGIbCFXJpEE1ML OuUmi9bInv59U0rsbB//r7AjhMdvZndz0JSIbPYm2pi0t2/EqsRNl2F2gfMSnaqJ57uEqy CHm4Lr2b6+pE3HfqjNB0fvPilJElf/E= X-MC-Unique: -nFzPlnmNei9y4AZgrXX1w-1 From: Igor Mammedov To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Ani Sinha Subject: [PATCH 40/40] tests: acpi: update expected blobs Date: Thu, 12 Jan 2023 15:03:12 +0100 Message-Id: <20230112140312.3096331-41-imammedo@redhat.com> In-Reply-To: <20230112140312.3096331-1-imammedo@redhat.com> References: <20230112140312.3096331-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=imammedo@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673533639566100001 Expected change removal of dynamic _DSM AML for non-hotpluggable hots-bridge, storage, isa bridge devices from PC machine blobs: - Scope (S00) - { - Name (ASUN, Zero) - Method (_DSM, 4, Serialized) // _DSM: Device-Specific M= ethod - { - Local0 =3D Package (0x02) - { - BSEL, - ASUN - } - Return (PDSM (Arg0, Arg1, Arg2, Arg3, Local0)) - } - } - - Scope (S08) - { - Name (ASUN, One) - Method (_DSM, 4, Serialized) // _DSM: Device-Specific M= ethod - { - Local0 =3D Package (0x02) - { - BSEL, - ASUN - } - Return (PDSM (Arg0, Arg1, Arg2, Arg3, Local0)) - } - } - - Scope (S10) - { - Name (ASUN, 0x02) - Method (_DSM, 4, Serialized) // _DSM: Device-Specific M= ethod - { - Local0 =3D Package (0x02) - { - BSEL, - ASUN - } - Return (PDSM (Arg0, Arg1, Arg2, Arg3, Local0)) - } - } Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 11 ----------- tests/data/acpi/pc/DSDT | Bin 6487 -> 6360 bytes tests/data/acpi/pc/DSDT.acpierst | Bin 6453 -> 6283 bytes tests/data/acpi/pc/DSDT.acpihmat | Bin 7812 -> 7685 bytes tests/data/acpi/pc/DSDT.bridge | Bin 12614 -> 12487 bytes tests/data/acpi/pc/DSDT.cphp | Bin 6951 -> 6824 bytes tests/data/acpi/pc/DSDT.dimmpxm | Bin 8141 -> 8014 bytes tests/data/acpi/pc/DSDT.hpbridge | Bin 6416 -> 6289 bytes tests/data/acpi/pc/DSDT.ipmikcs | Bin 6559 -> 6432 bytes tests/data/acpi/pc/DSDT.memhp | Bin 7846 -> 7719 bytes tests/data/acpi/pc/DSDT.nohpet | Bin 6345 -> 6218 bytes tests/data/acpi/pc/DSDT.numamem | Bin 6493 -> 6366 bytes 12 files changed, 11 deletions(-) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index 0adf61bac3..dfb8523c8b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,12 +1 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/pc/DSDT", -"tests/data/acpi/pc/DSDT.acpierst", -"tests/data/acpi/pc/DSDT.acpihmat", -"tests/data/acpi/pc/DSDT.bridge", -"tests/data/acpi/pc/DSDT.cphp", -"tests/data/acpi/pc/DSDT.dimmpxm", -"tests/data/acpi/pc/DSDT.hpbridge", -"tests/data/acpi/pc/DSDT.ipmikcs", -"tests/data/acpi/pc/DSDT.memhp", -"tests/data/acpi/pc/DSDT.nohpet", -"tests/data/acpi/pc/DSDT.numamem", diff --git a/tests/data/acpi/pc/DSDT b/tests/data/acpi/pc/DSDT index 1bc656f2a4897d2932d593e8768173e0d2597d45..0b475fb5a966543fef2cd7672a0= b198838a63151 100644 GIT binary patch delta 40 wcmca^bi`|Vl`n`J03N^%qW}N^ delta 92 zcmca%c-@H0CDbUcyECDt1=3DUQs0S`?J*8l(j delta 71 zcmX?}cr1y_CDenv?HJYVZhX1{+w! bb2tWv`Y}#Ucsu?!`@?jHo diff --git a/tests/data/acpi/pc/DSDT.cphp b/tests/data/acpi/pc/DSDT.cphp index ef487176e117acf8f271d0a54bfad8dfa33ef696..754ab854dc48fc1af2d335e7269= c23a056e66eb8 100644 GIT binary patch delta 40 wcmZ2(w!)OlCDW=3DVIc6o#F+Y&uwND`pvkxS|o@Y036s2$^ZZW delta 92 zcmX?Sch;WECDvQZ05_H!ZvX%Q diff --git a/tests/data/acpi/pc/DSDT.hpbridge b/tests/data/acpi/pc/DSDT.hpb= ridge index c8b388a85c8d7472a5370c9657fa2b4e1a897e38..834c27002edbd3e2298a71c9ff1= b501e3a3314f7 100644 GIT binary patch delta 40 wcmbPWG|`aDCDw>EckJ2UYJXa*Y?#B(?Xhx##0 f78H~N3s^t|7(oKO0$Ra_P!(KEAd$`Ic!RhBSb!F` diff --git a/tests/data/acpi/pc/DSDT.memhp b/tests/data/acpi/pc/DSDT.memhp index 45b434d485444750cf00ebc1b2658f2fa40f0884..2f895e9b385c1ae2f58c7ade4de= 02328b1be7356 100644 GIT binary patch delta 40 wcmZ2xyWED$CD=3DVIc6o#F+Y&uzXX@SAaSh;R@$00@>1nE(I) delta 92 zcmZ2(v&@#uCDo#F+Yu5G?0@SBlGKr`6DAfCf9IMk0} g@o#F+Yu5JFy^_!7LKr`6DAfCf9IMk0} gvLLSbkC5>CD`|Vn=3DgnP02yixaR2}S delta 92 zcmca-c-M%_CD|7PS7&