From patchwork Mon Jun 26 16:01:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 1800025 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=W+Gek4rM; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QqXhH6lg9z1yhT for ; Tue, 27 Jun 2023 02:03:43 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDog8-0006bu-JH; Mon, 26 Jun 2023 12:03:00 -0400 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 1qDofk-00065B-5P for qemu-devel@nongnu.org; Mon, 26 Jun 2023 12:02:36 -0400 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 1qDofg-0007uz-NX for qemu-devel@nongnu.org; Mon, 26 Jun 2023 12:02:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687795349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=507dWzn7znTKw0qDssORtUAXEkOINch+e5SE37J0GBw=; b=W+Gek4rMo5h+CAUTOXwet/uQY/Ewfvi0j3XsTyQ3gBvr1AaoybbFt+aI7jTsOTFexD2LCV MiBCxkSKOYWjt5Gds7XTMzz3u1uf/8cuUrdal1/A2vVnGJNhpe2VbUf1+PXzs5aSmBOaEO 0W1+2ZPd5nxMVieBDLVCit9DbKjjVrY= Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-546-7t1i9_-fO4meUMiXDK_zKQ-1; Mon, 26 Jun 2023 12:02:17 -0400 X-MC-Unique: 7t1i9_-fO4meUMiXDK_zKQ-1 Received: by mail-pg1-f197.google.com with SMTP id 41be03b00d2f7-54ff478ab88so1189995a12.1 for ; Mon, 26 Jun 2023 09:02:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687795332; x=1690387332; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=507dWzn7znTKw0qDssORtUAXEkOINch+e5SE37J0GBw=; b=bvDjaADfCK/ef4OjO0jYJkyrUvBnfuQfFOelMBIrwrztwVOfY8PSmwiAFGoPnFDUXr dp3yDEUnqWpXiU6Di52dqAIqzbwZFA8mS8+qJnEuOspOqvmOymGJlffNfKGDo5OBIzCX DeH3SwPOsx8XRIV8E8/X/fbS6UH9Ny/s3aeZkAb+Y6BizhRpxvVPSH21MLNxzSUf47o8 xd+ruXfaaMO9dhAklozH3OJ6rN+xM8+hjJJAKhs25uIot/1DPJ+Dhk4PIV4on/IMu71h /wi6saJ0wyWEjXWBBYQs/DZMAFegO8PltYgyL3A5fFxzOYufVGZaMxbVJsiHs/SmJeXQ Qo5g== X-Gm-Message-State: AC+VfDxtBsGQEG0iyk3HE9z5fwYX9htg0g/I7ORLtyNHB21Dy8DRQZOw 8gVtqD/mekudQMLIr664gp6OWa7zD5J+v3FFs3pSCeUAIHKpT3+OGX7nTiEJ1KRAMfj0tjIiNaU y1e4lLC4YrB7OdJl3OORSB5GHE8M5H4Kve8F2Thfy6hD+IDuJvazYJeEY0sSR+wtn3yJg91WkXN U= X-Received: by 2002:a05:6a20:431f:b0:125:aeeb:f8f1 with SMTP id h31-20020a056a20431f00b00125aeebf8f1mr6027933pzk.40.1687795332048; Mon, 26 Jun 2023 09:02:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6FlBul825z3wb960/f0Z3fOQe5uUD3gOJ6lVcMLkq+1EazPPdxTSOEYVYV3v/ZyYYzIClX0g== X-Received: by 2002:a05:6a20:431f:b0:125:aeeb:f8f1 with SMTP id h31-20020a056a20431f00b00125aeebf8f1mr6027907pzk.40.1687795331642; Mon, 26 Jun 2023 09:02:11 -0700 (PDT) Received: from localhost.localdomain ([115.96.139.77]) by smtp.googlemail.com with ESMTPSA id l23-20020a62be17000000b0065ebeb9bb23sm4120174pff.149.2023.06.26.09.02.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 09:02:11 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, Eduardo Habkost , Marcel Apfelbaum , =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Yanan Wang Cc: Peter Maydell , Richard Henderson Subject: [PATCH v5 1/5] Revert "cputlb: Restrict SavedIOTLB to system emulation" Date: Mon, 26 Jun 2023 21:31:52 +0530 Message-Id: <20230626160156.3938-2-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230626160156.3938-1-anisinha@redhat.com> References: <20230626160156.3938-1-anisinha@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=anisinha@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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Peter Maydell This reverts commit d7ee93e24359703debf4137f4cc632563aa4e8d1. That commit tries to make a field in the CPUState struct not be present when CONFIG_USER_ONLY is set. Unfortunately, you can't conditionally omit fields in structs like this based on ifdefs that are set per-target. If you try it, then code in files compiled per-target (where CONFIG_USER_ONLY is or can be set) will disagree about the struct layout with files that are compiled once-only (where this kind of ifdef is never set). This manifests specifically in 'make check-tcg' failing, because code in cpus-common.c that sets up the CPUState::cpu_index field puts it at a different offset from the code in plugins/core.c in qemu_plugin_vcpu_init_hook() which reads the cpu_index field. The latter then hits an assert because from its point of view every thread has a 0 cpu_index. There might be other weird behaviour too. Mostly we catch this kind of bug because the CONFIG_whatever is listed in include/exec/poison.h and so the reference to it in build-once source files will then cause a compiler error. Unfortunately CONFIG_USER_ONLY is an exception to that: we have some places where we use it in "safe" ways in headers that will be seen by once-only source files (e.g. ifdeffing out function prototypes) and it would be a lot of refactoring to be able to get to a position where we could poison it. This leaves us in a "you have to be careful to walk around the bear trap" situation... Fixes: d7ee93e243597 ("cputlb: Restrict SavedIOTLB to system emulation") Signed-off-by: Peter Maydell Message-Id: <20230620175712.1331625-1-peter.maydell@linaro.org> Signed-off-by: Richard Henderson --- include/hw/core/cpu.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index ee8d6b40b3..4871ad85f0 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -226,7 +226,7 @@ struct CPUWatchpoint { QTAILQ_ENTRY(CPUWatchpoint) entry; }; -#if defined(CONFIG_PLUGIN) && !defined(CONFIG_USER_ONLY) +#ifdef CONFIG_PLUGIN /* * For plugins we sometime need to save the resolved iotlb data before * the memory regions get moved around by io_writex. @@ -410,11 +410,9 @@ struct CPUState { #ifdef CONFIG_PLUGIN GArray *plugin_mem_cbs; -#if !defined(CONFIG_USER_ONLY) /* saved iotlb data from io_writex */ SavedIOTLB saved_iotlb; -#endif /* !CONFIG_USER_ONLY */ -#endif /* CONFIG_PLUGIN */ +#endif /* TODO Move common fields from CPUArchState here. */ int cpu_index; From patchwork Mon Jun 26 16:01:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 1800023 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=EH87wa0T; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QqXhF3H2Wz1yhT for ; Tue, 27 Jun 2023 02:03:40 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDog8-0006ZN-4t; Mon, 26 Jun 2023 12:03:00 -0400 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 1qDofm-0006Aj-Hc for qemu-devel@nongnu.org; Mon, 26 Jun 2023 12:02:45 -0400 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 1qDofk-0007wO-Rm for qemu-devel@nongnu.org; Mon, 26 Jun 2023 12:02:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687795356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XEZcgPReFyzDcO9cLJl1A0SSdm0joHIvq6RFVgYxRzg=; b=EH87wa0THoZUwxiGYpIKrOZOy8o8fWuUt1aP7vcdNIo+k7c6C2hWMdyjCizGZYX4Q/w2dF 7T70d5MDEv1Zp/H2nGQWq0KsIH2fe6DLUY74KcAVY7CaMFKHAurbF0SNvxV9CeJ9uPqo4S fpdP21GuLXVgP1wBnO345K54DBZSb8c= Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-663-p-W-LdDLP4yFLHH1_SUgAg-1; Mon, 26 Jun 2023 12:02:29 -0400 X-MC-Unique: p-W-LdDLP4yFLHH1_SUgAg-1 Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-666eb0346c4so1508070b3a.0 for ; Mon, 26 Jun 2023 09:02:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687795334; x=1690387334; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XEZcgPReFyzDcO9cLJl1A0SSdm0joHIvq6RFVgYxRzg=; b=V/Im01d7g6psGiXN57qb4DDstK3Ht2FerrDZ4Ys7Etoi8OxafYdqO8b9CqA5/1YSB7 2ROwr4levRnJnJJ1yqe7wKM28QpQxd0fzvhZesv9Mi5t5XzvDShnEi0alzJJqnaatck/ g/khjXXGSLzDknjD6EJXbZHL/blGQbGwAE8UWKPKyUOdKFknTQtXYe1LCRf+BBE7607Z 1HL6Vj+/tQUxrIMpcL5/mzHhj9rawG5+F1L+/Qhl+wExB9N6QKPmfqFtF+DA7XDkhNUO U6X6wh379iFPHzUTfsZ8ZDe6rx//pN/MxgzLNmdahDzb14dtjuFVIqV+lKwSKE0jnJZ2 ROMQ== X-Gm-Message-State: AC+VfDy4DRm9BBmmiScqnm8XUG6Ey7XbDT0Nj1m4Q6cUGrEeg4jW5P1l Mv41lkempCGLm8OvszwG5R3xCISvbKuWZjo/VzMGYzipUV1U0tCm9Rl3XJUYRYXsKe9fTR6xkRR RslALphLeo/LM43rArQMl71AP7svfDlsJ+QfchPgNpHFmx4kq7S5ZSMi8JKB0FeJV7Ooj00wkBN c= X-Received: by 2002:a05:6a00:2d82:b0:668:715a:6fcd with SMTP id fb2-20020a056a002d8200b00668715a6fcdmr18508295pfb.5.1687795334529; Mon, 26 Jun 2023 09:02:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Spa9gv068n8iu1A+P8IzILFnIcLYt7/wb5zGE4Y3OQkmNCabZPQiBcoh44/XePznxTWD0mw== X-Received: by 2002:a05:6a00:2d82:b0:668:715a:6fcd with SMTP id fb2-20020a056a002d8200b00668715a6fcdmr18508269pfb.5.1687795334100; Mon, 26 Jun 2023 09:02:14 -0700 (PDT) Received: from localhost.localdomain ([115.96.139.77]) by smtp.googlemail.com with ESMTPSA id l23-20020a62be17000000b0065ebeb9bb23sm4120174pff.149.2023.06.26.09.02.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 09:02:13 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha Subject: [PATCH v5 2/5] tests/acpi: allow changes in DSDT.noacpihp table blob Date: Mon, 26 Jun 2023 21:31:53 +0530 Message-Id: <20230626160156.3938-3-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230626160156.3938-1-anisinha@redhat.com> References: <20230626160156.3938-1-anisinha@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=anisinha@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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org We are going to fix bio-tables-test in the next patch and hence need to make sure the acpi tests continue to pass. Signed-off-by: Ani Sinha Acked-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..31df9c6187 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,2 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/q35/DSDT.noacpihp", From patchwork Mon Jun 26 16:01:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 1800026 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=hW0s1c8e; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QqXhM1DQHz1yhT for ; Tue, 27 Jun 2023 02:03:47 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDogI-0006i9-E1; Mon, 26 Jun 2023 12:03:12 -0400 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 1qDofj-00063z-UT for qemu-devel@nongnu.org; Mon, 26 Jun 2023 12:02:36 -0400 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 1qDofg-0007vM-VM for qemu-devel@nongnu.org; Mon, 26 Jun 2023 12:02:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687795352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YQi5DNpBee1TXBxFEGyYLPk0MTnw7h1zNgmbfk3WRkU=; b=hW0s1c8e1UsxtzGVHH7+LYCD3AGCQmiksLNLzFW2NbNNaBKiTpXLz5FvG06RSaqL4YiQuC ZgBF8pJiD7+R2RCC9EyS4s3PIWyCKD+4UXerb29OVRQlIcxFoW7/+FWpelKCjgKySeSIJ4 o/GdHabVFig6aZ3fWE+kD32dkh/eAes= Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-189-JGssa1uoMBmcavcqdpcQFQ-1; Mon, 26 Jun 2023 12:02:29 -0400 X-MC-Unique: JGssa1uoMBmcavcqdpcQFQ-1 Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-6544e70f973so1422798b3a.0 for ; Mon, 26 Jun 2023 09:02:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687795337; x=1690387337; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YQi5DNpBee1TXBxFEGyYLPk0MTnw7h1zNgmbfk3WRkU=; b=gidmT2XJNwNXDn5+FdmmgOfGTGCbyt2SdAGbdR7KRPvtTRqBsbKKDQ4auJq/FErN08 UMAy6axnBbdihYfkqECh9k1PmeqgzVrCm0ekkLmupRhi3zhoWKcnaaI+sKUiUVod5ecK uNwP+nNkyg8edKPf5eIF5EtuF1YAUKKwzMJVhZUs4gRHldWpa5Jy66EPa1tZwJDiSM26 vDMfBBmo712iDKIMKZ8NK/SiBsWZQRzKGE1f+JUo701kZfqgBWCciUf84RQ7h+lC/dX1 dee4+Rb0LwXOkLjZ5nq4cZeM1QzU0L5kIkRthVAJ9xe+6RInbOLjZXbaRLDnMRhKl2kW 7Plw== X-Gm-Message-State: AC+VfDwKyM0xmLR6V6bvAFmxreT+Iexwfw8Te71wvYq6sos5r3pvZm9u FqHQk4FS7QoS+XYVapIak+tpSwBH+c7PI7LME0jwF3n/aJ19tiOg9gKtQOlyZ/Q3c3f/H4BRj8j 5KpXIy0513LEslI8cNfffS1V4E98qR9mg407lt/ZOJus48SWUS2/oGYlS9tabQsbtIlBb/B/+zg c= X-Received: by 2002:a05:6a00:1504:b0:668:9735:573c with SMTP id q4-20020a056a00150400b006689735573cmr20089505pfu.15.1687795337002; Mon, 26 Jun 2023 09:02:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7uj2cHM/cPeJ7YqSKP8pFnjeIELD1AENrTYMzF2jnE56X+X9KjLxbI3qe5BOUykPb7vpm3jw== X-Received: by 2002:a05:6a00:1504:b0:668:9735:573c with SMTP id q4-20020a056a00150400b006689735573cmr20089470pfu.15.1687795336588; Mon, 26 Jun 2023 09:02:16 -0700 (PDT) Received: from localhost.localdomain ([115.96.139.77]) by smtp.googlemail.com with ESMTPSA id l23-20020a62be17000000b0065ebeb9bb23sm4120174pff.149.2023.06.26.09.02.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 09:02:16 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha Subject: [PATCH v5 3/5] tests/acpi/bios-tables-test: use the correct slot on the pcie-root-port Date: Mon, 26 Jun 2023 21:31:54 +0530 Message-Id: <20230626160156.3938-4-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230626160156.3938-1-anisinha@redhat.com> References: <20230626160156.3938-1-anisinha@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=anisinha@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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org PCIE ports only have one slot, slot 0. Hence, non-zero slots are not available for PCIE devices on PCIE root ports. Fix test_acpi_q35_tcg_no_acpi_hotplug() so that the test does not use them. Signed-off-by: Ani Sinha Reviewed-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index ed1c69cf01..47ba20b957 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1020,9 +1020,9 @@ static void test_acpi_q35_tcg_no_acpi_hotplug(void) " -device pci-testdev,bus=nohprp,acpi-index=501" " -device pcie-root-port,id=nohprpint,port=0x0,chassis=3,hotplug=off," "multifunction=on,addr=8.0" - " -device pci-testdev,bus=nohprpint,acpi-index=601,addr=8.1" + " -device pci-testdev,bus=nohprpint,acpi-index=601,addr=0.1" " -device pcie-root-port,id=hprp2,port=0x0,chassis=4,bus=nohprpint," - "addr=9.0" + "addr=0.2" " -device pci-testdev,bus=hprp2,acpi-index=602" , &data); free_test_data(&data); From patchwork Mon Jun 26 16:01:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 1800027 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=DosbqtXB; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QqXhM5q1jz20bH for ; Tue, 27 Jun 2023 02:03:47 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDog9-0006dg-9k; Mon, 26 Jun 2023 12:03:01 -0400 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 1qDofs-0006Hv-Sn for qemu-devel@nongnu.org; Mon, 26 Jun 2023 12:02:56 -0400 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 1qDofr-0007xY-9y for qemu-devel@nongnu.org; Mon, 26 Jun 2023 12:02:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687795362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UVrMQo5OTuj/Z/ArUoRLIJdd/O7g0cHC9ea86NhATqc=; b=DosbqtXBT9jPFXNFxtA2xjO8H2lGIPFfVorj5bOPALZtIGuZeWlBOxsC3G32iVTEfLYZNM hmNUyigv81GzZFOIa/HZAlvtOwJa9Twr8Iat19va9vL/+j5z7w/aYnqyRdIvnI4ApNKyru yUib6jAyd3SppQYVp6D/X4e4ou5UbNc= Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-482-SnjMX035OpCerEAA_dfs2Q-1; Mon, 26 Jun 2023 12:02:41 -0400 X-MC-Unique: SnjMX035OpCerEAA_dfs2Q-1 Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-67c2f6fb908so4993b3a.0 for ; Mon, 26 Jun 2023 09:02:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687795339; x=1690387339; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UVrMQo5OTuj/Z/ArUoRLIJdd/O7g0cHC9ea86NhATqc=; b=iQQcFZJugqjdoyK/vcBpAnMPCr8tJ3KEFtIK5TkhUgYP7uoO6MRmOLmpz4yr9RRDKa JzKOU1b6EoD7U0h/+/XR9iSnA6P3ApEY9BJhTEyiCBPP0oL0bbz5IkRC829gvWRyhjrx IxoHOul/rpIn9tX56BG5qdShqqHkLihxgt/Jf0yroBPFcaaXkNaFSiHFeAad7ttngnid i9XAEkpRKDLMbpBz6ho97HmslP8WNN21h8MN2lY0Jn7Z4oBiFS70apsgjAhZfzffCHLP 12rh+PtBdIfQpjfsVFqz7/xq9f2k0VdpVj3woUJHmLDl+6RqSzq0H+T0FyfqZJjDapgV k1aw== X-Gm-Message-State: AC+VfDyfUlI49XZN8MgiEc4UDlnxyurc8wU+j5pihxbvRj1L8w4Wrcts 1z4mty4/LwyZ/wudAKZWNX9LFMocRXFlNvwCR6I5PLV/k04186vvCyWOqPmyMz+/FETfrfW2L2i 0lHk+So40YG4Jnv92+QspcQBvwJCKARuwb3jqhYQlfIeGFvq20K+OwiTDy5ID3VKdWkuiRAaM7p M= X-Received: by 2002:a05:6a00:23c2:b0:668:69fa:f791 with SMTP id g2-20020a056a0023c200b0066869faf791mr19563008pfc.3.1687795339480; Mon, 26 Jun 2023 09:02:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ65L6Pv1Wp2GjtAIneMo5hEPUculZikCqixjAGrp4rMww/1bdWaCjt9jCO6oUqQFbNnvLCbiA== X-Received: by 2002:a05:6a00:23c2:b0:668:69fa:f791 with SMTP id g2-20020a056a0023c200b0066869faf791mr19562967pfc.3.1687795339012; Mon, 26 Jun 2023 09:02:19 -0700 (PDT) Received: from localhost.localdomain ([115.96.139.77]) by smtp.googlemail.com with ESMTPSA id l23-20020a62be17000000b0065ebeb9bb23sm4120174pff.149.2023.06.26.09.02.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 09:02:18 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha Subject: [PATCH v5 4/5] tests/acpi/bios-tables-test: update acpi blob q35/DSDT.noacpihp Date: Mon, 26 Jun 2023 21:31:55 +0530 Message-Id: <20230626160156.3938-5-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230626160156.3938-1-anisinha@redhat.com> References: <20230626160156.3938-1-anisinha@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=anisinha@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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Some fixes were committed in bios-tables-test in the previous commit. Update the acpi blob and clear bios-tables-test-allowed-diff.h so that the test continues to pass with the changes in the bios-tables-test. Following is the asl diff between the old and the newly updated blob: @@ -1,30 +1,30 @@ /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20210604 (64-bit version) * Copyright (c) 2000 - 2021 Intel Corporation * * Disassembling to symbolic ASL+ operators * - * Disassembly of tests/data/acpi/q35/DSDT.noacpihp, Wed Jun 21 18:26:52 2023 + * Disassembly of /tmp/aml-O8SU61, Wed Jun 21 18:26:52 2023 * * Original Table Header: * Signature "DSDT" - * Length 0x00002038 (8248) + * Length 0x00002031 (8241) * Revision 0x01 **** 32-bit table (V1), no 64-bit math support - * Checksum 0x4A + * Checksum 0x89 * OEM ID "BOCHS " * OEM Table ID "BXPC " * OEM Revision 0x00000001 (1) * Compiler ID "BXPC" * Compiler Version 0x00000001 (1) */ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC ", 0x00000001) { Scope (\) { OperationRegion (DBG, SystemIO, 0x0402, One) Field (DBG, ByteAcc, NoLock, Preserve) { DBGB, 8 } @@ -3148,48 +3148,48 @@ { Name (_ADR, Zero) // _ADR: Address Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method { Local0 = Package (0x01) { 0x01F5 } Return (EDSM (Arg0, Arg1, Arg2, Arg3, Local0)) } } } Device (S40) { Name (_ADR, 0x00080000) // _ADR: Address - Device (S41) + Device (S01) { - Name (_ADR, 0x00080001) // _ADR: Address + Name (_ADR, One) // _ADR: Address Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method { Local0 = Package (0x01) { 0x0259 } Return (EDSM (Arg0, Arg1, Arg2, Arg3, Local0)) } } - Device (S48) + Device (S02) { - Name (_ADR, 0x00090000) // _ADR: Address + Name (_ADR, 0x02) // _ADR: Address Device (S00) { Name (_ADR, Zero) // _ADR: Address } } } Device (SF8) { Name (_ADR, 0x001F0000) // _ADR: Address OperationRegion (PIRQ, PCI_Config, 0x60, 0x0C) Scope (\_SB) { Field (PCI0.SF8.PIRQ, ByteAcc, NoLock, Preserve) { PRQA, 8, Signed-off-by: Ani Sinha Acked-by: Igor Mammedov --- tests/data/acpi/q35/DSDT.noacpihp | Bin 8248 -> 8241 bytes tests/qtest/bios-tables-test-allowed-diff.h | 1 - 2 files changed, 1 deletion(-) diff --git a/tests/data/acpi/q35/DSDT.noacpihp b/tests/data/acpi/q35/DSDT.noacpihp index 6ab1f0e52543fcb7f84a7fd1327fe5aa42010565..8cab2f8eb9ae94e0165f3f17857ec7d080fb0e13 100644 GIT binary patch delta 109 zcmdntu+f3bCDi)r&-xoSoL DyqFtK delta 94 zcmdn!u)~4NCD X-Patchwork-Id: 1800024 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=TakuJsvm; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QqXhF4091z20bH for ; Tue, 27 Jun 2023 02:03:40 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDog6-0006Hu-Sm; Mon, 26 Jun 2023 12:02:59 -0400 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 1qDofi-00060j-HO for qemu-devel@nongnu.org; Mon, 26 Jun 2023 12:02:34 -0400 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 1qDofg-0007vB-O6 for qemu-devel@nongnu.org; Mon, 26 Jun 2023 12:02:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687795350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/JjxrSNAdYJ3YjEvsqjvOBEVgpy/3FUTtZqyQjsB1ec=; b=TakuJsvmCWVuujGcUeSRI97EfftmJEpWT26bc7M6Es9aj4kwgLZ8nXoI5lkd46IZ8TP4+h Ebz1kh8VM0cBV1Cslm6TTG+JsgUg7qNgOu7RwUBlKUM1Xz/8eMdD8ff2El+lPB06k5ig/i mso3WIPJqtQpeiqBegqdthITicqq0u0= Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-495-WKlt7b1eM1eSBQOQIfMefw-1; Mon, 26 Jun 2023 12:02:29 -0400 X-MC-Unique: WKlt7b1eM1eSBQOQIfMefw-1 Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-66a4c89bbb1so2986016b3a.0 for ; Mon, 26 Jun 2023 09:02:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687795343; x=1690387343; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/JjxrSNAdYJ3YjEvsqjvOBEVgpy/3FUTtZqyQjsB1ec=; b=O6pzbwXQ31VSb8D3DSnZGN45vZkFRDUXC7kSFd9DAenSroD/CzVwqrm4YAJUQI8FqD aPzdP2+ioNHb18hi31QendN/IUZGcJQsL5cFX5VB1bnBNp/PtN8sPAEz/1N0mIv27WXX ItJeY0uFNt1yjCmVnXQrakxTHVRsPwXNZIPfSLVX3onEUSXMKmndGgbXH1lsuMNaUeL0 EUf9hMqZq00fXLrZoYyu1PTR30/tWlqAnemNqEQTmmquOaGzvTj2/6ct63srrpRc2H5i SbWWbTDzF+OPa44tUVfAKM54cJ1x7OBibYnIRb372Hm5kjcc7yvbSP6bQPK9fcVC3vVd ZJtw== X-Gm-Message-State: AC+VfDyPvARUsoOIIks9hXD94WFwuQwrosB7wGZl3COFgYylOH5atT6S Z7kcIyL4F2D/9JflpOKJIxe+ZggRmb0V2dAu/djLLJoA+FBmFGgiA3MUq+XwIdTFwKNE8PwbceU lBwhvIAvcmEoKjBsHjEXvGRejm6nKJa7aYfUVUcuZuVZKUJMLhysSwAdoU7y9zVQlvIyVP0b+RU I= X-Received: by 2002:a05:6a00:198f:b0:662:5146:c77a with SMTP id d15-20020a056a00198f00b006625146c77amr37709649pfl.31.1687795343073; Mon, 26 Jun 2023 09:02:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ44TB0C+T6L94bFufezwxdpdDAaiD5D9a1NE8wguFxUfSrEdZ9VfDifZuP8L+WuPNay3mNUCA== X-Received: by 2002:a05:6a00:198f:b0:662:5146:c77a with SMTP id d15-20020a056a00198f00b006625146c77amr37709612pfl.31.1687795342641; Mon, 26 Jun 2023 09:02:22 -0700 (PDT) Received: from localhost.localdomain ([115.96.139.77]) by smtp.googlemail.com with ESMTPSA id l23-20020a62be17000000b0065ebeb9bb23sm4120174pff.149.2023.06.26.09.02.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 09:02:22 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, Thomas Huth , Laurent Vivier , Paolo Bonzini Cc: Ani Sinha , mst@redhat.com, imammedo@redhat.com, Michael Labiuk Subject: [PATCH v5 5/5] tests/qtest/hd-geo-test: fix incorrect pcie-root-port usage and simplify test Date: Mon, 26 Jun 2023 21:31:56 +0530 Message-Id: <20230626160156.3938-6-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230626160156.3938-1-anisinha@redhat.com> References: <20230626160156.3938-1-anisinha@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=anisinha@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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The test attaches a SCSI controller to a non-zero slot and a pcie-to-pci bridge on slot 0 on the same pcie-root-port. Since a downstream device can be attached to a pcie-root-port only on slot 0, the above test configuration is not allowed. Additionally using pcie.0 as id for pcie-root-port is incorrect as that id is reserved only for the root bus. In the test scenario, there is no need to attach a pcie-root-port to the root complex. A SCSI controller can be attached to a pcie-to-pci bridge which can then be directly attached to the root bus (pcie.0). Fix the test and simplify it. CC: mst@redhat.com CC: imammedo@redhat.com CC: Michael Labiuk Signed-off-by: Ani Sinha --- tests/qtest/hd-geo-test.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/tests/qtest/hd-geo-test.c b/tests/qtest/hd-geo-test.c index 5aa258a2b3..d08bffad91 100644 --- a/tests/qtest/hd-geo-test.c +++ b/tests/qtest/hd-geo-test.c @@ -784,14 +784,12 @@ static void test_override_scsi(void) test_override(args, "pc", expected); } -static void setup_pci_bridge(TestArgs *args, const char *id, const char *rootid) +static void setup_pci_bridge(TestArgs *args, const char *id) { - char *root, *br; - root = g_strdup_printf("-device pcie-root-port,id=%s", rootid); - br = g_strdup_printf("-device pcie-pci-bridge,bus=%s,id=%s", rootid, id); + char *br; + br = g_strdup_printf("-device pcie-pci-bridge,bus=pcie.0,id=%s", id); - args->argc = append_arg(args->argc, args->argv, ARGV_SIZE, root); args->argc = append_arg(args->argc, args->argv, ARGV_SIZE, br); } @@ -811,8 +809,8 @@ static void test_override_scsi_q35(void) add_drive_with_mbr(args, empty_mbr, 1); add_drive_with_mbr(args, empty_mbr, 1); add_drive_with_mbr(args, empty_mbr, 1); - setup_pci_bridge(args, "pcie.0", "br"); - add_scsi_controller(args, "lsi53c895a", "br", 3); + setup_pci_bridge(args, "pcie-pci-br"); + add_scsi_controller(args, "lsi53c895a", "pcie-pci-br", 3); add_scsi_disk(args, 0, 0, 0, 0, 0, 10000, 120, 30); add_scsi_disk(args, 1, 0, 0, 1, 0, 9000, 120, 30); add_scsi_disk(args, 2, 0, 0, 2, 0, 1, 0, 0); @@ -868,9 +866,9 @@ static void test_override_virtio_blk_q35(void) }; add_drive_with_mbr(args, empty_mbr, 1); add_drive_with_mbr(args, empty_mbr, 1); - setup_pci_bridge(args, "pcie.0", "br"); - add_virtio_disk(args, 0, "br", 3, 10000, 120, 30); - add_virtio_disk(args, 1, "br", 4, 9000, 120, 30); + setup_pci_bridge(args, "pcie-pci-br"); + add_virtio_disk(args, 0, "pcie-pci-br", 3, 10000, 120, 30); + add_virtio_disk(args, 1, "pcie-pci-br", 4, 9000, 120, 30); test_override(args, "q35", expected); }