From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748426827; cv=none; d=zohomail.com; s=zohoarc; b=jDIz/v7tvOC4iGUnqllCpYoIp4OsOTu4qSksgsZQXTZ2Zvh4YXJAp0p1ywfUx1qiAOv0LBq3Ugg1prV+g7YKIYkbp7UN6aUbZxyE2uSmuehVOBYol9kTMe1n55jLjKu5yZpHYlGwybJI5T42AtiBtIMZPebexiN1ldg378S2PfI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748426827; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=9oxiy6QyXCRbn4OaTPJfAU7LRxuueKmzLgzP08rUVe4=; b=B3blze3Qnxf0k7pVsPjoCSYocs0zsjmRXWUow+AF6aT0uE91qe6JapVla5m8+4PCqhPRdOr8QtX06yz6V348gONMnmA0xofPdjnyppAcA70H853wAedYXzuLApz3uCssmKIFYW/VXYWNSoxKofCffnJzlGiIlwUYrD5nF3KGJDY= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1748426827126497.2516552662528; Wed, 28 May 2025 03:07:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDgM-0004dK-7B; Wed, 28 May 2025 06:06:46 -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 1uKDg0-0004C6-1B for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:24 -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 1uKDfw-0007FU-Nn for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:23 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-167-3a330jvCMGOMq6nfsJqVyQ-1; Wed, 28 May 2025 06:05:15 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 48556180036E; Wed, 28 May 2025 10:05:14 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 285C9180049D; Wed, 28 May 2025 10:05:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426779; 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=9oxiy6QyXCRbn4OaTPJfAU7LRxuueKmzLgzP08rUVe4=; b=MxklaE0TNr/Tw/SUz4I9IpgFoljVOxXl8gD51hnptePn+aIf7BS0YzAf+0r+UwuDYSuM4S 6i59zgTpZEToRnCs42FHnvMOxrxSzArqdrYM5KcxK8KMaeOcsgDt65MjmD4IOVeJc3kZq+ yBqnvIClcrRnmsA2rz8gF6kHhuF5yTQ= X-MC-Unique: 3a330jvCMGOMq6nfsJqVyQ-1 X-Mimecast-MFC-AGG-ID: 3a330jvCMGOMq6nfsJqVyQ_1748426714 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PULL 01/27] tests/functional/test_sparc64_tuxrun: Explicitly set the 'sun4u' machine Date: Wed, 28 May 2025 12:04:41 +0200 Message-ID: <20250528100507.313906-2-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748426828596116600 From: Thomas Huth Use self.set_machine() to set the machine instead of relying on the default machine of the binary. This way the test can be skipped in case the machine has not been compiled into the QEMU binary. Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e Signed-off-by: Thomas Huth Message-ID: <20250521145112.142222-1-thuth@redhat.com> --- tests/functional/test_sparc64_tuxrun.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/functional/test_sparc64_tuxrun.py b/tests/functional/tes= t_sparc64_tuxrun.py index 3be08d6102b..0d7b43dd74c 100755 --- a/tests/functional/test_sparc64_tuxrun.py +++ b/tests/functional/test_sparc64_tuxrun.py @@ -24,6 +24,7 @@ class TuxRunSparc64Test(TuxRunBaselineTest): '479c3dc104c82b68be55e2c0c5c38cd473d0b37ad4badccde4775bb88ce34611') =20 def test_sparc64(self): + self.set_machine('sun4u') self.root=3D'sda' self.wait_for_shutdown=3DFalse self.common_tuxrun(kernel_asset=3Dself.ASSET_SPARC64_KERNEL, --=20 2.49.0 From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748427003; cv=none; d=zohomail.com; s=zohoarc; b=A+nR7hqZSQwcVvZjmvkpsTkaNJUVd99YvJg1sdBqU+KbMu1mBrknP0GcO5xXEcGwLzEHi6TJEiTr9U0T+w4qKEY2VMHAjhed7z9XSOyGJfxqN30yN7UWMlvhdq0DAcv9AEyXh0TMhsYW4z3CbQi+L8lDnW8n0+ILl6hGEa6KG54= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748427003; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=pKqHGGEtL2ZC5OKb/YBObl5/3Ty09dzGQ/zzRLpA4Ns=; b=hynwreWHODz32NX3jbeFx9gO2dv6OExznXSU1VIplkyImmzeYbLVQDdEHh1LWGsk+6kOHlZmO43ZWYh+eTVXbf44T1M/Yc4Cgi6eVxBr6Vqa7tOUrZjgL8/ke8zhjqVjdAanCpQmSD0Z1HPn9BdasOna6CaNjXM3CIR52t5DsNc= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1748427003440453.3960747268188; Wed, 28 May 2025 03:10:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDgV-0005K6-MQ; Wed, 28 May 2025 06:06:55 -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 1uKDg2-0004K1-61 for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:28 -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 1uKDfy-0007GE-B2 for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:24 -0400 Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-517-Qg0-SfDFNFibQ4OdK7SZPg-1; Wed, 28 May 2025 06:05:18 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 740AF19560B1; Wed, 28 May 2025 10:05:17 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1A397180049D; Wed, 28 May 2025 10:05:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426781; 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=pKqHGGEtL2ZC5OKb/YBObl5/3Ty09dzGQ/zzRLpA4Ns=; b=hyhOTHBlWjP+2vu56HQohM8HDongKDSm3S0bbNkKcNxkqU9hH75D2gC4nkU7DZoSPkQ0z1 oUoOHfMfR2QHckfoev/DdkS9m6kBqcjBQdH8Ca83kvAqgFGxwL+SMqeH1gb65jmUHpO/2M ckiWjtUiMJMqCzA3CPd7BYN8kIukRgE= X-MC-Unique: Qg0-SfDFNFibQ4OdK7SZPg-1 X-Mimecast-MFC-AGG-ID: Qg0-SfDFNFibQ4OdK7SZPg_1748426717 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 02/27] tests/functional/test_mips_malta: Re-enable the check for the PCI host bridge Date: Wed, 28 May 2025 12:04:42 +0200 Message-ID: <20250528100507.313906-3-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748427005078116600 From: Thomas Huth The problem with the PCI bridge has been fixed in commit e5894fd6f411c1 ("hw/pci-host/gt64120: Fix endianness handling"), so we can enable the corresponding test again. Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth Message-ID: <20250522080208.205489-1-thuth@redhat.com> --- tests/functional/test_mips_malta.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/functional/test_mips_malta.py b/tests/functional/test_mi= ps_malta.py index 89b9556f30d..30279f0ff21 100755 --- a/tests/functional/test_mips_malta.py +++ b/tests/functional/test_mips_malta.py @@ -80,10 +80,8 @@ def mips_check_wheezy(test, kernel_path, image_path, ker= nel_command_line, exec_command_and_wait_for_pattern(test, 'cat /proc/devices', 'usb') exec_command_and_wait_for_pattern(test, 'cat /proc/ioports', ' : piix4_smbus') - # lspci for the host bridge does not work on big endian targets: - # https://gitlab.com/qemu-project/qemu/-/issues/2826 - # exec_command_and_wait_for_pattern(test, 'lspci -d 11ab:4620', - # 'GT-64120') + exec_command_and_wait_for_pattern(test, 'lspci -d 11ab:4620', + 'GT-64120') exec_command_and_wait_for_pattern(test, 'cat /sys/bus/i2c/devices/i2c-0/name= ', 'SMBus PIIX4 adapter') --=20 2.49.0 From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748426929; cv=none; d=zohomail.com; s=zohoarc; b=jGPzVaSgTgOF25kxCN8E2CvEFVlTQ/BTCTfkUGHDbcOzbmuoW9IHTrmcwfmDsOtiAovaWVJUxNNljI12wQ6lRMxupY/fHEH+wrZQrgjs/MeX9KDW865BL/A3VZUDBjlsXYk96OTg5aYUxYSdDzmHmGqKB4UM0drbLZ21BmyeGRw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748426929; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Rt3bHuCxCuBXdn4uoTDU3Fdy2gUlNffEYdVpuhW8WkE=; b=QPaaa05mXQBVXgtO9BnRl0Q1bnIB+qMNdRyW4Iw9n3jYdiF/Wwuy1sTLaRTZ6Yed4gGUJ0X0FB4p22ygSRkZ4peYsaApAvmHLWIrRcOOBG7GfJK7FoZJHKLcjnUlXq4g10FJ6Q+mX5EkrQJYQ2oSJMIX7bNhgLO4HhWIa1V4F4A= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1748426929047272.22288727946966; Wed, 28 May 2025 03:08:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDgP-0004uD-8j; Wed, 28 May 2025 06:06:49 -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 1uKDg6-0004LN-IC for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:31 -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 1uKDg4-0007HT-E2 for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:30 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-88-yPtv79oZM9qUJSneKt9oYA-1; Wed, 28 May 2025 06:05:22 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 222961800875; Wed, 28 May 2025 10:05:21 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1587E180049D; Wed, 28 May 2025 10:05:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426787; 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=Rt3bHuCxCuBXdn4uoTDU3Fdy2gUlNffEYdVpuhW8WkE=; b=EtMKFRSbYVTpwVySr3ArOepc2bCJDP/l+O4RDIfsHPlwwUj6tej9M5OmpUFJFDbg7dOUGx qUJZ+6sPEnaJvn+A0CnM3jfjIGLIQ9ATSwfDCQ3CYVakEd851KQkdTRFTHPFdPC7T8G7JU UhbWPL/62p/MquFDylCRxg8FV1oEIRA= X-MC-Unique: yPtv79oZM9qUJSneKt9oYA-1 X-Mimecast-MFC-AGG-ID: yPtv79oZM9qUJSneKt9oYA_1748426721 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 03/27] tests/functional/test_mem_addr_space: Use set_machine() to select the machine Date: Wed, 28 May 2025 12:04:43 +0200 Message-ID: <20250528100507.313906-4-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748426930515116600 From: Thomas Huth By using self.set_machine() the tests get properly skipped in case the machine has not been compiled into the QEMU binary, e.g. when "configure" has been run with "--without-default-devices". Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Signed-off-by: Thomas Huth Message-ID: <20250521143732.140711-1-thuth@redhat.com> --- tests/functional/test_mem_addr_space.py | 63 +++++++++++++------------ 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/tests/functional/test_mem_addr_space.py b/tests/functional/tes= t_mem_addr_space.py index 2d9d31efb59..61b4a190b41 100755 --- a/tests/functional/test_mem_addr_space.py +++ b/tests/functional/test_mem_addr_space.py @@ -58,8 +58,8 @@ def test_phybits_low_pse36(self): should start fine. """ self.ensure_64bit_binary() - self.vm.add_args('-S', '-machine', 'q35', '-m', - '512,slots=3D1,maxmem=3D59.6G', + self.set_machine('q35') + self.vm.add_args('-S', '-m', '512,slots=3D1,maxmem=3D59.6G', '-cpu', 'pentium,pse36=3Don', '-display', 'none', '-object', 'memory-backend-ram,id=3Dmem1,size=3D1= G', '-device', 'pc-dimm,id=3Dvm0,memdev=3Dmem1') @@ -76,8 +76,8 @@ def test_phybits_low_pae(self): with pse36 above. """ self.ensure_64bit_binary() - self.vm.add_args('-S', '-machine', 'q35', '-m', - '512,slots=3D1,maxmem=3D59.6G', + self.set_machine('q35') + self.vm.add_args('-S', '-m', '512,slots=3D1,maxmem=3D59.6G', '-cpu', 'pentium,pae=3Don', '-display', 'none', '-object', 'memory-backend-ram,id=3Dmem1,size=3D1= G', '-device', 'pc-dimm,id=3Dvm0,memdev=3Dmem1') @@ -93,8 +93,8 @@ def test_phybits_ok_pentium_pse36(self): same options as the failing case above with pse36 cpu feature. """ self.ensure_64bit_binary() - self.vm.add_args('-machine', 'q35', '-m', - '512,slots=3D1,maxmem=3D59.5G', + self.set_machine('q35') + self.vm.add_args('-m', '512,slots=3D1,maxmem=3D59.5G', '-cpu', 'pentium,pse36=3Don', '-display', 'none', '-object', 'memory-backend-ram,id=3Dmem1,size=3D1= G', '-device', 'pc-dimm,id=3Dvm0,memdev=3Dmem1') @@ -111,8 +111,8 @@ def test_phybits_ok_pentium_pae(self): with the same options as the case above. """ self.ensure_64bit_binary() - self.vm.add_args('-machine', 'q35', '-m', - '512,slots=3D1,maxmem=3D59.5G', + self.set_machine('q35') + self.vm.add_args('-m', '512,slots=3D1,maxmem=3D59.5G', '-cpu', 'pentium,pae=3Don', '-display', 'none', '-object', 'memory-backend-ram,id=3Dmem1,size=3D1= G', '-device', 'pc-dimm,id=3Dvm0,memdev=3Dmem1') @@ -128,8 +128,8 @@ def test_phybits_ok_pentium2(self): with pse36 ON. """ self.ensure_64bit_binary() - self.vm.add_args('-machine', 'q35', '-m', - '512,slots=3D1,maxmem=3D59.5G', + self.set_machine('q35') + self.vm.add_args('-m', '512,slots=3D1,maxmem=3D59.5G', '-cpu', 'pentium2', '-display', 'none', '-object', 'memory-backend-ram,id=3Dmem1,size=3D1= G', '-device', 'pc-dimm,id=3Dvm0,memdev=3Dmem1') @@ -148,8 +148,8 @@ def test_phybits_low_nonpse36(self): above 4 GiB due to the PCI hole and simplicity. """ self.ensure_64bit_binary() - self.vm.add_args('-S', '-machine', 'q35', '-m', - '512,slots=3D1,maxmem=3D4G', + self.set_machine('q35') + self.vm.add_args('-S', '-m', '512,slots=3D1,maxmem=3D4G', '-cpu', 'pentium', '-display', 'none', '-object', 'memory-backend-ram,id=3Dmem1,size=3D1= G', '-device', 'pc-dimm,id=3Dvm0,memdev=3Dmem1') @@ -176,8 +176,8 @@ def test_phybits_low_tcg_q35_70_amd(self): make QEMU fail with the error message. """ self.ensure_64bit_binary() - self.vm.add_args('-S', '-machine', 'pc-q35-7.0', '-m', - '512,slots=3D1,maxmem=3D988G', + self.set_machine('pc-q35-7.0') + self.vm.add_args('-S', '-m', '512,slots=3D1,maxmem=3D988G', '-display', 'none', '-object', 'memory-backend-ram,id=3Dmem1,size=3D1= G', '-device', 'pc-dimm,id=3Dvm0,memdev=3Dmem1') @@ -197,8 +197,8 @@ def test_phybits_low_tcg_q35_71_amd(self): than 988 GiB). """ self.ensure_64bit_binary() - self.vm.add_args('-S', '-machine', 'pc-q35-7.1', '-m', - '512,slots=3D1,maxmem=3D976G', + self.set_machine('pc-q35-7.1') + self.vm.add_args('-S', '-m', '512,slots=3D1,maxmem=3D976G', '-display', 'none', '-object', 'memory-backend-ram,id=3Dmem1,size=3D1= G', '-device', 'pc-dimm,id=3Dvm0,memdev=3Dmem1') @@ -214,8 +214,8 @@ def test_phybits_ok_tcg_q35_70_amd(self): successfully start when maxmem is < 988G. """ self.ensure_64bit_binary() - self.vm.add_args('-S', '-machine', 'pc-q35-7.0', '-m', - '512,slots=3D1,maxmem=3D987.5G', + self.set_machine('pc-q35-7.0') + self.vm.add_args('-S', '-m', '512,slots=3D1,maxmem=3D987.5G', '-display', 'none', '-object', 'memory-backend-ram,id=3Dmem1,size=3D1= G', '-device', 'pc-dimm,id=3Dvm0,memdev=3Dmem1') @@ -231,8 +231,8 @@ def test_phybits_ok_tcg_q35_71_amd(self): successfully start when maxmem is < 976G. """ self.ensure_64bit_binary() - self.vm.add_args('-S', '-machine', 'pc-q35-7.1', '-m', - '512,slots=3D1,maxmem=3D975.5G', + self.set_machine('pc-q35-7.1') + self.vm.add_args('-S', '-m', '512,slots=3D1,maxmem=3D975.5G', '-display', 'none', '-object', 'memory-backend-ram,id=3Dmem1,size=3D1= G', '-device', 'pc-dimm,id=3Dvm0,memdev=3Dmem1') @@ -249,9 +249,9 @@ def test_phybits_ok_tcg_q35_71_intel(self): "above_4G" memory starts at 4G. """ self.ensure_64bit_binary() + self.set_machine('pc-q35-7.1') self.vm.add_args('-S', '-cpu', 'Skylake-Server', - '-machine', 'pc-q35-7.1', '-m', - '512,slots=3D1,maxmem=3D976G', + '-m', '512,slots=3D1,maxmem=3D976G', '-display', 'none', '-object', 'memory-backend-ram,id=3Dmem1,size=3D1= G', '-device', 'pc-dimm,id=3Dvm0,memdev=3Dmem1') @@ -274,9 +274,9 @@ def test_phybits_low_tcg_q35_71_amd_41bits(self): fail to start. """ self.ensure_64bit_binary() + self.set_machine('pc-q35-7.1') self.vm.add_args('-S', '-cpu', 'EPYC-v4,phys-bits=3D41', - '-machine', 'pc-q35-7.1', '-m', - '512,slots=3D1,maxmem=3D992G', + '-m', '512,slots=3D1,maxmem=3D992G', '-display', 'none', '-object', 'memory-backend-ram,id=3Dmem1,size=3D1= G', '-device', 'pc-dimm,id=3Dvm0,memdev=3Dmem1') @@ -293,9 +293,9 @@ def test_phybits_ok_tcg_q35_71_amd_41bits(self): QEMU should start fine. """ self.ensure_64bit_binary() + self.set_machine('pc-q35-7.1') self.vm.add_args('-S', '-cpu', 'EPYC-v4,phys-bits=3D41', - '-machine', 'pc-q35-7.1', '-m', - '512,slots=3D1,maxmem=3D990G', + '-m', '512,slots=3D1,maxmem=3D990G', '-display', 'none', '-object', 'memory-backend-ram,id=3Dmem1,size=3D1= G', '-device', 'pc-dimm,id=3Dvm0,memdev=3Dmem1') @@ -314,12 +314,12 @@ def test_phybits_low_tcg_q35_intel_cxl(self): alignment constraints with 40 bits (1 TiB) of processor physical b= its. """ self.ensure_64bit_binary() + self.set_machine('q35') self.vm.add_args('-S', '-cpu', 'Skylake-Server,phys-bits=3D40', - '-machine', 'q35,cxl=3Don', '-m', - '512,slots=3D1,maxmem=3D987G', + '-m', '512,slots=3D1,maxmem=3D987G', '-display', 'none', '-device', 'pxb-cxl,bus_nr=3D12,bus=3Dpcie.0,id= =3Dcxl.1', - '-M', 'cxl-fmw.0.targets.0=3Dcxl.1,cxl-fmw.0.size= =3D1G') + '-M', 'cxl=3Don,cxl-fmw.0.targets.0=3Dcxl.1,cxl-f= mw.0.size=3D1G') self.vm.set_qmp_monitor(enabled=3DFalse) self.vm.launch() self.vm.wait() @@ -333,9 +333,10 @@ def test_phybits_ok_tcg_q35_intel_cxl(self): with cxl enabled. """ self.ensure_64bit_binary() + self.set_machine('q35') self.vm.add_args('-S', '-cpu', 'Skylake-Server,phys-bits=3D40', - '-machine', 'q35,cxl=3Don', '-m', - '512,slots=3D1,maxmem=3D987G', + '-machine', 'cxl=3Don', + '-m', '512,slots=3D1,maxmem=3D987G', '-display', 'none', '-device', 'pxb-cxl,bus_nr=3D12,bus=3Dpcie.0,id= =3Dcxl.1') self.vm.set_qmp_monitor(enabled=3DFalse) --=20 2.49.0 From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748426921; cv=none; d=zohomail.com; s=zohoarc; b=WAbxSzsKh9VcBbrdxWLt85RdRMgYdxoB8DFOQ1Webc4uUM6HAYZffmRhK/RxfHFNzc9FAmx1YzIlXnhKd5U7vUJxzdi870hG1PvoztfB/vH5QuSTB+Rzfw/lNzd//Rs/W2V6WeGhfXWsQ3WNzIGKVjt2pAvL0Gk3qfsOnyVWJUM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748426921; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Pf7eRMwbNhYu/vYXTk3pybu82UDncmTgawPC3/buBs4=; b=Suj2awRJDaSXDiTpXcUGZQ0tv704KmJ8DXRGNlVM3YgGcU5iecX4CAsX83tYnzP1VXwcW9YijaN2RvR0dJEV81GoeBWvt0g4vlJ4j3PYFFE4r0r66cp+zknZH2xlaMAZMOLnIxwrYLSgxrTBJzmP+MyVX/S9IeHola78KAzcj2o= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1748426921205838.624845327419; Wed, 28 May 2025 03:08:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDgU-0005Cc-6u; Wed, 28 May 2025 06:06:54 -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 1uKDg7-0004NX-Ka for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:33 -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 1uKDg4-0007Hi-QF for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:30 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-332-M_X-YES_O7ij0uuAvfCTOw-1; Wed, 28 May 2025 06:05:24 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CDADC195609E; Wed, 28 May 2025 10:05:23 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B683318004A7; Wed, 28 May 2025 10:05:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426788; 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=Pf7eRMwbNhYu/vYXTk3pybu82UDncmTgawPC3/buBs4=; b=N5qwh14JWRj1V3PbnehYUTCHZdwEqzWd6IMVfaa4e8kXF+grjKguCcZ3J3wum31xIehBWW 3Aab0vBjjBn0otgDlVMWCebyCP+xO2Zv87YZ9h8nN+gj4hTZ9i1J+vdqjmNa292HXxPzeP b0/4nL65LspzwPU9L2MK7zSdmUzuPcE= X-MC-Unique: M_X-YES_O7ij0uuAvfCTOw-1 X-Mimecast-MFC-AGG-ID: M_X-YES_O7ij0uuAvfCTOw_1748426724 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Alexandr Moshkov Subject: [PULL 04/27] tests/functional: add skipLockedMemoryTest decorator Date: Wed, 28 May 2025 12:04:44 +0200 Message-ID: <20250528100507.313906-5-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748426922214116600 Content-Type: text/plain; charset="utf-8" From: Alexandr Moshkov Used in future commit to skipping execution of a tests if the system's locked memory limit is below the required threshold. Signed-off-by: Alexandr Moshkov Reviewed-by: Thomas Huth Message-ID: <20250525070737.54267-2-dtalexundeer@yandex-team.ru> Signed-off-by: Thomas Huth --- tests/functional/qemu_test/__init__.py | 2 +- tests/functional/qemu_test/decorators.py | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/tests/functional/qemu_test/__init__.py b/tests/functional/qemu= _test/__init__.py index af41c2c6a22..6e666a059fc 100644 --- a/tests/functional/qemu_test/__init__.py +++ b/tests/functional/qemu_test/__init__.py @@ -15,6 +15,6 @@ from .linuxkernel import LinuxKernelTest from .decorators import skipIfMissingCommands, skipIfNotMachine, \ skipFlakyTest, skipUntrustedTest, skipBigDataTest, skipSlowTest, \ - skipIfMissingImports, skipIfOperatingSystem + skipIfMissingImports, skipIfOperatingSystem, skipLockedMemoryTest from .archive import archive_extract from .uncompress import uncompress diff --git a/tests/functional/qemu_test/decorators.py b/tests/functional/qe= mu_test/decorators.py index 50d29de533d..c0d1567b142 100644 --- a/tests/functional/qemu_test/decorators.py +++ b/tests/functional/qemu_test/decorators.py @@ -5,6 +5,7 @@ import importlib import os import platform +import resource from unittest import skipIf, skipUnless =20 from .cmd import which @@ -131,3 +132,20 @@ def skipIfMissingImports(*args): =20 return skipUnless(has_imports, 'required import(s) "%s" not installed'= % ", ".join(args)) + +''' +Decorator to skip execution of a test if the system's +locked memory limit is below the required threshold. +Takes required locked memory threshold in kB. +Example: + + @skipLockedMemoryTest(2_097_152) +''' +def skipLockedMemoryTest(locked_memory): + # get memlock hard limit in bytes + _, ulimit_memory =3D resource.getrlimit(resource.RLIMIT_MEMLOCK) + + return skipUnless( + ulimit_memory =3D=3D resource.RLIM_INFINITY or ulimit_memory >=3D = locked_memory * 1024, + f'Test required {locked_memory} kB of available locked memory', + ) --=20 2.49.0 From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748427065; cv=none; d=zohomail.com; s=zohoarc; b=SXFXaprr2Ufsvo9PKI3BVH/mLaIAMQCtqY8igtSzF4oi54T8Sixb1YKDfU8aIDN4QUBEIQJtYBuGCQzEcSsNdSxwEzUKWFt+gnGh1vFs7dAEy0dAUL2YdfMhhs3um0m7NYnu3ggNJAvDU9NvF5A0ZbAU9d7py38aqxR3RbuATE4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748427065; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=hVA012VkzcvdoDUkAdfR2+pJ3HkG0N8iDqVKF3jHfxo=; b=R8tKrmnPgfCl1ICCySHGiOAkQfVyr2SYsSTk7/d3neCKdQZX1tmIKBHfz1AgF8YiMCpJotFUueEIwGiql+rx9NZ7ya4beLV5GDOmqla7tYQTsj0nqLvabAR6WCAtIedmYF5/kjgWZ/FMMGTaoEiqzwWz8cwA6/yQ08hSXdMYE38= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1748427065632957.4222524337296; Wed, 28 May 2025 03:11:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDga-0005ev-Mr; Wed, 28 May 2025 06:07: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 1uKDgL-0004bE-FB for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06: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 1uKDgB-0007Ib-0z for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:42 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-342-b4_s_PnAMDWa7gKSOXsZTw-1; Wed, 28 May 2025 06:05:29 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E38851800374; Wed, 28 May 2025 10:05:27 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8CF5118004A7; Wed, 28 May 2025 10:05:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426793; 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=hVA012VkzcvdoDUkAdfR2+pJ3HkG0N8iDqVKF3jHfxo=; b=QUNzhrqJrSYQUfj7bZ5eS5pcaWFsjG2h0DEXhVGVFMaHhYceEiKwI3CFODfPfl69tnzZIW gftTlwmqjT4Inkg/6GSPR61yDdNUfotPV685J1Eiad7czxd9xJEES0gfyD0KRnQhpx/HLO JfYAqG8kBOSOClPYqs1bedA6yDZceUg= X-MC-Unique: b4_s_PnAMDWa7gKSOXsZTw-1 X-Mimecast-MFC-AGG-ID: b4_s_PnAMDWa7gKSOXsZTw_1748426728 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Alexandr Moshkov Subject: [PULL 05/27] tests/functional: add memlock tests Date: Wed, 28 May 2025 12:04:45 +0200 Message-ID: <20250528100507.313906-6-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748427071335116600 Content-Type: text/plain; charset="utf-8" From: Alexandr Moshkov Add new tests to check the correctness of the `-overcommit memlock` option (possible values: off, on, on-fault) by using `/proc/{qemu_pid}/status` file to check in VmSize, VmRSS and VmLck values: * if `memlock=3Doff`, then VmLck =3D 0; * if `memlock=3Don`, then VmLck > 0 and almost all memory is resident; * if `memlock=3Don-fault`, then VmLck > 0 and only few memory is resident. Signed-off-by: Alexandr Moshkov Message-ID: <20250525070737.54267-3-dtalexundeer@yandex-team.ru> [thuth: improved the text in a comment] Signed-off-by: Thomas Huth --- tests/functional/meson.build | 1 + tests/functional/test_memlock.py | 79 ++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100755 tests/functional/test_memlock.py diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 52b4706cfe8..13079f58b66 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -68,6 +68,7 @@ tests_generic_system =3D [ 'empty_cpu_model', 'info_usernet', 'version', + 'memlock', ] =20 tests_generic_linuxuser =3D [ diff --git a/tests/functional/test_memlock.py b/tests/functional/test_memlo= ck.py new file mode 100755 index 00000000000..8910cb6da33 --- /dev/null +++ b/tests/functional/test_memlock.py @@ -0,0 +1,79 @@ +#!/usr/bin/env python3 +# +# Functional test that check overcommit memlock options +# +# Copyright (c) Yandex Technologies LLC, 2025 +# +# Author: +# Alexandr Moshkov +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import re + +from typing import Dict + +from qemu_test import QemuSystemTest +from qemu_test import skipLockedMemoryTest + + +STATUS_VALUE_PATTERN =3D re.compile(r'^(\w+):\s+(\d+) kB', re.MULTILINE) + + +@skipLockedMemoryTest(2_097_152) # 2GB +class MemlockTest(QemuSystemTest): + """ + Runs a guest with memlock options. + Then verify, that this options is working correctly + by checking the smaps of the QEMU process. + """ + + def common_vm_setup_with_memlock(self, memlock): + self.vm.add_args('-overcommit', f'mem-lock=3D{memlock}') + self.vm.launch() + + def test_memlock_off(self): + self.common_vm_setup_with_memlock('off') + + status =3D self.get_process_status_values(self.vm.get_pid()) + + self.assertTrue(status['VmLck'] =3D=3D 0) + + def test_memlock_on(self): + self.common_vm_setup_with_memlock('on') + + status =3D self.get_process_status_values(self.vm.get_pid()) + + # VmLck > 0 kB and almost all memory is resident + self.assertTrue(status['VmLck'] > 0) + self.assertTrue(status['VmRSS'] >=3D status['VmSize'] * 0.70) + + def test_memlock_onfault(self): + self.common_vm_setup_with_memlock('on-fault') + + status =3D self.get_process_status_values(self.vm.get_pid()) + + # VmLck > 0 kB and only few memory is resident + self.assertTrue(status['VmLck'] > 0) + self.assertTrue(status['VmRSS'] <=3D status['VmSize'] * 0.30) + + def get_process_status_values(self, pid: int) -> Dict[str, int]: + result =3D {} + raw_status =3D self._get_raw_process_status(pid) + + for line in raw_status.split('\n'): + if m :=3D STATUS_VALUE_PATTERN.match(line): + result[m.group(1)] =3D int(m.group(2)) + + return result + + def _get_raw_process_status(self, pid: int) -> str: + try: + with open(f'/proc/{pid}/status', 'r') as f: + return f.read() + except FileNotFoundError: + self.skipTest("Can't open status file of the process") + + +if __name__ =3D=3D '__main__': + MemlockTest.main() --=20 2.49.0 From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748426928; cv=none; d=zohomail.com; s=zohoarc; b=C2IwiHlkvSAIKAPjgnWAzuqz1mK20GEO4aKDvi9cGy6NthQcuphqn2EArpzdBGA6LP26OT2AgPgzsJYHR2iCtVLlRSOy7/ROco1tBj72C8Hsf5ZR1McL5CQgYSDIh0rkSH+KABSEDwDBmFc8bJmTCe240cUkGsoScNAq4tYn8Kg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748426928; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=dEb4Kr7OH9mfQyQBPGxtAjcpcZHJ1m3zlbwT48wH6rM=; b=VzJLQ/fqWFxTuE9Dp2BIk4Qqvoo6bZror6rjIUVN7X0ADxKcAQAqmLhkHvesBXDlfJK0i9mAL4MP+3re+WvPg4SU0FuZPrOLG3hvrVwzaWGzCWrQ/bh3VeA9xxILpZqVYISHBLJh7nXcQ3w5PaqwgQSd4OIpUlux6IE6vY+5SPY= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1748426928168640.1370536548213; Wed, 28 May 2025 03:08:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDgg-0006Bi-Ha; Wed, 28 May 2025 06:07:06 -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 1uKDge-00061q-0w for qemu-devel@nongnu.org; Wed, 28 May 2025 06:07:04 -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 1uKDgc-0007M5-18 for qemu-devel@nongnu.org; Wed, 28 May 2025 06:07:03 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-251-W53lTc3zPyWFYmElZ9ko9w-1; Wed, 28 May 2025 06:05:31 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 813731955D93; Wed, 28 May 2025 10:05:30 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7229B180049D; Wed, 28 May 2025 10:05:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426821; 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=dEb4Kr7OH9mfQyQBPGxtAjcpcZHJ1m3zlbwT48wH6rM=; b=DR0xxjVfzrIsiUUWwK6Rdj8V+4LBzTD1HCTUI+xn4AWyMxJs2eICC4qvF35zQUMrSfxyRS nkpljgbsiHuixojXjqrXAFKpGnlfb/D1NfJw9mgz2u7MbSBGqT0TAA6Kp+M58BWgI6bocv GZeVdNAf5c7m1gzOIQ1l4kzheQu+aTY= X-MC-Unique: W53lTc3zPyWFYmElZ9ko9w-1 X-Mimecast-MFC-AGG-ID: W53lTc3zPyWFYmElZ9ko9w_1748426730 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 06/27] hw/microblaze: Add endianness property to the petalogix_s3adsp1800 machine Date: Wed, 28 May 2025 12:04:46 +0200 Message-ID: <20250528100507.313906-7-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748426930401116600 From: Thomas Huth Since the microblaze target can now handle both endianness, big and little, we should provide a config knob for the user to select the desired endianness. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth Message-ID: <20250515132019.569365-2-thuth@redhat.com> --- hw/microblaze/petalogix_s3adsp1800_mmu.c | 41 +++++++++++++++++++++--- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petal= ogix_s3adsp1800_mmu.c index 032f6f70eac..edc5d0dcfd0 100644 --- a/hw/microblaze/petalogix_s3adsp1800_mmu.c +++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c @@ -58,9 +58,20 @@ #define TYPE_PETALOGIX_S3ADSP1800_MACHINE \ MACHINE_TYPE_NAME("petalogix-s3adsp1800") =20 +struct S3Adsp1800MachineState { + MachineState parent_class; + + EndianMode endianness; +}; + +OBJECT_DECLARE_TYPE(S3Adsp1800MachineState, MachineClass, + PETALOGIX_S3ADSP1800_MACHINE) + + static void petalogix_s3adsp1800_init(MachineState *machine) { + S3Adsp1800MachineState *psms =3D PETALOGIX_S3ADSP1800_MACHINE(machine); ram_addr_t ram_size =3D machine->ram_size; DeviceState *dev; MicroBlazeCPU *cpu; @@ -71,13 +82,12 @@ petalogix_s3adsp1800_init(MachineState *machine) MemoryRegion *phys_ram =3D g_new(MemoryRegion, 1); qemu_irq irq[32]; MemoryRegion *sysmem =3D get_system_memory(); - EndianMode endianness =3D TARGET_BIG_ENDIAN ? ENDIAN_MODE_BIG - : ENDIAN_MODE_LITTLE; + EndianMode endianness =3D psms->endianness; =20 cpu =3D MICROBLAZE_CPU(object_new(TYPE_MICROBLAZE_CPU)); object_property_set_str(OBJECT(cpu), "version", "7.10.d", &error_abort= ); object_property_set_bool(OBJECT(cpu), "little-endian", - !TARGET_BIG_ENDIAN, &error_abort); + endianness =3D=3D ENDIAN_MODE_LITTLE, &error_= abort); qdev_realize(DEVICE(cpu), NULL, &error_abort); =20 /* Attach emulated BRAM through the LMB. */ @@ -135,20 +145,41 @@ petalogix_s3adsp1800_init(MachineState *machine) =20 create_unimplemented_device("xps_gpio", GPIO_BASEADDR, 0x10000); =20 - microblaze_load_kernel(cpu, !TARGET_BIG_ENDIAN, ddr_base, ram_size, - machine->initrd_filename, + microblaze_load_kernel(cpu, endianness =3D=3D ENDIAN_MODE_LITTLE, ddr_= base, + ram_size, machine->initrd_filename, BINARY_DEVICE_TREE_FILE, NULL); } =20 +static int machine_get_endianness(Object *obj, Error **errp G_GNUC_UNUSED) +{ + S3Adsp1800MachineState *ms =3D PETALOGIX_S3ADSP1800_MACHINE(obj); + return ms->endianness; +} + +static void machine_set_endianness(Object *obj, int endianness, Error **er= rp) +{ + S3Adsp1800MachineState *ms =3D PETALOGIX_S3ADSP1800_MACHINE(obj); + ms->endianness =3D endianness; +} + static void petalogix_s3adsp1800_machine_class_init(ObjectClass *oc, const void *data) { MachineClass *mc =3D MACHINE_CLASS(oc); + ObjectProperty *prop; =20 mc->desc =3D "PetaLogix linux refdesign for xilinx Spartan 3ADSP1800"; mc->init =3D petalogix_s3adsp1800_init; mc->is_default =3D true; + + prop =3D object_class_property_add_enum(oc, "endianness", "EndianMode", + &EndianMode_lookup, + machine_get_endianness, + machine_set_endianness); + object_property_set_default_str(prop, TARGET_BIG_ENDIAN ? "big" : "lit= tle"); + object_class_property_set_description(oc, "endianness", + "Defines whether the machine runs in big or little endian mode= "); } =20 static const TypeInfo petalogix_s3adsp1800_machine_types[] =3D { --=20 2.49.0 From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748426757; cv=none; d=zohomail.com; s=zohoarc; b=dBxkJVQ4hcILPflPYAQHaPRDLO5VKh6mQJtg+w60PjCaXad/0H9R+20/Vx7O0mmVdQwttT4974WbSUQsv0O04LpdM7mWLM0sgIxzWSbtcDTdfuZVcMy4TW+Mqw9bczdk882oucvpXgF0KMUeKlQ7PaWGnSEiUTuUhkKGEhRTvfM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748426757; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=jlUQHTAuaVqvF8kv3Q5QXyGqMwCukrz0+7JZaW9TJ50=; b=arV1X5umYASBHLfDf4D7AuievFBeHuOhnJj/oi3YqbysbyxsM/Dx5zGDS0mWezEc6+PKc29S59Nr7igSt0QomxXBwZHb4nNeHxf5HFLVoCYbnvw7swW+1q7XoJuU9j6Trnlq/mODp4ZD5OmVE3NoH1WsqvSB17qAkM+yYOrmY0o= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1748426757786497.42300883158; Wed, 28 May 2025 03:05:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDfP-0003hX-VL; Wed, 28 May 2025 06:05:48 -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 1uKDfJ-0003gH-P0 for qemu-devel@nongnu.org; Wed, 28 May 2025 06:05:42 -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 1uKDfH-0007DK-8W for qemu-devel@nongnu.org; Wed, 28 May 2025 06:05:41 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-270-l2KDWkhqNCaJmQKl93HbLg-1; Wed, 28 May 2025 06:05:35 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0EB9E180036F; Wed, 28 May 2025 10:05:34 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7B69318004A7; Wed, 28 May 2025 10:05:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426738; 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=jlUQHTAuaVqvF8kv3Q5QXyGqMwCukrz0+7JZaW9TJ50=; b=ODiIQ2UUSiyXQZGQBmZ+aImNEOm/NME7CKtyYI/zZquUntS5jAed+nU0GrkbZWTwoj4+MI ya/4y4oUZyCd+4M/JU/VXbBJ9NxDNb+ZDTzqFN+FNxunIZtDAzwk7y4ucesblEQlm9oWhz XUagXJAw0RFlmaS/orASNsv7JaTWGu0= X-MC-Unique: l2KDWkhqNCaJmQKl93HbLg-1 X-Mimecast-MFC-AGG-ID: l2KDWkhqNCaJmQKl93HbLg_1748426734 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 07/27] tests/functional: Test both microblaze s3adsp1800 endianness variants Date: Wed, 28 May 2025 12:04:47 +0200 Message-ID: <20250528100507.313906-8-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748426759658116600 From: Thomas Huth Now that the endianness of the petalogix-s3adsp1800 can be configured, we should test that the cross-endianness also works as expected, thus test the big endian variant on the little endian target and vice versa. (based on an original idea from Philippe Mathieu-Daud=C3=A9) Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth Message-ID: <20250515132019.569365-3-thuth@redhat.com> --- tests/functional/test_microblaze_s3adsp1800.py | 18 +++++++++++++----- .../functional/test_microblazeel_s3adsp1800.py | 6 +++++- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/tests/functional/test_microblaze_s3adsp1800.py b/tests/functio= nal/test_microblaze_s3adsp1800.py index c93fa14232b..f093b162c0a 100755 --- a/tests/functional/test_microblaze_s3adsp1800.py +++ b/tests/functional/test_microblaze_s3adsp1800.py @@ -25,12 +25,14 @@ class MicroblazeMachine(QemuSystemTest): ('http://www.qemu-advent-calendar.org/2023/download/day13.tar.gz'), 'b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22') =20 - def do_ballerina_be_test(self, machine): - self.set_machine(machine) + def do_ballerina_be_test(self, force_endianness=3DFalse): + self.set_machine('petalogix-s3adsp1800') self.archive_extract(self.ASSET_IMAGE_BE) self.vm.set_console() self.vm.add_args('-kernel', self.scratch_file('day17', 'ballerina.bin')) + if force_endianness: + self.vm.add_args('-M', 'endianness=3Dbig') self.vm.launch() wait_for_console_pattern(self, 'This architecture does not have ' 'kernel memory protection') @@ -39,12 +41,14 @@ def do_ballerina_be_test(self, machine): # message, that's why we don't test for a later string here. This # needs some investigation by a microblaze wizard one day... =20 - def do_xmaton_le_test(self, machine): + def do_xmaton_le_test(self, force_endianness=3DFalse): self.require_netdev('user') - self.set_machine(machine) + self.set_machine('petalogix-s3adsp1800') self.archive_extract(self.ASSET_IMAGE_LE) self.vm.set_console() self.vm.add_args('-kernel', self.scratch_file('day13', 'xmaton.bin= ')) + if force_endianness: + self.vm.add_args('-M', 'endianness=3Dlittle') tftproot =3D self.scratch_file('day13') self.vm.add_args('-nic', f'user,tftp=3D{tftproot}') self.vm.launch() @@ -59,9 +63,13 @@ def do_xmaton_le_test(self, machine): class MicroblazeBigEndianMachine(MicroblazeMachine): =20 ASSET_IMAGE_BE =3D MicroblazeMachine.ASSET_IMAGE_BE + ASSET_IMAGE_LE =3D MicroblazeMachine.ASSET_IMAGE_LE =20 def test_microblaze_s3adsp1800_legacy_be(self): - self.do_ballerina_be_test('petalogix-s3adsp1800') + self.do_ballerina_be_test() + + def test_microblaze_s3adsp1800_legacy_le(self): + self.do_xmaton_le_test(force_endianness=3DTrue) =20 =20 if __name__ =3D=3D '__main__': diff --git a/tests/functional/test_microblazeel_s3adsp1800.py b/tests/funct= ional/test_microblazeel_s3adsp1800.py index ab59941d57a..915902d48bd 100755 --- a/tests/functional/test_microblazeel_s3adsp1800.py +++ b/tests/functional/test_microblazeel_s3adsp1800.py @@ -13,9 +13,13 @@ class MicroblazeLittleEndianMachine(MicroblazeMachine): =20 ASSET_IMAGE_LE =3D MicroblazeMachine.ASSET_IMAGE_LE + ASSET_IMAGE_BE =3D MicroblazeMachine.ASSET_IMAGE_BE =20 def test_microblaze_s3adsp1800_legacy_le(self): - self.do_xmaton_le_test('petalogix-s3adsp1800') + self.do_xmaton_le_test() + + def test_microblaze_s3adsp1800_legacy_be(self): + self.do_ballerina_be_test(force_endianness=3DTrue) =20 =20 if __name__ =3D=3D '__main__': --=20 2.49.0 From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748426757; cv=none; d=zohomail.com; s=zohoarc; b=F4NQLgBHOy+iCK16fTqXcFCZRSP6M+AVIXSXtdsYLnCBcm8Gaa9EV4ahDENArKo8URLAQ1V7wsBfE04ef66mzhGPIefVFo1gc+hWO4OTy1QPhqo30IozoivZM9mX/gpTnqI9MwqpJmvKcixxMwDQtzUzI9OLuZ2yFMO+jBQMsKI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748426757; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=fWUh2rJgWja5WEaS/iPfFSlqhgAKpX6G06znW9U8J3U=; b=IH3zN2YuZ/UJYNDzvop2c0lzgKMLM9bshgjZj1m0TMFDF3oImFTikaTWMaD4M0aZqvVoO/Xa5QRWu5iBjMO01uyW+dn7PwCgbuorGT66r7oYNna+2NmlLYiGdpmOQVk4viclOyUK29nFdQEfZa3ipJkzwkI3IHLoGjGguQ2b1V8= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1748426757628264.4871112102958; Wed, 28 May 2025 03:05:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDfM-0003h6-Pg; Wed, 28 May 2025 06:05:45 -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 1uKDfJ-0003gG-P0 for qemu-devel@nongnu.org; Wed, 28 May 2025 06:05:42 -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 1uKDfH-0007DP-Gj for qemu-devel@nongnu.org; Wed, 28 May 2025 06:05:41 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-408-pmk6dt4qPSuO8F9puw4Rmw-1; Wed, 28 May 2025 06:05:37 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7A30818001D1; Wed, 28 May 2025 10:05:36 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C7B77180049D; Wed, 28 May 2025 10:05:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426739; 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=fWUh2rJgWja5WEaS/iPfFSlqhgAKpX6G06znW9U8J3U=; b=YRXA4/nhbto9AdQufmh6oeGxb9PS/6JEP+5CUB36HgxMWFtIh0dExq1fTaRpvULffQfSVK XBs1ii7aRs1sY8xUoBWXOLrq+Bm7jAlDYgiH8wh+apR/5W4KmtYC18MOjv+2zfxVuyFWPC 6o/P9RBW+AC9ysf6k4O0mp3oxwvTbDA= X-MC-Unique: pmk6dt4qPSuO8F9puw4Rmw-1 X-Mimecast-MFC-AGG-ID: pmk6dt4qPSuO8F9puw4Rmw_1748426736 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 08/27] hw/microblaze: Remove the big-endian variants of ml605 and xlnx-zynqmp-pmu Date: Wed, 28 May 2025 12:04:48 +0200 Message-ID: <20250528100507.313906-9-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748426759686116601 From: Thomas Huth Both machines were added with little-endian in mind only (the "endianness" CPU property was hard-wired to "true", see commits 133d23b3ad1 and a88bbb006a52), so the variants that showed up on the big endian target likely never worked. We deprecated these non-working machine variants two releases ago, and so far nobody complained, so it should be fine now to disable them. Hard-wire the machines to little endian now. Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth Message-ID: <20250515132019.569365-4-thuth@redhat.com> --- docs/about/deprecated.rst | 6 ------ docs/about/removed-features.rst | 9 +++++++++ hw/microblaze/petalogix_ml605_mmu.c | 15 ++++----------- hw/microblaze/xlnx-zynqmp-pmu.c | 7 +------ 4 files changed, 14 insertions(+), 23 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 44d3427e989..f3bf02d8b88 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -324,12 +324,6 @@ deprecated; use the new name ``dtb-randomness`` instea= d. The new name better reflects the way this property affects all random data within the device tree blob, not just the ``kaslr-seed`` node. =20 -Big-Endian variants of MicroBlaze ``petalogix-ml605`` and ``xlnx-zynqmp-pm= u`` machines (since 9.2) -''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''= '''''''''''''''''''''''' - -Both ``petalogix-ml605`` and ``xlnx-zynqmp-pmu`` were added for little end= ian -CPUs. Big endian support is not tested. - Mips ``mipssim`` machine (since 10.0) ''''''''''''''''''''''''''''''''''''' =20 diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.= rst index 063284d4f8a..9df5aba0bb6 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -1082,6 +1082,15 @@ This machine was removed because PPC 405 CPU have no= known users, firmware images are not available, OpenWRT dropped support in 2019, U-Boot in 2017, and Linux in 2024. =20 +Big-Endian variants of ``petalogix-ml605`` and ``xlnx-zynqmp-pmu`` machine= s (removed in 10.1) +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''= ''''''''''''''''''' + +Both the MicroBlaze ``petalogix-ml605`` and ``xlnx-zynqmp-pmu`` machines +were added for little endian CPUs. Big endian support was never tested +and likely never worked. Starting with QEMU v10.1, the machines are now +only available as little-endian machines. + + linux-user mode CPUs -------------------- =20 diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_= ml605_mmu.c index bea6b689fd1..6e923c49cfc 100644 --- a/hw/microblaze/petalogix_ml605_mmu.c +++ b/hw/microblaze/petalogix_ml605_mmu.c @@ -80,8 +80,6 @@ petalogix_ml605_init(MachineState *machine) MemoryRegion *phys_lmb_bram =3D g_new(MemoryRegion, 1); MemoryRegion *phys_ram =3D g_new(MemoryRegion, 1); qemu_irq irq[32]; - EndianMode endianness =3D TARGET_BIG_ENDIAN ? ENDIAN_MODE_BIG - : ENDIAN_MODE_LITTLE; =20 /* init CPUs */ cpu =3D MICROBLAZE_CPU(object_new(TYPE_MICROBLAZE_CPU)); @@ -113,7 +111,7 @@ petalogix_ml605_init(MachineState *machine) =20 =20 dev =3D qdev_new("xlnx.xps-intc"); - qdev_prop_set_enum(dev, "endianness", endianness); + qdev_prop_set_enum(dev, "endianness", ENDIAN_MODE_LITTLE); qdev_prop_set_uint32(dev, "kind-of-intr", 1 << TIMER_IRQ); sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, INTC_BASEADDR); @@ -129,7 +127,7 @@ petalogix_ml605_init(MachineState *machine) =20 /* 2 timers at irq 2 @ 100 Mhz. */ dev =3D qdev_new("xlnx.xps-timer"); - qdev_prop_set_enum(dev, "endianness", endianness); + qdev_prop_set_enum(dev, "endianness", ENDIAN_MODE_LITTLE); qdev_prop_set_uint32(dev, "one-timer-only", 0); qdev_prop_set_uint32(dev, "clock-frequency", 100 * 1000000); sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); @@ -177,7 +175,7 @@ petalogix_ml605_init(MachineState *machine) SSIBus *spi; =20 dev =3D qdev_new("xlnx.xps-spi"); - qdev_prop_set_enum(dev, "endianness", endianness); + qdev_prop_set_enum(dev, "endianness", ENDIAN_MODE_LITTLE); qdev_prop_set_uint8(dev, "num-ss-bits", NUM_SPI_FLASHES); busdev =3D SYS_BUS_DEVICE(dev); sysbus_realize_and_unref(busdev, &error_fatal); @@ -218,12 +216,7 @@ petalogix_ml605_init(MachineState *machine) =20 static void petalogix_ml605_machine_init(MachineClass *mc) { - if (TARGET_BIG_ENDIAN) { - mc->desc =3D "PetaLogix linux refdesign for xilinx ml605 (big endi= an)"; - mc->deprecation_reason =3D "big endian support is not tested"; - } else { - mc->desc =3D "PetaLogix linux refdesign for xilinx ml605 (little e= ndian)"; - } + mc->desc =3D "PetaLogix linux refdesign for xilinx ml605 (little endia= n)"; mc->init =3D petalogix_ml605_init; } =20 diff --git a/hw/microblaze/xlnx-zynqmp-pmu.c b/hw/microblaze/xlnx-zynqmp-pm= u.c index ed40b5f2e05..e909802bb74 100644 --- a/hw/microblaze/xlnx-zynqmp-pmu.c +++ b/hw/microblaze/xlnx-zynqmp-pmu.c @@ -181,12 +181,7 @@ static void xlnx_zynqmp_pmu_init(MachineState *machine) =20 static void xlnx_zynqmp_pmu_machine_init(MachineClass *mc) { - if (TARGET_BIG_ENDIAN) { - mc->desc =3D "Xilinx ZynqMP PMU machine (big endian)"; - mc->deprecation_reason =3D "big endian support is not tested"; - } else { - mc->desc =3D "Xilinx ZynqMP PMU machine (little endian)"; - } + mc->desc =3D "Xilinx ZynqMP PMU machine (little endian)"; mc->init =3D xlnx_zynqmp_pmu_init; } =20 --=20 2.49.0 From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748426791; cv=none; d=zohomail.com; s=zohoarc; b=Ja/R1BQFDV+bIKOepPjUmyQhNkmiPz2j/nppnLdnJlOgmvlmaefMpp7fqFbwCf5p3+dvfo+l8I1FN3DJ6Nk7rbYyfO+rpigZtUfjWkQQhCqwyIcIQFPOhlvIkCide+nyXuYlvNeoa2BUkiRTRpDbX9GYVCbBPncPTex/5GMB40I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748426791; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=1RB+zViEFHGrU/67PhbRLcWmgiYOEsMhUSk4cTJVDvQ=; b=DMf08xpGWB54zn6f/Izxlhb8eM4ew97igntyDwfPiglm4TCnJub1Gjl9aV0UjAcDbimE+jfiNz6UEJodsi+YbMkyi+bwi1Cx2VptXhX0jGPvY8Z2rLr1FfXyATm9Uh+ydFwVZuIlJG/GHYubzLnIi1n1erDcxci9mshw4kuVyJU= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1748426791561565.4180469547275; Wed, 28 May 2025 03:06:31 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDfS-0003j6-9I; Wed, 28 May 2025 06:05:50 -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 1uKDfN-0003hP-UJ for qemu-devel@nongnu.org; Wed, 28 May 2025 06:05:45 -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 1uKDfM-0007Df-9j for qemu-devel@nongnu.org; Wed, 28 May 2025 06:05:45 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-634-e6QBhjJiO2W8e2npM3c4Qw-1; Wed, 28 May 2025 06:05:40 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9169218004AD; Wed, 28 May 2025 10:05:39 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5A9AC180049D; Wed, 28 May 2025 10:05:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426743; 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=1RB+zViEFHGrU/67PhbRLcWmgiYOEsMhUSk4cTJVDvQ=; b=GGNtdDHgifSxke0g1K8cicyhCeaF2XMAT9HgTASxHgyjUuJgNBXjFgmhapEgU1koSoXDWv jXkKgyNvwNCVVDHUXG8T2+U+QQMwhz0u6vlEmH9vApzoCR1pqpBwlXzlL+nCdJpMsH4pwY 9U/uxGuj7WAxLi68ob3upOS+TtJi7g0= X-MC-Unique: e6QBhjJiO2W8e2npM3c4Qw-1 X-Mimecast-MFC-AGG-ID: e6QBhjJiO2W8e2npM3c4Qw_1748426739 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 09/27] docs: Deprecate the qemu-system-microblazeel binary Date: Wed, 28 May 2025 12:04:49 +0200 Message-ID: <20250528100507.313906-10-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748426792113116600 From: Thomas Huth The (former big-endian only) binary qemu-system-microblaze can handle both endiannesses nowadays, so we don't need the separate qemu-system-microblazeel binary for little endian anymore. Let's deprecate it to avoid unnecessary compilation and test time in the future. Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth Message-ID: <20250515132019.569365-5-thuth@redhat.com> --- docs/about/deprecated.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index f3bf02d8b88..891f8dedc90 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -354,6 +354,19 @@ machine must ensure that they're setting the ``spike``= machine in the command line (``-M spike``). =20 =20 +System emulator binaries +------------------------ + +``qemu-system-microblazeel`` (since 10.1) +''''''''''''''''''''''''''''''''''''''''' + +The ``qemu-system-microblaze`` binary can emulate little-endian machines +now, too, so the separate binary ``qemu-system-microblazeel`` (with the +``el`` suffix) for little-endian targets is not required anymore. The +``petalogix-s3adsp1800`` machine can now be switched to little endian by +setting its ``endianness`` property to ``little``. + + Backend options --------------- =20 --=20 2.49.0 From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748426824; cv=none; d=zohomail.com; s=zohoarc; b=DX6GfhzGFGCVwnIwta3k9IzF1ao2kFd5pQCLLnH8sRqcXYep3yFs6UVdfQa44x3hWeJv9x4WcLZfhXbUNk9+d9KfAgacKMPatJtq7NPt460SpIEFBLwDJoYlwkUe9y54WM94C9MCxx+HLD3V2k/2TPLzlv16CYcrAxrFeaS3wzY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748426824; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=P4BcFeHZdhTzXIhCu3ar2uLEb5iCDSRwkE8Rgxvkcgk=; b=AMJT2GF1jB8Rtx+BIFGRfbzgmO0rmIfN3HoIn+eFdJqpSs/VJt8s0lnGQ0IgnR8LL8w+tAwMKlPvOUVC3e/UG/iQQq/64sH9462F1chdx14rZP5UUrhTMoXMFY4Arb7kHLjv/my9ji7j49IF/pQl73sQ8NIF4XL6zlyFtOY5qik= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1748426824243654.6288044220022; Wed, 28 May 2025 03:07:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDfT-0003jc-6u; Wed, 28 May 2025 06:05:51 -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 1uKDfQ-0003iM-P1 for qemu-devel@nongnu.org; Wed, 28 May 2025 06:05:49 -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 1uKDfO-0007Dm-Am for qemu-devel@nongnu.org; Wed, 28 May 2025 06:05:48 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-160-pMATDg3INvygN3Hne6Dhmw-1; Wed, 28 May 2025 06:05:44 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C4D8E1800373; Wed, 28 May 2025 10:05:42 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 30970180049D; Wed, 28 May 2025 10:05:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426745; 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=P4BcFeHZdhTzXIhCu3ar2uLEb5iCDSRwkE8Rgxvkcgk=; b=gLOEN6F0nB8h8yaxacxGwD/3+i14WrCFnsavqVFRORjkNpjKdiPOqQ4bAN9HBZhmMZkcVA Nf0VSo4BBvtYRK3rM2lLwXE2tPHEt824Xd6XcL2tZcoG8nP270GDk5oT2urzJsQopaA4KL pkktEsbpUcutEdf619gABM7ftTfGECo= X-MC-Unique: pMATDg3INvygN3Hne6Dhmw-1 X-Mimecast-MFC-AGG-ID: pMATDg3INvygN3Hne6Dhmw_1748426743 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Zhao Liu , Xiaoyao Li Subject: [PULL 10/27] hw/i386/pc: Remove deprecated pc-q35-2.4 and pc-i440fx-2.4 machines Date: Wed, 28 May 2025 12:04:50 +0200 Message-ID: <20250528100507.313906-11-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748426826592116600 From: Philippe Mathieu-Daud=C3=A9 These machines has been supported for a period of more than 6 years. According to our versioned machine support policy (see commit ce80c4fa6ff "docs: document special exception for machine type deprecation & removal") they can now be removed. Remove the qtest in test-x86-cpuid-compat.c file. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Thomas Huth Reviewed-by: Zhao Liu Reviewed-by: Xiaoyao Li Message-ID: <20250512083948.39294-2-philmd@linaro.org> Signed-off-by: Thomas Huth --- hw/i386/pc_piix.c | 13 ------------- hw/i386/pc_q35.c | 13 ------------- tests/qtest/test-x86-cpuid-compat.c | 14 -------------- 3 files changed, 40 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 0dce512f184..04213b45b44 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -791,19 +791,6 @@ static void pc_i440fx_machine_2_5_options(MachineClass= *m) =20 DEFINE_I440FX_MACHINE(2, 5); =20 -static void pc_i440fx_machine_2_4_options(MachineClass *m) -{ - PCMachineClass *pcmc =3D PC_MACHINE_CLASS(m); - - pc_i440fx_machine_2_5_options(m); - m->hw_version =3D "2.4.0"; - pcmc->broken_reserved_end =3D true; - compat_props_add(m->compat_props, hw_compat_2_4, hw_compat_2_4_len); - compat_props_add(m->compat_props, pc_compat_2_4, pc_compat_2_4_len); -} - -DEFINE_I440FX_MACHINE(2, 4); - #ifdef CONFIG_ISAPC static void isapc_machine_options(MachineClass *m) { diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index c538b3d05b4..47e12602413 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -685,16 +685,3 @@ static void pc_q35_machine_2_5_options(MachineClass *m) } =20 DEFINE_Q35_MACHINE(2, 5); - -static void pc_q35_machine_2_4_options(MachineClass *m) -{ - PCMachineClass *pcmc =3D PC_MACHINE_CLASS(m); - - pc_q35_machine_2_5_options(m); - m->hw_version =3D "2.4.0"; - pcmc->broken_reserved_end =3D true; - compat_props_add(m->compat_props, hw_compat_2_4, hw_compat_2_4_len); - compat_props_add(m->compat_props, pc_compat_2_4, pc_compat_2_4_len); -} - -DEFINE_Q35_MACHINE(2, 4); diff --git a/tests/qtest/test-x86-cpuid-compat.c b/tests/qtest/test-x86-cpu= id-compat.c index c9de47bb269..456e2af6657 100644 --- a/tests/qtest/test-x86-cpuid-compat.c +++ b/tests/qtest/test-x86-cpuid-compat.c @@ -365,20 +365,6 @@ int main(int argc, char **argv) "level", 10); } =20 - /* - * xlevel doesn't have any feature that triggers auto-level - * code on old machine-types. Just check that the compat code - * is working correctly: - */ - if (qtest_has_machine("pc-i440fx-2.4")) { - add_cpuid_test("x86/cpuid/xlevel-compat/pc-i440fx-2.4/npt-off", - "SandyBridge", NULL, "pc-i440fx-2.4", - "xlevel", 0x80000008); - add_cpuid_test("x86/cpuid/xlevel-compat/pc-i440fx-2.4/npt-on", - "SandyBridge", "svm=3Don,npt=3Don", "pc-i440fx-2.4", - "xlevel", 0x80000008); - } - /* Test feature parsing */ add_feature_test("x86/cpuid/features/plus", "486", "+arat", --=20 2.49.0 From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748426822; cv=none; d=zohomail.com; s=zohoarc; b=Dcxse11ybMzOmDYgu7v0UgKGRiiwTPFTIPcSOwM/CCo7lqGF/6X8Lr5DO/aCyW64Yw7KloYIl6ah2BPbZQzEPMn0Kega0mJg7L5ffhndAS80bAYpIooU1EPp78vUyjfi5K7rvXMdckLVKbFKGxXOPm6xUvQDNYbAQ45O/+TugYU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748426822; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=pyumWieLSY7fqHWHrJAxx17qyJlbxZ6HzrKW4tcATRk=; b=Ii2mIdqxFV7yaUxb5ItD1kFfbqCx8UtpJcnm7m82NkoH/UG200p+19xG/0S+JJo84LM+OjiUEwCUdsf1EtG5qR95K383I+P1HltlTm2DrBJ1PRaUti9+O+4LY3cbH4ziWKoa4t8itW9oktbstYFMhPHUhAeQA0zujcfx7hKOXPw= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 174842682295544.3551598500394; Wed, 28 May 2025 03:07:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDfX-0003kJ-Md; Wed, 28 May 2025 06:05:55 -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 1uKDfU-0003je-Ld for qemu-devel@nongnu.org; Wed, 28 May 2025 06:05:52 -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 1uKDfT-0007E9-1D for qemu-devel@nongnu.org; Wed, 28 May 2025 06:05:52 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-119-xaFKIUk4MXmAguZUjMcaYQ-1; Wed, 28 May 2025 06:05:46 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D4D42195608E; Wed, 28 May 2025 10:05:45 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5CE67180049D; Wed, 28 May 2025 10:05:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426750; 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=pyumWieLSY7fqHWHrJAxx17qyJlbxZ6HzrKW4tcATRk=; b=Z8Oh+2V8w+USE4nG+5/ezG3wpV0SPEapxxUAAWQ2y3BawRE3xIFxVU7obFWBI1/vF6Ffoj FgXjimBEY91fY/i9qgcCB5mV0KT5yntrM37avedEFHXhOuZaADvdbZmf156I7hMnI/4Ykg 7uTBl+oM7dE/xy1N1MJa4Kq0wAE8ygk= X-MC-Unique: xaFKIUk4MXmAguZUjMcaYQ-1 X-Mimecast-MFC-AGG-ID: xaFKIUk4MXmAguZUjMcaYQ_1748426745 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Zhao Liu , Xiaoyao Li Subject: [PULL 11/27] hw/i386/pc: Remove PCMachineClass::broken_reserved_end field Date: Wed, 28 May 2025 12:04:51 +0200 Message-ID: <20250528100507.313906-12-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748426824574116600 From: Philippe Mathieu-Daud=C3=A9 The PCMachineClass::broken_reserved_end field was only used by the pc-q35-2.4 and pc-i440fx-2.4 machines, which got removed. Remove it and simplify pc_memory_init(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Thomas Huth Reviewed-by: Zhao Liu Reviewed-by: Xiaoyao Li Message-ID: <20250512083948.39294-3-philmd@linaro.org> Signed-off-by: Thomas Huth --- include/hw/i386/pc.h | 1 - hw/i386/pc.c | 13 +++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 9563674e2da..f4a874b17fc 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -107,7 +107,6 @@ struct PCMachineClass { /* RAM / address space compat: */ bool gigabyte_align; bool has_reserved_memory; - bool broken_reserved_end; bool enforce_amd_1tb_hole; bool isa_bios_alias; =20 diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 70656157ca0..c8bb4a3ee47 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -999,14 +999,13 @@ void pc_memory_init(PCMachineState *pcms, =20 if (machine->device_memory) { uint64_t *val =3D g_malloc(sizeof(*val)); - uint64_t res_mem_end =3D machine->device_memory->base; - - if (!pcmc->broken_reserved_end) { - res_mem_end +=3D memory_region_size(&machine->device_memory->m= r); - } + uint64_t res_mem_end; =20 if (pcms->cxl_devices_state.is_enabled) { res_mem_end =3D cxl_resv_end; + } else { + res_mem_end =3D machine->device_memory->base + + memory_region_size(&machine->device_memory->mr= ); } *val =3D cpu_to_le64(ROUND_UP(res_mem_end, 1 * GiB)); fw_cfg_add_file(fw_cfg, "etc/reserved-memory-end", val, sizeof(*va= l)); @@ -1044,9 +1043,7 @@ uint64_t pc_pci_hole64_start(void) hole64_start =3D pc_get_cxl_range_end(pcms); } else if (pcmc->has_reserved_memory && (ms->ram_size < ms->maxram_siz= e)) { pc_get_device_memory_range(pcms, &hole64_start, &size); - if (!pcmc->broken_reserved_end) { - hole64_start +=3D size; - } + hole64_start +=3D size; } else { hole64_start =3D pc_above_4g_end(pcms); } --=20 2.49.0 From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748426786; cv=none; d=zohomail.com; s=zohoarc; b=DQ8EyeiDtaEZEOOY2UGP9pb80nCJ8bA32qlX8aMepntLDsCg4KMCxll9Pg7xcKvORby/umQo9lYoTIiKa4FhXLnm0wzSKJSHp/vuw7m2bMcni9oYZ0359qQWELCCA7M8q/Gd26FfeQen3UBAKP7A/zTvw8wC3R1XCS2QsVvYYeM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748426786; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=dKZE1RSoSBOz6DDkalid0XJ7WvsEX48DFl11SRZz3mA=; b=fMMwW8cAWkHZNNn1D9IvsFHiUwa0xz/99D8u6T5zdS0MTIW+LHk/ZfIvPduUYXEebhE5N/47NK0OlvHfVj/7oQIA4vOTsOsBqu9Rp4ki8kjk39++baMJJMvsrbZy5if0tcDZSOvXn/0KuUPyHJzMDQnLt8n4x/OXV2kJ7Ox98pY= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1748426786111311.0435340068875; Wed, 28 May 2025 03:06:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDfx-00045A-1Z; Wed, 28 May 2025 06:06:21 -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 1uKDfZ-0003pg-1I for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:03 -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 1uKDfX-0007EO-96 for qemu-devel@nongnu.org; Wed, 28 May 2025 06:05:56 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-544-qRKwQ3UHM1ScL0Bqup-b5g-1; Wed, 28 May 2025 06:05:51 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 71BBF1800258; Wed, 28 May 2025 10:05:50 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D14C7180049D; Wed, 28 May 2025 10:05:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426754; 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=dKZE1RSoSBOz6DDkalid0XJ7WvsEX48DFl11SRZz3mA=; b=Ah+8iJwbAJh+PCyXTAqxGvVJEMPh5k1GK1KBjaGEmKWE678l9l0GtXwAdY/z5srSEvUm5c KQgwjjQNNqhenRfZnTn8trdYLWQ9H/up/g2uiDgHpq1ULRH6XrKJ85qCMDTviD2+7SJT/J BZPM3DOe/1cVgOt9hDupPr10eks2wgc= X-MC-Unique: qRKwQ3UHM1ScL0Bqup-b5g-1 X-Mimecast-MFC-AGG-ID: qRKwQ3UHM1ScL0Bqup-b5g_1748426750 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Zhao Liu , Xiaoyao Li Subject: [PULL 12/27] hw/i386/pc: Remove pc_compat_2_4[] array Date: Wed, 28 May 2025 12:04:52 +0200 Message-ID: <20250528100507.313906-13-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748426788330116600 From: Philippe Mathieu-Daud=C3=A9 The pc_compat_2_4[] array was only used by the pc-q35-2.4 and pc-i440fx-2.4 machines, which got removed. Remove it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Zhao Liu Reviewed-by: Xiaoyao Li Message-ID: <20250512083948.39294-4-philmd@linaro.org> Signed-off-by: Thomas Huth --- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 19 ------------------- 2 files changed, 22 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index f4a874b17fc..b34aa25fdce 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -301,9 +301,6 @@ extern const size_t pc_compat_2_6_len; extern GlobalProperty pc_compat_2_5[]; extern const size_t pc_compat_2_5_len; =20 -extern GlobalProperty pc_compat_2_4[]; -extern const size_t pc_compat_2_4_len; - #define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \ static void pc_machine_##suffix##_class_init(ObjectClass *oc, \ const void *data) \ diff --git a/hw/i386/pc.c b/hw/i386/pc.c index c8bb4a3ee47..2b46714a5ac 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -262,25 +262,6 @@ const size_t pc_compat_2_6_len =3D G_N_ELEMENTS(pc_com= pat_2_6); GlobalProperty pc_compat_2_5[] =3D {}; const size_t pc_compat_2_5_len =3D G_N_ELEMENTS(pc_compat_2_5); =20 -GlobalProperty pc_compat_2_4[] =3D { - PC_CPU_MODEL_IDS("2.4.0") - { "Haswell-" TYPE_X86_CPU, "abm", "off" }, - { "Haswell-noTSX-" TYPE_X86_CPU, "abm", "off" }, - { "Broadwell-" TYPE_X86_CPU, "abm", "off" }, - { "Broadwell-noTSX-" TYPE_X86_CPU, "abm", "off" }, - { "host" "-" TYPE_X86_CPU, "host-cache-info", "on" }, - { TYPE_X86_CPU, "check", "off" }, - { "qemu64" "-" TYPE_X86_CPU, "sse4a", "on" }, - { "qemu64" "-" TYPE_X86_CPU, "abm", "on" }, - { "qemu64" "-" TYPE_X86_CPU, "popcnt", "on" }, - { "qemu32" "-" TYPE_X86_CPU, "popcnt", "on" }, - { "Opteron_G2" "-" TYPE_X86_CPU, "rdtscp", "on" }, - { "Opteron_G3" "-" TYPE_X86_CPU, "rdtscp", "on" }, - { "Opteron_G4" "-" TYPE_X86_CPU, "rdtscp", "on" }, - { "Opteron_G5" "-" TYPE_X86_CPU, "rdtscp", "on", } -}; -const size_t pc_compat_2_4_len =3D G_N_ELEMENTS(pc_compat_2_4); - /* * @PC_FW_DATA: * Size of the chunk of memory at the top of RAM for the BIOS ACPI tables --=20 2.49.0 From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748427001; cv=none; d=zohomail.com; s=zohoarc; b=VTQiaEA5CTCW63kFu8PlDyMOlgZ3wFZ4M2c22/iCuM8ejAz4j6FLMchG1v5qtxFM6cm4U+XXgLyGRg9DI0BBvInWLdG4QJnsWTLafJZ4iI0X81xbMk3mvtM1MLHJw6cAtMtxEEQfGXLRVl4I/5VwXuwZOcLICmig/VP9vrI5724= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748427001; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=tsG/B8VWD10VBEzxymb8JmpD+1O43g2EFYmid+iq6go=; b=b+OlvTGg0XfNlls/Xfvvzi5wI5mHZW9t9+SoqVK4L3LexON2ngYlCbx+vUXT9rrJyAWbTHy+mKHy/XnSYdw1U0o14u2XPemVk2SzcLzucZoEAj3/WBbpGhCP48U3Tt/tW/ni3stxr645m9fwOvxUioDJ5mbXXAUMqj7uf4MxyIE= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 174842700111891.62476649153689; Wed, 28 May 2025 03:10:01 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDiZ-0003XU-B0; Wed, 28 May 2025 06:09:04 -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 1uKDiR-0003OV-Bn for qemu-devel@nongnu.org; Wed, 28 May 2025 06:08:55 -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 1uKDiP-0007b9-Sl for qemu-devel@nongnu.org; Wed, 28 May 2025 06:08:55 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-629-mHzLKnmIOSCxqRMoRHHJvg-1; Wed, 28 May 2025 06:05:55 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1636119560A5; Wed, 28 May 2025 10:05:54 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 355FD18004A7; Wed, 28 May 2025 10:05:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426932; 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=tsG/B8VWD10VBEzxymb8JmpD+1O43g2EFYmid+iq6go=; b=hJPXOmpPeC+ozy5akixJDnnsVhgNVY+aRjf186bsZ7ixl7EEUCZ13buACwTQmouzoHjHhE q6TIEpfKtT1DYPWjKuiB0jkkm28darxRUOfUjafvUye4ys74vhvBelQSDJuow1DHLJLBQM dXkURzn//diK314JYna3fb5+N8xR6ZU= X-MC-Unique: mHzLKnmIOSCxqRMoRHHJvg-1 X-Mimecast-MFC-AGG-ID: mHzLKnmIOSCxqRMoRHHJvg_1748426754 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Zhao Liu , Xiaoyao Li Subject: [PULL 13/27] hw/core/machine: Remove hw_compat_2_4[] array Date: Wed, 28 May 2025 12:04:53 +0200 Message-ID: <20250528100507.313906-14-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748427003052116600 From: Philippe Mathieu-Daud=C3=A9 The hw_compat_2_4[] array was only used by the pc-q35-2.4 and pc-i440fx-2.4 machines, which got removed. Remove it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Zhao Liu Reviewed-by: Xiaoyao Li Message-ID: <20250512083948.39294-6-philmd@linaro.org> Signed-off-by: Thomas Huth --- include/hw/boards.h | 3 --- hw/core/machine.c | 9 --------- 2 files changed, 12 deletions(-) diff --git a/include/hw/boards.h b/include/hw/boards.h index a7b1fcffae3..03e7cbeae82 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -866,7 +866,4 @@ extern const size_t hw_compat_2_6_len; extern GlobalProperty hw_compat_2_5[]; extern const size_t hw_compat_2_5_len; =20 -extern GlobalProperty hw_compat_2_4[]; -extern const size_t hw_compat_2_4_len; - #endif diff --git a/hw/core/machine.c b/hw/core/machine.c index c3f3a5020d0..15cd2bc3c40 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -294,15 +294,6 @@ GlobalProperty hw_compat_2_5[] =3D { }; const size_t hw_compat_2_5_len =3D G_N_ELEMENTS(hw_compat_2_5); =20 -GlobalProperty hw_compat_2_4[] =3D { - { "e1000", "extra_mac_registers", "off" }, - { "virtio-pci", "x-disable-pcie", "on" }, - { "virtio-pci", "migrate-extra", "off" }, - { "fw_cfg_mem", "dma_enabled", "off" }, - { "fw_cfg_io", "dma_enabled", "off" } -}; -const size_t hw_compat_2_4_len =3D G_N_ELEMENTS(hw_compat_2_4); - MachineState *current_machine; =20 static char *machine_get_kernel(Object *obj, Error **errp) --=20 2.49.0 From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748426840; cv=none; d=zohomail.com; s=zohoarc; b=gnvSaRYHZnbTHYWxS6o4x+5mWzUvbYeNywei1bD0+ak3fLHkcj1XZOm57bVU6JBeXM+o3WIQdDz/6FIONR6BSWb9Pieqj2Um8PJGNbl550q0VjFkd7IBO1w9oUyZ/N6Pj35Z0yRwMfJgzNU2cpShPaje8WNgBpnp1htCyH/rX5s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748426840; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=fDA/okgTdwBkuJfM2akfszXR3E9almYZhidqyI4nBwI=; b=CrqDZGDh7U81ap9aRyAXSbaGtXQYWfABT4b3ePhd9O9YBURU41otbGrgYs+uS06EhTOnoxXTfJYwSbqlXLYTvprM+hZLGO4R6SoMmWKkB3C/J/1XV9dhXpkeWwVMxif7vroItxiS9wK0k/IntHuVN2EorC0ELe1oVPh3yWjlliM= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1748426840564108.7827439163674; Wed, 28 May 2025 03:07:20 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDgj-0006Sh-5K; Wed, 28 May 2025 06:07:09 -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 1uKDg0-0004CD-BG for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:25 -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 1uKDfh-0007Eb-88 for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:22 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-533-ZGw3g00AO3eoj7bgJVbMUw-1; Wed, 28 May 2025 06:05:57 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CEC16195608A; Wed, 28 May 2025 10:05:56 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9ECA3180049D; Wed, 28 May 2025 10:05:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426761; 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=fDA/okgTdwBkuJfM2akfszXR3E9almYZhidqyI4nBwI=; b=GD5xh+/SDriuwfKJugCHOyHt0XFr1t2R/IsVno1BNJVMOHQXSy1SSlMPI/9byozK4YfakM ZVzQQpW6+A3hUrzYfXfNro1muTaeE47ibaIpgM9SU08J2n7fZ4KfejuA9g9/SLH6vfmbDO bgWRvkmqKu1lmjb6x/gWFS+KRHOuxK8= X-MC-Unique: ZGw3g00AO3eoj7bgJVbMUw-1 X-Mimecast-MFC-AGG-ID: ZGw3g00AO3eoj7bgJVbMUw_1748426756 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Zhao Liu Subject: [PULL 14/27] hw/net/e1000: Remove unused E1000_FLAG_MAC flag Date: Wed, 28 May 2025 12:04:54 +0200 Message-ID: <20250528100507.313906-15-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UPPERCASE_50_75=0.008 autolearn=unavailable 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748426842686116600 From: Philippe Mathieu-Daud=C3=A9 E1000_FLAG_MAC was only used by the hw_compat_2_4[] array, via the 'extra_mac_registers=3Doff' property. We removed all machines using that array, lets remove all the code around E1000_FLAG_MAC, including the MAC_ACCESS_FLAG_NEEDED enum, similarly to commit fa4ec9ffda7 ("e1000: remove old compatibility code"). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Zhao Liu Message-ID: <20250512083948.39294-7-philmd@linaro.org> Signed-off-by: Thomas Huth --- hw/net/e1000.c | 95 ++++++++++++++++++++++---------------------------- 1 file changed, 41 insertions(+), 54 deletions(-) diff --git a/hw/net/e1000.c b/hw/net/e1000.c index cba4999e6d0..a80a7b0cdb4 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -127,10 +127,8 @@ struct E1000State_st { QEMUTimer *flush_queue_timer; =20 /* Compatibility flags for migration to/from qemu 1.3.0 and older */ -#define E1000_FLAG_MAC_BIT 2 #define E1000_FLAG_TSO_BIT 3 #define E1000_FLAG_VET_BIT 4 -#define E1000_FLAG_MAC (1 << E1000_FLAG_MAC_BIT) #define E1000_FLAG_TSO (1 << E1000_FLAG_TSO_BIT) #define E1000_FLAG_VET (1 << E1000_FLAG_VET_BIT) =20 @@ -1212,52 +1210,51 @@ enum { NWRITEOPS =3D ARRAY_SIZE(macreg_writeops) }; =20 enum { MAC_ACCESS_PARTIAL =3D 1, MAC_ACCESS_FLAG_NEEDED =3D 2 }; =20 -#define markflag(x) ((E1000_FLAG_##x << 2) | MAC_ACCESS_FLAG_NEEDED) /* In the array below the meaning of the bits is: [f|f|f|f|f|f|n|p] * f - flag bits (up to 6 possible flags) * n - flag needed - * p - partially implenented */ + * p - partially implemented */ static const uint8_t mac_reg_access[0x8000] =3D { - [IPAV] =3D markflag(MAC), [WUC] =3D markflag(MAC), - [IP6AT] =3D markflag(MAC), [IP4AT] =3D markflag(MAC), - [FFVT] =3D markflag(MAC), [WUPM] =3D markflag(MAC), - [ECOL] =3D markflag(MAC), [MCC] =3D markflag(MAC), - [DC] =3D markflag(MAC), [TNCRS] =3D markflag(MAC), - [RLEC] =3D markflag(MAC), [XONRXC] =3D markflag(MAC), - [XOFFTXC] =3D markflag(MAC), [RFC] =3D markflag(MAC), - [TSCTFC] =3D markflag(MAC), [MGTPRC] =3D markflag(MAC), - [WUS] =3D markflag(MAC), [AIT] =3D markflag(MAC), - [FFLT] =3D markflag(MAC), [FFMT] =3D markflag(MAC), - [SCC] =3D markflag(MAC), [FCRUC] =3D markflag(MAC), - [LATECOL] =3D markflag(MAC), [COLC] =3D markflag(MAC), - [SEQEC] =3D markflag(MAC), [CEXTERR] =3D markflag(MAC), - [XONTXC] =3D markflag(MAC), [XOFFRXC] =3D markflag(MAC), - [RJC] =3D markflag(MAC), [RNBC] =3D markflag(MAC), - [MGTPDC] =3D markflag(MAC), [MGTPTC] =3D markflag(MAC), - [RUC] =3D markflag(MAC), [ROC] =3D markflag(MAC), - [GORCL] =3D markflag(MAC), [GORCH] =3D markflag(MAC), - [GOTCL] =3D markflag(MAC), [GOTCH] =3D markflag(MAC), - [BPRC] =3D markflag(MAC), [MPRC] =3D markflag(MAC), - [TSCTC] =3D markflag(MAC), [PRC64] =3D markflag(MAC), - [PRC127] =3D markflag(MAC), [PRC255] =3D markflag(MAC), - [PRC511] =3D markflag(MAC), [PRC1023] =3D markflag(MAC), - [PRC1522] =3D markflag(MAC), [PTC64] =3D markflag(MAC), - [PTC127] =3D markflag(MAC), [PTC255] =3D markflag(MAC), - [PTC511] =3D markflag(MAC), [PTC1023] =3D markflag(MAC), - [PTC1522] =3D markflag(MAC), [MPTC] =3D markflag(MAC), - [BPTC] =3D markflag(MAC), - - [TDFH] =3D markflag(MAC) | MAC_ACCESS_PARTIAL, - [TDFT] =3D markflag(MAC) | MAC_ACCESS_PARTIAL, - [TDFHS] =3D markflag(MAC) | MAC_ACCESS_PARTIAL, - [TDFTS] =3D markflag(MAC) | MAC_ACCESS_PARTIAL, - [TDFPC] =3D markflag(MAC) | MAC_ACCESS_PARTIAL, - [RDFH] =3D markflag(MAC) | MAC_ACCESS_PARTIAL, - [RDFT] =3D markflag(MAC) | MAC_ACCESS_PARTIAL, - [RDFHS] =3D markflag(MAC) | MAC_ACCESS_PARTIAL, - [RDFTS] =3D markflag(MAC) | MAC_ACCESS_PARTIAL, - [RDFPC] =3D markflag(MAC) | MAC_ACCESS_PARTIAL, - [PBM] =3D markflag(MAC) | MAC_ACCESS_PARTIAL, + [IPAV] =3D MAC_ACCESS_FLAG_NEEDED, [WUC] =3D MAC_ACCESS_FLAG= _NEEDED, + [IP6AT] =3D MAC_ACCESS_FLAG_NEEDED, [IP4AT] =3D MAC_ACCESS_FLAG= _NEEDED, + [FFVT] =3D MAC_ACCESS_FLAG_NEEDED, [WUPM] =3D MAC_ACCESS_FLAG= _NEEDED, + [ECOL] =3D MAC_ACCESS_FLAG_NEEDED, [MCC] =3D MAC_ACCESS_FLAG= _NEEDED, + [DC] =3D MAC_ACCESS_FLAG_NEEDED, [TNCRS] =3D MAC_ACCESS_FLAG= _NEEDED, + [RLEC] =3D MAC_ACCESS_FLAG_NEEDED, [XONRXC] =3D MAC_ACCESS_FLAG= _NEEDED, + [XOFFTXC] =3D MAC_ACCESS_FLAG_NEEDED, [RFC] =3D MAC_ACCESS_FLAG= _NEEDED, + [TSCTFC] =3D MAC_ACCESS_FLAG_NEEDED, [MGTPRC] =3D MAC_ACCESS_FLAG= _NEEDED, + [WUS] =3D MAC_ACCESS_FLAG_NEEDED, [AIT] =3D MAC_ACCESS_FLAG= _NEEDED, + [FFLT] =3D MAC_ACCESS_FLAG_NEEDED, [FFMT] =3D MAC_ACCESS_FLAG= _NEEDED, + [SCC] =3D MAC_ACCESS_FLAG_NEEDED, [FCRUC] =3D MAC_ACCESS_FLAG= _NEEDED, + [LATECOL] =3D MAC_ACCESS_FLAG_NEEDED, [COLC] =3D MAC_ACCESS_FLAG= _NEEDED, + [SEQEC] =3D MAC_ACCESS_FLAG_NEEDED, [CEXTERR] =3D MAC_ACCESS_FLAG= _NEEDED, + [XONTXC] =3D MAC_ACCESS_FLAG_NEEDED, [XOFFRXC] =3D MAC_ACCESS_FLAG= _NEEDED, + [RJC] =3D MAC_ACCESS_FLAG_NEEDED, [RNBC] =3D MAC_ACCESS_FLAG= _NEEDED, + [MGTPDC] =3D MAC_ACCESS_FLAG_NEEDED, [MGTPTC] =3D MAC_ACCESS_FLAG= _NEEDED, + [RUC] =3D MAC_ACCESS_FLAG_NEEDED, [ROC] =3D MAC_ACCESS_FLAG= _NEEDED, + [GORCL] =3D MAC_ACCESS_FLAG_NEEDED, [GORCH] =3D MAC_ACCESS_FLAG= _NEEDED, + [GOTCL] =3D MAC_ACCESS_FLAG_NEEDED, [GOTCH] =3D MAC_ACCESS_FLAG= _NEEDED, + [BPRC] =3D MAC_ACCESS_FLAG_NEEDED, [MPRC] =3D MAC_ACCESS_FLAG= _NEEDED, + [TSCTC] =3D MAC_ACCESS_FLAG_NEEDED, [PRC64] =3D MAC_ACCESS_FLAG= _NEEDED, + [PRC127] =3D MAC_ACCESS_FLAG_NEEDED, [PRC255] =3D MAC_ACCESS_FLAG= _NEEDED, + [PRC511] =3D MAC_ACCESS_FLAG_NEEDED, [PRC1023] =3D MAC_ACCESS_FLAG= _NEEDED, + [PRC1522] =3D MAC_ACCESS_FLAG_NEEDED, [PTC64] =3D MAC_ACCESS_FLAG= _NEEDED, + [PTC127] =3D MAC_ACCESS_FLAG_NEEDED, [PTC255] =3D MAC_ACCESS_FLAG= _NEEDED, + [PTC511] =3D MAC_ACCESS_FLAG_NEEDED, [PTC1023] =3D MAC_ACCESS_FLAG= _NEEDED, + [PTC1522] =3D MAC_ACCESS_FLAG_NEEDED, [MPTC] =3D MAC_ACCESS_FLAG= _NEEDED, + [BPTC] =3D MAC_ACCESS_FLAG_NEEDED, + + [TDFH] =3D MAC_ACCESS_FLAG_NEEDED | MAC_ACCESS_PARTIAL, + [TDFT] =3D MAC_ACCESS_FLAG_NEEDED | MAC_ACCESS_PARTIAL, + [TDFHS] =3D MAC_ACCESS_FLAG_NEEDED | MAC_ACCESS_PARTIAL, + [TDFTS] =3D MAC_ACCESS_FLAG_NEEDED | MAC_ACCESS_PARTIAL, + [TDFPC] =3D MAC_ACCESS_FLAG_NEEDED | MAC_ACCESS_PARTIAL, + [RDFH] =3D MAC_ACCESS_FLAG_NEEDED | MAC_ACCESS_PARTIAL, + [RDFT] =3D MAC_ACCESS_FLAG_NEEDED | MAC_ACCESS_PARTIAL, + [RDFHS] =3D MAC_ACCESS_FLAG_NEEDED | MAC_ACCESS_PARTIAL, + [RDFTS] =3D MAC_ACCESS_FLAG_NEEDED | MAC_ACCESS_PARTIAL, + [RDFPC] =3D MAC_ACCESS_FLAG_NEEDED | MAC_ACCESS_PARTIAL, + [PBM] =3D MAC_ACCESS_FLAG_NEEDED | MAC_ACCESS_PARTIAL, }; =20 static void @@ -1419,13 +1416,6 @@ static int e1000_tx_tso_post_load(void *opaque, int = version_id) return 0; } =20 -static bool e1000_full_mac_needed(void *opaque) -{ - E1000State *s =3D opaque; - - return chkflag(MAC); -} - static bool e1000_tso_state_needed(void *opaque) { E1000State *s =3D opaque; @@ -1451,7 +1441,6 @@ static const VMStateDescription vmstate_e1000_full_ma= c_state =3D { .name =3D "e1000/full_mac_state", .version_id =3D 1, .minimum_version_id =3D 1, - .needed =3D e1000_full_mac_needed, .fields =3D (const VMStateField[]) { VMSTATE_UINT32_ARRAY(mac_reg, E1000State, 0x8000), VMSTATE_END_OF_LIST() @@ -1679,8 +1668,6 @@ static void pci_e1000_realize(PCIDevice *pci_dev, Err= or **errp) =20 static const Property e1000_properties[] =3D { DEFINE_NIC_PROPERTIES(E1000State, conf), - DEFINE_PROP_BIT("extra_mac_registers", E1000State, - compat_flags, E1000_FLAG_MAC_BIT, true), DEFINE_PROP_BIT("migrate_tso_props", E1000State, compat_flags, E1000_FLAG_TSO_BIT, true), DEFINE_PROP_BIT("init-vet", E1000State, --=20 2.49.0 From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748426840; cv=none; d=zohomail.com; s=zohoarc; b=EzS2van1UAzq9IL4pgFWoDZoVEBHBIBM2vwtwB+hh9Z5xKJx0y7Q20h3O7LFfc4a8nmlpZdiFhdc0JBkURNw2vgUeaImGdyTBWy46MlOor82cIVaHoK5NtYKlC+NVi7i8Dbt+7rzAS2mEL4BqYMR39vMWovq9ZdivtovivIBBJs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748426840; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=NrXUMB04D9eKs4sNmt0JGGNI3Be/7bQAJFM2t4rb92M=; b=OXid7eEZKydDkW8dwRXWfVJhmYyT0rBOgWAil5pGAJqt79GTIc0ka3lObgUjXXoogRXeADePMgodoE2SOWEbyfgSBXYHy6WwVXaIWvjjuJ48twFJ22esDMMj5MnE+dYClnZwREI5T3gq3HlYgjhIZUfVEQLdzXTXYUjhGzzpurw= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1748426840128832.8511335139746; Wed, 28 May 2025 03:07:20 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDg7-0004K0-98; Wed, 28 May 2025 06:06:33 -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 1uKDfw-00048X-Pc for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:20 -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 1uKDft-0007Eh-Me for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:20 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-593-HF-Ca-cSNRSzEq5zqfyBCw-1; Wed, 28 May 2025 06:06:02 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 49606194510F; Wed, 28 May 2025 10:06:00 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D15BA180049D; Wed, 28 May 2025 10:05:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426766; 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=NrXUMB04D9eKs4sNmt0JGGNI3Be/7bQAJFM2t4rb92M=; b=OHtO25PWGAGZEsEbHh5lwnb2afqeBCSn4JyHcdByfQQXem4kRVyo5osDKwWaqsfVQLeSxY umoJH79sY35Ao5o8IqlvHo74AdB7d/BsxWVUCOEmNv6jUhqLKzBHpqw640Yp4JxKaEG5F6 B4zFKMFz1eM4JVdtk4Ew+l7n8nEEs3s= X-MC-Unique: HF-Ca-cSNRSzEq5zqfyBCw-1 X-Mimecast-MFC-AGG-ID: HF-Ca-cSNRSzEq5zqfyBCw_1748426760 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Zhao Liu Subject: [PULL 15/27] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_MIGRATE_EXTRA definition Date: Wed, 28 May 2025 12:04:55 +0200 Message-ID: <20250528100507.313906-16-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748426840683116600 From: Philippe Mathieu-Daud=C3=A9 VIRTIO_PCI_FLAG_MIGRATE_EXTRA was only used by the hw_compat_2_4[] array, via the 'migrate-extra=3Dtrue' property. We removed all machines using that array, lets remove all the code around VIRTIO_PCI_FLAG_MIGRATE_EXTRA. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Thomas Huth Reviewed-by: Zhao Liu Message-ID: <20250512083948.39294-8-philmd@linaro.org> Signed-off-by: Thomas Huth --- include/hw/virtio/virtio-pci.h | 4 ---- hw/virtio/virtio-pci.c | 6 +----- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/include/hw/virtio/virtio-pci.h b/include/hw/virtio/virtio-pci.h index 1dbc3851b01..eb22ed0a1d9 100644 --- a/include/hw/virtio/virtio-pci.h +++ b/include/hw/virtio/virtio-pci.h @@ -32,7 +32,6 @@ DECLARE_OBJ_CHECKERS(VirtioPCIBusState, VirtioPCIBusClass, enum { VIRTIO_PCI_FLAG_BUS_MASTER_BUG_MIGRATION_BIT, VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, - VIRTIO_PCI_FLAG_MIGRATE_EXTRA_BIT, VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT, VIRTIO_PCI_FLAG_DISABLE_PCIE_BIT, VIRTIO_PCI_FLAG_PAGE_PER_VQ_BIT, @@ -57,9 +56,6 @@ enum { /* virtio version flags */ #define VIRTIO_PCI_FLAG_DISABLE_PCIE (1 << VIRTIO_PCI_FLAG_DISABLE_PCIE_BI= T) =20 -/* migrate extra state */ -#define VIRTIO_PCI_FLAG_MIGRATE_EXTRA (1 << VIRTIO_PCI_FLAG_MIGRATE_EXTRA_= BIT) - /* have pio notification for modern device ? */ #define VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY \ (1 << VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 9b48aa8c3e7..f52fac663c2 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -146,9 +146,7 @@ static const VMStateDescription vmstate_virtio_pci =3D { =20 static bool virtio_pci_has_extra_state(DeviceState *d) { - VirtIOPCIProxy *proxy =3D to_virtio_pci_proxy(d); - - return proxy->flags & VIRTIO_PCI_FLAG_MIGRATE_EXTRA; + return true; } =20 static void virtio_pci_save_extra_state(DeviceState *d, QEMUFile *f) @@ -2363,8 +2361,6 @@ static void virtio_pci_bus_reset_hold(Object *obj, Re= setType type) static const Property virtio_pci_properties[] =3D { DEFINE_PROP_BIT("virtio-pci-bus-master-bug-migration", VirtIOPCIProxy,= flags, VIRTIO_PCI_FLAG_BUS_MASTER_BUG_MIGRATION_BIT, false), - DEFINE_PROP_BIT("migrate-extra", VirtIOPCIProxy, flags, - VIRTIO_PCI_FLAG_MIGRATE_EXTRA_BIT, true), DEFINE_PROP_BIT("modern-pio-notify", VirtIOPCIProxy, flags, VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT, false), DEFINE_PROP_BIT("x-disable-pcie", VirtIOPCIProxy, flags, --=20 2.49.0 From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748426823; cv=none; d=zohomail.com; s=zohoarc; b=Mw6LyQH4QUoPR/1N6iv2tE9RVyvocdgCKN4KPC/Xkfv9JBSpR7tZ1ZHLAWFq7PgIeYuvQPEj7U4K6m2v/WXhvSjECG1hTA+XspnwLmuU4ymxeXkoPEWr+IZBaFsgCWjVXdV/SpQS57BIbSeMdcTyPrrl68ncnGAyEtJjv+6eZ/U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748426823; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=r4CRIfygZP0HnBH0FX1cjWd/jykjn/umfziO5ttUVTw=; b=Vt+9+h/l0UARRY51eGQnixdrNEctWjg2ZgYgUhTKLRR2TOly4vEj/eSrCQAc8/BiXAB+856OSxyMJPYb4mNpMyqRDxZPH6dkuOJh5njkqswJjMIQAoGZSiXyQsjl0BogK4FGFTkLRiMltQRgNwg7tGJMpaiioaxR0SAPKLF9SiY= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1748426823130422.8098770006013; Wed, 28 May 2025 03:07:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDg7-0004Jr-8X; Wed, 28 May 2025 06:06:33 -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 1uKDfv-00045C-Bo for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:20 -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 1uKDft-0007Et-LO for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:18 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-690-mwy9T-8hNeaa_nk0yAgZNg-1; Wed, 28 May 2025 06:06:04 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id BE41D1800373; Wed, 28 May 2025 10:06:03 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id EF10A180049D; Wed, 28 May 2025 10:06:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426768; 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=r4CRIfygZP0HnBH0FX1cjWd/jykjn/umfziO5ttUVTw=; b=IMJZyiFhitC99OQ5KIAkppZ7NUWbF5YkhcmTRKSDYpYkHqFnhVBFhZdZ9r0lFV8YECu5VA pE3Tz6pSfD9Pjk+NPmpKMAAGSUtv94X0yrqJvaiYvaC123wOVFxj2UH5Sg9WHa1/WlLztU F+Vb4eZokQrOaGKZ9i7I/2cq04UtI+I= X-MC-Unique: mwy9T-8hNeaa_nk0yAgZNg-1 X-Mimecast-MFC-AGG-ID: mwy9T-8hNeaa_nk0yAgZNg_1748426763 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Zhao Liu , Xiaoyao Li Subject: [PULL 16/27] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_DISABLE_PCIE definition Date: Wed, 28 May 2025 12:04:56 +0200 Message-ID: <20250528100507.313906-17-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748426824491116600 From: Philippe Mathieu-Daud=C3=A9 VIRTIO_PCI_FLAG_DISABLE_PCIE was only used by the hw_compat_2_4[] array, via the 'x-disable-pcie=3Dfalse' property. We removed all machines using that array, lets remove all the code around VIRTIO_PCI_FLAG_DISABLE_PCIE (see commit 9a4c0e220d8 for similar VIRTIO_PCI_FLAG_* enum removal). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Thomas Huth Reviewed-by: Zhao Liu Reviewed-by: Xiaoyao Li Message-ID: <20250512083948.39294-9-philmd@linaro.org> Signed-off-by: Thomas Huth --- include/hw/virtio/virtio-pci.h | 4 ---- hw/virtio/virtio-pci.c | 5 +---- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/include/hw/virtio/virtio-pci.h b/include/hw/virtio/virtio-pci.h index eb22ed0a1d9..eab5394898d 100644 --- a/include/hw/virtio/virtio-pci.h +++ b/include/hw/virtio/virtio-pci.h @@ -33,7 +33,6 @@ enum { VIRTIO_PCI_FLAG_BUS_MASTER_BUG_MIGRATION_BIT, VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT, - VIRTIO_PCI_FLAG_DISABLE_PCIE_BIT, VIRTIO_PCI_FLAG_PAGE_PER_VQ_BIT, VIRTIO_PCI_FLAG_ATS_BIT, VIRTIO_PCI_FLAG_INIT_DEVERR_BIT, @@ -53,9 +52,6 @@ enum { * vcpu thread using ioeventfd for some devices. */ #define VIRTIO_PCI_FLAG_USE_IOEVENTFD (1 << VIRTIO_PCI_FLAG_USE_IOEVENTF= D_BIT) =20 -/* virtio version flags */ -#define VIRTIO_PCI_FLAG_DISABLE_PCIE (1 << VIRTIO_PCI_FLAG_DISABLE_PCIE_BI= T) - /* have pio notification for modern device ? */ #define VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY \ (1 << VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index f52fac663c2..e62ae1e5e07 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -2363,8 +2363,6 @@ static const Property virtio_pci_properties[] =3D { VIRTIO_PCI_FLAG_BUS_MASTER_BUG_MIGRATION_BIT, false), DEFINE_PROP_BIT("modern-pio-notify", VirtIOPCIProxy, flags, VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT, false), - DEFINE_PROP_BIT("x-disable-pcie", VirtIOPCIProxy, flags, - VIRTIO_PCI_FLAG_DISABLE_PCIE_BIT, false), DEFINE_PROP_BIT("page-per-vq", VirtIOPCIProxy, flags, VIRTIO_PCI_FLAG_PAGE_PER_VQ_BIT, false), DEFINE_PROP_BOOL("x-ignore-backend-features", VirtIOPCIProxy, @@ -2393,8 +2391,7 @@ static void virtio_pci_dc_realize(DeviceState *qdev, = Error **errp) VirtIOPCIProxy *proxy =3D VIRTIO_PCI(qdev); PCIDevice *pci_dev =3D &proxy->pci_dev; =20 - if (!(proxy->flags & VIRTIO_PCI_FLAG_DISABLE_PCIE) && - virtio_pci_modern(proxy)) { + if (virtio_pci_modern(proxy)) { pci_dev->cap_present |=3D QEMU_PCI_CAP_EXPRESS; } =20 --=20 2.49.0 From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748426986; cv=none; d=zohomail.com; s=zohoarc; b=LG0AULa12X9DwCZFxHoHZ6sCQ8JRe492Dyc1BqQgBF+GPN0rBDAqzL+o6SlwzaFeTSFHYNx/OB+id4gJ9MioGJM0hBBn/Q06GguT317uLsWzJCWTRRGzwMyYcbFmJB7WkrUxkW2geILBrbc9bumBQ7QSVHpd5NudG+JtT7X6HXM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748426986; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=2a7awnVBSjhEnf2yZXL6q25QAaoWfsYKy4VNpBfBk6I=; b=Xs9yMFByVbEAOHjUHr/zly1zPLCgz5ku711wryH7GIyk9ugT5bcU5yFv0M5XBgWeeRVxA0R3dMM4Qwd3mWz/OyAgqodc85cIE5Tnb/qxJvq/mPYhgfEtWU9p42y4iPvyZCv1xUUB41INrDAXMculzutZAWlpsP6vL8BjPZUpt4I= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1748426986948914.1955441350414; Wed, 28 May 2025 03:09:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDgS-00056b-8f; Wed, 28 May 2025 06:06:52 -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 1uKDg0-0004C7-2u for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:24 -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 1uKDft-0007Ez-MK for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:23 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-496-ZSxy-bqpN6eBDSDtHK4cGg-1; Wed, 28 May 2025 06:06:08 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 764481956086; Wed, 28 May 2025 10:06:07 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6696118004A7; Wed, 28 May 2025 10:06:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426771; 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=2a7awnVBSjhEnf2yZXL6q25QAaoWfsYKy4VNpBfBk6I=; b=GEk5R78DHzHPCdT3zH62oL6NlduIAsBUntj46PBl89eHZIpIBeoPF6VaErPTfyndiY1PRA oeNG4zWE2siEalQDgmO6iOFZvVcCxekrIprDL9gwePbU6Hl/RZlp4KV0EJu+7BgnALOroh pwbYCmeNleWPUzV4e4ohOwXf9jRmu2s= X-MC-Unique: ZSxy-bqpN6eBDSDtHK4cGg-1 X-Mimecast-MFC-AGG-ID: ZSxy-bqpN6eBDSDtHK4cGg_1748426767 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Zhao Liu , Xiaoyao Li Subject: [PULL 17/27] hw/i386/pc: Remove deprecated pc-q35-2.5 and pc-i440fx-2.5 machines Date: Wed, 28 May 2025 12:04:57 +0200 Message-ID: <20250528100507.313906-18-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748426992953116600 From: Philippe Mathieu-Daud=C3=A9 These machines has been supported for a period of more than 6 years. According to our versioned machine support policy (see commit ce80c4fa6ff "docs: document special exception for machine type deprecation & removal") they can now be removed. Remove the now unused empty pc_compat_2_5[] array. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Zhao Liu Reviewed-by: Xiaoyao Li Message-ID: <20250512083948.39294-10-philmd@linaro.org> Signed-off-by: Thomas Huth --- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 3 --- hw/i386/pc_piix.c | 13 ------------- hw/i386/pc_q35.c | 13 ------------- 4 files changed, 32 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index b34aa25fdce..79b72c54dd3 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -298,9 +298,6 @@ extern const size_t pc_compat_2_7_len; extern GlobalProperty pc_compat_2_6[]; extern const size_t pc_compat_2_6_len; =20 -extern GlobalProperty pc_compat_2_5[]; -extern const size_t pc_compat_2_5_len; - #define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \ static void pc_machine_##suffix##_class_init(ObjectClass *oc, \ const void *data) \ diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 2b46714a5ac..cb375aabdc5 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -259,9 +259,6 @@ GlobalProperty pc_compat_2_6[] =3D { }; const size_t pc_compat_2_6_len =3D G_N_ELEMENTS(pc_compat_2_6); =20 -GlobalProperty pc_compat_2_5[] =3D {}; -const size_t pc_compat_2_5_len =3D G_N_ELEMENTS(pc_compat_2_5); - /* * @PC_FW_DATA: * Size of the chunk of memory at the top of RAM for the BIOS ACPI tables diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 04213b45b44..7a62bb06500 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -778,19 +778,6 @@ static void pc_i440fx_machine_2_6_options(MachineClass= *m) =20 DEFINE_I440FX_MACHINE(2, 6); =20 -static void pc_i440fx_machine_2_5_options(MachineClass *m) -{ - X86MachineClass *x86mc =3D X86_MACHINE_CLASS(m); - - pc_i440fx_machine_2_6_options(m); - x86mc->save_tsc_khz =3D false; - m->legacy_fw_cfg_order =3D 1; - compat_props_add(m->compat_props, hw_compat_2_5, hw_compat_2_5_len); - compat_props_add(m->compat_props, pc_compat_2_5, pc_compat_2_5_len); -} - -DEFINE_I440FX_MACHINE(2, 5); - #ifdef CONFIG_ISAPC static void isapc_machine_options(MachineClass *m) { diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 47e12602413..33211b1876f 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -672,16 +672,3 @@ static void pc_q35_machine_2_6_options(MachineClass *m) } =20 DEFINE_Q35_MACHINE(2, 6); - -static void pc_q35_machine_2_5_options(MachineClass *m) -{ - X86MachineClass *x86mc =3D X86_MACHINE_CLASS(m); - - pc_q35_machine_2_6_options(m); - x86mc->save_tsc_khz =3D false; - m->legacy_fw_cfg_order =3D 1; - compat_props_add(m->compat_props, hw_compat_2_5, hw_compat_2_5_len); - compat_props_add(m->compat_props, pc_compat_2_5, pc_compat_2_5_len); -} - -DEFINE_Q35_MACHINE(2, 5); --=20 2.49.0 From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748426854; cv=none; d=zohomail.com; s=zohoarc; b=WcymdfHsjdtB2+4DX78wmtLdXJe1H+FbYdcG69q9f/dPH5sP7u3YXjDHCsLkix4wI1oKepO7q5MpyWNGes1ufsOVdVVuzj1NcVy6s6aTfAU4UVz7EDcKPz6sjyjTntmhEa4MPD7jKQmW+L9GpofUaBEghVTsoQiy8qmAELuZVrc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748426854; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=tvapFg6ZdMY4hXPzf/ac/ZhCNA8XrEnKwnsjVhZAGDU=; b=a1av/2fl87Un+r2Iyt1ui9BhnhTxBH+3MUlvtaC6IUWhBIsEgBITnuT7yc3hwxXX4q7OlwwkBaBFQAkIejaDq46TCCwYkWjT0A49ohKciWEPMSNVq9hKdckBYNuhzCzkGIOC2yaPf6oo0rPvAUncruXLBPqUIZQT9BZd4FsH/2Y= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 174842685464987.47490404922542; Wed, 28 May 2025 03:07:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDgL-0004X7-9S; Wed, 28 May 2025 06:06:45 -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 1uKDfw-00048K-Ly for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:20 -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 1uKDft-0007F3-Mb for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:20 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-33-jFSDRmVPPtWESEMWyGIGZA-1; Wed, 28 May 2025 06:06:13 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 37DD919560BC; Wed, 28 May 2025 10:06:12 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 91C8F18004A7; Wed, 28 May 2025 10:06:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426774; 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=tvapFg6ZdMY4hXPzf/ac/ZhCNA8XrEnKwnsjVhZAGDU=; b=FXDwLr0OCW4itsCd37UEKCWO/nOWNeh8kpxl2uhm+wL+F0lSfNlO6zFcBCd8a9AX362j1u V9L7znBL/YIloNngsLBs1nd32CP1eVao5XVesrPUHjSd5YSGUh7rP9QSReD/a8c7g12c4t vHbrr8yBWSFSaew/XPfiekKVWzh/Df8= X-MC-Unique: jFSDRmVPPtWESEMWyGIGZA-1 X-Mimecast-MFC-AGG-ID: jFSDRmVPPtWESEMWyGIGZA_1748426772 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Zhao Liu , Xiaoyao Li Subject: [PULL 18/27] hw/i386/x86: Remove X86MachineClass::save_tsc_khz field Date: Wed, 28 May 2025 12:04:58 +0200 Message-ID: <20250528100507.313906-19-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748426855004116600 From: Philippe Mathieu-Daud=C3=A9 The X86MachineClass::save_tsc_khz boolean was only used by the pc-q35-2.5 and pc-i440fx-2.5 machines, which got removed. Remove it and simplify tsc_khz_needed(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Thomas Huth Reviewed-by: Zhao Liu Reviewed-by: Xiaoyao Li Message-ID: <20250512083948.39294-11-philmd@linaro.org> Signed-off-by: Thomas Huth --- include/hw/i386/x86.h | 5 ----- hw/i386/x86.c | 1 - target/i386/machine.c | 5 ++--- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h index 258b1343a16..fc460b82f82 100644 --- a/include/hw/i386/x86.h +++ b/include/hw/i386/x86.h @@ -27,13 +27,8 @@ #include "qom/object.h" =20 struct X86MachineClass { - /*< private >*/ MachineClass parent; =20 - /*< public >*/ - - /* TSC rate migration: */ - bool save_tsc_khz; /* use DMA capable linuxboot option rom */ bool fwcfg_dma_enabled; /* CPU and apic information: */ diff --git a/hw/i386/x86.c b/hw/i386/x86.c index e2d04092992..f80533df1c5 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -382,7 +382,6 @@ static void x86_machine_class_init(ObjectClass *oc, con= st void *data) mc->get_default_cpu_node_id =3D x86_get_default_cpu_node_id; mc->possible_cpu_arch_ids =3D x86_possible_cpu_arch_ids; mc->kvm_type =3D x86_kvm_type; - x86mc->save_tsc_khz =3D true; x86mc->fwcfg_dma_enabled =3D true; nc->nmi_monitor_handler =3D x86_nmi; =20 diff --git a/target/i386/machine.c b/target/i386/machine.c index 6cb561c6322..dd2dac1d443 100644 --- a/target/i386/machine.c +++ b/target/i386/machine.c @@ -1060,9 +1060,8 @@ static bool tsc_khz_needed(void *opaque) { X86CPU *cpu =3D opaque; CPUX86State *env =3D &cpu->env; - MachineClass *mc =3D MACHINE_GET_CLASS(qdev_get_machine()); - X86MachineClass *x86mc =3D X86_MACHINE_CLASS(mc); - return env->tsc_khz && x86mc->save_tsc_khz; + + return env->tsc_khz; } =20 static const VMStateDescription vmstate_tsc_khz =3D { --=20 2.49.0 From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748426981; cv=none; d=zohomail.com; s=zohoarc; b=AZndxggtoh6wbLiUIwaByQAPvi0Jv305h3hyollXFaHTLmBt9sfkqeEtk/5TnBRrMMhz3gdLRr5mHJNPoSQTZgnCmVj7yxXNXwarorPAO0eywxiPfsXXagnTV189PRaYzU059OU3DyydbSloDURo3tK05P/KGowXKm9THHJKd6w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748426981; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=eK+HczivaTK+gyAPglvrt94YWhujdDkIncNou17/y2w=; b=Y8RerQo6XN/h17oc9vQsNUC4UhGSJS7UmSHveB6FEXXvmQq7P4vYNQEy0+6nkCo4SOHF9dvgnJmZEAVAiM7J3M7dl+wOD+op05QnDlrsRRzy6DwpAdE6fxFTejnE0UbOS9Ay899pT82z1JTnuxQC/LdlZkNxpJytqYCgVaUnARU= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17484269815644.262897211058316; Wed, 28 May 2025 03:09:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDgP-0004sN-3G; Wed, 28 May 2025 06:06:49 -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 1uKDfz-0004C0-1m for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:24 -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 1uKDfw-0007Fb-GW for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:22 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-519-opkbMEc5MU6gZ3KMmqwJdQ-1; Wed, 28 May 2025 06:06:16 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4EDF5180045C; Wed, 28 May 2025 10:06:15 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C18551800371; Wed, 28 May 2025 10:06:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426779; 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=eK+HczivaTK+gyAPglvrt94YWhujdDkIncNou17/y2w=; b=aTIcim+9EAAwMIY0mqEEGCWPGG2DX+GZN7k3c+aU8tXkQSAXZVOM/SHugx6SjZViFaa2Ux gZiSOmDPozfLt5ZiMEznQ/T51rwJ81huiELE+iRkmQNeAadr4semf31kqvLWxKS4p5T8/C sO7VpR1iEhn1iE4L6wfHXMAt/17R8x0= X-MC-Unique: opkbMEc5MU6gZ3KMmqwJdQ-1 X-Mimecast-MFC-AGG-ID: opkbMEc5MU6gZ3KMmqwJdQ_1748426775 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Zhao Liu , Xiaoyao Li Subject: [PULL 19/27] hw/nvram/fw_cfg: Remove legacy FW_CFG_ORDER_OVERRIDE Date: Wed, 28 May 2025 12:04:59 +0200 Message-ID: <20250528100507.313906-20-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748426983130116600 From: Philippe Mathieu-Daud=C3=A9 The MachineClass::legacy_fw_cfg_order boolean was only used by the pc-q35-2.5 and pc-i440fx-2.5 machines, which got removed. Remove it along with: - FW_CFG_ORDER_OVERRIDE_* definitions - fw_cfg_set_order_override() - fw_cfg_reset_order_override() - fw_cfg_order[] - rom_set_order_override() - rom_reset_order_override() Simplify CLI and pc_vga_init() / pc_nic_init(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Zhao Liu Reviewed-by: Xiaoyao Li Message-ID: <20250512083948.39294-12-philmd@linaro.org> [thuth: Fix error from check_patch.pl wrt to an empty "for" loop] Signed-off-by: Thomas Huth --- include/hw/boards.h | 3 +- include/hw/loader.h | 2 - include/hw/nvram/fw_cfg.h | 10 ---- hw/core/loader.c | 14 ----- hw/i386/pc.c | 7 +-- hw/nvram/fw_cfg.c | 110 +++----------------------------------- system/vl.c | 5 -- 7 files changed, 10 insertions(+), 141 deletions(-) diff --git a/include/hw/boards.h b/include/hw/boards.h index 03e7cbeae82..ab900dacabc 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -286,8 +286,7 @@ struct MachineClass { no_parallel:1, no_floppy:1, no_cdrom:1, - pci_allow_0_address:1, - legacy_fw_cfg_order:1; + pci_allow_0_address:1; bool auto_create_sdcard; bool is_default; const char *default_machine_opts; diff --git a/include/hw/loader.h b/include/hw/loader.h index d280dc33e96..c96b5e141c6 100644 --- a/include/hw/loader.h +++ b/include/hw/loader.h @@ -270,8 +270,6 @@ int rom_add_elf_program(const char *name, GMappedFile *= mapped_file, void *data, AddressSpace *as); int rom_check_and_register_reset(void); void rom_set_fw(FWCfgState *f); -void rom_set_order_override(int order); -void rom_reset_order_override(void); =20 /** * rom_transaction_begin: diff --git a/include/hw/nvram/fw_cfg.h b/include/hw/nvram/fw_cfg.h index 47578ccc7f2..d41b9328fd1 100644 --- a/include/hw/nvram/fw_cfg.h +++ b/include/hw/nvram/fw_cfg.h @@ -42,14 +42,6 @@ struct FWCfgDataGeneratorClass { =20 typedef struct fw_cfg_file FWCfgFile; =20 -#define FW_CFG_ORDER_OVERRIDE_VGA 70 -#define FW_CFG_ORDER_OVERRIDE_NIC 80 -#define FW_CFG_ORDER_OVERRIDE_USER 100 -#define FW_CFG_ORDER_OVERRIDE_DEVICE 110 - -void fw_cfg_set_order_override(FWCfgState *fw_cfg, int order); -void fw_cfg_reset_order_override(FWCfgState *fw_cfg); - typedef struct FWCfgFiles { uint32_t count; FWCfgFile f[]; @@ -75,8 +67,6 @@ struct FWCfgState { uint32_t cur_offset; Notifier machine_ready; =20 - int fw_cfg_order_override; - bool dma_enabled; dma_addr_t dma_addr; AddressSpace *dma_as; diff --git a/hw/core/loader.c b/hw/core/loader.c index b792a54bb02..e7056ba4bd3 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -1333,20 +1333,6 @@ void rom_set_fw(FWCfgState *f) fw_cfg =3D f; } =20 -void rom_set_order_override(int order) -{ - if (!fw_cfg) - return; - fw_cfg_set_order_override(fw_cfg, order); -} - -void rom_reset_order_override(void) -{ - if (!fw_cfg) - return; - fw_cfg_reset_order_override(fw_cfg); -} - void rom_transaction_begin(void) { Rom *rom; diff --git a/hw/i386/pc.c b/hw/i386/pc.c index cb375aabdc5..49632b69d29 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1033,7 +1033,6 @@ DeviceState *pc_vga_init(ISABus *isa_bus, PCIBus *pci= _bus) { DeviceState *dev =3D NULL; =20 - rom_set_order_override(FW_CFG_ORDER_OVERRIDE_VGA); if (pci_bus) { PCIDevice *pcidev =3D pci_vga_init(pci_bus); dev =3D pcidev ? &pcidev->qdev : NULL; @@ -1041,7 +1040,7 @@ DeviceState *pc_vga_init(ISABus *isa_bus, PCIBus *pci= _bus) ISADevice *isadev =3D isa_vga_init(isa_bus); dev =3D isadev ? DEVICE(isadev) : NULL; } - rom_reset_order_override(); + return dev; } =20 @@ -1231,8 +1230,6 @@ void pc_nic_init(PCMachineClass *pcmc, ISABus *isa_bu= s, PCIBus *pci_bus) bool default_is_ne2k =3D g_str_equal(mc->default_nic, TYPE_ISA_NE2000); NICInfo *nd; =20 - rom_set_order_override(FW_CFG_ORDER_OVERRIDE_NIC); - while ((nd =3D qemu_find_nic_info(TYPE_ISA_NE2000, default_is_ne2k, NU= LL))) { pc_init_ne2k_isa(isa_bus, nd, &error_fatal); } @@ -1241,8 +1238,6 @@ void pc_nic_init(PCMachineClass *pcmc, ISABus *isa_bu= s, PCIBus *pci_bus) if (pci_bus) { pci_init_nic_devices(pci_bus, mc->default_nic); } - - rom_reset_order_override(); } =20 void pc_i8259_create(ISABus *isa_bus, qemu_irq *i8259_irqs) diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c index 237b9f7d1fe..aa240504935 100644 --- a/hw/nvram/fw_cfg.c +++ b/hw/nvram/fw_cfg.c @@ -817,62 +817,6 @@ void fw_cfg_modify_i64(FWCfgState *s, uint16_t key, ui= nt64_t value) g_free(old); } =20 -void fw_cfg_set_order_override(FWCfgState *s, int order) -{ - assert(s->fw_cfg_order_override =3D=3D 0); - s->fw_cfg_order_override =3D order; -} - -void fw_cfg_reset_order_override(FWCfgState *s) -{ - assert(s->fw_cfg_order_override !=3D 0); - s->fw_cfg_order_override =3D 0; -} - -/* - * This is the legacy order list. For legacy systems, files are in - * the fw_cfg in the order defined below, by the "order" value. Note - * that some entries (VGA ROMs, NIC option ROMS, etc.) go into a - * specific area, but there may be more than one and they occur in the - * order that the user specifies them on the command line. Those are - * handled in a special manner, using the order override above. - * - * For non-legacy, the files are sorted by filename to avoid this kind - * of complexity in the future. - * - * This is only for x86, other arches don't implement versioning so - * they won't set legacy mode. - */ -static struct { - const char *name; - int order; -} fw_cfg_order[] =3D { - { "etc/boot-menu-wait", 10 }, - { "bootsplash.jpg", 11 }, - { "bootsplash.bmp", 12 }, - { "etc/boot-fail-wait", 15 }, - { "etc/smbios/smbios-tables", 20 }, - { "etc/smbios/smbios-anchor", 30 }, - { "etc/e820", 40 }, - { "etc/reserved-memory-end", 50 }, - { "genroms/kvmvapic.bin", 55 }, - { "genroms/linuxboot.bin", 60 }, - { }, /* VGA ROMs from pc_vga_init come here, 70. */ - { }, /* NIC option ROMs from pc_nic_init come here, 80. */ - { "etc/system-states", 90 }, - { }, /* User ROMs come here, 100. */ - { }, /* Device FW comes here, 110. */ - { "etc/extra-pci-roots", 120 }, - { "etc/acpi/tables", 130 }, - { "etc/table-loader", 140 }, - { "etc/tpm/log", 150 }, - { "etc/acpi/rsdp", 160 }, - { "bootorder", 170 }, - { "etc/msr_feature_control", 180 }, - -#define FW_CFG_ORDER_OVERRIDE_LAST 200 -}; - /* * Any sub-page size update to these table MRs will be lost during migrati= on, * as we use aligned size in ram_load_precopy() -> qemu_ram_resize() path. @@ -890,29 +834,6 @@ static void fw_cfg_acpi_mr_save(FWCfgState *s, const c= har *filename, size_t len) } } =20 -static int get_fw_cfg_order(FWCfgState *s, const char *name) -{ - int i; - - if (s->fw_cfg_order_override > 0) { - return s->fw_cfg_order_override; - } - - for (i =3D 0; i < ARRAY_SIZE(fw_cfg_order); i++) { - if (fw_cfg_order[i].name =3D=3D NULL) { - continue; - } - - if (strcmp(name, fw_cfg_order[i].name) =3D=3D 0) { - return fw_cfg_order[i].order; - } - } - - /* Stick unknown stuff at the end. */ - warn_report("Unknown firmware file in legacy mode: %s", name); - return FW_CFG_ORDER_OVERRIDE_LAST; -} - void fw_cfg_add_file_callback(FWCfgState *s, const char *filename, FWCfgCallback select_cb, FWCfgWriteCallback write_cb, @@ -921,7 +842,6 @@ void fw_cfg_add_file_callback(FWCfgState *s, const cha= r *filename, { int i, index, count; size_t dsize; - MachineClass *mc =3D MACHINE_GET_CLASS(qdev_get_machine()); int order =3D 0; =20 if (!s->files) { @@ -933,22 +853,11 @@ void fw_cfg_add_file_callback(FWCfgState *s, const c= har *filename, count =3D be32_to_cpu(s->files->count); assert(count < fw_cfg_file_slots(s)); =20 - /* Find the insertion point. */ - if (mc->legacy_fw_cfg_order) { - /* - * Sort by order. For files with the same order, we keep them - * in the sequence in which they were added. - */ - order =3D get_fw_cfg_order(s, filename); - for (index =3D count; - index > 0 && order < s->entry_order[index - 1]; - index--); - } else { - /* Sort by file name. */ - for (index =3D count; - index > 0 && strcmp(filename, s->files->f[index - 1].name) < = 0; - index--); - } + /* Find the insertion point, sorting by file name. */ + for (index =3D count; + index > 0 && strcmp(filename, s->files->f[index - 1].name) < 0; + index--) + ; =20 /* * Move all the entries from the index point and after down one @@ -1058,7 +967,6 @@ bool fw_cfg_add_file_from_generator(FWCfgState *s, =20 static void fw_cfg_machine_reset(void *opaque) { - MachineClass *mc =3D MACHINE_GET_CLASS(qdev_get_machine()); FWCfgState *s =3D opaque; void *ptr; size_t len; @@ -1068,11 +976,9 @@ static void fw_cfg_machine_reset(void *opaque) ptr =3D fw_cfg_modify_file(s, "bootorder", (uint8_t *)buf, len); g_free(ptr); =20 - if (!mc->legacy_fw_cfg_order) { - buf =3D get_boot_devices_lchs_list(&len); - ptr =3D fw_cfg_modify_file(s, "bios-geometry", (uint8_t *)buf, len= ); - g_free(ptr); - } + buf =3D get_boot_devices_lchs_list(&len); + ptr =3D fw_cfg_modify_file(s, "bios-geometry", (uint8_t *)buf, len); + g_free(ptr); } =20 static void fw_cfg_machine_ready(struct Notifier *n, void *data) diff --git a/system/vl.c b/system/vl.c index fd402b8ff8f..3b7057e6c66 100644 --- a/system/vl.c +++ b/system/vl.c @@ -1192,10 +1192,7 @@ static int parse_fw_cfg(void *opaque, QemuOpts *opts= , Error **errp) return -1; } } - /* For legacy, keep user files in a specific global order. */ - fw_cfg_set_order_override(fw_cfg, FW_CFG_ORDER_OVERRIDE_USER); fw_cfg_add_file(fw_cfg, name, buf, size); - fw_cfg_reset_order_override(fw_cfg); return 0; } =20 @@ -2745,7 +2742,6 @@ static void qemu_create_cli_devices(void) } =20 /* init generic devices */ - rom_set_order_override(FW_CFG_ORDER_OVERRIDE_DEVICE); qemu_opts_foreach(qemu_find_opts("device"), device_init_func, NULL, &error_fatal); QTAILQ_FOREACH(opt, &device_opts, next) { @@ -2756,7 +2752,6 @@ static void qemu_create_cli_devices(void) assert(ret_data =3D=3D NULL); /* error_fatal aborts */ loc_pop(&opt->loc); } - rom_reset_order_override(); } =20 static bool qemu_machine_creation_done(Error **errp) --=20 2.49.0 From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748426945; cv=none; d=zohomail.com; s=zohoarc; b=A/6NrzhJdqyHkxBB9c/mU7Wu6JCpnqXOu6mk3YDtXPr8hr1EkWe+IU3DDv6USI5KmPyriN3lPBXyA6spVyIrnCXoQcR0EQCQtjzjFK/0PCdakwubMR8GlWyQsA/1yBX5TDkJ2Gpm2bFIw3glNF8pIH+/EJokpHhEcpevFdNt7+o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748426945; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=uMATuWWm+srIs5nFJ3klsWb/Ek9p4aFq+16UijVU0pY=; b=VZahbltIFOgFgO0Fnn9t6I9M3DU6l+82wD2hI1aqCoJJ99/FzJu5GW567l3H77SpLeWLJVcx6WSK6TrAynX+iSLVnqOYLNAqI4BZMhnSr7Af1+Fex7XZ7kCUWf4LbVO/XFNrpWU1TZdlPP8YzDDTU0TGngaNKYKb3JBtuE22RZs= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1748426945288648.8315139205168; Wed, 28 May 2025 03:09:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDgO-0004os-ES; Wed, 28 May 2025 06:06:48 -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 1uKDg2-0004K3-Pa for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:29 -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 1uKDfz-0007GW-Ov for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:26 -0400 Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-116-l7YzJmGPM_K3FOBJ5Jl1KQ-1; Wed, 28 May 2025 06:06:19 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9D3A7194510B; Wed, 28 May 2025 10:06:18 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0C6D3180049D; Wed, 28 May 2025 10:06:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426783; 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=uMATuWWm+srIs5nFJ3klsWb/Ek9p4aFq+16UijVU0pY=; b=CdjoJvcByKGZTI471GGWgCRYP+/fB78HSM+ov5TiDXhsQ3H8TWSri51qn7loZla8MW6CO9 sDRhFvn0h2wdYPlwLBu1o+2iAy8oq6DfItmlccEiZcXmxNpCZ+GTZr26wKdR3vJks61Fut SeQYMZEZ9G//gZC5XdN14/40sdHP5IU= X-MC-Unique: l7YzJmGPM_K3FOBJ5Jl1KQ-1 X-Mimecast-MFC-AGG-ID: l7YzJmGPM_K3FOBJ5Jl1KQ_1748426778 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Zhao Liu , Xiaoyao Li Subject: [PULL 20/27] hw/core/machine: Remove hw_compat_2_5[] array Date: Wed, 28 May 2025 12:05:00 +0200 Message-ID: <20250528100507.313906-21-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748426946332116600 From: Philippe Mathieu-Daud=C3=A9 The hw_compat_2_5[] array was only used by the pc-q35-2.5 and pc-i440fx-2.5 machines, which got removed. Remove it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Zhao Liu Reviewed-by: Xiaoyao Li Message-ID: <20250512083948.39294-13-philmd@linaro.org> Signed-off-by: Thomas Huth --- include/hw/boards.h | 3 --- hw/core/machine.c | 9 --------- 2 files changed, 12 deletions(-) diff --git a/include/hw/boards.h b/include/hw/boards.h index ab900dacabc..f424b2b5058 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -862,7 +862,4 @@ extern const size_t hw_compat_2_7_len; extern GlobalProperty hw_compat_2_6[]; extern const size_t hw_compat_2_6_len; =20 -extern GlobalProperty hw_compat_2_5[]; -extern const size_t hw_compat_2_5_len; - #endif diff --git a/hw/core/machine.c b/hw/core/machine.c index 15cd2bc3c40..e869821b224 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -285,15 +285,6 @@ GlobalProperty hw_compat_2_6[] =3D { }; const size_t hw_compat_2_6_len =3D G_N_ELEMENTS(hw_compat_2_6); =20 -GlobalProperty hw_compat_2_5[] =3D { - { "isa-fdc", "fallback", "144" }, - { "pvscsi", "x-old-pci-configuration", "on" }, - { "pvscsi", "x-disable-pcie", "on" }, - { "vmxnet3", "x-old-msi-offsets", "on" }, - { "vmxnet3", "x-disable-pcie", "on" }, -}; -const size_t hw_compat_2_5_len =3D G_N_ELEMENTS(hw_compat_2_5); - MachineState *current_machine; =20 static char *machine_get_kernel(Object *obj, Error **errp) --=20 2.49.0 From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748426921; cv=none; d=zohomail.com; s=zohoarc; b=O9eOvoezH5pknHML4xe6lDnA3zRGs4USupdXMxPT7vsBcqz+Bcz1XgxU+27Hr/1YWYmp7nh2m10NssgU8vAQDtJDB8kTN9z5D4h9FJpyu7Qa30Lp3ODwHoPxBtTcj7nPy7Xx7Z/Arrs3Ru29CLEgxPKK6igONrB4yhiVAO6sfsc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748426921; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=OHCI9bUlMc1zhmH226iMPrisn8+fAxn1VK6cPkHMjcY=; b=DSTcDwtnBrk3V29NmjxGlCbpO+aCHXUc3TYK+qj576gyp/aaW/Ek/APo8WTcRWq5zq5EDDb4C3G3aNvxXb+v2IAUjVsUXFtRnE4zRESDek4sHaDwZBfcZOCPZtBMvgwKrl9HAF7j/F8WbNeOE0lMYVDt5k3/jKKF++uJ9NjLasU= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 174842692112396.19761526772027; Wed, 28 May 2025 03:08:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDgZ-0005U4-5h; Wed, 28 May 2025 06:06: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 1uKDg4-0004KM-3i for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:29 -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 1uKDg2-0007H7-Ht for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:27 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-318-qcGn4wf2MW2qnEhokEun_Q-1; Wed, 28 May 2025 06:06:23 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B367318007E1; Wed, 28 May 2025 10:06:22 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 56CAC180049D; Wed, 28 May 2025 10:06:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426785; 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=OHCI9bUlMc1zhmH226iMPrisn8+fAxn1VK6cPkHMjcY=; b=FYWQSGxWUaLfJPupBYWNj20dUQHzv3LR8DLB8NYdl5d6Y/6j6jqto5XPRy91tA5Z9M4v1s NqLyQlfK6/W8ecg+9bmPV9nICE/tT/OgdRVyPZUwvIAwzqeTMOZsWocfeYUhXkx6CCNOrm NdK/rW14YiE4OZxl5s9NpZ3Y4afPgrk= X-MC-Unique: qcGn4wf2MW2qnEhokEun_Q-1 X-Mimecast-MFC-AGG-ID: qcGn4wf2MW2qnEhokEun_Q_1748426782 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Zhao Liu , Xiaoyao Li Subject: [PULL 21/27] hw/scsi/vmw_pvscsi: Remove PVSCSI_COMPAT_OLD_PCI_CONFIGURATION definition Date: Wed, 28 May 2025 12:05:01 +0200 Message-ID: <20250528100507.313906-22-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748426922012116600 From: Philippe Mathieu-Daud=C3=A9 PVSCSI_COMPAT_OLD_PCI_CONFIGURATION was only used by the hw_compat_2_5[] array, via the 'x-old-pci-configuration=3Don' property. We removed all machines using that array, lets remove all the code around PVSCSI_COMPAT_OLD_PCI_CONFIGURATION. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Thomas Huth Reviewed-by: Zhao Liu Reviewed-by: Xiaoyao Li Message-ID: <20250512083948.39294-15-philmd@linaro.org> Signed-off-by: Thomas Huth --- hw/scsi/vmw_pvscsi.c | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c index d5825b67868..34de59a7cf6 100644 --- a/hw/scsi/vmw_pvscsi.c +++ b/hw/scsi/vmw_pvscsi.c @@ -69,17 +69,11 @@ OBJECT_DECLARE_TYPE(PVSCSIState, PVSCSIClass, PVSCSI) =20 =20 /* Compatibility flags for migration */ -#define PVSCSI_COMPAT_OLD_PCI_CONFIGURATION_BIT 0 -#define PVSCSI_COMPAT_OLD_PCI_CONFIGURATION \ - (1 << PVSCSI_COMPAT_OLD_PCI_CONFIGURATION_BIT) #define PVSCSI_COMPAT_DISABLE_PCIE_BIT 1 #define PVSCSI_COMPAT_DISABLE_PCIE \ (1 << PVSCSI_COMPAT_DISABLE_PCIE_BIT) =20 -#define PVSCSI_USE_OLD_PCI_CONFIGURATION(s) \ - ((s)->compat_flags & PVSCSI_COMPAT_OLD_PCI_CONFIGURATION) -#define PVSCSI_MSI_OFFSET(s) \ - (PVSCSI_USE_OLD_PCI_CONFIGURATION(s) ? 0x50 : 0x7c) +#define PVSCSI_MSI_OFFSET (0x7c) #define PVSCSI_EXP_EP_OFFSET (0x40) =20 typedef struct PVSCSIRingInfo { @@ -1110,7 +1104,7 @@ pvscsi_init_msi(PVSCSIState *s) int res; PCIDevice *d =3D PCI_DEVICE(s); =20 - res =3D msi_init(d, PVSCSI_MSI_OFFSET(s), PVSCSI_MSIX_NUM_VECTORS, + res =3D msi_init(d, PVSCSI_MSI_OFFSET, PVSCSI_MSIX_NUM_VECTORS, PVSCSI_USE_64BIT, PVSCSI_PER_VECTOR_MASK, NULL); if (res < 0) { trace_pvscsi_init_msi_fail(res); @@ -1158,15 +1152,11 @@ pvscsi_realizefn(PCIDevice *pci_dev, Error **errp) trace_pvscsi_state("init"); =20 /* PCI subsystem ID, subsystem vendor ID, revision */ - if (PVSCSI_USE_OLD_PCI_CONFIGURATION(s)) { - pci_set_word(pci_dev->config + PCI_SUBSYSTEM_ID, 0x1000); - } else { - pci_set_word(pci_dev->config + PCI_SUBSYSTEM_VENDOR_ID, - PCI_VENDOR_ID_VMWARE); - pci_set_word(pci_dev->config + PCI_SUBSYSTEM_ID, - PCI_DEVICE_ID_VMWARE_PVSCSI); - pci_config_set_revision(pci_dev->config, 0x2); - } + pci_set_word(pci_dev->config + PCI_SUBSYSTEM_VENDOR_ID, + PCI_VENDOR_ID_VMWARE); + pci_set_word(pci_dev->config + PCI_SUBSYSTEM_ID, + PCI_DEVICE_ID_VMWARE_PVSCSI); + pci_config_set_revision(pci_dev->config, 0x2); =20 /* PCI latency timer =3D 255 */ pci_dev->config[PCI_LATENCY_TIMER] =3D 0xff; @@ -1298,8 +1288,6 @@ static const VMStateDescription vmstate_pvscsi =3D { =20 static const Property pvscsi_properties[] =3D { DEFINE_PROP_UINT8("use_msg", PVSCSIState, use_msg, 1), - DEFINE_PROP_BIT("x-old-pci-configuration", PVSCSIState, compat_flags, - PVSCSI_COMPAT_OLD_PCI_CONFIGURATION_BIT, false), DEFINE_PROP_BIT("x-disable-pcie", PVSCSIState, compat_flags, PVSCSI_COMPAT_DISABLE_PCIE_BIT, false), }; --=20 2.49.0 From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748426835; cv=none; d=zohomail.com; s=zohoarc; b=aXqjSbpnnlmveImAlIJ87ThKGvfdxBCYcDlSaf+d8btSOmOC5No5GY+t17clbQVpc7mzlxWbdB9GdDmkdkuZqA8jcy9KJAaVwOFwOjZFSXidDB0y5pISHAm+IyZN+cPleXtIj2YpHA0TrBEShqFMryJCfhA+JYzkK7q7AXTmQ3c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748426835; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=w56H/ZiBqfsqtT6hrO28JZqCjilGvXll/+3BUcPwYmU=; b=M6EInTnHtcUeSJZoM6bTtrJI01N4WQ1SYgGFDISGaZaC4ShF3NAoljKmFrEg2f0BYgZY6uTcAsNaQTtWi7D1/Lx6iQxP/d4X+zjeADc6vOxy07LNNag8ta0vt3fVE4t6AjUj705jFfEYqEfXVRnmy6b/Y4UJDnNcZe6TICujwZ8= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1748426835860245.14463303103116; Wed, 28 May 2025 03:07:15 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDgT-00058p-9G; Wed, 28 May 2025 06:06:53 -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 1uKDg9-0004P2-AD for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:35 -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 1uKDg7-0007I6-EH for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:32 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-474-klHbmcc2OD6FpRWcgaWWfQ-1; Wed, 28 May 2025 06:06:27 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4AE671800446; Wed, 28 May 2025 10:06:26 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5F5CC180049D; Wed, 28 May 2025 10:06:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426790; 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=w56H/ZiBqfsqtT6hrO28JZqCjilGvXll/+3BUcPwYmU=; b=AHW5URdj0+G3fJYSc9Lv3+uKQjw+nBwg8wRxZt68w+6NEh8pLH8du9NwMy8sR3mzBY2dwI vy/Cvn3nSom8pZowc3zuik4OpaQdp9XOienm1lWtWlUfQMRnfWgSksAk3/57E/6wCM+av+ CaH/PC1sWWKAnIKoJ40bDy6EzKYUgwo= X-MC-Unique: klHbmcc2OD6FpRWcgaWWfQ-1 X-Mimecast-MFC-AGG-ID: klHbmcc2OD6FpRWcgaWWfQ_1748426786 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Zhao Liu , Xiaoyao Li Subject: [PULL 22/27] hw/scsi/vmw_pvscsi: Remove PVSCSI_COMPAT_DISABLE_PCIE_BIT definition Date: Wed, 28 May 2025 12:05:02 +0200 Message-ID: <20250528100507.313906-23-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748426836919116600 From: Philippe Mathieu-Daud=C3=A9 PVSCSI_COMPAT_DISABLE_PCIE_BIT was only used by the hw_compat_2_5[] array, via the 'x-disable-pcie=3Don' property. We removed all machines using that array, lets remove all the code around PVSCSI_COMPAT_DISABLE_PCIE_BIT, including the now unused PVSCSIState::compat_flags field. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Thomas Huth Reviewed-by: Zhao Liu Reviewed-by: Xiaoyao Li Message-ID: <20250512083948.39294-16-philmd@linaro.org> Signed-off-by: Thomas Huth --- hw/scsi/vmw_pvscsi.c | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c index 34de59a7cf6..e163023d14c 100644 --- a/hw/scsi/vmw_pvscsi.c +++ b/hw/scsi/vmw_pvscsi.c @@ -68,11 +68,6 @@ struct PVSCSIClass { OBJECT_DECLARE_TYPE(PVSCSIState, PVSCSIClass, PVSCSI) =20 =20 -/* Compatibility flags for migration */ -#define PVSCSI_COMPAT_DISABLE_PCIE_BIT 1 -#define PVSCSI_COMPAT_DISABLE_PCIE \ - (1 << PVSCSI_COMPAT_DISABLE_PCIE_BIT) - #define PVSCSI_MSI_OFFSET (0x7c) #define PVSCSI_EXP_EP_OFFSET (0x40) =20 @@ -123,8 +118,6 @@ struct PVSCSIState { uint8_t msi_used; /* For migration compatibility = */ PVSCSIRingInfo rings; /* Data transfer rings manager = */ uint32_t resetting; /* Reset in progress = */ - - uint32_t compat_flags; }; =20 typedef struct PVSCSIRequest { @@ -1224,21 +1217,8 @@ pvscsi_post_load(void *opaque, int version_id) return 0; } =20 -static bool pvscsi_vmstate_need_pcie_device(void *opaque) -{ - PVSCSIState *s =3D PVSCSI(opaque); - - return !(s->compat_flags & PVSCSI_COMPAT_DISABLE_PCIE); -} - -static bool pvscsi_vmstate_test_pci_device(void *opaque, int version_id) -{ - return !pvscsi_vmstate_need_pcie_device(opaque); -} - static const VMStateDescription vmstate_pvscsi_pcie_device =3D { .name =3D "pvscsi/pcie", - .needed =3D pvscsi_vmstate_need_pcie_device, .fields =3D (const VMStateField[]) { VMSTATE_PCI_DEVICE(parent_obj, PVSCSIState), VMSTATE_END_OF_LIST() @@ -1252,9 +1232,6 @@ static const VMStateDescription vmstate_pvscsi =3D { .pre_save =3D pvscsi_pre_save, .post_load =3D pvscsi_post_load, .fields =3D (const VMStateField[]) { - VMSTATE_STRUCT_TEST(parent_obj, PVSCSIState, - pvscsi_vmstate_test_pci_device, 0, - vmstate_pci_device, PCIDevice), VMSTATE_UINT8(msi_used, PVSCSIState), VMSTATE_UINT32(resetting, PVSCSIState), VMSTATE_UINT64(reg_interrupt_status, PVSCSIState), @@ -1288,19 +1265,14 @@ static const VMStateDescription vmstate_pvscsi =3D { =20 static const Property pvscsi_properties[] =3D { DEFINE_PROP_UINT8("use_msg", PVSCSIState, use_msg, 1), - DEFINE_PROP_BIT("x-disable-pcie", PVSCSIState, compat_flags, - PVSCSI_COMPAT_DISABLE_PCIE_BIT, false), }; =20 static void pvscsi_realize(DeviceState *qdev, Error **errp) { PVSCSIClass *pvs_c =3D PVSCSI_GET_CLASS(qdev); PCIDevice *pci_dev =3D PCI_DEVICE(qdev); - PVSCSIState *s =3D PVSCSI(qdev); =20 - if (!(s->compat_flags & PVSCSI_COMPAT_DISABLE_PCIE)) { - pci_dev->cap_present |=3D QEMU_PCI_CAP_EXPRESS; - } + pci_dev->cap_present |=3D QEMU_PCI_CAP_EXPRESS; =20 pvs_c->parent_dc_realize(qdev, errp); } --=20 2.49.0 From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748426928; cv=none; d=zohomail.com; s=zohoarc; b=YUsOmG63CwcqfrApNY8B5NeLo4KJHNumijXPFI+nlmUpuC50vq+OVic6vuT4f/dDt1uybhXUbzpW/NmGa5Drlc5BhUwOOE/Z453Il4A0Yjjv0Yntent1HSlvuulYBS+1oQNHr4W/YFRufSl0UnAZNLdrlAzI0UaTrHJMWMpJ5/w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748426928; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=0LUMQ2s0adqb0824GaQ5lu0r6aD3qTFWNdBDBR5nDao=; b=OJfVNKJN48HJV4cE5fxMsWqZszPSDPs7wADxsfoGZSJ07R7nbizaRxetzCytwLZ+e6FFhrtE/Q4TECr8Q9AUsdUrbmIU1DeZpAhG+aLNDItiPSxuFleEegCAnANSNZWjNe3m+mYbDJnKrCsh7yXc00MTdsVpJR/X5np1+/2fkZk= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1748426928360784.8392369263969; Wed, 28 May 2025 03:08:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDgd-0005p8-3S; Wed, 28 May 2025 06:07:03 -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 1uKDgO-0004rG-Iz for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:48 -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 1uKDgI-0007Iy-Ni for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:48 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-644-LWuLtyb_N0y3oYho6EwZVg-1; Wed, 28 May 2025 06:06:31 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E38551800258; Wed, 28 May 2025 10:06:29 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D6EB7180049D; Wed, 28 May 2025 10:06:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426795; 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=0LUMQ2s0adqb0824GaQ5lu0r6aD3qTFWNdBDBR5nDao=; b=ac4xDmL2+iDgtmGiRwklVyzFapuQ2+YzfY88fEdaoFWtM4/JanmNuEWDSZHhFmwYPZmXU0 BBc589xBBldk110keZa8B9uP8uiK41Dse4ZkhvAudspX+AYQJgH4NXoefyzcaxGF8452Qn r8Y8ueNQd6Bwex4VYlFnypK1WK0tNaE= X-MC-Unique: LWuLtyb_N0y3oYho6EwZVg-1 X-Mimecast-MFC-AGG-ID: LWuLtyb_N0y3oYho6EwZVg_1748426790 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Zhao Liu , Xiaoyao Li Subject: [PULL 23/27] hw/scsi/vmw_pvscsi: Convert DeviceRealize -> InstanceInit Date: Wed, 28 May 2025 12:05:03 +0200 Message-ID: <20250528100507.313906-24-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748426930336116600 From: Philippe Mathieu-Daud=C3=A9 Simplify replacing pvscsi_realize() by pvscsi_instance_init(), removing the need for device_class_set_parent_realize(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Zhao Liu Reviewed-by: Xiaoyao Li Message-ID: <20250512083948.39294-17-philmd@linaro.org> Signed-off-by: Thomas Huth --- hw/scsi/vmw_pvscsi.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c index e163023d14c..7c98b1b8ea6 100644 --- a/hw/scsi/vmw_pvscsi.c +++ b/hw/scsi/vmw_pvscsi.c @@ -1267,21 +1267,15 @@ static const Property pvscsi_properties[] =3D { DEFINE_PROP_UINT8("use_msg", PVSCSIState, use_msg, 1), }; =20 -static void pvscsi_realize(DeviceState *qdev, Error **errp) +static void pvscsi_instance_init(Object *obj) { - PVSCSIClass *pvs_c =3D PVSCSI_GET_CLASS(qdev); - PCIDevice *pci_dev =3D PCI_DEVICE(qdev); - - pci_dev->cap_present |=3D QEMU_PCI_CAP_EXPRESS; - - pvs_c->parent_dc_realize(qdev, errp); + PCI_DEVICE(obj)->cap_present |=3D QEMU_PCI_CAP_EXPRESS; } =20 static void pvscsi_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); PCIDeviceClass *k =3D PCI_DEVICE_CLASS(klass); - PVSCSIClass *pvs_k =3D PVSCSI_CLASS(klass); HotplugHandlerClass *hc =3D HOTPLUG_HANDLER_CLASS(klass); =20 k->realize =3D pvscsi_realizefn; @@ -1290,8 +1284,6 @@ static void pvscsi_class_init(ObjectClass *klass, con= st void *data) k->device_id =3D PCI_DEVICE_ID_VMWARE_PVSCSI; k->class_id =3D PCI_CLASS_STORAGE_SCSI; k->subsystem_id =3D 0x1000; - device_class_set_parent_realize(dc, pvscsi_realize, - &pvs_k->parent_dc_realize); device_class_set_legacy_reset(dc, pvscsi_reset); dc->vmsd =3D &vmstate_pvscsi; device_class_set_props(dc, pvscsi_properties); @@ -1306,6 +1298,7 @@ static const TypeInfo pvscsi_info =3D { .class_size =3D sizeof(PVSCSIClass), .instance_size =3D sizeof(PVSCSIState), .class_init =3D pvscsi_class_init, + .instance_init =3D pvscsi_instance_init, .interfaces =3D (const InterfaceInfo[]) { { TYPE_HOTPLUG_HANDLER }, { INTERFACE_PCIE_DEVICE }, --=20 2.49.0 From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748426901; cv=none; d=zohomail.com; s=zohoarc; b=hl8VJRS2+Of3u+0Bwyi3f/yOutF92R1m/Y9YwoT9zFaA40x7zDKjecERwXzaf7D0c7q/NlUeu+eXIF0gV38B92ohf0eONr0XBsQgzmQTdTwNNNSybmsxEX1FEhJUDYnJpOR7T9ztzd4V6JxGYof0vKVDXKk6KUMfKjJqQWjlUQQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748426901; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=i4s4nDeinyoCVN53qRh52ZsiWvCPH0QRvFdBdGrsLMM=; b=OuzVTnO1xTYWVq5zK4UT07uamZHP4dtTsSbN1qOuhquO30RVk4OWXR8GX4kRCtBpzApOIKYqpZ+2rTWCc6cKOYJzvjVS+0GjndnxgExlGsQzqjRPV6WUU/KDNbT2jDSQYqStenft98mKZMPEAw7EPpObPsIAqI1VPW25oI6lVKM= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1748426901596799.8901350305814; Wed, 28 May 2025 03:08:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDgd-0005xk-RE; Wed, 28 May 2025 06:07:03 -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 1uKDgO-0004rJ-Jk for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:48 -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 1uKDgL-0007JD-94 for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:48 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-319-WGmg8QXLPbO2IP_ZpkaAiA-1; Wed, 28 May 2025 06:06:34 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id F085F1800261; Wed, 28 May 2025 10:06:33 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A0846180049D; Wed, 28 May 2025 10:06:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426798; 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=i4s4nDeinyoCVN53qRh52ZsiWvCPH0QRvFdBdGrsLMM=; b=bwMWvY2gFWG3XwaTk0To00As95pI9IKTNGzMnqRYf63JeUhDNLAdSw85nSj8QJO9CV7gdF L2mvvL1fxHQ6zJSBCziRetBooKvkPtdZjPOmQ1E04RIsMN+y9//WCMEwPVnhbC24zUsXEX BzdzIFgxbUVYIZxLcw0MleDZXQlp9Vw= X-MC-Unique: WGmg8QXLPbO2IP_ZpkaAiA-1 X-Mimecast-MFC-AGG-ID: WGmg8QXLPbO2IP_ZpkaAiA_1748426794 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Zhao Liu , Xiaoyao Li Subject: [PULL 24/27] hw/net/vmxnet3: Remove VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS definition Date: Wed, 28 May 2025 12:05:04 +0200 Message-ID: <20250528100507.313906-25-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748426903771116600 From: Philippe Mathieu-Daud=C3=A9 VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS was only used by the hw_compat_2_5[] array, via the 'x-old-msi-offsets=3Don' property. We removed all machines using that array, lets remove all the code around VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Zhao Liu Reviewed-by: Xiaoyao Li Message-ID: <20250512083948.39294-18-philmd@linaro.org> Signed-off-by: Thomas Huth --- hw/net/vmxnet3.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 83d942af179..3cf5d71f478 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -42,18 +42,13 @@ #define VMXNET3_MSIX_BAR_SIZE 0x2000 =20 /* Compatibility flags for migration */ -#define VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS_BIT 0 -#define VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS \ - (1 << VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS_BIT) #define VMXNET3_COMPAT_FLAG_DISABLE_PCIE_BIT 1 #define VMXNET3_COMPAT_FLAG_DISABLE_PCIE \ (1 << VMXNET3_COMPAT_FLAG_DISABLE_PCIE_BIT) =20 #define VMXNET3_EXP_EP_OFFSET (0x48) -#define VMXNET3_MSI_OFFSET(s) \ - ((s)->compat_flags & VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS ? 0x50 : 0x84) -#define VMXNET3_MSIX_OFFSET(s) \ - ((s)->compat_flags & VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS ? 0 : 0x9c) +#define VMXNET3_MSI_OFFSET (0x84) +#define VMXNET3_MSIX_OFFSET (0x9c) #define VMXNET3_DSN_OFFSET (0x100) =20 #define VMXNET3_BAR0_IDX (0) @@ -61,8 +56,7 @@ #define VMXNET3_MSIX_BAR_IDX (2) =20 #define VMXNET3_OFF_MSIX_TABLE (0x000) -#define VMXNET3_OFF_MSIX_PBA(s) \ - ((s)->compat_flags & VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS ? 0x800 : 0x1= 000) +#define VMXNET3_OFF_MSIX_PBA (0x1000) =20 /* Link speed in Mbps should be shifted by 16 */ #define VMXNET3_LINK_SPEED (1000 << 16) @@ -2122,8 +2116,8 @@ vmxnet3_init_msix(VMXNET3State *s) &s->msix_bar, VMXNET3_MSIX_BAR_IDX, VMXNET3_OFF_MSIX_TABLE, &s->msix_bar, - VMXNET3_MSIX_BAR_IDX, VMXNET3_OFF_MSIX_PBA(s), - VMXNET3_MSIX_OFFSET(s), NULL); + VMXNET3_MSIX_BAR_IDX, VMXNET3_OFF_MSIX_PBA, + VMXNET3_MSIX_OFFSET, NULL); =20 if (0 > res) { VMW_WRPRN("Failed to initialize MSI-X, error %d", res); @@ -2221,7 +2215,7 @@ static void vmxnet3_pci_realize(PCIDevice *pci_dev, E= rror **errp) /* Interrupt pin A */ pci_dev->config[PCI_INTERRUPT_PIN] =3D 0x01; =20 - ret =3D msi_init(pci_dev, VMXNET3_MSI_OFFSET(s), VMXNET3_MAX_NMSIX_INT= RS, + ret =3D msi_init(pci_dev, VMXNET3_MSI_OFFSET, VMXNET3_MAX_NMSIX_INTRS, VMXNET3_USE_64BIT, VMXNET3_PER_VECTOR_MASK, NULL); /* Any error other than -ENOTSUP(board's MSI support is broken) * is a programming error. Fall back to INTx silently on -ENOTSUP */ @@ -2472,8 +2466,6 @@ static const VMStateDescription vmstate_vmxnet3 =3D { =20 static const Property vmxnet3_properties[] =3D { DEFINE_NIC_PROPERTIES(VMXNET3State, conf), - DEFINE_PROP_BIT("x-old-msi-offsets", VMXNET3State, compat_flags, - VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS_BIT, false), DEFINE_PROP_BIT("x-disable-pcie", VMXNET3State, compat_flags, VMXNET3_COMPAT_FLAG_DISABLE_PCIE_BIT, false), }; --=20 2.49.0 From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748427134; cv=none; d=zohomail.com; s=zohoarc; b=l+JFs+yGvLKRwJ/hz/yCDSeOVtBFy7xUCANZX07NZvhMdO+C2nUCeVgQ/AuqSFlCjvRe/DU+efKP0gPHhjgRSspKtELP+Et9FfO9pAbaBdQ3XoFHX35pBL/3Jovu9hXMq7qZKRCgsXlbSH9Znx4AJ0KaWvTUyPrf5ZnATGjVUIY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748427134; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=SjKpU/nYfX8v4Il/bQ/hdOg2oevNS7Qmgj1ruv54cLk=; b=dUXPrS9HLcDj9ehXlGk/UH2iOVLY7B1Ze0DkfHs9BV4u7vMkZzL0lgMZBr9ofZU4t9N2Ikv7yKbHdsvti7m8S6YEVcu5z1wvWT5PoMjX8X+TAKO+A4atpeRy9Y1imcF9DAUsoYjomgxuvo7jsmkzYsVK3GGV8q5Fvsl3slN9+0w= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1748427134572588.307143233311; Wed, 28 May 2025 03:12:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDgb-0005lN-UL; Wed, 28 May 2025 06:07:03 -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 1uKDgO-0004rI-JR for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:48 -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 1uKDgL-0007JT-97 for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:48 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-122-7gMxvagKMqGE4NouRKzgsQ-1; Wed, 28 May 2025 06:06:39 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 14A1F18004AD; Wed, 28 May 2025 10:06:38 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id ADF69180049D; Wed, 28 May 2025 10:06:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426802; 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=SjKpU/nYfX8v4Il/bQ/hdOg2oevNS7Qmgj1ruv54cLk=; b=M7UkAYzKimP4/5ONUBqmnp5UXQ5sLUD20712zOar0rUYlTkqKCK5wSM0I66+EX1l9hXKz2 xssXo7l99DIBsfHgA4m4c5CIxggJJsliwbKiRD+lbUMoG7ajd4L3FAMoDHZ6U8cgDTuKj3 en9iJ07Ww2Hdqe6nuLa9ociuru9eyPc= X-MC-Unique: 7gMxvagKMqGE4NouRKzgsQ-1 X-Mimecast-MFC-AGG-ID: 7gMxvagKMqGE4NouRKzgsQ_1748426798 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Zhao Liu , Xiaoyao Li Subject: [PULL 25/27] hw/net/vmxnet3: Remove VMXNET3_COMPAT_FLAG_DISABLE_PCIE definition Date: Wed, 28 May 2025 12:05:05 +0200 Message-ID: <20250528100507.313906-26-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748427135517116600 From: Philippe Mathieu-Daud=C3=A9 VMXNET3_COMPAT_FLAG_DISABLE_PCIE was only used by the hw_compat_2_5[] array, via the 'x-disable-pcie=3Don' property. We removed all machines using that array, lets remove all the code around VMXNET3_COMPAT_FLAG_DISABLE_PCIE. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Zhao Liu Reviewed-by: Xiaoyao Li Message-ID: <20250512083948.39294-19-philmd@linaro.org> Signed-off-by: Thomas Huth --- hw/net/vmxnet3.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 3cf5d71f478..d080fe9b38a 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -41,11 +41,6 @@ #define PCI_DEVICE_ID_VMWARE_VMXNET3_REVISION 0x1 #define VMXNET3_MSIX_BAR_SIZE 0x2000 =20 -/* Compatibility flags for migration */ -#define VMXNET3_COMPAT_FLAG_DISABLE_PCIE_BIT 1 -#define VMXNET3_COMPAT_FLAG_DISABLE_PCIE \ - (1 << VMXNET3_COMPAT_FLAG_DISABLE_PCIE_BIT) - #define VMXNET3_EXP_EP_OFFSET (0x48) #define VMXNET3_MSI_OFFSET (0x84) #define VMXNET3_MSIX_OFFSET (0x9c) @@ -2466,8 +2461,6 @@ static const VMStateDescription vmstate_vmxnet3 =3D { =20 static const Property vmxnet3_properties[] =3D { DEFINE_NIC_PROPERTIES(VMXNET3State, conf), - DEFINE_PROP_BIT("x-disable-pcie", VMXNET3State, compat_flags, - VMXNET3_COMPAT_FLAG_DISABLE_PCIE_BIT, false), }; =20 static void vmxnet3_realize(DeviceState *qdev, Error **errp) @@ -2476,9 +2469,7 @@ static void vmxnet3_realize(DeviceState *qdev, Error = **errp) PCIDevice *pci_dev =3D PCI_DEVICE(qdev); VMXNET3State *s =3D VMXNET3(qdev); =20 - if (!(s->compat_flags & VMXNET3_COMPAT_FLAG_DISABLE_PCIE)) { - pci_dev->cap_present |=3D QEMU_PCI_CAP_EXPRESS; - } + pci_dev->cap_present |=3D QEMU_PCI_CAP_EXPRESS; =20 vc->parent_dc_realize(qdev, errp); } --=20 2.49.0 From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748426855; cv=none; d=zohomail.com; s=zohoarc; b=njwrw9UTfJ2r5jShyyLgHPAhB6YFPROs5OurBtH0nQDSZyciCRO4FsAiiLpGYKZyCK+oNTV9/2K300yaqnh0sYurES72NGxaLZo61YMHt5wuGdI85ubkoSFPr0/lMBXAbPuRHd0+u+Vgs1iWLpQdVcXRQKrjncfKgwBixvh0itk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748426855; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=boKqtfV5mjhcV+igiCQ1wF54BVqNnBj3nxcXDBLUNjM=; b=RfNJntNlTS5yfO9nRPJ/vBGk0hISp07/kAv3YPaWCg/sbGYiVhi7KIwBYPmS4clEevLaX6QhNs+fjxghmY16olqNg2fkXmMIZ2vM8lg+grkw0Xz3/e+EhUM1blxZxgsRPnFg2CO+Oh/6X8maBSb/vu2cRTpqsEdsFVud07sBFtg= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1748426855856514.4240299839407; Wed, 28 May 2025 03:07:35 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDgZ-0005cW-Ix; Wed, 28 May 2025 06:07: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 1uKDgO-0004rF-ID for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:48 -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 1uKDgM-0007Ju-Qq for qemu-devel@nongnu.org; Wed, 28 May 2025 06:06:48 -0400 Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-515-tWPM_ZkvMBCK34un7kEI_w-1; Wed, 28 May 2025 06:06:42 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A5DB0195608B; Wed, 28 May 2025 10:06:41 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C5E6F180049D; Wed, 28 May 2025 10:06:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426806; 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=boKqtfV5mjhcV+igiCQ1wF54BVqNnBj3nxcXDBLUNjM=; b=Qpw3PSwgkDsN91Ev1lqVjVQ+yxAsUJuZc/oVrbnn319TWkn+d6x3b3Uv3YHNq2NjMKiX9S Et6Nbi66j77TsTrEdTM/Gn5Wq/JCmyAo1jmsVUGSdgmMoOazALze2BUEu5aBVuwEub5EAR goIOT8r9SJoHuwtRCDgg91b4USwg/vc= X-MC-Unique: tWPM_ZkvMBCK34un7kEI_w-1 X-Mimecast-MFC-AGG-ID: tWPM_ZkvMBCK34un7kEI_w_1748426801 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Zhao Liu , Xiaoyao Li Subject: [PULL 26/27] hw/net/vmxnet3: Merge DeviceRealize in InstanceInit Date: Wed, 28 May 2025 12:05:06 +0200 Message-ID: <20250528100507.313906-27-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748426856949116600 From: Philippe Mathieu-Daud=C3=A9 Simplify merging vmxnet3_realize() within vmxnet3_instance_init(), removing the need for device_class_set_parent_realize(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Zhao Liu Reviewed-by: Xiaoyao Li Message-ID: <20250512083948.39294-20-philmd@linaro.org> Signed-off-by: Thomas Huth --- hw/net/vmxnet3.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index d080fe9b38a..7c0ca56b7c0 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -2238,6 +2238,7 @@ static void vmxnet3_instance_init(Object *obj) device_add_bootindex_property(obj, &s->conf.bootindex, "bootindex", "/ethernet-phy@0", DEVICE(obj)); + PCI_DEVICE(obj)->cap_present |=3D QEMU_PCI_CAP_EXPRESS; } =20 static void vmxnet3_pci_uninit(PCIDevice *pci_dev) @@ -2463,22 +2464,10 @@ static const Property vmxnet3_properties[] =3D { DEFINE_NIC_PROPERTIES(VMXNET3State, conf), }; =20 -static void vmxnet3_realize(DeviceState *qdev, Error **errp) -{ - VMXNET3Class *vc =3D VMXNET3_DEVICE_GET_CLASS(qdev); - PCIDevice *pci_dev =3D PCI_DEVICE(qdev); - VMXNET3State *s =3D VMXNET3(qdev); - - pci_dev->cap_present |=3D QEMU_PCI_CAP_EXPRESS; - - vc->parent_dc_realize(qdev, errp); -} - static void vmxnet3_class_init(ObjectClass *class, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(class); PCIDeviceClass *c =3D PCI_DEVICE_CLASS(class); - VMXNET3Class *vc =3D VMXNET3_DEVICE_CLASS(class); =20 c->realize =3D vmxnet3_pci_realize; c->exit =3D vmxnet3_pci_uninit; @@ -2489,8 +2478,6 @@ static void vmxnet3_class_init(ObjectClass *class, co= nst void *data) c->class_id =3D PCI_CLASS_NETWORK_ETHERNET; c->subsystem_vendor_id =3D PCI_VENDOR_ID_VMWARE; c->subsystem_id =3D PCI_DEVICE_ID_VMWARE_VMXNET3; - device_class_set_parent_realize(dc, vmxnet3_realize, - &vc->parent_dc_realize); dc->desc =3D "VMWare Paravirtualized Ethernet v3"; device_class_set_legacy_reset(dc, vmxnet3_qdev_reset); dc->vmsd =3D &vmstate_vmxnet3; --=20 2.49.0 From nobody Mon Oct 27 19:42:30 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1748427065; cv=none; d=zohomail.com; s=zohoarc; b=HgKEFGZotEgiPwxj4MuFQmU10dBCDmUZdEhonNS9yX7ky0fmSDtmqjUPsFvHtQV7k8mHBUwEMS6ZDQ8mNL6zdsdNoXQj/Tg0V41qdPbgcGw9h20n11Zyfu7FQaiDGEYbEqFrH1RNaoisbiz2o5WbTAzjFmzRi8gZJgpl9wy1Cgo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748427065; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=syN9efIB0hNvD8iCymDl24Tj7OZV+bCEsnzxf8NWRq8=; b=Cbw3P3whb0e++r/E6ur6PNXXnKqRzbLq1r0FIKMpteO0zx8Rp8cO9mfRd7GH4Sh5ehN7YSuTYcPOMGkhnUFa3grvYzY8o6Zcb1QFcc2KxwWCErHQHBBvGbT4eRpzScWJZ+ajZBP6o5wSwU7iZpU6LiCyUFgnIpuMU85b28abpnc= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1748427065129479.0874808281884; Wed, 28 May 2025 03:11:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKDhe-0000a1-Mo; Wed, 28 May 2025 06:08:08 -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 1uKDhV-0000H7-9n for qemu-devel@nongnu.org; Wed, 28 May 2025 06:08:00 -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 1uKDhR-0007QT-Vj for qemu-devel@nongnu.org; Wed, 28 May 2025 06:07:56 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-681-29m2Hoe8PBSBrOA6R8DIyA-1; Wed, 28 May 2025 06:06:45 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id F37C41800446; Wed, 28 May 2025 10:06:44 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.110]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2C775180049D; Wed, 28 May 2025 10:06:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748426872; 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=syN9efIB0hNvD8iCymDl24Tj7OZV+bCEsnzxf8NWRq8=; b=ITmfqU2hqIk7mIBxbyEdYWfeHIztR+qjcoX+pO6ZbefGPHwjirAMBbw8i6YNypwaVCajEk vzUlmva9RpMQCnaudjnzLtwjVozLNy4O22Gj+cvDv8vBOc/cD8zYOad6kmCP63QyF06eWJ xcYF1X/uprPzr7JLPEDM0rT8ZtBnL8s= X-MC-Unique: 29m2Hoe8PBSBrOA6R8DIyA-1 X-Mimecast-MFC-AGG-ID: 29m2Hoe8PBSBrOA6R8DIyA_1748426805 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Matheus Tavares Bernardino , Juraj Marcin Subject: [PULL 27/27] tests/unit/test-util-sockets: fix mem-leak on error object Date: Wed, 28 May 2025 12:05:07 +0200 Message-ID: <20250528100507.313906-28-thuth@redhat.com> In-Reply-To: <20250528100507.313906-1-thuth@redhat.com> References: <20250528100507.313906-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) DKIMWL_WL_HIGH=-2.907, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1748427071311116600 Content-Type: text/plain; charset="utf-8" From: Matheus Tavares Bernardino The test fails with --enable-asan as the error struct is never freed. In the case where the test expects a success but it fails, let's also report the error for debugging (it will be freed internally). Fixes 316e8ee8d6 ("util/qemu-sockets: Refactor inet_parse() to use QemuOpts= ") Signed-off-by: Matheus Tavares Bernardino Reviewed-by: Juraj Marcin Message-ID: <518d94c7db20060b2a086cf55ee9bffab992a907.1748280011.git.matheu= s.bernardino@oss.qualcomm.com> Signed-off-by: Thomas Huth --- tests/unit/test-util-sockets.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/unit/test-util-sockets.c b/tests/unit/test-util-sockets.c index 8492f4d68f2..ee66d727c38 100644 --- a/tests/unit/test-util-sockets.c +++ b/tests/unit/test-util-sockets.c @@ -341,8 +341,12 @@ static void inet_parse_test_helper(const char *str, int rc =3D inet_parse(&addr, str, &error); =20 if (success) { + if (error) { + error_report_err(error); + } g_assert_cmpint(rc, =3D=3D, 0); } else { + error_free(error); g_assert_cmpint(rc, <, 0); } if (exp_addr !=3D NULL) { --=20 2.49.0