From patchwork Wed May 28 10:04:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 892958 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e53:0:b0:3a3:61c9:c5d4 with SMTP id j19csp2113755wrz; Wed, 28 May 2025 03:07:04 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVqaz15meYkS1cExO9Ot5GeqJgPO14RxTmgRuhI3QPZtSdMdRMqTuYW9EkWM5WxDOhKOMAHaQ==@linaro.org X-Google-Smtp-Source: AGHT+IFFWzXHfjpGIpVJqtks72QSG5/HSc8CYSj0aj7K7v4B+VuKyDOrGupQBB3cEZHtaHRFVugB X-Received: by 2002:a05:622a:53c9:b0:499:5503:7b2c with SMTP id d75a77b69052e-49f480c9160mr281837621cf.43.1748426823875; Wed, 28 May 2025 03:07:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1748426823; cv=none; d=google.com; s=arc-20240605; b=WwDaVME6MkoozRrGtN6tgRGGM2PrKsdpGlkiHDs/tzMMoRFAQ9CZ92sYoLmA4F5lfH c4Q8ZzIVsukuZDoukvYZL6sW6QK502dY4xN41zISPQrHwp7lwz9dAepapIsbE3hGME05 e+lTXm+BLc2ymRZ9IybKFG/awCfCOn2lfJtXR+Y7ZM+hivuqjZeRGeNKf3Fgqph9JN87 iQ0SQrWPh1CrbZ7vu8BZeKfPaScuOLVAjnc6CCjnSiT6qPQNMknJR3bNr9m40bZQkhxx mt3J3RWadcA8VsFBqKGr6vIFDvaqikzHpHVUE/IFmFtvx5g9uGD/trezpb3TI5j4CDRi bFHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=P4BcFeHZdhTzXIhCu3ar2uLEb5iCDSRwkE8Rgxvkcgk=; fh=7aRxDtZP1Aq9vpCPLaCABi2Dx/PnTfPUrTuYqgFFRwg=; b=ffOhmPcwSOafMyNEYzZZMG2oOz8r382PXlL38LhwxLGuNJ6fYX9TsnrBESThshDAa0 OikUyM0Cns18yIbSNQFDQMSz+6k9W0Aq1/BqQ6jWcyWpb4k78ajCsNJvxiY/BQ4OpC28 jJEPu7vBEHe7zqhuqRg/L2H1XZKEgpSM9b8cU3l43PmGAsTS8PDkx1zDAYEh/KoXPYaz rZLjeAxb+P1EsQ2NI4nsSjiaxogLOQBE/oUHiEkwl3nlu5ux5/p0pHbj8Uzt4HHoVa+z wYARMDiD7f/zWsyDk7IN+9GHAMt8MnwfGg+PSLPDkyUp6Oc4pK26WjtyEmZJEafQtkD2 usAQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gLOEN6F0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-4a3c80e7217si9116551cf.349.2025.05.28.03.07.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 May 2025 03:07:03 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gLOEN6F0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com 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 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= 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 X-MC-Unique: pMATDg3INvygN3Hne6Dhmw-1 X-Mimecast-MFC-AGG-ID: pMATDg3INvygN3Hne6Dhmw_1748426743 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) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Daniel_P=2E_Berrang=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 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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é Reviewed-by: Daniel P. Berrangé 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) DEFINE_I440FX_MACHINE(2, 5); -static void pc_i440fx_machine_2_4_options(MachineClass *m) -{ - PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - - pc_i440fx_machine_2_5_options(m); - m->hw_version = "2.4.0"; - pcmc->broken_reserved_end = 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) } DEFINE_Q35_MACHINE(2, 5); - -static void pc_q35_machine_2_4_options(MachineClass *m) -{ - PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - - pc_q35_machine_2_5_options(m); - m->hw_version = "2.4.0"; - pcmc->broken_reserved_end = 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-cpuid-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); } - /* - * 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=on,npt=on", "pc-i440fx-2.4", - "xlevel", 0x80000008); - } - /* Test feature parsing */ add_feature_test("x86/cpuid/features/plus", "486", "+arat", From patchwork Wed May 28 10:04:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 892957 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e53:0:b0:3a3:61c9:c5d4 with SMTP id j19csp2113746wrz; Wed, 28 May 2025 03:07:03 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXxk7KH9J13E2Rr1vc1FDTphAncVhE641tAGzcFYFcCIV/rB38abcRhOBsmz7haT/agwYgxBw==@linaro.org X-Google-Smtp-Source: AGHT+IGvi8plXpCDGBDQGg2Wnnef1u79OD1scWHYJW7b2q3HdWJfzAe5a37BT4WksLhmGx+DgD1F X-Received: by 2002:a05:622a:248b:b0:476:87dd:16f9 with SMTP id d75a77b69052e-49f4674e681mr283628411cf.18.1748426822815; Wed, 28 May 2025 03:07:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1748426822; cv=none; d=google.com; s=arc-20240605; b=UIdg0d4Ov5ZFKynZ4GmwytnmUWdVdgwSlqTZUdrxx0+Y+sK3pjCTktktkMGuh19rin g5uBvOU9OAS2KIDgWzcT4B6dUAFpFyXBS9xEaLCW0dEg9Lkd0F/ymC0OFksVuwptnXvy De89cy5sg/sAhIynVJDqKHJyP1bYtTx7SUFmajF0EO7Q+O+skCxbaHjitQkO8kN8RQKm tLrjM5LUhwZIq/xuOUYj7piUuYh0EW6VBi1kuW+7EWH1H+YhuZaoHf2zXjuoI09NDF9O Tqb5c/gheY5wL2SADgHIioTO899CW3GfViWGxJFBVNmVqnmDwRDVKHDe9vOIEIBigwNZ hNVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pyumWieLSY7fqHWHrJAxx17qyJlbxZ6HzrKW4tcATRk=; fh=7aRxDtZP1Aq9vpCPLaCABi2Dx/PnTfPUrTuYqgFFRwg=; b=XB9eELsU7GsXbEKqnVfuMNOYsK/Ah+xZaISxNILzWT7Nw0Q/3df/Nhn5npq4jNCK9B 8uvL4Z4HVVRuUnk9Cw4OA3OeAefhbIc4Bd564CRiKZFgrRrlWcLEod65GhjdrIF7YYRR wfPsAV9Fx10OT6BAuccIqp4LSGryA2IyyWIpD3XMOE7zZaRtwezACC6IhS3Whn7cX9Bp zqRg5BVUU/9L1r6CVmhybdTkg2NLXUMayOMMDSyggQdcRbhQ6+0XWnMZa0MYjqDGaZOe N/50va9gO1adYvxFpn40vvxWdzzmAZ4N2Phu+XEtQngSiKdQrj1R3Qtq72vpd70V4K58 Tquw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Z8Oh+2V8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-4a3c7922a45si9355151cf.185.2025.05.28.03.07.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 May 2025 03:07:02 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Z8Oh+2V8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com 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 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= 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 X-MC-Unique: xaFKIUk4MXmAguZUjMcaYQ-1 X-Mimecast-MFC-AGG-ID: xaFKIUk4MXmAguZUjMcaYQ_1748426745 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) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Daniel_P=2E_Berrang=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 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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é Reviewed-by: Daniel P. Berrangé 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; 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, if (machine->device_memory) { uint64_t *val = g_malloc(sizeof(*val)); - uint64_t res_mem_end = machine->device_memory->base; - - if (!pcmc->broken_reserved_end) { - res_mem_end += memory_region_size(&machine->device_memory->mr); - } + uint64_t res_mem_end; if (pcms->cxl_devices_state.is_enabled) { res_mem_end = cxl_resv_end; + } else { + res_mem_end = machine->device_memory->base + + memory_region_size(&machine->device_memory->mr); } *val = cpu_to_le64(ROUND_UP(res_mem_end, 1 * GiB)); fw_cfg_add_file(fw_cfg, "etc/reserved-memory-end", val, sizeof(*val)); @@ -1044,9 +1043,7 @@ uint64_t pc_pci_hole64_start(void) hole64_start = pc_get_cxl_range_end(pcms); } else if (pcmc->has_reserved_memory && (ms->ram_size < ms->maxram_size)) { pc_get_device_memory_range(pcms, &hole64_start, &size); - if (!pcmc->broken_reserved_end) { - hole64_start += size; - } + hole64_start += size; } else { hole64_start = pc_above_4g_end(pcms); } From patchwork Wed May 28 10:04:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 892955 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e53:0:b0:3a3:61c9:c5d4 with SMTP id j19csp2113498wrz; Wed, 28 May 2025 03:06:25 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUHmzXn9G+IPEhPTZQM1oggg3VR4QNFjRrlj/2tfvc/flfKroaDaCiW691/KpE5FPU8GSb6hA==@linaro.org X-Google-Smtp-Source: AGHT+IGm8oKOFjA4yB1QC9rPl9F0wJvmoSlkvZfLTBmJDuIh1oN0F5izdRj9cHqYJtlDyEX1Ossg X-Received: by 2002:a05:6214:20e5:b0:6e2:43d1:5fd0 with SMTP id 6a1803df08f44-6fa9d28be22mr306654686d6.31.1748426785671; Wed, 28 May 2025 03:06:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1748426785; cv=none; d=google.com; s=arc-20240605; b=iqv/wdv8rCsU/PHznKtdQuU8JgcRnZjzOIEk3zO6Pe8u1e8TWpR3cTHdbujWSiNHvT gfdKEmhrEi+n2ODH+k67Z+5CTpVzkt9hewQ0L4yoFhWbi7Lnx9AhW0L64QHmz2ziuPjq nmQ41kMHzH7WA7R5Duj272pthYgGf1V3nglcfyvm9hlbZueUFf0HEB3RWp45VHCIIWcv azY8oVdm70RCoP7ST47SL65qw1EHLeIZj5RTh1Umz9kGlppx6wIF5SykKnA3VOT1HTra lFwie7eaBDbzgUNJ0jkLw8AXxxb3taVxRP31SSQmh2SVJL6efNuxVvQVMJXYX+7PE38Q avQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dKZE1RSoSBOz6DDkalid0XJ7WvsEX48DFl11SRZz3mA=; fh=7aRxDtZP1Aq9vpCPLaCABi2Dx/PnTfPUrTuYqgFFRwg=; b=QAF70RxINQz3bRMVJ6fzdr5dVRpW7ObF+9vVz+ZsV8u+RKWbYTOCT9UTrsVISxaaAL XR+tH8w4C7JBMDVScaYpkL0yB550a3QxoOQNlETkCRVLohf7ee5VrvkxWARJR9VbvNu7 z4FyUoXY8qXc3rx7sqbvLHV+UmLa03XUga9xKlITjduCL0psU/pDlDxA5atLvd54wPh4 d1NQ8DSbfBJUO/YF6uzkagTo87/wCpj89T0f8Ph5JppN4banU9mRI3kguebtqXWWbRHW GeI6U4cKPi3wzrBt8AIEkjrxm0UNd8ndpc9CXlazU7beQ+E8ynGr3umSBFHjPuAOCDfu vC/g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ah+8iJwb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6fac0bbc4d1si9340986d6.318.2025.05.28.03.06.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 May 2025 03:06:25 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ah+8iJwb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com 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 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= 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 X-MC-Unique: qRKwQ3UHM1ScL0Bqup-b5g-1 X-Mimecast-MFC-AGG-ID: qRKwQ3UHM1ScL0Bqup-b5g_1748426750 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) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Daniel_P=2E_Berrang=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 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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é Reviewed-by: Daniel P. Berrangé 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; -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 = G_N_ELEMENTS(pc_compat_2_6); GlobalProperty pc_compat_2_5[] = {}; const size_t pc_compat_2_5_len = G_N_ELEMENTS(pc_compat_2_5); -GlobalProperty pc_compat_2_4[] = { - 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 = 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 From patchwork Wed May 28 10:04:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 892970 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e53:0:b0:3a3:61c9:c5d4 with SMTP id j19csp2114973wrz; Wed, 28 May 2025 03:10:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWMLwd6AUl/MvcGh3x94diBUuK+AZ1l36uMZ229NfPM2ZgaP14QWgkURgLxAuF4YAho9m/srQ==@linaro.org X-Google-Smtp-Source: AGHT+IEA5B4Cbmtfi8IbLdp1Gpj6LdFt8xhONmABAOuX2l0uvcskW+93ouMBk9kmWtwyfzZkbIQI X-Received: by 2002:a05:6214:124e:b0:6f5:ea0:3c1e with SMTP id 6a1803df08f44-6fabf2c4ea0mr24443186d6.23.1748427000509; Wed, 28 May 2025 03:10:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1748427000; cv=none; d=google.com; s=arc-20240605; b=P6meeC+j9E9n3IYJOkvdBUOKc6uss8vcRorr+ov6vwxhJtUKXzJuR3vr1xa8d/tfKi QdqI5fpnAqwGbZmLn86F0QggQO7LN/T1rUnC5F7TjAXgJafSK/ocsItYwrPX+M2Wz6sd P9nktYN7dR3c2T63Cdw9xQaTBIYj27G49YLPs1vJ+m2MRpcM4GUUUDzzUDJBdE1opkhH CXpq8zTyJsr3KC7Nc/hWIm/RDjVfWMjDvX3cm2p7oD0nuvBQZL7mSNsFb+FW3FRLkKE8 ZcekN1ys2r/fXOQFN+0Hg9Qs35tEpteAQK4zQw7Czf39WaKvJtuMkhLdljtiDVI21sUm pQGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tsG/B8VWD10VBEzxymb8JmpD+1O43g2EFYmid+iq6go=; fh=7aRxDtZP1Aq9vpCPLaCABi2Dx/PnTfPUrTuYqgFFRwg=; b=IyWYi6q7gFQ6oW8e6avzkE6crWsCXYrD3+CI5zyeU+ecIaLE1Hrrbuo8Qb1BYpe1dc O+WRzSgX/3oO8yf45/bKdjmY15tMPOpbGCwZL5Gkrl/ICGTHOkHkyCUg0mbcBNvctbFr TyBB7/n6cOaVr3Pwk40Ncb8Pj/lZQ8I0uUvKSxuIYbQsRrWOYMKI6QNHtvhtyo26mt84 J8RXlqi8mm74SfLlz1ZkSl1udiJrgTYR7MWCrCfnZaKKregsMSfOObZpf46W1CxAqZ1H GQS54qYcXiBmSoMllXfRv4q6ERwLPZrN1mSI7WhveKcEz+wL0SGN1sz/rEIx4Kk7aV+t cq5A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hJPXOmpP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6fac0bab6besi9152896d6.220.2025.05.28.03.10.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 May 2025 03:10:00 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hJPXOmpP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com 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 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= 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 X-MC-Unique: mHzLKnmIOSCxqRMoRHHJvg-1 X-Mimecast-MFC-AGG-ID: mHzLKnmIOSCxqRMoRHHJvg_1748426754 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) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Daniel_P=2E_Berrang=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 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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é Reviewed-by: Daniel P. Berrangé 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; -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[] = { }; const size_t hw_compat_2_5_len = G_N_ELEMENTS(hw_compat_2_5); -GlobalProperty hw_compat_2_4[] = { - { "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 = G_N_ELEMENTS(hw_compat_2_4); - MachineState *current_machine; static char *machine_get_kernel(Object *obj, Error **errp) From patchwork Wed May 28 10:04:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 892961 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e53:0:b0:3a3:61c9:c5d4 with SMTP id j19csp2113908wrz; Wed, 28 May 2025 03:07:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWSuzTbDemG/ZAv+m/4EliEM+Kllj/W+NDI8ia2K02ea7eTgj39kHhZfX8Ie7yvL/3gQGqROA==@linaro.org X-Google-Smtp-Source: AGHT+IGKenDgV6WjeGyccGtynOF9B6U5j0X6ph/G/0yjJZmnJDnHfu+LuvlmH4OmuXWKVHTdZ/AI X-Received: by 2002:a05:622a:5c94:b0:4a4:2d6d:80a0 with SMTP id d75a77b69052e-4a42d6d81f1mr9471601cf.10.1748426840164; Wed, 28 May 2025 03:07:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1748426840; cv=none; d=google.com; s=arc-20240605; b=FWvpY6OyYGsxwJZ3j2jzLob45Y7VqFtXKJqU4WzI/wmOayXwrC09FeVYwIvS0ert44 z6j4LcYm9/XjRhKDqT3kXe504uKNTnkwAbALZtx/RQLSNCpORbzAlDP/Yz8ChCseSW0k wFXZxT0cQXA9REZien8K1Hhazv+y1ng5x1VC2ak7FilflkNKmI3hRCUOr86XD7jsYxUN 2wVfpyqaafydf0mYxEtvpk87ZL8z7XmC1DXk4xmP/wU8J88D4Y4JPqKR5j1GluVafBDE VEVpKhTlkOwdigFsBQ2bnwa2NPIP2EvGILggA69BAV5po6W0HWOViWfM8ZWdSd1EWBdC WFLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fDA/okgTdwBkuJfM2akfszXR3E9almYZhidqyI4nBwI=; fh=Ofys2XBV3UM2gFMGgAbllSIeKasHauj2EG9b+N5oOyI=; b=Jh61ZDB9BOvyGHoGIqfEYAGv1ou2TmAM4k+dE4740ImACQM6vVD5aqySctqGj0QQyh nz6FVZFfWsbr5Nd/LJeL1Jp3JENkZzitEvze2UlEfxjEp25FdGzXoKu6j4qyUvr5C+J2 acn3EMYOBzFrXT/fiVYMLFyxqtwUxqAkP2ZNUu/xq15JvtzwxBV292M5qFciBZLFb+92 E6+oTQHf7uHYJOkvMWaSv6rF6lrQZS4LC/pwTAd6tarCHiv2yW7/fKrn1gnVlwptwRGW PJ1ilvJIrC3TGcadB1S+r63AykaFAk02eLlHBh1K72R3Z7aDulPMtrq5DcxDMrfOXHRb Xqew==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="GD5xh+/S"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6fac0bab572si9308746d6.240.2025.05.28.03.07.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 May 2025 03:07:20 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="GD5xh+/S"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com 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 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= 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 X-MC-Unique: ZGw3g00AO3eoj7bgJVbMUw-1 X-Mimecast-MFC-AGG-ID: ZGw3g00AO3eoj7bgJVbMUw_1748426756 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) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Daniel_P=2E_Berrang=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 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé E1000_FLAG_MAC was only used by the hw_compat_2_4[] array, via the 'extra_mac_registers=off' 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é Reviewed-by: Daniel P. Berrangé 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; /* 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) @@ -1212,52 +1210,51 @@ enum { NWRITEOPS = ARRAY_SIZE(macreg_writeops) }; enum { MAC_ACCESS_PARTIAL = 1, MAC_ACCESS_FLAG_NEEDED = 2 }; -#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] = { - [IPAV] = markflag(MAC), [WUC] = markflag(MAC), - [IP6AT] = markflag(MAC), [IP4AT] = markflag(MAC), - [FFVT] = markflag(MAC), [WUPM] = markflag(MAC), - [ECOL] = markflag(MAC), [MCC] = markflag(MAC), - [DC] = markflag(MAC), [TNCRS] = markflag(MAC), - [RLEC] = markflag(MAC), [XONRXC] = markflag(MAC), - [XOFFTXC] = markflag(MAC), [RFC] = markflag(MAC), - [TSCTFC] = markflag(MAC), [MGTPRC] = markflag(MAC), - [WUS] = markflag(MAC), [AIT] = markflag(MAC), - [FFLT] = markflag(MAC), [FFMT] = markflag(MAC), - [SCC] = markflag(MAC), [FCRUC] = markflag(MAC), - [LATECOL] = markflag(MAC), [COLC] = markflag(MAC), - [SEQEC] = markflag(MAC), [CEXTERR] = markflag(MAC), - [XONTXC] = markflag(MAC), [XOFFRXC] = markflag(MAC), - [RJC] = markflag(MAC), [RNBC] = markflag(MAC), - [MGTPDC] = markflag(MAC), [MGTPTC] = markflag(MAC), - [RUC] = markflag(MAC), [ROC] = markflag(MAC), - [GORCL] = markflag(MAC), [GORCH] = markflag(MAC), - [GOTCL] = markflag(MAC), [GOTCH] = markflag(MAC), - [BPRC] = markflag(MAC), [MPRC] = markflag(MAC), - [TSCTC] = markflag(MAC), [PRC64] = markflag(MAC), - [PRC127] = markflag(MAC), [PRC255] = markflag(MAC), - [PRC511] = markflag(MAC), [PRC1023] = markflag(MAC), - [PRC1522] = markflag(MAC), [PTC64] = markflag(MAC), - [PTC127] = markflag(MAC), [PTC255] = markflag(MAC), - [PTC511] = markflag(MAC), [PTC1023] = markflag(MAC), - [PTC1522] = markflag(MAC), [MPTC] = markflag(MAC), - [BPTC] = markflag(MAC), - - [TDFH] = markflag(MAC) | MAC_ACCESS_PARTIAL, - [TDFT] = markflag(MAC) | MAC_ACCESS_PARTIAL, - [TDFHS] = markflag(MAC) | MAC_ACCESS_PARTIAL, - [TDFTS] = markflag(MAC) | MAC_ACCESS_PARTIAL, - [TDFPC] = markflag(MAC) | MAC_ACCESS_PARTIAL, - [RDFH] = markflag(MAC) | MAC_ACCESS_PARTIAL, - [RDFT] = markflag(MAC) | MAC_ACCESS_PARTIAL, - [RDFHS] = markflag(MAC) | MAC_ACCESS_PARTIAL, - [RDFTS] = markflag(MAC) | MAC_ACCESS_PARTIAL, - [RDFPC] = markflag(MAC) | MAC_ACCESS_PARTIAL, - [PBM] = markflag(MAC) | MAC_ACCESS_PARTIAL, + [IPAV] = MAC_ACCESS_FLAG_NEEDED, [WUC] = MAC_ACCESS_FLAG_NEEDED, + [IP6AT] = MAC_ACCESS_FLAG_NEEDED, [IP4AT] = MAC_ACCESS_FLAG_NEEDED, + [FFVT] = MAC_ACCESS_FLAG_NEEDED, [WUPM] = MAC_ACCESS_FLAG_NEEDED, + [ECOL] = MAC_ACCESS_FLAG_NEEDED, [MCC] = MAC_ACCESS_FLAG_NEEDED, + [DC] = MAC_ACCESS_FLAG_NEEDED, [TNCRS] = MAC_ACCESS_FLAG_NEEDED, + [RLEC] = MAC_ACCESS_FLAG_NEEDED, [XONRXC] = MAC_ACCESS_FLAG_NEEDED, + [XOFFTXC] = MAC_ACCESS_FLAG_NEEDED, [RFC] = MAC_ACCESS_FLAG_NEEDED, + [TSCTFC] = MAC_ACCESS_FLAG_NEEDED, [MGTPRC] = MAC_ACCESS_FLAG_NEEDED, + [WUS] = MAC_ACCESS_FLAG_NEEDED, [AIT] = MAC_ACCESS_FLAG_NEEDED, + [FFLT] = MAC_ACCESS_FLAG_NEEDED, [FFMT] = MAC_ACCESS_FLAG_NEEDED, + [SCC] = MAC_ACCESS_FLAG_NEEDED, [FCRUC] = MAC_ACCESS_FLAG_NEEDED, + [LATECOL] = MAC_ACCESS_FLAG_NEEDED, [COLC] = MAC_ACCESS_FLAG_NEEDED, + [SEQEC] = MAC_ACCESS_FLAG_NEEDED, [CEXTERR] = MAC_ACCESS_FLAG_NEEDED, + [XONTXC] = MAC_ACCESS_FLAG_NEEDED, [XOFFRXC] = MAC_ACCESS_FLAG_NEEDED, + [RJC] = MAC_ACCESS_FLAG_NEEDED, [RNBC] = MAC_ACCESS_FLAG_NEEDED, + [MGTPDC] = MAC_ACCESS_FLAG_NEEDED, [MGTPTC] = MAC_ACCESS_FLAG_NEEDED, + [RUC] = MAC_ACCESS_FLAG_NEEDED, [ROC] = MAC_ACCESS_FLAG_NEEDED, + [GORCL] = MAC_ACCESS_FLAG_NEEDED, [GORCH] = MAC_ACCESS_FLAG_NEEDED, + [GOTCL] = MAC_ACCESS_FLAG_NEEDED, [GOTCH] = MAC_ACCESS_FLAG_NEEDED, + [BPRC] = MAC_ACCESS_FLAG_NEEDED, [MPRC] = MAC_ACCESS_FLAG_NEEDED, + [TSCTC] = MAC_ACCESS_FLAG_NEEDED, [PRC64] = MAC_ACCESS_FLAG_NEEDED, + [PRC127] = MAC_ACCESS_FLAG_NEEDED, [PRC255] = MAC_ACCESS_FLAG_NEEDED, + [PRC511] = MAC_ACCESS_FLAG_NEEDED, [PRC1023] = MAC_ACCESS_FLAG_NEEDED, + [PRC1522] = MAC_ACCESS_FLAG_NEEDED, [PTC64] = MAC_ACCESS_FLAG_NEEDED, + [PTC127] = MAC_ACCESS_FLAG_NEEDED, [PTC255] = MAC_ACCESS_FLAG_NEEDED, + [PTC511] = MAC_ACCESS_FLAG_NEEDED, [PTC1023] = MAC_ACCESS_FLAG_NEEDED, + [PTC1522] = MAC_ACCESS_FLAG_NEEDED, [MPTC] = MAC_ACCESS_FLAG_NEEDED, + [BPTC] = MAC_ACCESS_FLAG_NEEDED, + + [TDFH] = MAC_ACCESS_FLAG_NEEDED | MAC_ACCESS_PARTIAL, + [TDFT] = MAC_ACCESS_FLAG_NEEDED | MAC_ACCESS_PARTIAL, + [TDFHS] = MAC_ACCESS_FLAG_NEEDED | MAC_ACCESS_PARTIAL, + [TDFTS] = MAC_ACCESS_FLAG_NEEDED | MAC_ACCESS_PARTIAL, + [TDFPC] = MAC_ACCESS_FLAG_NEEDED | MAC_ACCESS_PARTIAL, + [RDFH] = MAC_ACCESS_FLAG_NEEDED | MAC_ACCESS_PARTIAL, + [RDFT] = MAC_ACCESS_FLAG_NEEDED | MAC_ACCESS_PARTIAL, + [RDFHS] = MAC_ACCESS_FLAG_NEEDED | MAC_ACCESS_PARTIAL, + [RDFTS] = MAC_ACCESS_FLAG_NEEDED | MAC_ACCESS_PARTIAL, + [RDFPC] = MAC_ACCESS_FLAG_NEEDED | MAC_ACCESS_PARTIAL, + [PBM] = MAC_ACCESS_FLAG_NEEDED | MAC_ACCESS_PARTIAL, }; static void @@ -1419,13 +1416,6 @@ static int e1000_tx_tso_post_load(void *opaque, int version_id) return 0; } -static bool e1000_full_mac_needed(void *opaque) -{ - E1000State *s = opaque; - - return chkflag(MAC); -} - static bool e1000_tso_state_needed(void *opaque) { E1000State *s = opaque; @@ -1451,7 +1441,6 @@ static const VMStateDescription vmstate_e1000_full_mac_state = { .name = "e1000/full_mac_state", .version_id = 1, .minimum_version_id = 1, - .needed = e1000_full_mac_needed, .fields = (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, Error **errp) static const Property e1000_properties[] = { 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, From patchwork Wed May 28 10:04:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 892960 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e53:0:b0:3a3:61c9:c5d4 with SMTP id j19csp2113902wrz; Wed, 28 May 2025 03:07:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXXhfEQtNqGtz2WEHioi3dVYb/Ohju608pJW0eNU85WUAJtu1C4zgPpKUgxVUJQDSVfSqW2Jw==@linaro.org X-Google-Smtp-Source: AGHT+IEq4aay6luYz1oOM7Ji1z66+BNnkdf7qbT8MkViXofuNDGmdNXagPmt1/oqseLAkThk5SdG X-Received: by 2002:a05:6214:21a3:b0:6f4:cfb3:9de1 with SMTP id 6a1803df08f44-6fa9d2b4a7bmr304100616d6.40.1748426839696; Wed, 28 May 2025 03:07:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1748426839; cv=none; d=google.com; s=arc-20240605; b=Tk+gby+2RHh3T4bvV5ooIkHGEONeBB7Ijnpzd4Q78swDx7OWb3fb6ZkN96nw8RXXJv 8QpWjc7n4o9BegE/oVsJv3PHh+t5L9tsutvFEofxMqXaBHc2G/n5OI/Omhbfmg3NfFq0 RIsCVX9p2mB66YTjrrAzueBA3qpCpsEziStCAAKJiQF35xyPp4t6FEy+VOXVmry6yehK 7y9CJPzxGKLhZSnw2gHO7yrEGMeM5dZmSTOT3VQpzknI7GfEcj1sbJz9Uf3Zi/goHuE8 exoq5HLP/tgzE+Pq3t+nulatMlWjyWLZjRG0hgG42nszTP4xqpWkBxR2XVa/lrs8Uvid o+iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NrXUMB04D9eKs4sNmt0JGGNI3Be/7bQAJFM2t4rb92M=; fh=Ofys2XBV3UM2gFMGgAbllSIeKasHauj2EG9b+N5oOyI=; b=ap+IuOK+Z+WvJUYDT7ZCB19nU03mQ35lXCu8Kq3trrd7NPpyIVoITAua8A3ZeD2asO NNaRulzvZzBKjmUEwGS+U5FSF8dDSStlyh5jEFSSdvDMqWJbwA3RokLb3zm1cl/o5ggL Fe0ngryPhTvAOlrK9WfJBrllzG4Nh5WAlAjiaN8BQmMRjUvTliF0dBxa9HDWf34xSPCr FJASGcmeFpI0G1Mdr8vW2uzLydkhPnvqgQ7Tck+nbXl7Dbsn2zUtGfLw3wBvBSmgVmN6 Q+VgFMh2a5WzlQQ/9JEi8F49ZjzyiRS4q9espSq6U93cS4t9Dyz+AdxCRM79pNNuDcNd g95Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OHtO25PW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6fac0b28b42si9075806d6.115.2025.05.28.03.07.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 May 2025 03:07:19 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OHtO25PW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com 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 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= 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 X-MC-Unique: HF-Ca-cSNRSzEq5zqfyBCw-1 X-Mimecast-MFC-AGG-ID: HF-Ca-cSNRSzEq5zqfyBCw_1748426760 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) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Daniel_P=2E_Berrang=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 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé VIRTIO_PCI_FLAG_MIGRATE_EXTRA was only used by the hw_compat_2_4[] array, via the 'migrate-extra=true' 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é Reviewed-by: Daniel P. Berrangé 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_BIT) -/* 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 = { static bool virtio_pci_has_extra_state(DeviceState *d) { - VirtIOPCIProxy *proxy = to_virtio_pci_proxy(d); - - return proxy->flags & VIRTIO_PCI_FLAG_MIGRATE_EXTRA; + return true; } static void virtio_pci_save_extra_state(DeviceState *d, QEMUFile *f) @@ -2363,8 +2361,6 @@ static void virtio_pci_bus_reset_hold(Object *obj, ResetType type) static const Property virtio_pci_properties[] = { 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, From patchwork Wed May 28 10:04:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 892956 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e53:0:b0:3a3:61c9:c5d4 with SMTP id j19csp2113745wrz; Wed, 28 May 2025 03:07:03 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWEzRb06fHT8R3CHez63lSY0g268wqiHT1hk74WZ/p9RWClDTTtxr3fsSPpqlfDE1dCP4SgjA==@linaro.org X-Google-Smtp-Source: AGHT+IFwUlCbCTn18e1dZgPR0rvI5xwdNun4jB6c38J2b6WkXmxgXhbBtX38YBVwsOrv4cAALamw X-Received: by 2002:a05:622a:a0b:b0:48d:8053:d8ee with SMTP id d75a77b69052e-49f485aa677mr245178811cf.36.1748426822809; Wed, 28 May 2025 03:07:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1748426822; cv=none; d=google.com; s=arc-20240605; b=OB9j8D+gbQNwjTUPD4tKEqeqLOo1U5wBnbIRbdJ/pS7z/UOgtViHs2ecCFOWvIGlb+ s+M+ZBVs4CshAY1ArkKIzuBNUNHmC8cAx0H/ZaaOgHlWKdNDt6zTqSV+unow1KzT9mYy kej+mL1evnzt8w+mZKNZkhc1LPRUgQAhC4iXv4w4zPvbprhsKnswJK5Crn1YvRWkLEOf B+yUINNzNPGJYbDTdWH2J2dD/dFO0M2qoW1+Gb1Dx9vkdB2cAOwZPRzLks1Px88P64t8 fOcymKhp4D0CLHiWJzMbIj+lsstnSrfc+yYWScfXvraipuYJwq+n7UR5v0l6XnhnsD9i IDyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=r4CRIfygZP0HnBH0FX1cjWd/jykjn/umfziO5ttUVTw=; fh=7aRxDtZP1Aq9vpCPLaCABi2Dx/PnTfPUrTuYqgFFRwg=; b=PgHuhgotA5zbckmBIl44olb+iL99sKXEVTd2Xc2DecRl/2iNNVMUrou0vhRgq40V/t k1zIOQqZ48th1k8hCeRLNK4ZtA5qIiTS2a3Tooj7VlccNLEI17h63o5ArT7MKop5dlsb luD4Daf2tRyYUq7EO0Z/Yos93EGyvjGpSii75MEU0mfO2M9DmQzXIFd3+vp9ES/j3FBu /ebEDx21Km6hbDIpsxDGlyov/+VFu1fFFclSp75tlbVtQK6Lg35nF5bjyax4Nqn15Nxk cdX3zgr+AkeIeWbw6+y+w2Igy/ImPLvTNXQ6V5EPe3tzmO7eSiGLK4xp9FYawie5LLi4 Bw7w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IMJZyiFh; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-4a3bfef0c6csi9268961cf.94.2025.05.28.03.07.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 May 2025 03:07:02 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IMJZyiFh; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com 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 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= 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 X-MC-Unique: mwy9T-8hNeaa_nk0yAgZNg-1 X-Mimecast-MFC-AGG-ID: mwy9T-8hNeaa_nk0yAgZNg_1748426763 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) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Daniel_P=2E_Berrang=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 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé VIRTIO_PCI_FLAG_DISABLE_PCIE was only used by the hw_compat_2_4[] array, via the 'x-disable-pcie=false' 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é Reviewed-by: Daniel P. Berrangé 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_IOEVENTFD_BIT) -/* virtio version flags */ -#define VIRTIO_PCI_FLAG_DISABLE_PCIE (1 << VIRTIO_PCI_FLAG_DISABLE_PCIE_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 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[] = { 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 = VIRTIO_PCI(qdev); PCIDevice *pci_dev = &proxy->pci_dev; - if (!(proxy->flags & VIRTIO_PCI_FLAG_DISABLE_PCIE) && - virtio_pci_modern(proxy)) { + if (virtio_pci_modern(proxy)) { pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS; } From patchwork Wed May 28 10:04:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 892969 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e53:0:b0:3a3:61c9:c5d4 with SMTP id j19csp2114949wrz; Wed, 28 May 2025 03:09:56 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW8Ewm5JWBs5y7vo9z5K6zUsdXt94uMi+Nb1pz5leLArLZGDhJqT1ZjgvHtJSbwUafAlu6unw==@linaro.org X-Google-Smtp-Source: AGHT+IFfu+9uIFvuRbHRYe2jerPLaN1PyipH8cvmhPei+iuw5ONxTVTS28jChlePIL/C/fK2kEyg X-Received: by 2002:a05:6214:3010:b0:6f5:3e38:612b with SMTP id 6a1803df08f44-6fa9d345852mr249704356d6.41.1748426986303; Wed, 28 May 2025 03:09:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1748426986; cv=none; d=google.com; s=arc-20240605; b=Ff3qvvddp1tFnrJKhq9PBA2ysig27V9XOZsx4d+IlfEWTWiHvVg1RbsmrXdmso83Z/ RHMT7thOA6ifwpv8hmBK3UJQ8bsNTg7B8ebS7i+lujlmt22kkJHmB7qFprDnlJuYVcjz LuNCfREzXssb6XWWKZEeSxlvoDmGRh9n5qlWOK9mGfdsMrluMUvrthjGjdDXAsgr+3pD QVrQ5N7Nt/DHHdT5ah9g3A8aQx/Hd7pyx8/fFnlgHTRGssF5SUIK35rcIbEnuWg+PcGz 3olXM4DkT8CKEDwOGKGwFYxp7UgE4y+mYNwEsjYDLQkkGY+1ytFipnfZ/YT888Ni2wQl fnRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2a7awnVBSjhEnf2yZXL6q25QAaoWfsYKy4VNpBfBk6I=; fh=7aRxDtZP1Aq9vpCPLaCABi2Dx/PnTfPUrTuYqgFFRwg=; b=fz4LLDA1zzUxR8nrxoEVWCZekwKvQI8JQetI4VVkxctgCKpPji0CMBSAAK5W469ewK hXEvjy0M7C0i4ET7jcfrOHTx+nUS97x9dN4ECCGSYbr9iNHhz5WBY+t1dxka29qiwboJ WlVhySNySgUBs8t+ZeIVJ95r9z5dQJAriTzVqsZmb+gGu35PypqlFjbiXdApA1mNkN76 6vVQ9TCYqoQCRJF5UlV6E17WxIte1z1/Wxh8cD6hDF2+WrUsADUW16Fiijo4UP7MBK/G r5bc0/eoRnOLh0LQUiqaX9p71xRg14KAJJDIJLXjtf2AQYzRmYYy6i5DbYTN/HZhHZrX HXyw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GEk5R78D; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6fac0bab0b3si9223056d6.257.2025.05.28.03.09.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 May 2025 03:09:46 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GEk5R78D; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com 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 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= 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 X-MC-Unique: ZSxy-bqpN6eBDSDtHK4cGg-1 X-Mimecast-MFC-AGG-ID: ZSxy-bqpN6eBDSDtHK4cGg_1748426767 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) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Daniel_P=2E_Berrang=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 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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é Reviewed-by: Daniel P. Berrangé 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; -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[] = { }; const size_t pc_compat_2_6_len = G_N_ELEMENTS(pc_compat_2_6); -GlobalProperty pc_compat_2_5[] = {}; -const size_t pc_compat_2_5_len = 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) DEFINE_I440FX_MACHINE(2, 6); -static void pc_i440fx_machine_2_5_options(MachineClass *m) -{ - X86MachineClass *x86mc = X86_MACHINE_CLASS(m); - - pc_i440fx_machine_2_6_options(m); - x86mc->save_tsc_khz = false; - m->legacy_fw_cfg_order = 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) } DEFINE_Q35_MACHINE(2, 6); - -static void pc_q35_machine_2_5_options(MachineClass *m) -{ - X86MachineClass *x86mc = X86_MACHINE_CLASS(m); - - pc_q35_machine_2_6_options(m); - x86mc->save_tsc_khz = false; - m->legacy_fw_cfg_order = 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); From patchwork Wed May 28 10:04:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 892962 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e53:0:b0:3a3:61c9:c5d4 with SMTP id j19csp2114016wrz; Wed, 28 May 2025 03:07:34 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXccAGvQmkBe8Qz7Uo9esJKNUakGpEtetneyepoX+MotRcTLMjmowqvdDXDXvJ4Fec7hrsPzQ==@linaro.org X-Google-Smtp-Source: AGHT+IFRFTnRpkZsktF9RTrMIn0iumsI5acYoLYABU+l3oaY6DQQt+15TvnltbVxhavp62D1b97+ X-Received: by 2002:a05:620a:f01:b0:7c7:a5e6:d287 with SMTP id af79cd13be357-7ceecbf9a87mr2510285885a.52.1748426854275; Wed, 28 May 2025 03:07:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1748426854; cv=none; d=google.com; s=arc-20240605; b=DGk6fjKfQsH5QY2gZm6fBwDr+SqW9w4mrxGAs8iRWfV5p79CVXNLPfA9zq5lEOsAva keok9g7OHPVBLlMzW2hoPS/2o2gvTE2N3abDuizQbC4DCSxLYTfAflz8tgD+PhZCO91u Kob58kG5WgAcFRnU2YKOUmrgUBnJG6rJZ1I/icrIV9xyuqckv+4ybFxwDyVpIEjH+Lj9 XrmaMvBLF3ePraiStJ+qvGbRreUiVhhPUnaJA2piQhyMat6rizJLYKlbnCRlFQ6sp4DV io+pMX8dpTqpvgu9/PdBs7SuBfIgMlbzcV9cE+iBn1iV8EMfbMAbdBduP0AbfbuAPOdV HamA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tvapFg6ZdMY4hXPzf/ac/ZhCNA8XrEnKwnsjVhZAGDU=; fh=7aRxDtZP1Aq9vpCPLaCABi2Dx/PnTfPUrTuYqgFFRwg=; b=FT8Oslme3DwV5HVDFcWmcB1d2fH/aR2KGs5ljfBVUa7b+jNCcCwkpD0oqx5M249xE6 0g17mNnVdOD9V/85H/BGCmkYzBYKmfoD9TEGGEY28pBoVoOJ4vB360Gpo2GeWxpW1bkE 0hmU3NsppLISCUrrc7uLyiBH11TSsyIHMis9tvzmyE1O74wlqt6v2s3mZuZ6n9ClW4a0 k2VYdiJdkU68WZp4OMZzWV6SiNCykqmjtXfgg5sPBwQmcKutwmA9Eblp0ejSPsnARcsD sAt7YBIbJIJBZJXWj70tTpv3Yw+0R67M60TfoQzTwSoHQln0mIr7+WmgsbBkSQNSQLej Jf7A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FXDwLr0O; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7cfc5d636d0si100072785a.411.2025.05.28.03.07.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 May 2025 03:07:34 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FXDwLr0O; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com 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 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= 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 X-MC-Unique: jFSDRmVPPtWESEMWyGIGZA-1 X-Mimecast-MFC-AGG-ID: jFSDRmVPPtWESEMWyGIGZA_1748426772 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) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Daniel_P=2E_Berrang=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 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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é Reviewed-by: Daniel P. Berrangé 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" struct X86MachineClass { - /*< private >*/ MachineClass parent; - /*< 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, const void *data) mc->get_default_cpu_node_id = x86_get_default_cpu_node_id; mc->possible_cpu_arch_ids = x86_possible_cpu_arch_ids; mc->kvm_type = x86_kvm_type; - x86mc->save_tsc_khz = true; x86mc->fwcfg_dma_enabled = true; nc->nmi_monitor_handler = x86_nmi; 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 = opaque; CPUX86State *env = &cpu->env; - MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine()); - X86MachineClass *x86mc = X86_MACHINE_CLASS(mc); - return env->tsc_khz && x86mc->save_tsc_khz; + + return env->tsc_khz; } static const VMStateDescription vmstate_tsc_khz = { From patchwork Wed May 28 10:04:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 892968 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e53:0:b0:3a3:61c9:c5d4 with SMTP id j19csp2114854wrz; Wed, 28 May 2025 03:09:41 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV/dsFkXvXdljdWjtGob4NJmYogz0EAadQw8t9uJ4DvL/VWVgtJ8MCYlIm89NOq6SZlYe8wqQ==@linaro.org X-Google-Smtp-Source: AGHT+IETwYbIgknG8or6UipdmT6ZrTbdfbCvjcGDPBBuiDYKeuWzYsTPqREw9TfPexLnmwEUys0L X-Received: by 2002:a05:622a:2b03:b0:476:9474:9b73 with SMTP id d75a77b69052e-49f479142c0mr238330631cf.42.1748426981057; Wed, 28 May 2025 03:09:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1748426981; cv=none; d=google.com; s=arc-20240605; b=HfxxnCvFsT5wLOyEmSk4gPcRWPzaef9T28snt8KhQhtL12nZJWQFreTH3Y/KoQLXKU OXLQ7KTFOeer3tawulLrOEcq3dVcJGKDZrp6gFoWYloZNHdpcCKqtGqoqLhT75+jkkP/ OZQzcCyOL/5ROj7Xsp60W8wKMAL9Gu9tUiiN1myKRdpALrxYqFuCg27SPFEavzFx93W8 cM3mZitTRpr/w+bel47awPM7s3AEj1jEKQKWlA8UsLFWL6Jx/DJYWB+EhewSmvZCt7SL Y1VcwcEu31lu6MTpKVvR5bnDdn9wt9WJVY9HlkYY0Ezt8nR17IUb8yt68bwizhyTQwL/ njGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=eK+HczivaTK+gyAPglvrt94YWhujdDkIncNou17/y2w=; fh=7aRxDtZP1Aq9vpCPLaCABi2Dx/PnTfPUrTuYqgFFRwg=; b=L/W1mjmKpVYolq+zFt7Q6frJswDPWhfkuuonaBZOMdTX9Md0kZtbQqwxcjUccvNEra hQacUPC4Hu4q8h3bbCqHMmNZz0/Xwoo5rd5sRkUIymLQNynInghvtE5FIA5jTnLFF4tQ jB8MpxGzOQWlKW15iIQDPlTvWSVfWJkjW7ZAsxSllNuN+C4pioyt4aWQ/tqHygFhtitz 3WJRiGE1vhBlTVF7M57t3Po7xTinnGwGwIM+eLU+W17MSf810ftJBqGaJvlMphGtt5sY qrRLRi1k1hNfI5O/i5O812VsZ+ie7UUfzbwnD8r4ZfPdbtYPhQ+k1iRyrVc+WnI7W+Sj yyOA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aTIcim+9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-4a3bfef0eb7si9471961cf.4.2025.05.28.03.09.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 May 2025 03:09:41 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aTIcim+9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com 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 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= 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 X-MC-Unique: opkbMEc5MU6gZ3KMmqwJdQ-1 X-Mimecast-MFC-AGG-ID: opkbMEc5MU6gZ3KMmqwJdQ_1748426775 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) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Daniel_P=2E_Berrang=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 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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é Reviewed-by: Daniel P. Berrangé 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); /** * 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 { typedef struct fw_cfg_file FWCfgFile; -#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; - 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 = f; } -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 = NULL; - rom_set_order_override(FW_CFG_ORDER_OVERRIDE_VGA); if (pci_bus) { PCIDevice *pcidev = pci_vga_init(pci_bus); dev = pcidev ? &pcidev->qdev : NULL; @@ -1041,7 +1040,7 @@ DeviceState *pc_vga_init(ISABus *isa_bus, PCIBus *pci_bus) ISADevice *isadev = isa_vga_init(isa_bus); dev = isadev ? DEVICE(isadev) : NULL; } - rom_reset_order_override(); + return dev; } @@ -1231,8 +1230,6 @@ void pc_nic_init(PCMachineClass *pcmc, ISABus *isa_bus, PCIBus *pci_bus) bool default_is_ne2k = g_str_equal(mc->default_nic, TYPE_ISA_NE2000); NICInfo *nd; - rom_set_order_override(FW_CFG_ORDER_OVERRIDE_NIC); - while ((nd = qemu_find_nic_info(TYPE_ISA_NE2000, default_is_ne2k, NULL))) { pc_init_ne2k_isa(isa_bus, nd, &error_fatal); } @@ -1241,8 +1238,6 @@ void pc_nic_init(PCMachineClass *pcmc, ISABus *isa_bus, PCIBus *pci_bus) if (pci_bus) { pci_init_nic_devices(pci_bus, mc->default_nic); } - - rom_reset_order_override(); } 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, uint64_t value) g_free(old); } -void fw_cfg_set_order_override(FWCfgState *s, int order) -{ - assert(s->fw_cfg_order_override == 0); - s->fw_cfg_order_override = order; -} - -void fw_cfg_reset_order_override(FWCfgState *s) -{ - assert(s->fw_cfg_order_override != 0); - s->fw_cfg_order_override = 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[] = { - { "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 migration, * 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 char *filename, size_t len) } } -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 = 0; i < ARRAY_SIZE(fw_cfg_order); i++) { - if (fw_cfg_order[i].name == NULL) { - continue; - } - - if (strcmp(name, fw_cfg_order[i].name) == 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 char *filename, { int i, index, count; size_t dsize; - MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine()); int order = 0; if (!s->files) { @@ -933,22 +853,11 @@ void fw_cfg_add_file_callback(FWCfgState *s, const char *filename, count = be32_to_cpu(s->files->count); assert(count < fw_cfg_file_slots(s)); - /* 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 = get_fw_cfg_order(s, filename); - for (index = count; - index > 0 && order < s->entry_order[index - 1]; - index--); - } else { - /* Sort by file name. */ - for (index = count; - index > 0 && strcmp(filename, s->files->f[index - 1].name) < 0; - index--); - } + /* Find the insertion point, sorting by file name. */ + for (index = count; + index > 0 && strcmp(filename, s->files->f[index - 1].name) < 0; + index--) + ; /* * 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, static void fw_cfg_machine_reset(void *opaque) { - MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine()); FWCfgState *s = opaque; void *ptr; size_t len; @@ -1068,11 +976,9 @@ static void fw_cfg_machine_reset(void *opaque) ptr = fw_cfg_modify_file(s, "bootorder", (uint8_t *)buf, len); g_free(ptr); - if (!mc->legacy_fw_cfg_order) { - buf = get_boot_devices_lchs_list(&len); - ptr = fw_cfg_modify_file(s, "bios-geometry", (uint8_t *)buf, len); - g_free(ptr); - } + buf = get_boot_devices_lchs_list(&len); + ptr = fw_cfg_modify_file(s, "bios-geometry", (uint8_t *)buf, len); + g_free(ptr); } 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; } @@ -2745,7 +2742,6 @@ static void qemu_create_cli_devices(void) } /* 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 == NULL); /* error_fatal aborts */ loc_pop(&opt->loc); } - rom_reset_order_override(); } static bool qemu_machine_creation_done(Error **errp) From patchwork Wed May 28 10:05:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 892967 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e53:0:b0:3a3:61c9:c5d4 with SMTP id j19csp2114635wrz; Wed, 28 May 2025 03:09:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWDXnTfH80cqsqh+ECBW7ENvT+TkLfAd7HMZ+IKPI+v0SoabZj+0nnvMSQsjzkLSv8IO/1uew==@linaro.org X-Google-Smtp-Source: AGHT+IHwU77YXm67fSPWqCG3cBqubLO6vfyYvnPPrDMLc4eF6PlRzUhtRcWXi2F/2nQwJIYIz8rl X-Received: by 2002:a05:620a:4087:b0:7ca:c9cb:abc with SMTP id af79cd13be357-7ceecb95c76mr2168127785a.33.1748426944917; Wed, 28 May 2025 03:09:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1748426944; cv=none; d=google.com; s=arc-20240605; b=Da/3MSrh/BmmtWlOP0s16rxLP4Xrkv1xWRCtMgCjmXIMK90ZOCklJbehlfKCRsVcN9 aK6C4GMD6T2VBvtHz1kodpkK0ML5O4VYyZ1DZQ7CeMfACA28Zn5Cu9MLGawIo8fNEXeI v63g5DlXhXF9z7oFgfZAQ/PXgo91AgoNnOfNlIo+QQ9at56wiJNXo+kULYuF/yjNBWUT DLMxYWUEu8tDmdhdjsWRieRDUOm0AvuYYs9tnaRALhv2qeZvbRUbh8afM80P0kaWaarV UDOHoQM8EqoAr5zqmyxe0wBsVu1371i9X3oBpO3IpJJVFMr2kmtf6QNqk28/yeDpVsgL 0/uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=uMATuWWm+srIs5nFJ3klsWb/Ek9p4aFq+16UijVU0pY=; fh=7aRxDtZP1Aq9vpCPLaCABi2Dx/PnTfPUrTuYqgFFRwg=; b=RdrgHJ7/comoQf0B6W0perS2HPjO12lOH2K3Mv/Fg4lmoboI0QU+DuF80Bckdthi7T XrrJttnJSD/3IZzOyLwtFnBDOqWCFcgn13rYUZdmJJoCo9KWyejPcURbuvZNXHN092Ge mmm3yGLM9trT/aaVX9PCFtylYrUh5+SkcL9Twc3qGEMWtodSRELQTm47p5J7BQ78+GZ3 2ZW+e2TcrY9hFji566wyV+vf4SD6asGIa55SeASkGz/8sCYbmaqVJovKTe8/5wzElH8l 8Cv8/Lx/jHHWkSwbxfEQpngl/bQ/bNtexn/pkvfqdiV0q6QzcyPtbeQKbpvV5Sj7THmX arow==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CdjoJvcB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7cfc5d4001csi98817185a.285.2025.05.28.03.09.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 May 2025 03:09:04 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CdjoJvcB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com 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 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= 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 X-MC-Unique: l7YzJmGPM_K3FOBJ5Jl1KQ-1 X-Mimecast-MFC-AGG-ID: l7YzJmGPM_K3FOBJ5Jl1KQ_1748426778 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) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Daniel_P=2E_Berrang=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 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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é Reviewed-by: Daniel P. Berrangé 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; -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[] = { }; const size_t hw_compat_2_6_len = G_N_ELEMENTS(hw_compat_2_6); -GlobalProperty hw_compat_2_5[] = { - { "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 = G_N_ELEMENTS(hw_compat_2_5); - MachineState *current_machine; static char *machine_get_kernel(Object *obj, Error **errp) From patchwork Wed May 28 10:05:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 892965 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e53:0:b0:3a3:61c9:c5d4 with SMTP id j19csp2114447wrz; Wed, 28 May 2025 03:08:40 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUNj9p1w5NlXhu9ygd235qXnrSQM6BtcW3W9WcQ9wOmA162VldFZ+5gh1eiLgbfpac7dI8wVw==@linaro.org X-Google-Smtp-Source: AGHT+IHafQJOg5H2hN1XlT6B+pP3Rv1ag5rVlGizWxGqTR3eAUHIWKRBRpeti4hpnq8FVK5aihBr X-Received: by 2002:a05:6214:3010:b0:6f2:b551:a65 with SMTP id 6a1803df08f44-6fa9d2a25a4mr301862866d6.38.1748426920524; Wed, 28 May 2025 03:08:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1748426920; cv=none; d=google.com; s=arc-20240605; b=JBPhhpoJdsxGeh/z2Yt3IaZeLTZPAU4fuEFzRjAsaJFumeR8AUrbPyVMTbpvh2lZL4 E6XL4gRQTdn7Xg3pZPOKxn1axLGvVOI0muWhFujQQ5dBV4KfHunpQ3OzQiKi3tQ8wNCz aeQm1SqDnhAIBbP82WTrL8Eca7Lh2MsHr6VABwtoMIA+ZB1jcliMVXi4jInE3FBOiBuD jg4GEWII8oDQtght+RG1snOJHVbyEKGZDtOffyX1QB+5WigaUrAplDpj8ja8XF833D5A g4WwxIYTuZyfkJ+tsF7kcxQVcQFoVmllLCY1iYzE1rM7G8DckUF7OpMFliZFrr1Xqtn2 h9Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=OHCI9bUlMc1zhmH226iMPrisn8+fAxn1VK6cPkHMjcY=; fh=7aRxDtZP1Aq9vpCPLaCABi2Dx/PnTfPUrTuYqgFFRwg=; b=ByxnuDa/QguKq5KqzER1CUfbrPcuWbrYiyd0aaHvJ82hRP/4KwRMfAHd+cjAujifyS /Y6nAXbq460qqv4DskC9OZOKwPhtwMJ+NmMMi++Ox5b5GbgAAJWvU8ze4ddNPhLZaHA+ f0kJteCFLcHKHz+wMWx/045YupyK/OjiESxjLE0b+98wizK1+ZkO/2R/wCnFwF218usN 6sJRTVnDDQ1sVMfrD5qnHhm7B+pJ+vplaFmF7kAr2XS78CFuhsv0jI60Lm5kV9derp9Y vw9DxthyDfxWt1/8eNtIMma4BaAhGTMB1Upo5C/40aLmwSPazrvTOcQf+zju9fTFu8E6 cqYw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FYWQSGxW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6fac0b2287dsi9384296d6.46.2025.05.28.03.08.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 May 2025 03:08:40 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FYWQSGxW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com 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 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= 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 X-MC-Unique: qcGn4wf2MW2qnEhokEun_Q-1 X-Mimecast-MFC-AGG-ID: qcGn4wf2MW2qnEhokEun_Q_1748426782 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) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Daniel_P=2E_Berrang=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 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé PVSCSI_COMPAT_OLD_PCI_CONFIGURATION was only used by the hw_compat_2_5[] array, via the 'x-old-pci-configuration=on' 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é Reviewed-by: Daniel P. Berrangé 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) /* 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) -#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) typedef struct PVSCSIRingInfo { @@ -1110,7 +1104,7 @@ pvscsi_init_msi(PVSCSIState *s) int res; PCIDevice *d = PCI_DEVICE(s); - res = msi_init(d, PVSCSI_MSI_OFFSET(s), PVSCSI_MSIX_NUM_VECTORS, + res = 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"); /* 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); /* PCI latency timer = 255 */ pci_dev->config[PCI_LATENCY_TIMER] = 0xff; @@ -1298,8 +1288,6 @@ static const VMStateDescription vmstate_pvscsi = { static const Property pvscsi_properties[] = { 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), }; From patchwork Wed May 28 10:05:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 892959 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e53:0:b0:3a3:61c9:c5d4 with SMTP id j19csp2113870wrz; Wed, 28 May 2025 03:07:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV2gLdlfoOD+mgibZEnkayrn/OW8LVT0oIxEe2sxNm/w74iNXjX/8x/Gj55r+ancAnGdlvcBQ==@linaro.org X-Google-Smtp-Source: AGHT+IF+rrR47AbHlffZvorFX3EPt2djPsaT1bsoFdlg+YtFNphNCW5vHMhV765RNDeGUoXQzKhI X-Received: by 2002:a05:620a:f0b:b0:7c7:73bf:ecb7 with SMTP id af79cd13be357-7cf06d3f0e3mr525489085a.10.1748426835941; Wed, 28 May 2025 03:07:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1748426835; cv=none; d=google.com; s=arc-20240605; b=e2+NWM2c4RPsGd1ykTrkp92JkQMNzleslA/Uw6yC5fthzI6QSoKrLyW+VDyBJ3Ieoc gP22v5qEUyOKHlx6JucBT/EMcCGubdryLeabwx9qq9q+AT8S7DE57rKmb2C3ysnIl//2 ZgbhKKWW2+OLEdYbWoMM0WXQA0TNGVW1sz7WDLfOYC2q6MiH77xV3bcEHOFaiLOf73Pm FmzYXgceSQEvMlviQLMClLTxbf+V3F11iOwT+d+XVxOOTcYVG8q8iGOPL/+wPluKo6mZ Da8+P58ocgoPDTu/vGs/VCDQVKtj6RNYlxyb29DOGgAz0YH7LPp2J7CM9NEdsc/sAMaY V+OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=w56H/ZiBqfsqtT6hrO28JZqCjilGvXll/+3BUcPwYmU=; fh=7aRxDtZP1Aq9vpCPLaCABi2Dx/PnTfPUrTuYqgFFRwg=; b=ge8nX6ddKpEH0trkD6Fp0+RXrnNv+XUzX9R1NyAokZWYJH1Yg2f2Yc1pu7+CqvlA/N y9HQyZQmcrWMk9Z9c+pgqj/iFocnOPlMC2BphGNson6fVxcbLI/VpuVz8jNcmSBDzs/Z xgHe5B2TvVFyxHDmV64AcuFe+Xs4fcsiHSRtnfgMBplOThnbEAZwenAKUCyEjiUgJypZ I8jMKr6KCpVgs0IDY2FvCPidmCTlW4yrcQyPk+NN5NQaJYIP28VsbCWvWwR8GrZkQgo/ xt1AUYtUSN62xDzsB+tmWiMKw8XnVxWW6J+ZZ+zHNKBodSgdoj5CnG7GCLYzzJrE0mce L5Kg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AHW5URdj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7cfb81f6442si103452385a.39.2025.05.28.03.07.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 May 2025 03:07:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AHW5URdj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com 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 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= 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 X-MC-Unique: klHbmcc2OD6FpRWcgaWWfQ-1 X-Mimecast-MFC-AGG-ID: klHbmcc2OD6FpRWcgaWWfQ_1748426786 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) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Daniel_P=2E_Berrang=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 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé PVSCSI_COMPAT_DISABLE_PCIE_BIT was only used by the hw_compat_2_5[] array, via the 'x-disable-pcie=on' 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é Reviewed-by: Daniel P. Berrangé 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) -/* 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) @@ -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; }; typedef struct PVSCSIRequest { @@ -1224,21 +1217,8 @@ pvscsi_post_load(void *opaque, int version_id) return 0; } -static bool pvscsi_vmstate_need_pcie_device(void *opaque) -{ - PVSCSIState *s = 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 = { .name = "pvscsi/pcie", - .needed = pvscsi_vmstate_need_pcie_device, .fields = (const VMStateField[]) { VMSTATE_PCI_DEVICE(parent_obj, PVSCSIState), VMSTATE_END_OF_LIST() @@ -1252,9 +1232,6 @@ static const VMStateDescription vmstate_pvscsi = { .pre_save = pvscsi_pre_save, .post_load = pvscsi_post_load, .fields = (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 = { static const Property pvscsi_properties[] = { DEFINE_PROP_UINT8("use_msg", PVSCSIState, use_msg, 1), - DEFINE_PROP_BIT("x-disable-pcie", PVSCSIState, compat_flags, - PVSCSI_COMPAT_DISABLE_PCIE_BIT, false), }; static void pvscsi_realize(DeviceState *qdev, Error **errp) { PVSCSIClass *pvs_c = PVSCSI_GET_CLASS(qdev); PCIDevice *pci_dev = PCI_DEVICE(qdev); - PVSCSIState *s = PVSCSI(qdev); - if (!(s->compat_flags & PVSCSI_COMPAT_DISABLE_PCIE)) { - pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS; - } + pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS; pvs_c->parent_dc_realize(qdev, errp); } From patchwork Wed May 28 10:05:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 892966 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e53:0:b0:3a3:61c9:c5d4 with SMTP id j19csp2114506wrz; Wed, 28 May 2025 03:08:48 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXSOoykdlVK9jiXAwg32LAU5K+VcOlUwJMP5IoHpIh1do9CADFbEMpX8r9+Dm5G6TCK3+/TuQ==@linaro.org X-Google-Smtp-Source: AGHT+IGSsgIVcK0Tb/m8PrLFJI+gWreL1gO3rDSPXeVlXv3e/rUIN4wvaxH4ENRKj9luNGA9pfpB X-Received: by 2002:a05:620a:4312:b0:7ca:cd70:718b with SMTP id af79cd13be357-7ceecc13f6dmr2388859585a.35.1748426927995; Wed, 28 May 2025 03:08:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1748426927; cv=none; d=google.com; s=arc-20240605; b=dL6A7hH/0DbZSH6p9hoCqeNDYnFJCdj24HRF9wdCC8OS2jMKbUZzszz0M4tNOaYbs1 Whe1sktme8hwxxIKSQG3kA1gWtagIq2o4ulHNyijwo21BaFW/S5iocrOzABXzIobbCwI 5srVOkXtzrr9TqWc/DzmbH705wB6rkdJJpgpYCHC5LYIzhzxEiAlJyjt19QBoIVfdcSF 7IMzHJOSB7xmht6Tw9NG00vbFIJWIDGg5kpQvJM5zaAYn8mjnMuGYXSvbv1AzKGOZl1s wF5G7F/kUOsWap8a3vpwsSjuEsapFkij39cF7cfbWB5YkefgqVEJ85vtpyt365px7A2o sCww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0LUMQ2s0adqb0824GaQ5lu0r6aD3qTFWNdBDBR5nDao=; fh=7aRxDtZP1Aq9vpCPLaCABi2Dx/PnTfPUrTuYqgFFRwg=; b=MV47B0GapKxc5MQGQavO6i5dthEbefZEsubLryd34RwPAavG2VIYqI7CHywA519WZC lPNsAr2LAUkWna7MMbaMvrGiMEKIsf/m3DfTkcyYlKEgE5oLyTbd5ahxyHmoCEYoY6MU y6kR1XjZj8fkqwVhdGGRSoF1EHXTf3Plx98pAi24rfBjkmLQr3/ns8MRpkHS1vXE2dr1 7q46UV1jHc+cPgcAS73D0jav+Blhi6MIjSVggVrbLKn/wJaISxtJJOhOtXFA1815tK/3 IVn6ALGbUzSHxIoep7HtURSbH4yOe6Gi3sdttfhSBRqYhnZaL3j+PMCV8LxgfE/wz3hH Mspg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ac4xDmL2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7cfc5d415e2si97567185a.212.2025.05.28.03.08.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 May 2025 03:08:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ac4xDmL2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com 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 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= 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 X-MC-Unique: LWuLtyb_N0y3oYho6EwZVg-1 X-Mimecast-MFC-AGG-ID: LWuLtyb_N0y3oYho6EwZVg_1748426790 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) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Daniel_P=2E_Berrang=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 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Simplify replacing pvscsi_realize() by pvscsi_instance_init(), removing the need for device_class_set_parent_realize(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé 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[] = { DEFINE_PROP_UINT8("use_msg", PVSCSIState, use_msg, 1), }; -static void pvscsi_realize(DeviceState *qdev, Error **errp) +static void pvscsi_instance_init(Object *obj) { - PVSCSIClass *pvs_c = PVSCSI_GET_CLASS(qdev); - PCIDevice *pci_dev = PCI_DEVICE(qdev); - - pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS; - - pvs_c->parent_dc_realize(qdev, errp); + PCI_DEVICE(obj)->cap_present |= QEMU_PCI_CAP_EXPRESS; } static void pvscsi_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc = DEVICE_CLASS(klass); PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); - PVSCSIClass *pvs_k = PVSCSI_CLASS(klass); HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(klass); k->realize = pvscsi_realizefn; @@ -1290,8 +1284,6 @@ static void pvscsi_class_init(ObjectClass *klass, const void *data) k->device_id = PCI_DEVICE_ID_VMWARE_PVSCSI; k->class_id = PCI_CLASS_STORAGE_SCSI; k->subsystem_id = 0x1000; - device_class_set_parent_realize(dc, pvscsi_realize, - &pvs_k->parent_dc_realize); device_class_set_legacy_reset(dc, pvscsi_reset); dc->vmsd = &vmstate_pvscsi; device_class_set_props(dc, pvscsi_properties); @@ -1306,6 +1298,7 @@ static const TypeInfo pvscsi_info = { .class_size = sizeof(PVSCSIClass), .instance_size = sizeof(PVSCSIState), .class_init = pvscsi_class_init, + .instance_init = pvscsi_instance_init, .interfaces = (const InterfaceInfo[]) { { TYPE_HOTPLUG_HANDLER }, { INTERFACE_PCIE_DEVICE }, From patchwork Wed May 28 10:05:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 892964 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e53:0:b0:3a3:61c9:c5d4 with SMTP id j19csp2114389wrz; Wed, 28 May 2025 03:08:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU/bXZd5n2ZEZxJbtsJWJ9QQJw3EEf3lWiK+nJD4xqZMkivQQp8bVYFrSi8Pedr4EKu3Xi5Yg==@linaro.org X-Google-Smtp-Source: AGHT+IHuS9ckAhRPOBMQoQgSD2MWcDrpcpuvaHBEPXZGskO7DWQPCKVrFVBDCYazKFgkgQjUgHJA X-Received: by 2002:a05:620a:244d:b0:7ca:f3f7:e617 with SMTP id af79cd13be357-7ceecc02e22mr2339836885a.1.1748426901280; Wed, 28 May 2025 03:08:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1748426901; cv=none; d=google.com; s=arc-20240605; b=b3GRs61QtenGg15zljjVNvmdoMXG0jrTDQQK0050TTjtcezORzQgN5sgmCnO+mo0GQ dyh4sfExc3VrEuo43fBbBR/lNWFBhW75FTWVvx3pbRJFKBtcVw2PSXWkuK2DwIYW7K9Q UL/z+uhAkOi/fdKGGLiHscqqD9u6puCaJOQwjwlBkCMrRhwWCGPZUHjTGH0EC3scyoTV eMi8+2bu3EtnN1id7i7AvNEq0ByWrgRV1n/XbSq/oP2zydOHdw0Dg4rMDkRLedFidCMj hYCDfBEKWIu6NrAJz17hqgz0OrQnPYbtpAF5OTWVmmRwAOMYvSLPSBSajL6DN6Efv2Ce CWMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=i4s4nDeinyoCVN53qRh52ZsiWvCPH0QRvFdBdGrsLMM=; fh=7aRxDtZP1Aq9vpCPLaCABi2Dx/PnTfPUrTuYqgFFRwg=; b=ijjSsxgNd9oucOG7QRxJVqQaVRPaoS2pGDsye3u+IIF+L8dQPyL+NeIgiveQofZixe jeXSm/nuRARUIeqU7AWPKC8Tr9AlSzzm2o8EcHBJBgGjIhSbIJWp4LvizE0jgxmvyLHs iB+2zyE11FYnJ3LtHMuLSp0+11yNg0n/eHoR8XsHnwvNBVQntKqOP3VNfhpkj5shsO6w iKakt1frRWMVFkmHwG6BEYny5ocq6yZB2DwQzSkm0h5tUi5x6tj3SVmhpCex9Y4aB/lY PrQfQO83rkBR305Ou+SPg0gUWRmwZlw9plh4A2bcvdLbtK6mDcC3uQ6czByTwuf40U8g vTKQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bwMWvY2g; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7cfb81f7919si101214185a.113.2025.05.28.03.08.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 May 2025 03:08:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bwMWvY2g; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com 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 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= 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 X-MC-Unique: WGmg8QXLPbO2IP_ZpkaAiA-1 X-Mimecast-MFC-AGG-ID: WGmg8QXLPbO2IP_ZpkaAiA_1748426794 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) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Daniel_P=2E_Berrang=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 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS was only used by the hw_compat_2_5[] array, via the 'x-old-msi-offsets=on' 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é Reviewed-by: Daniel P. Berrangé 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 /* 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) #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) #define VMXNET3_BAR0_IDX (0) @@ -61,8 +56,7 @@ #define VMXNET3_MSIX_BAR_IDX (2) #define VMXNET3_OFF_MSIX_TABLE (0x000) -#define VMXNET3_OFF_MSIX_PBA(s) \ - ((s)->compat_flags & VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS ? 0x800 : 0x1000) +#define VMXNET3_OFF_MSIX_PBA (0x1000) /* 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); 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, Error **errp) /* Interrupt pin A */ pci_dev->config[PCI_INTERRUPT_PIN] = 0x01; - ret = msi_init(pci_dev, VMXNET3_MSI_OFFSET(s), VMXNET3_MAX_NMSIX_INTRS, + ret = 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 = { static const Property vmxnet3_properties[] = { 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), }; From patchwork Wed May 28 10:05:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 892971 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e53:0:b0:3a3:61c9:c5d4 with SMTP id j19csp2115841wrz; Wed, 28 May 2025 03:12:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXEEv4wCYE/WKXS7a2vp0NP4s8L/voTpzmaBE2slEAdV1AMRmms+mUyl40Ipcy40DdTXYJdOg==@linaro.org X-Google-Smtp-Source: AGHT+IEBXwUWap4n51ii/dqaU/T+y5LW/YZzYflgGrYBXpG3YmcisvX3li24ROyMfaPMPowSceSz X-Received: by 2002:ac8:6903:0:b0:4a3:76eb:2824 with SMTP id d75a77b69052e-4a376eb2de0mr33441721cf.38.1748427134117; Wed, 28 May 2025 03:12:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1748427134; cv=none; d=google.com; s=arc-20240605; b=iHsFJ50ZoZQInC4Zj39aSnVNEmAivhTrbkjJqYogcGBNVUNCFjOSw3THk6To50BMUC v6DTDapaFckxY5+9TqDVoykaNE9HlmgBMNV4/PsPeXOAabS2vOg80YWn97yY4UPjNi0w ueNvvmqgz2iAuB6w6tDDa91Bnl6TOwur3KyXM72DxPECcIViaa6xDG9+laA05VuZBJBp 99YB56ym/mHWxKo60t/gh6td8Ws86P4CSKZCWSbecWp2M2MfmLVqbTa0NbLL0goS3tv0 p09XGHZLfK6EdNws6p7uRi81BDMtgAMWpQIcT4dKnQ8FRMfjULYuW2sQtB0HqGkvLJGf FHCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SjKpU/nYfX8v4Il/bQ/hdOg2oevNS7Qmgj1ruv54cLk=; fh=7aRxDtZP1Aq9vpCPLaCABi2Dx/PnTfPUrTuYqgFFRwg=; b=ewAgTIod4+8fNbpkAilM+3aPY67NLned06uobPV0mFYHzJgoxOG7RwQKo6vENzgK2O p68DXZgJD1MjNl0clRNcrLTX6CnDS/TU8/Hg+ry5eQE857BGyTGzL1AqlyeZlfuT9ak2 8maH3yVufP4vV3iv6oEI1akDj/E4ittgwZLujDtiTdIu/x3c0d0I6aWiVLKT5T4GSSbu FrMNN4M1AZ5oi5prVdlAuZwePDMY5Jxxhr7NxCgT5mPO3vYYawWpC6Pm7EEV7KwPfHnZ TMEJ9fFZwKM6uJl6aTH/qYKQ1qanz4JYAU91klYv41cGhyQMx3QKIX/awHR3UuDsQhIR wz6Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=M7UkAYzK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-4a3cfefe941si9136581cf.519.2025.05.28.03.12.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 May 2025 03:12:14 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=M7UkAYzK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com 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 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= 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 X-MC-Unique: 7gMxvagKMqGE4NouRKzgsQ-1 X-Mimecast-MFC-AGG-ID: 7gMxvagKMqGE4NouRKzgsQ_1748426798 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) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Daniel_P=2E_Berrang=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 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé VMXNET3_COMPAT_FLAG_DISABLE_PCIE was only used by the hw_compat_2_5[] array, via the 'x-disable-pcie=on' 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é Reviewed-by: Daniel P. Berrangé 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 -/* 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 = { static const Property vmxnet3_properties[] = { DEFINE_NIC_PROPERTIES(VMXNET3State, conf), - DEFINE_PROP_BIT("x-disable-pcie", VMXNET3State, compat_flags, - VMXNET3_COMPAT_FLAG_DISABLE_PCIE_BIT, false), }; static void vmxnet3_realize(DeviceState *qdev, Error **errp) @@ -2476,9 +2469,7 @@ static void vmxnet3_realize(DeviceState *qdev, Error **errp) PCIDevice *pci_dev = PCI_DEVICE(qdev); VMXNET3State *s = VMXNET3(qdev); - if (!(s->compat_flags & VMXNET3_COMPAT_FLAG_DISABLE_PCIE)) { - pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS; - } + pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS; vc->parent_dc_realize(qdev, errp); } From patchwork Wed May 28 10:05:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 892963 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e53:0:b0:3a3:61c9:c5d4 with SMTP id j19csp2114027wrz; Wed, 28 May 2025 03:07:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVmQ+CrbaczydpAaq//2q5fx2YgzXqucAEY2J4PALzNBghCYmn6XWpHWHRYZDxw+O7UaavVgw==@linaro.org X-Google-Smtp-Source: AGHT+IEeIcMv45TscsiHOtlkblxP9YBU2MS0KWMPuwI7lhfPhnZoJJwaZ8mXYqAUxh7F062cfSm7 X-Received: by 2002:a05:620a:f05:b0:7ca:f3d0:e7c8 with SMTP id af79cd13be357-7ceecc3ca8emr2314055585a.52.1748426855379; Wed, 28 May 2025 03:07:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1748426855; cv=none; d=google.com; s=arc-20240605; b=OZf0gzqcZmfMUWCHBuSF849qg3fXUtbGyYlmbTIt7Uo9GoIZdpzavXts01yt0BjjYJ jGbSxwU5P2JTFSL8I9GghKh6SDjDrzReJzlqiYJIZE5Wyb9grB50jKmoRBBv5dLOAh58 dGe7DBJZqtoRSSrU4r5W6bb6eVI5Y+7iTNSfFROLF1tClLMUe+2vuitZ+cF3Jq8QTsFx zS2h62n1RWnW5YXAc5UCsWWf6rU+r47fEmek9tVo0YKXjGiO1DPpu9yu6bucQX9mVE7Z wJ5IjupuKbwV8SA3RyIGrt/P5GCwsq4+zI6ENxtXLWSHbZ7aHDhnWlT+pPPPfuFuvEYw 4VqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=boKqtfV5mjhcV+igiCQ1wF54BVqNnBj3nxcXDBLUNjM=; fh=7aRxDtZP1Aq9vpCPLaCABi2Dx/PnTfPUrTuYqgFFRwg=; b=I+66IHbfivN2/HjVGmA0nYXo0z+ZIbIJ588QFMasJU8r6DVnY7IBhclrgxlobg0Tyq xoDoh4j3OAghash0SuzeF+Sh6sF4GNlWrUVY7SRlNACsG+18Ec8pIqS7TZNEa8cRbqqz 0vv+IWsV8Az5Fhj+Tk2Rhx91p+1boBc+l/TlvpZeQbEcR3hDS0oSyqZupNHB/LiOKKXn U9H+Ta33z9gABuq9CuqjSRwPXCG8aHZKcl4QP+7t5jKwyouo/6EGfI/1KaoPgPbkUyFO mg7OrNh1KIr2N7gH4LTIyMfojuLlB4z4BaI+1qNVEZglbfO83mgQvxEwzP+689LpUJTY r+RA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Qpw3PSwg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7cfc5d63582si97566885a.375.2025.05.28.03.07.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 May 2025 03:07:35 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Qpw3PSwg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com 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 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= 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 X-MC-Unique: tWPM_ZkvMBCK34un7kEI_w-1 X-Mimecast-MFC-AGG-ID: tWPM_ZkvMBCK34un7kEI_w_1748426801 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) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Daniel_P=2E_Berrang=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 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Simplify merging vmxnet3_realize() within vmxnet3_instance_init(), removing the need for device_class_set_parent_realize(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé 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 |= QEMU_PCI_CAP_EXPRESS; } static void vmxnet3_pci_uninit(PCIDevice *pci_dev) @@ -2463,22 +2464,10 @@ static const Property vmxnet3_properties[] = { DEFINE_NIC_PROPERTIES(VMXNET3State, conf), }; -static void vmxnet3_realize(DeviceState *qdev, Error **errp) -{ - VMXNET3Class *vc = VMXNET3_DEVICE_GET_CLASS(qdev); - PCIDevice *pci_dev = PCI_DEVICE(qdev); - VMXNET3State *s = VMXNET3(qdev); - - pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS; - - vc->parent_dc_realize(qdev, errp); -} - static void vmxnet3_class_init(ObjectClass *class, const void *data) { DeviceClass *dc = DEVICE_CLASS(class); PCIDeviceClass *c = PCI_DEVICE_CLASS(class); - VMXNET3Class *vc = VMXNET3_DEVICE_CLASS(class); c->realize = vmxnet3_pci_realize; c->exit = vmxnet3_pci_uninit; @@ -2489,8 +2478,6 @@ static void vmxnet3_class_init(ObjectClass *class, const void *data) c->class_id = PCI_CLASS_NETWORK_ETHERNET; c->subsystem_vendor_id = PCI_VENDOR_ID_VMWARE; c->subsystem_id = PCI_DEVICE_ID_VMWARE_VMXNET3; - device_class_set_parent_realize(dc, vmxnet3_realize, - &vc->parent_dc_realize); dc->desc = "VMWare Paravirtualized Ethernet v3"; device_class_set_legacy_reset(dc, vmxnet3_qdev_reset); dc->vmsd = &vmstate_vmxnet3;