From patchwork Fri May 2 18:56:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 886641 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp962042wrq; Fri, 2 May 2025 12:00:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUQFMrCGm6pp/O34hP1i+2yLAVBlNYh3Uq3LNFKUvrdijBhXd9ZHFi6oebbfHvDfQrxP3PdzA==@linaro.org X-Google-Smtp-Source: AGHT+IFn+jaCIheDYugzBHr0K2H2uTTUME4UNw6ZfAFgI1TFKNfOzgMbMz7najYnLneV181Fxj88 X-Received: by 2002:a05:622a:5516:b0:476:8f90:b5b1 with SMTP id d75a77b69052e-48c31b1a7c0mr60185601cf.25.1746212450384; Fri, 02 May 2025 12:00:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746212450; cv=none; d=google.com; s=arc-20240605; b=QGSwWd6g1Z/cMJmmAluiJ6MFvxuERQtsZxyHVG4wuhClQOwVh89kTZ/gY833snXieG pOKfJ7JlQQI/Y4C0hUMTek4rfZ2tT+KWkYNfHvu5W3BByoIj0ICiAGNNHh/nDFi3fSva E+atOs8WLWEmQqWn/4UgwyEs9UeyEeA0jf4V8pK0H1YQJzqrWjT1x7j0J81TUe+wnQzd IhBAUjHf8tV6RbNC3cuxXvJhgiCp02FoflMG2b6eG6v+hxJ842cpCqZnWu0FwGTbtil+ te8FjS1Hj9QdYqQMhY0XH2O0oFiLTrMjWn+INTZ8yl0j8Iy93kqs4xq4s9VdMq5dyRPk G8CA== 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=QsChSFQ9xfBFOGYiAY/gUqNa+0g2ne7rXsTx8MOyPRo=; fh=zA7MiWWYdZ7nPYzFPsisQ1XfjLk8wRfRNbrxI2kr3EE=; b=EaqMP8qy/YKzNpvuC1r+5v3ALklZLXfDsn8DLXBZmvzmJ73dUxRSCOMNy4oqDgstxQ mxQ08s8+63sYCeDHvJOlLDHj1q7AR2/TXXXqytQne2ulZ4lvrFIHK49wLGIQXfCU/qIs IiFoAMGgjoMc8YuU8r5NxWB3l9y3ZwFmB1Xw/TbdgxZEz8UY6VGZJNnKFUxdUpXDAcYu nfEnsntS3NSD7NVIwMz41S1ro6Moc8FHgRuFLtWlMilTnN/VPb0FCDCj//kjEOj2QSwK nmtPVO/WjTrzDZaviSaRo8PxvV4kldF/u5Jmxe7fQE+UEqOpS+r71VIzDiTON1Lw8ghc LYAA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Bgc1uVyY; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-48b98733a3bsi35825101cf.358.2025.05.02.12.00.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 May 2025 12:00:50 -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=@linaro.org header.s=google header.b=Bgc1uVyY; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAvZO-0004Y7-1W; Fri, 02 May 2025 14:57:10 -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 1uAvZL-0004V9-2U for qemu-devel@nongnu.org; Fri, 02 May 2025 14:57:07 -0400 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAvZI-0005NF-Oi for qemu-devel@nongnu.org; Fri, 02 May 2025 14:57:06 -0400 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-ac2bb7ca40bso383187866b.3 for ; Fri, 02 May 2025 11:57:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746212221; x=1746817021; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QsChSFQ9xfBFOGYiAY/gUqNa+0g2ne7rXsTx8MOyPRo=; b=Bgc1uVyYUOUEHezKlKDYH+y728lkzwupDdOXAJWjYdIBtRY5xmLGTl8oh00deIInao 8NmFVSCwR+g/8G0W+25rGHOfx3QnHG1f3Xww9141M3gR/s559dvTkkTjigs0DO+zSrIY 9r0E/RCAoESk6Q5b52an/VZvb3Ez9DfYY2jZJC3OqbeqFw3evJRotARHRPxahsck46Ve dwZrC45xnPTHOAPb3oGTFDU1KFOeG6j/sYU7Swrxlw93thd+SMzT2ZkP4eKT5kTK+lWY YtlxgGKm21SQBuKFfITYS+ZZ9Kn6CNgSVKEe5OwxCbIY9IcDttX4WMYTN4NIGNA3+6Fd fDUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746212221; x=1746817021; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QsChSFQ9xfBFOGYiAY/gUqNa+0g2ne7rXsTx8MOyPRo=; b=D8JcST/aAmR+HspwKGH0WZ/IXeshgir5UZUecNu3lMUeRdkYoJHJZc7vceG/2ALFKV JdA6ebwaoOjMKkJgz7JZI0TTK9+v9IqGVnsHD0eFu/PqJJG4MyEchuNGpLM166Y7oGnh anh+raqreYFS5Bts96J01d8u4mxGsZrBMI+0pvl4DSf/m0eeSERNDiekg9LYrS1+RIkY BYgluQVXvuK7zPCjNg6Fl8LwIS59dRAFL8KZowIedyTqXa3vCngJneYg17eLxLsq/lVd 0E7a4pkKVbfIbxPySiLK9AiZh5OmxbBsL/0ZjiIAaOyJaeOyBgB55Czf9AarXKUWVqGc yznA== X-Gm-Message-State: AOJu0YzWMFtjD5qd0Gcv0UnAKZuE+gNnpACUKBZTSutxy1gxnskHelNh vbzBP9zxxogrzimUzjphhw8BZpivBl6yu4diP0G3dTC3jHSgm3aqVZz6QfEwm7UG3n72U8mTArV r X-Gm-Gg: ASbGncvJDAOlTcOm/74Ilf4YGMj+gMj/WGCDMxJlrQRDEW2vmonf9P+g3gPMP5Y3D7U 2KLWm9frAiu8UiDIZPOLm8882jK/vOVvh06LygQRU7JARhoCq0SqWL4BWN/Wkd6fIIJtv6HIC7D KoFcJEzBlJ0iqQwQzMMpGuSW9rxJposRm42OAeDwI4w4Azy2VZvtqpj/lcKdpjDqUBSjygrXnnl 6gT3/d3+ItUI5h7yK1zCoUVbU7AEtjoA7rl974+QDjYSYudm1+utbwccJTnQM7KZUWXxygXtf1/ opWx8Lsjd3VReNgMedLT5sANFMzFq1gn5OmRTd/375tfPE8z85AKpPjs1ZTBzUejQYIJxtcnxbn 5PjNlXoKKhsPmEUIVtBRo X-Received: by 2002:a17:907:7287:b0:ace:ca87:2306 with SMTP id a640c23a62f3a-ad17b5f27damr382895366b.34.1746212220734; Fri, 02 May 2025 11:57:00 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ad1894c29d3sm84586166b.113.2025.05.02.11.56.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 02 May 2025 11:57:00 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Laurent Vivier , Igor Mammedov , Huacai Chen , Amit Shah , Marcel Apfelbaum , Sergio Lopez , Ani Sinha , Paolo Bonzini , Eduardo Habkost , Jiaxun Yang , Jason Wang , Richard Henderson , Yanan Wang , Gerd Hoffmann , =?utf-8?q?Cl=C3=A9ment_Mathieu--Drif?= , Zhao Liu , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Yi Liu , "Michael S. Tsirkin" , Mark Cave-Ayland Subject: [PATCH v3 01/19] hw/i386/pc: Remove deprecated pc-q35-2.6 and pc-i440fx-2.6 machines Date: Fri, 2 May 2025 20:56:33 +0200 Message-ID: <20250502185652.67370-2-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250502185652.67370-1-philmd@linaro.org> References: <20250502185652.67370-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=philmd@linaro.org; helo=mail-ej1-x630.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland --- hw/i386/pc_piix.c | 14 -------------- hw/i386/pc_q35.c | 14 -------------- 2 files changed, 28 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 7a62bb06500..98a118fd4a0 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -764,20 +764,6 @@ static void pc_i440fx_machine_2_7_options(MachineClass *m) DEFINE_I440FX_MACHINE(2, 7); -static void pc_i440fx_machine_2_6_options(MachineClass *m) -{ - X86MachineClass *x86mc = X86_MACHINE_CLASS(m); - PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - - pc_i440fx_machine_2_7_options(m); - pcmc->legacy_cpu_hotplug = true; - x86mc->fwcfg_dma_enabled = false; - compat_props_add(m->compat_props, hw_compat_2_6, hw_compat_2_6_len); - compat_props_add(m->compat_props, pc_compat_2_6, pc_compat_2_6_len); -} - -DEFINE_I440FX_MACHINE(2, 6); - #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 33211b1876f..b7ffb5f1216 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -658,17 +658,3 @@ static void pc_q35_machine_2_7_options(MachineClass *m) } DEFINE_Q35_MACHINE(2, 7); - -static void pc_q35_machine_2_6_options(MachineClass *m) -{ - X86MachineClass *x86mc = X86_MACHINE_CLASS(m); - PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - - pc_q35_machine_2_7_options(m); - pcmc->legacy_cpu_hotplug = true; - x86mc->fwcfg_dma_enabled = false; - compat_props_add(m->compat_props, hw_compat_2_6, hw_compat_2_6_len); - compat_props_add(m->compat_props, pc_compat_2_6, pc_compat_2_6_len); -} - -DEFINE_Q35_MACHINE(2, 6); From patchwork Fri May 2 18:56:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 886633 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp961048wrq; Fri, 2 May 2025 11:58:38 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVPv9QEi9rC4R/dyhtI5bFBV66gaTclPUguSUN3NPTZx1Q/JQDkRrXHLJ3Annan6GFa97dlwg==@linaro.org X-Google-Smtp-Source: AGHT+IGECaEYroz7a1PZraDDAw/Sw3AVVN76VldrP/8tOoZwtisdnP4pPCJqqqQot0je5WfKH0wB X-Received: by 2002:a05:620a:410c:b0:7c5:5791:122b with SMTP id af79cd13be357-7cad5b8cf08mr422390985a.37.1746212318491; Fri, 02 May 2025 11:58:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746212318; cv=none; d=google.com; s=arc-20240605; b=ZT1Dfb/s9qB72bsklYtSfTeX6wSLgf0EutX6e1Q55FCtVMu8SHabgUzHZzrkun94v7 Bjg3xGQKaQ16tdixjps0kmJGLdUV9nFZC9e6B/CwaFBFWWXma/Uim5t6sApGVYSdDRyn u18ZHDJ34runFHcfLEyesIAnJayHnm2sNdRtFsi7dnRBozkeNxRneBIc/mhr2zEvlGUQ C8yE50obeKigQsunkxiNvu+BTT7rq6jkchYvZNbSn2hsXhYXE6bUVmiKB1dGciopZ7Sv nUASU//BCyZIxlWKuzTdbyICREA7gfpbz1/bRDtMnhfgFLHwVq9LAvBLSJLi6UBBOsU8 0+mQ== 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=7qfnGI5cVlujnz0wd1v+F1XwVTLfEg1rKbq6EincqJQ=; fh=zA7MiWWYdZ7nPYzFPsisQ1XfjLk8wRfRNbrxI2kr3EE=; b=QQLK0Al7gH+RbhRm5ljOViPxDICHhN0PSQQy/GoYAkS0R8np2d3V9dccewUx9eBWvN h5McM8lCjCOLcXF83sB5+ECVDRTJ8WI1XzSJL/JIQEzDuiBe/w+6B27LgDYwBLOatOdN Gb4dv4Pl98ZRVrzuvFWFyRSBnbGHVGNKdfl886A34XkJNAdSVLS+/g2jqkd87rYMdKf3 ER1ScrW+O1GKfjSkTPoJ6I2IPovWRSGUgkze7Su3l/zViDNdFMz/ZXE5a0qKy01QX0g9 0flirLDG1P3vt7s37LYsYohs4ApkAQdrZ1zmQqjq9mtVzPI43uOOrL5FLkXYrHpCw6Ug Qy7g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jc5lBdrA; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7cad23b84eesi371161085a.27.2025.05.02.11.58.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 May 2025 11:58:38 -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=@linaro.org header.s=google header.b=jc5lBdrA; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAvZR-0004fM-2i; Fri, 02 May 2025 14:57:13 -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 1uAvZP-0004bf-Hc for qemu-devel@nongnu.org; Fri, 02 May 2025 14:57:11 -0400 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAvZM-0005Nw-CS for qemu-devel@nongnu.org; Fri, 02 May 2025 14:57:10 -0400 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-ac2963dc379so355736666b.2 for ; Fri, 02 May 2025 11:57:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746212226; x=1746817026; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7qfnGI5cVlujnz0wd1v+F1XwVTLfEg1rKbq6EincqJQ=; b=jc5lBdrAZKWwb47rXBGBqB9BaFLVGyG46PUnZcfy6+wD49yyyfkDPq7q20vv2KrRzu RcbJhgBZrp/P92snVfG0aXUfTNxg46jBtjHP5K2VwoaUuBgOtfZnS3B5d50PgWz6vqDk TOoA5+uChRe3ZgJCW69OEzHy9KzYXDdgscr5kSqxn3/tgj4d2J5Bay2gA+4JljfvU85w lJIAFT/dVtnCzD6ru9AH/LfxkqINvDIXt+NW7gg+muk6mQjI8xKWICdKabxzqXKU0bQi 6XzyrCLPwOjUY2pptIhLiUgWRpcHbqadgQD5a7zrXC048JA6DhEQnDabXAkz8nFxhjX1 +0Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746212226; x=1746817026; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7qfnGI5cVlujnz0wd1v+F1XwVTLfEg1rKbq6EincqJQ=; b=dQFkez2rH4mXKzU2/s0eYhacHllzKhETr93npDzhk8uglWR1zLwis5noEDH6Fv8j9S WW/u3/hzSc7bQrSPwJRlRKJuJXxxJ8kJ6AXhSmczaVlcjEuFr1TZpCJJ3PIkLArmKUtu QvmpoKmoFWIKcOWy65tFuMxU7WLF4ciNNHZ7Wat/quilRxZl1VFsDdBXqGDcoF8ZNx0p aNQAnmwrD2zI4JXc0AZTRaAe+Osd5Phzgmz6Yok7qpQklGwuXxy29HIcu1wgj7kpHBV1 8DoDB+KT7QtjROvfWcXNkgpDxXhyLMGZqQeQ3inFenKwXqTPqtjVjcuOET14nTnQkR/H pacQ== X-Gm-Message-State: AOJu0YxoZF/o9GQsO9fncO8n2zcGczApeWIbRX8HMTZw6Xx0Z4lTNQvN q8US7ZzDVs6MVozWX8v+DgYy+AhGxDbxExblJRqcyHwi5tLtPQJFmHJKlKkzCozQw9QI/eN72e+ r X-Gm-Gg: ASbGncu404gISUQTZXP+WpHnfytCJiL5B399K0vKCGPp0kZi3gW6ASLS3cAk86na7ru jcse57NKqsCVJ4jpXTlCRoaVdrpzbz50I7DmT8Oe/02sU9PC7m+7cEFmQJMqSDcuPFt6+P2yOuW TkMkyIdKPwetgkz9V3sRhH4BienOfRmIiq79AFA/T7IyaU77xihshTsEZYbO4Lkg83g9JZxtIAf XuA7ndh7C49rv7WHvGrejQ31IuDrXackBpDxKB5tb0Fez4PtBIe4IuJnmzIobxrl/BpkEpdLIW2 IetgXU4B1/2XsneO4Y+sTah5dbzcT8Eab6l9xo3ugG6KDe9oqO1U/ICbCsh1Vm5qCvCqTJItS16 fXTFUwDCJ4cGR3NnpANDE X-Received: by 2002:a17:907:96a2:b0:aca:a1cf:d5f8 with SMTP id a640c23a62f3a-ad17ad39d00mr381369766b.11.1746212226448; Fri, 02 May 2025 11:57:06 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ad1891a766fsm87943066b.69.2025.05.02.11.57.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 02 May 2025 11:57:05 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Laurent Vivier , Igor Mammedov , Huacai Chen , Amit Shah , Marcel Apfelbaum , Sergio Lopez , Ani Sinha , Paolo Bonzini , Eduardo Habkost , Jiaxun Yang , Jason Wang , Richard Henderson , Yanan Wang , Gerd Hoffmann , =?utf-8?q?Cl=C3=A9ment_Mathieu--Drif?= , Zhao Liu , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Yi Liu , "Michael S. Tsirkin" , Mark Cave-Ayland Subject: [PATCH v3 02/19] hw/i386/pc: Remove PCMachineClass::legacy_cpu_hotplug field Date: Fri, 2 May 2025 20:56:34 +0200 Message-ID: <20250502185652.67370-3-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250502185652.67370-1-philmd@linaro.org> References: <20250502185652.67370-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=philmd@linaro.org; helo=mail-ej1-x62c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The PCMachineClass::legacy_cpu_hotplug boolean was only used by the pc-q35-2.6 and pc-i440fx-2.6 machines, which got removed. Remove it and simplify build_dsdt(), removing build_legacy_cpu_hotplug_aml() altogether. Note, this field was added by commit 679dd1a957d ("pc: use new CPU hotplug interface since 2.7 machine type"): > For compatibility reasons PC/Q35 will start with legacy > CPU hotplug interface by default but with new CPU hotplug > AML code since 2.7 machine type. That way legacy firmware > that doesn't use QEMU generated ACPI tables will be > able to continue using legacy CPU hotplug interface. > > While new machine type, with firmware supporting QEMU > provided ACPI tables, will generate new CPU hotplug AML, > which will switch to new CPU hotplug interface when > guest OS executes its _INI method on ACPI tables > loading. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland --- include/hw/acpi/cpu_hotplug.h | 3 - include/hw/i386/pc.h | 3 - hw/acpi/cpu_hotplug.c | 230 ---------------------------------- hw/i386/acpi-build.c | 4 +- 4 files changed, 1 insertion(+), 239 deletions(-) diff --git a/include/hw/acpi/cpu_hotplug.h b/include/hw/acpi/cpu_hotplug.h index 3b932abbbbe..aeee630cf05 100644 --- a/include/hw/acpi/cpu_hotplug.h +++ b/include/hw/acpi/cpu_hotplug.h @@ -34,7 +34,4 @@ void legacy_acpi_cpu_hotplug_init(MemoryRegion *parent, Object *owner, void acpi_switch_to_modern_cphp(AcpiCpuHotplug *gpe_cpu, CPUHotplugState *cpuhp_state, uint16_t io_port); - -void build_legacy_cpu_hotplug_aml(Aml *ctx, MachineState *machine, - uint16_t io_base); #endif diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 79b72c54dd3..a3de3e9560d 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -110,9 +110,6 @@ struct PCMachineClass { bool enforce_amd_1tb_hole; bool isa_bios_alias; - /* generate legacy CPU hotplug AML */ - bool legacy_cpu_hotplug; - /* use PVH to load kernels that support this feature */ bool pvh_enabled; diff --git a/hw/acpi/cpu_hotplug.c b/hw/acpi/cpu_hotplug.c index aa0e1e3efa5..fe439705bda 100644 --- a/hw/acpi/cpu_hotplug.c +++ b/hw/acpi/cpu_hotplug.c @@ -116,233 +116,3 @@ void acpi_switch_to_modern_cphp(AcpiCpuHotplug *gpe_cpu, memory_region_del_subregion(parent, &gpe_cpu->io); cpu_hotplug_hw_init(parent, gpe_cpu->device, cpuhp_state, io_port); } - -void build_legacy_cpu_hotplug_aml(Aml *ctx, MachineState *machine, - uint16_t io_base) -{ - Aml *dev; - Aml *crs; - Aml *pkg; - Aml *field; - Aml *method; - Aml *if_ctx; - Aml *else_ctx; - int i, apic_idx; - Aml *sb_scope = aml_scope("_SB"); - uint8_t madt_tmpl[8] = {0x00, 0x08, 0x00, 0x00, 0x00, 0, 0, 0}; - Aml *cpu_id = aml_arg(1); - Aml *apic_id = aml_arg(0); - Aml *cpu_on = aml_local(0); - Aml *madt = aml_local(1); - Aml *cpus_map = aml_name(CPU_ON_BITMAP); - Aml *zero = aml_int(0); - Aml *one = aml_int(1); - MachineClass *mc = MACHINE_GET_CLASS(machine); - const CPUArchIdList *apic_ids = mc->possible_cpu_arch_ids(machine); - X86MachineState *x86ms = X86_MACHINE(machine); - - /* - * _MAT method - creates an madt apic buffer - * apic_id = Arg0 = Local APIC ID - * cpu_id = Arg1 = Processor ID - * cpu_on = Local0 = CPON flag for this cpu - * madt = Local1 = Buffer (in madt apic form) to return - */ - method = aml_method(CPU_MAT_METHOD, 2, AML_NOTSERIALIZED); - aml_append(method, - aml_store(aml_derefof(aml_index(cpus_map, apic_id)), cpu_on)); - aml_append(method, - aml_store(aml_buffer(sizeof(madt_tmpl), madt_tmpl), madt)); - /* Update the processor id, lapic id, and enable/disable status */ - aml_append(method, aml_store(cpu_id, aml_index(madt, aml_int(2)))); - aml_append(method, aml_store(apic_id, aml_index(madt, aml_int(3)))); - aml_append(method, aml_store(cpu_on, aml_index(madt, aml_int(4)))); - aml_append(method, aml_return(madt)); - aml_append(sb_scope, method); - - /* - * _STA method - return ON status of cpu - * apic_id = Arg0 = Local APIC ID - * cpu_on = Local0 = CPON flag for this cpu - */ - method = aml_method(CPU_STATUS_METHOD, 1, AML_NOTSERIALIZED); - aml_append(method, - aml_store(aml_derefof(aml_index(cpus_map, apic_id)), cpu_on)); - if_ctx = aml_if(cpu_on); - { - aml_append(if_ctx, aml_return(aml_int(0xF))); - } - aml_append(method, if_ctx); - else_ctx = aml_else(); - { - aml_append(else_ctx, aml_return(zero)); - } - aml_append(method, else_ctx); - aml_append(sb_scope, method); - - method = aml_method(CPU_EJECT_METHOD, 2, AML_NOTSERIALIZED); - aml_append(method, aml_sleep(200)); - aml_append(sb_scope, method); - - method = aml_method(CPU_SCAN_METHOD, 0, AML_NOTSERIALIZED); - { - Aml *while_ctx, *if_ctx2, *else_ctx2; - Aml *bus_check_evt = aml_int(1); - Aml *remove_evt = aml_int(3); - Aml *status_map = aml_local(5); /* Local5 = active cpu bitmap */ - Aml *byte = aml_local(2); /* Local2 = last read byte from bitmap */ - Aml *idx = aml_local(0); /* Processor ID / APIC ID iterator */ - Aml *is_cpu_on = aml_local(1); /* Local1 = CPON flag for cpu */ - Aml *status = aml_local(3); /* Local3 = active state for cpu */ - - aml_append(method, aml_store(aml_name(CPU_STATUS_MAP), status_map)); - aml_append(method, aml_store(zero, byte)); - aml_append(method, aml_store(zero, idx)); - - /* While (idx < SizeOf(CPON)) */ - while_ctx = aml_while(aml_lless(idx, aml_sizeof(cpus_map))); - aml_append(while_ctx, - aml_store(aml_derefof(aml_index(cpus_map, idx)), is_cpu_on)); - - if_ctx = aml_if(aml_and(idx, aml_int(0x07), NULL)); - { - /* Shift down previously read bitmap byte */ - aml_append(if_ctx, aml_shiftright(byte, one, byte)); - } - aml_append(while_ctx, if_ctx); - - else_ctx = aml_else(); - { - /* Read next byte from cpu bitmap */ - aml_append(else_ctx, aml_store(aml_derefof(aml_index(status_map, - aml_shiftright(idx, aml_int(3), NULL))), byte)); - } - aml_append(while_ctx, else_ctx); - - aml_append(while_ctx, aml_store(aml_and(byte, one, NULL), status)); - if_ctx = aml_if(aml_lnot(aml_equal(is_cpu_on, status))); - { - /* State change - update CPON with new state */ - aml_append(if_ctx, aml_store(status, aml_index(cpus_map, idx))); - if_ctx2 = aml_if(aml_equal(status, one)); - { - aml_append(if_ctx2, - aml_call2(AML_NOTIFY_METHOD, idx, bus_check_evt)); - } - aml_append(if_ctx, if_ctx2); - else_ctx2 = aml_else(); - { - aml_append(else_ctx2, - aml_call2(AML_NOTIFY_METHOD, idx, remove_evt)); - } - } - aml_append(if_ctx, else_ctx2); - aml_append(while_ctx, if_ctx); - - aml_append(while_ctx, aml_increment(idx)); /* go to next cpu */ - aml_append(method, while_ctx); - } - aml_append(sb_scope, method); - - /* The current AML generator can cover the APIC ID range [0..255], - * inclusive, for VCPU hotplug. */ - QEMU_BUILD_BUG_ON(ACPI_CPU_HOTPLUG_ID_LIMIT > 256); - if (x86ms->apic_id_limit > ACPI_CPU_HOTPLUG_ID_LIMIT) { - error_report("max_cpus is too large. APIC ID of last CPU is %u", - x86ms->apic_id_limit - 1); - exit(1); - } - - /* create PCI0.PRES device and its _CRS to reserve CPU hotplug MMIO */ - dev = aml_device("PCI0." stringify(CPU_HOTPLUG_RESOURCE_DEVICE)); - aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A06"))); - aml_append(dev, - aml_name_decl("_UID", aml_string("CPU Hotplug resources")) - ); - /* device present, functioning, decoding, not shown in UI */ - aml_append(dev, aml_name_decl("_STA", aml_int(0xB))); - crs = aml_resource_template(); - aml_append(crs, - aml_io(AML_DECODE16, io_base, io_base, 1, ACPI_GPE_PROC_LEN) - ); - aml_append(dev, aml_name_decl("_CRS", crs)); - aml_append(sb_scope, dev); - /* declare CPU hotplug MMIO region and PRS field to access it */ - aml_append(sb_scope, aml_operation_region( - "PRST", AML_SYSTEM_IO, aml_int(io_base), ACPI_GPE_PROC_LEN)); - field = aml_field("PRST", AML_BYTE_ACC, AML_NOLOCK, AML_PRESERVE); - aml_append(field, aml_named_field("PRS", 256)); - aml_append(sb_scope, field); - - /* build Processor object for each processor */ - for (i = 0; i < apic_ids->len; i++) { - int cpu_apic_id = apic_ids->cpus[i].arch_id; - - assert(cpu_apic_id < ACPI_CPU_HOTPLUG_ID_LIMIT); - - dev = aml_processor(i, 0, 0, "CP%.02X", cpu_apic_id); - - method = aml_method("_MAT", 0, AML_NOTSERIALIZED); - aml_append(method, - aml_return(aml_call2(CPU_MAT_METHOD, - aml_int(cpu_apic_id), aml_int(i)) - )); - aml_append(dev, method); - - method = aml_method("_STA", 0, AML_NOTSERIALIZED); - aml_append(method, - aml_return(aml_call1(CPU_STATUS_METHOD, aml_int(cpu_apic_id)))); - aml_append(dev, method); - - method = aml_method("_EJ0", 1, AML_NOTSERIALIZED); - aml_append(method, - aml_return(aml_call2(CPU_EJECT_METHOD, aml_int(cpu_apic_id), - aml_arg(0))) - ); - aml_append(dev, method); - - aml_append(sb_scope, dev); - } - - /* build this code: - * Method(NTFY, 2) {If (LEqual(Arg0, 0x00)) {Notify(CP00, Arg1)} ...} - */ - /* Arg0 = APIC ID */ - method = aml_method(AML_NOTIFY_METHOD, 2, AML_NOTSERIALIZED); - for (i = 0; i < apic_ids->len; i++) { - int cpu_apic_id = apic_ids->cpus[i].arch_id; - - if_ctx = aml_if(aml_equal(aml_arg(0), aml_int(cpu_apic_id))); - aml_append(if_ctx, - aml_notify(aml_name("CP%.02X", cpu_apic_id), aml_arg(1)) - ); - aml_append(method, if_ctx); - } - aml_append(sb_scope, method); - - /* build "Name(CPON, Package() { One, One, ..., Zero, Zero, ... })" - * - * Note: The ability to create variable-sized packages was first - * introduced in ACPI 2.0. ACPI 1.0 only allowed fixed-size packages - * ith up to 255 elements. Windows guests up to win2k8 fail when - * VarPackageOp is used. - */ - pkg = x86ms->apic_id_limit <= 255 ? aml_package(x86ms->apic_id_limit) : - aml_varpackage(x86ms->apic_id_limit); - - for (i = 0, apic_idx = 0; i < apic_ids->len; i++) { - int cpu_apic_id = apic_ids->cpus[i].arch_id; - - for (; apic_idx < cpu_apic_id; apic_idx++) { - aml_append(pkg, aml_int(0)); - } - aml_append(pkg, aml_int(apic_ids->cpus[i].cpu ? 1 : 0)); - apic_idx = cpu_apic_id + 1; - } - aml_append(sb_scope, aml_name_decl(CPU_ON_BITMAP, pkg)); - aml_append(ctx, sb_scope); - - method = aml_method("\\_GPE._E02", 0, AML_NOTSERIALIZED); - aml_append(method, aml_call0("\\_SB." CPU_SCAN_METHOD)); - aml_append(ctx, method); -} diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 3fffa4a3328..625889783ec 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1465,9 +1465,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, } aml_append(dsdt, scope); - if (pcmc->legacy_cpu_hotplug) { - build_legacy_cpu_hotplug_aml(dsdt, machine, pm->cpu_hp_io_base); - } else { + { CPUHotplugFeatures opts = { .acpi_1_compatible = true, .has_legacy_cphp = true, .smi_path = pm->smi_on_cpuhp ? "\\_SB.PCI0.SMI0.SMIC" : NULL, From patchwork Fri May 2 18:56:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 886631 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp961009wrq; Fri, 2 May 2025 11:58:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVCcN6Q5zeGPdzp5FuAtfICMw/650RxmBucnuhF1bQabeC+Hh4Jo1OoDaS06zdxHe6S35WstQ==@linaro.org X-Google-Smtp-Source: AGHT+IH0Tt3uLl3ILYM6jij0kTGC12ysjnfQQ8c0mlhHL/KtR+96aL2IsbcCzxFzqXQgO8NHHziA X-Received: by 2002:a05:622a:130c:b0:477:1edc:2367 with SMTP id d75a77b69052e-48d5d6e951cmr3480761cf.37.1746212312505; Fri, 02 May 2025 11:58:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746212312; cv=none; d=google.com; s=arc-20240605; b=YviUHC9KEJ07COV5Mti5SMBlqt9Oe48z7bygkr8y8x333DztjzENDXewBt5qS9+gO0 y+IhXfw8HSves2qEzb5dukjCfB9gY5r29MY9ut7aJXArBsPxsRBXEMChzVnD6cT0OfkC uTQ67C6Zi/ucaYWc5UiomphroSZkKSt5v0Ct0h3vVMn1v/EFGStsE0/spKBUrewSvhla gcp8+GWEtTLYfspyqSztxnnWTL69z9HodVjQpiWvpFpjItjmxLUuuXL5PaOnwNTK8c9a ILKa7zWQ4aczFu/PyYKHWmQ3qlkb2cL7K4eFOjXtoxNDTb4WuXr61f/FieN+e9OwvMs6 3sCg== 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=w7+NkoyA3HMTuquXVM6+FfGafWiuRck1O1aecj2hVgw=; fh=Mi6rIaSWSDxP/DH2kogK8jGulyKPJuFbWNIs/qeUzeE=; b=Z+hRixdTOf0vba77b/tC5JHu+BShIXpTBewWpektJKYL1BD+ieHv9jCyxxDNzCEHxt S94RYpQkpGTeVB/ZKUFtzrhj0J4NRUxIzxXZig2hOUUX5HupYgK4WZiHeMYiNinknHhM SLrZ/JiHEseiqXf49uTIsKFr6QYuklaRTT/QIHv4XPnnpYD20QH5itnzOgKCIu+bBbXw aPN8TVZpPnl9u2S6d/lpsvS1lwCIBGFK0zaRG8qAr2VEkAHD6TwbepRkwV1gsXkJ3E+i cAoLHq662qwwODBCexivSIjpmzfmT1s4hYL8vFa0d4nK3iVhqogx6UjFzi7OymfpEHFV HnpA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xzd9roj+; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-48b98246a98si33614801cf.336.2025.05.02.11.58.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 May 2025 11:58:32 -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=@linaro.org header.s=google header.b=xzd9roj+; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAvZd-0004rj-Iv; Fri, 02 May 2025 14:57:25 -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 1uAvZV-0004m8-8k for qemu-devel@nongnu.org; Fri, 02 May 2025 14:57:17 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAvZT-0005Ol-O8 for qemu-devel@nongnu.org; Fri, 02 May 2025 14:57:17 -0400 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-5f6214f189bso4436374a12.2 for ; Fri, 02 May 2025 11:57:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746212233; x=1746817033; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=w7+NkoyA3HMTuquXVM6+FfGafWiuRck1O1aecj2hVgw=; b=xzd9roj+JrGBDb96hWO1kkuwO0nXKHzCVp7eEsJWbKeomOGs0gHBYlMndxhncRVJfT h9q7TARUqI49iosegStRebIkOTpMsGiLw2qnGH5KwTbz2V367jyeU7tqqLapgjPIS5Ld 4PPZB0xzkUJgazOgpxTrZjOQEcV+r0Pen1TTkbZhF48/7y0DEeytlkPTvuhiv1nyS/L1 DSBZFt03UIal7hHqvN3s+VaG34J3K3T+othVnoKsgSCp/yp0vfVrXhpx8FXdxdFz/H/j UktzLqwZRXAGcSR4LBS+XVsfuLhgZKylFtctYpWZAnOgpdr6FCGsgplxGNNoQ11w+Q8I qMlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746212233; x=1746817033; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w7+NkoyA3HMTuquXVM6+FfGafWiuRck1O1aecj2hVgw=; b=Vo+oAMw20UhiRFjrUOR5MI4dcrHaVgOErntNegcpTjwMAm/KwpaqXfZtOUrGRvC9tv OpzByN+rjOA4wHARK2X+sP0pUohZBFdoY081y60xI6/qGT9Fe7yx+hHfh3JDH3DQEgRc Scege0YlwGhYSYlaNNQkfVtQftE1a8t7czDucYw6aravsdgGgzduM2TE04ui2/6+3+PT flzlN2erPaIBQKyqEYCRBM0qu92PrBnUcctIC9O+Ch0vt0qWt3rSW/1E+suBPE4+6X13 qoY+WZTOQibJDupUZYDJeCPqcOR3gGbx8lTg9gY6tZD2FZhpuBb1vsMK6eq6KYY0NZ12 g3Xw== X-Gm-Message-State: AOJu0YyhFsD9hal8AIjwdsk81tjky3ONse0QVxPx2g0HbA5RI10NaYWU gGKMlejXtRbHAXUEKj794Nlm9TKWyLgAu6FKp4K1u3wrJOMdlWkns9cn6Acq1E5F4UNWaNwvM4B y X-Gm-Gg: ASbGncsuPcqCZJk4OheUqqs0BWby3g4a22kCmaNA9bEjeU9vAK0Yojs9lKHLP6q7Lq9 JkBBw0oiuylzDXGl21O7zTbxAyhYU4H4cVm9GXHD0zaav4e2OyLvWVOefkbZ9kPp5rtZ4WseGrY sEWGhfEyChVTZY/uYLcXwfuXLI2A41P4fFx6VZDbkCOE1pxMLCHgZUDxxsCn830+jJxRCYreqmU pDw/6Ubk0NkgzXsJ79f9AHNI1kCfxS/kVeH3kLQvcKNWPlespoNid+JOXKqzGEcaLUcK4ozHkeW 3ViF/1+zcZhdJvP7RpvdHsCUG9l/n9PDKjLOP36iiKQTp+is6BFN8tA92z3xEccMwc5IPp/mW+w 8GsxD2b+OZMX++U3+12W3fU874zVfxLU= X-Received: by 2002:a05:6402:1e8e:b0:5f6:d53f:cb9d with SMTP id 4fb4d7f45d1cf-5fa7891a94emr3357374a12.30.1746212233486; Fri, 02 May 2025 11:57:13 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5fa77755777sm1569609a12.6.2025.05.02.11.57.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 02 May 2025 11:57:12 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Laurent Vivier , Igor Mammedov , Huacai Chen , Amit Shah , Marcel Apfelbaum , Sergio Lopez , Ani Sinha , Paolo Bonzini , Eduardo Habkost , Jiaxun Yang , Jason Wang , Richard Henderson , Yanan Wang , Gerd Hoffmann , =?utf-8?q?Cl=C3=A9ment_Mathieu--Drif?= , Zhao Liu , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Yi Liu , "Michael S. Tsirkin" Subject: [PATCH v3 03/19] hw/mips/loongson3_virt: Prefer using fw_cfg_init_mem() Date: Fri, 2 May 2025 20:56:35 +0200 Message-ID: <20250502185652.67370-4-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250502185652.67370-1-philmd@linaro.org> References: <20250502185652.67370-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=philmd@linaro.org; helo=mail-ed1-x52a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org fw_cfg_init_mem_wide() is prefered to initialize fw_cfg with DMA support. Without DMA, use fw_cfg_init_mem(). Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/loongson3_virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c index de6fbcc0cb4..41733988729 100644 --- a/hw/mips/loongson3_virt.c +++ b/hw/mips/loongson3_virt.c @@ -286,7 +286,7 @@ static void fw_conf_init(void) FWCfgState *fw_cfg; hwaddr cfg_addr = virt_memmap[VIRT_FW_CFG].base; - fw_cfg = fw_cfg_init_mem_wide(cfg_addr, cfg_addr + 8, 8, 0, NULL); + fw_cfg = fw_cfg_init_mem(cfg_addr, cfg_addr + 8, 8); fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, (uint16_t)current_machine->smp.cpus); fw_cfg_add_i16(fw_cfg, FW_CFG_MAX_CPUS, (uint16_t)current_machine->smp.max_cpus); fw_cfg_add_i64(fw_cfg, FW_CFG_RAM_SIZE, loaderparams.ram_size); From patchwork Fri May 2 18:56:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 886643 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp962603wrq; Fri, 2 May 2025 12:01:42 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCViaAAkAT5xl7g2+LtgMz/LetBMc74vuNJgB60sS8YPhsdU7Ja4cO7AXst/yhZ/FNM9VnfEnw==@linaro.org X-Google-Smtp-Source: AGHT+IGui7m/olIi/2fOCdbKmk5znvp0P/TbMqz9GBorzzQKFs/jkYqgU7Mz3ZZDDg/7UmQQ9obh X-Received: by 2002:a05:6000:250c:b0:39c:1257:ccae with SMTP id ffacd0b85a97d-3a099af23e6mr3050316f8f.57.1746212501953; Fri, 02 May 2025 12:01:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746212501; cv=none; d=google.com; s=arc-20240605; b=khD1xaS3KhJgu8ROTHzOCTAdnJcyVepPUPES11/zWSP7Y8t6XSyS/HbI+8apcCnGZn rbX1SjouZ3CfMUwxioGdBm0efCBuMVCm8lcZtIv/nkqkWlXX258xze1NNqKnh00Ysyrj bDvMOzs5iM0i2Y9tJTQydywWwILHSvCh9sPwPIMF7KdKtbRTzq5MGguJYAPzxEPw/ztp /228kalD6+eYhpRGB9DJVjdh8xRpXE5Lh+ccHtOSdgQ+ugyKEXXBJx6VHEt+gB6DqS0v WwoHAQyyRzOXiYIQp8Ek9BCGNG8TL1/Zk608f2urivd3urycPJQgkx3lUlt+LeksZYRv OMRw== 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=ksLm8Hbb5N8Btg8hJJq48kxuL5GRhX/1Dl4RQBlOi+Q=; fh=Mi6rIaSWSDxP/DH2kogK8jGulyKPJuFbWNIs/qeUzeE=; b=KF6DpIvZsuB2r5yHnc+oUw0WcUpwP2q4ofcEU4kWYQ3nHDe1aTSH8boW+tRPvMg1Wh T1RNuWGZIvK5TRcblsonEOm4UEEX0YZ3ek5hPweQnU3mVKNzJ5rDTbVwOownlei9WNmS 4jGIfNG37POhxSJ8HA+ferGfksU9XnXYqMyRm8QJya4e2yuO2SJEgPux47czDFapf9ZF gk4xaIiNeuvauUGRdvTtOGotyEsvdH8mc2BKq3cQLruLVdNxBR0pDGYIanAZVoq+6rG2 d2bK9V3ws9R+VaQsRnpDmeh7OD5LJbvsI90IGdrs5/M+puot+fU9jOo26UwNjhA5ahdJ rVmA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CeBxNecB; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ffacd0b85a97d-3a099b007dbsi1537217f8f.529.2025.05.02.12.01.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 May 2025 12:01: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=@linaro.org header.s=google header.b=CeBxNecB; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAvZf-0004sn-9b; Fri, 02 May 2025 14:57:29 -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 1uAvZb-0004oR-BW for qemu-devel@nongnu.org; Fri, 02 May 2025 14:57:23 -0400 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAvZZ-0005Pi-8M for qemu-devel@nongnu.org; Fri, 02 May 2025 14:57:22 -0400 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-ac29fd22163so402092066b.3 for ; Fri, 02 May 2025 11:57:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746212239; x=1746817039; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ksLm8Hbb5N8Btg8hJJq48kxuL5GRhX/1Dl4RQBlOi+Q=; b=CeBxNecBb7II4FgXONKuyCX6Ox3xOhW5ETBJot7ExX2rskH23D1gdEBwM5xaFoVYB2 mESOD3HbGfbVTweveHzxIspv+8rXyIdEWvSHSQMIUdFC1+QRoupib4+hzt5ejYJ+hUXf 1h/EaWYygWKDxJFT1aFIaatsEeoJ4FqTTQGPaJql4gTa2wBaPsLFliYGoJxYAMZx/6EU GBA3Ut2BI4nt8Gbjw1FNpM7wh4jpueDYSXsgnC2qhxDJ7fd++eANbfUs48b4VSTqbD5q F1Z/GBne9889T1zZ02cOSXvr9v3J2KfBglGUi+95rwSN6LzZ+cDy25PBIxOvVi/bH/TJ nLRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746212239; x=1746817039; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ksLm8Hbb5N8Btg8hJJq48kxuL5GRhX/1Dl4RQBlOi+Q=; b=FVtzQLIct1YGMDhtj09qPdxITtWHOQueskdKxaCRZfAZAI+zvNgOjBRMQ6fiMFofDZ MLjR6oihZ+VKUGHuCImK7KmQp3nnuv3ERuFw4IAVr+WqSvKTJBkYnVcrAZgONlWw632S SgVS4jsIENeIdDASmxzMV/UXaYQ1aiypUIzGfNgvFmvoRMZt5zW0epvG732GF+GTtt90 fso5WvlkDYvG4/4+cxrZrEoVG6itsw2I2aG9eHRfEn9lOH1AzdIkRT65RTbl16nYv5jE Wrg0EY8qg+4jHai1dy1aFHO2t898V5YIDaMZZAidQYHQyxzmojqGwT52z60FHjJt/SSS JK3Q== X-Gm-Message-State: AOJu0Yzaz0Xz8fZvF5WdSZKbC0l0W0AUgEuVu7ysgKXfunJdD334Pe1w Eb8Wwt7aCRU5NjHFbJjE4+UCQ2lhRssvTysi5jKJwYhS7lEmBztdqjPOJ8r0gd0lxSrcQbcv8FD m X-Gm-Gg: ASbGncuKNbXU+G57HpwfUGdoCOyKYhvRAueHrx8jHMXgDzRlXTewMrkOsc/Db5rrpbO hweoHjJcxyx9pGZ3091t4tNFjVXiWEE2JDXa3Lsz+3Z0BBaKcaqTFrTLFI1cGE2ec8pNQ/RHgsL LtY+CR+zVtBpTUlQWESH4+625SWy297OVOtqEp+o9pMO0NYsjVwhWf4nL2e6XhI3t6j2lHdjhiV pHFKbnuF/y1zWEF6ho/SM70ZDYGV2QLeuWTbLh3nN47weyncVGBZYJ9H/byLvPmvU8OdI+Ftfar c4f/BAXV0DGdYw0/DPzU8GBprLdaFZlz+kzNnCsqDBkoHsvGmlEtglVxbAP2QGOL5xz8RyzCUvv J4vRPQ4ZapLdKEU00m3KG X-Received: by 2002:a17:907:a05:b0:ac7:b368:b193 with SMTP id a640c23a62f3a-ad17adbf7fbmr463741066b.27.1746212238974; Fri, 02 May 2025 11:57:18 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ad1891f6b05sm86006066b.86.2025.05.02.11.57.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 02 May 2025 11:57:18 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Laurent Vivier , Igor Mammedov , Huacai Chen , Amit Shah , Marcel Apfelbaum , Sergio Lopez , Ani Sinha , Paolo Bonzini , Eduardo Habkost , Jiaxun Yang , Jason Wang , Richard Henderson , Yanan Wang , Gerd Hoffmann , =?utf-8?q?Cl=C3=A9ment_Mathieu--Drif?= , Zhao Liu , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Yi Liu , "Michael S. Tsirkin" Subject: [PATCH v3 04/19] hw/nvram/fw_cfg: Factor fw_cfg_init_mem_internal() out Date: Fri, 2 May 2025 20:56:36 +0200 Message-ID: <20250502185652.67370-5-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250502185652.67370-1-philmd@linaro.org> References: <20250502185652.67370-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=philmd@linaro.org; helo=mail-ej1-x632.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Factor fw_cfg_init_mem_internal() out of fw_cfg_init_mem_wide(). In fw_cfg_init_mem_wide(), assert DMA arguments are provided. Callers without DMA have to use the fw_cfg_init_mem() helper. Signed-off-by: Philippe Mathieu-Daudé --- hw/nvram/fw_cfg.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c index 54cfa07d3f5..d119c10d308 100644 --- a/hw/nvram/fw_cfg.c +++ b/hw/nvram/fw_cfg.c @@ -1053,9 +1053,9 @@ FWCfgState *fw_cfg_init_io_dma(uint32_t iobase, uint32_t dma_iobase, return s; } -FWCfgState *fw_cfg_init_mem_wide(hwaddr ctl_addr, - hwaddr data_addr, uint32_t data_width, - hwaddr dma_addr, AddressSpace *dma_as) +static FWCfgState *fw_cfg_init_mem_internal(hwaddr ctl_addr, + hwaddr data_addr, uint32_t data_width, + hwaddr dma_addr, AddressSpace *dma_as) { DeviceState *dev; SysBusDevice *sbd; @@ -1087,11 +1087,19 @@ FWCfgState *fw_cfg_init_mem_wide(hwaddr ctl_addr, return s; } +FWCfgState *fw_cfg_init_mem_wide(hwaddr ctl_addr, + hwaddr data_addr, uint32_t data_width, + hwaddr dma_addr, AddressSpace *dma_as) +{ + assert(dma_iobase && dma_as); + fw_cfg_init_mem_internal(ctl_addr, data_addr, data_addr, dma_addr, dma_as); +} + FWCfgState *fw_cfg_init_mem(hwaddr ctl_addr, hwaddr data_addr) { - return fw_cfg_init_mem_wide(ctl_addr, data_addr, - fw_cfg_data_mem_ops.valid.max_access_size, - 0, NULL); + return fw_cfg_init_mem_internal(ctl_addr, data_addr, + fw_cfg_data_mem_ops.valid.max_access_size, + 0, NULL); } From patchwork Fri May 2 18:56:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 886630 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp961005wrq; Fri, 2 May 2025 11:58:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU78VSrcZDC8RBlRV4qubWiihYMgdzcbJoH7vUTvhRSdMKBzksq9lM5ry1JK0HKdX0qQpUaXg==@linaro.org X-Google-Smtp-Source: AGHT+IGhx1p2Z7T9+to3reDVB0/Z4Qd1tXP1JLaqXwDkOHHURgzv0URUII/Bs1sAyN7e9z6MqdPs X-Received: by 2002:a05:622a:1baa:b0:476:6215:eafc with SMTP id d75a77b69052e-48d5c4819a1mr2925201cf.22.1746212312121; Fri, 02 May 2025 11:58:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746212312; cv=none; d=google.com; s=arc-20240605; b=TiL0CA6nr10pikufGIBQ9sD6GQBUyVbP434CCGD5pANZnmxXR6OUOP9MTSJ9a8L9AR ekpoOjFouOmxs50k+s5St2DrlnK1OHjRHsaYBG7Hbkwt+stvrElGSdrqvylHR80qq3Ey +aysoF3AT9uzvy2BV7tnNaSl2LswapuptrNhHn9qxeaMIyZjFEnYPj2C4Tb48xn2YLdA w5p6U+lDMSQtwGin/koFr0qDdmTRjMy73bGCfR6OUmgd1wfzMCvrOjIgfipYmbLZD4LY ORiCJAQygnJDBi8xpfWNerZz4PIKTJKwxWB1koZxZeXhh6SClHCy1W7PDJjZ7f8jgWkQ xq6w== 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=J7AMA5ZLAGtFwb46rBtPIk1KAapPoLENY9+BSCyDrfE=; fh=Mi6rIaSWSDxP/DH2kogK8jGulyKPJuFbWNIs/qeUzeE=; b=ZfhM46tMi7hKMVm3rn0gAu+45GSraLAe8kTKlszK614b6N+RfCc6xXtBCHz5EYz39a /JRq/8Ivpeo0brh7nsjXiOloSspRU8+JtHcgUYBJnhHprJpXse4bOdMSseZjMQPi0nqh tmmkdnQRD8TlMeQVgMu4EE7vkCN1mzk6ws8Mtz3IPp2RxN4wjDA03D2/EPDiURXsbvQl v/d+0+QSPEITXyHUdCr2Vv5BLzWFfOOnS9fYuLeLKMpdDCep3ZE+eH6teFsTA6Qs9CYO KdxtFWpca5pW3V3Ii7u50JklkGv+EKPs9z/xa1y0g52h19Xk7uyQj5umLYZ4vpGsfckk SRhQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ypk5WA1C; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-48b98724498si36029971cf.340.2025.05.02.11.58.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 May 2025 11:58:32 -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=@linaro.org header.s=google header.b=ypk5WA1C; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAvZj-0004xO-0h; Fri, 02 May 2025 14:57:31 -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 1uAvZh-0004u7-GQ for qemu-devel@nongnu.org; Fri, 02 May 2025 14:57:29 -0400 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAvZe-0005QW-IC for qemu-devel@nongnu.org; Fri, 02 May 2025 14:57:29 -0400 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-ac289147833so421327666b.2 for ; Fri, 02 May 2025 11:57:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746212244; x=1746817044; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=J7AMA5ZLAGtFwb46rBtPIk1KAapPoLENY9+BSCyDrfE=; b=ypk5WA1C4A/fcy518pQFbQm1rsFP/AKOFh01dgBEDWDoOmxOP3sXtmT09WB9yvQWSi 8RtOZNBhtwlGoBO2L873D36F1+/58e1Dki+AtnktIpeXEGU+GUXJtmy3AO1xpNGbiDXN lcG9sOg3aUkkOZpDqsrsQSD/6NGh8CC0QOVs4ZHqDRwxf1d2E+GCwamjAH7vtGU6DgeT iBrf04sJSaEOQn0h6+SmBjTULCuDYa0G+uWNr5C2p0eY/2YB7hqQYcq2JykqFnGCXN9s yknay9yVlpnLYrImXePNrFqkwn3jffa7bb3pTcWM6yKTb+/gh79EHtzLNMlWuO7ZFSdK VOzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746212244; x=1746817044; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J7AMA5ZLAGtFwb46rBtPIk1KAapPoLENY9+BSCyDrfE=; b=hXcT+q1cJ2qz6ifFwIopnXZH+rQfbK4E+/1/213+U6vN7MTzBDIGKcxHb9ajfCMfks Df7LafNZa+oqiRBFYOXoJ5AB598ZIyy/gY+3DgTo224opFabLnTgm/nJEFNKMCCvePDO u+6oNY/u9mOMBBZ1pvnCSTkHQYdp6Xja02D8Rvz0oBciAdfrtjzaXNzGJJ1suqWTXXWm Cb13Xs5XdyJYrgAR1zFbD9AgyMZMvxf3EQ1Rbiz/UkdILZlMICYpkl8XnDnqwrzXPwhW rsR/BA9XK5zZKRQwBCO8Joab8kXMljgH6R+YKj9pSq2lp9RfgsdScvEiaJopxi6OTQF/ Ut4Q== X-Gm-Message-State: AOJu0YwV8SbunczQJAGd3ObGCyRGSGKXWx14mrTpH2nGyG9EGfLciynz AdFbE0wsgWCEi9kGGmH3S6tCwNFVGAg/CtkLhZLYJRonfM04bNMqijh5SXe3XSXqBVz8nBk126d H X-Gm-Gg: ASbGncuvLnXU29vAb+7REISncPBoESTUB/WcYpK2bKPomTY9/YcrxIs85IXvfZDch7B 6Plt1YS9s/4yftOZ9S+IHmWjDRa0cw+xP8ux3/0wyIJMnILDN+M8j7Slu8B7ZliTPVRKlaQVPEp lJ1c3STwK0yKrds0+a3B+6GeNteBY1f6n2OgjmwAxXHrxqyQJCCBKyrI4uAmZZvwgdpuTzndO15 +mgmT3GXncdF7jyARYoKyy0cSoU8dqYCockBDxncy1uCFZ0jKMGRGA4YCh2EiOtIDPG0KPbMseM O0BS52gQ6qTtb9/+/fUJFvWs2ZMzLAJlXduVs2QpC8r7rm5nnP70phSuqRXTqtw5nIeF4F4SuKC uDqWVIeppWXaCyNcFrq2z X-Received: by 2002:a17:907:86a3:b0:ace:6a25:f56a with SMTP id a640c23a62f3a-ad17ad89a93mr422212666b.29.1746212244582; Fri, 02 May 2025 11:57:24 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ad1891a2d87sm86057966b.45.2025.05.02.11.57.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 02 May 2025 11:57:23 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Laurent Vivier , Igor Mammedov , Huacai Chen , Amit Shah , Marcel Apfelbaum , Sergio Lopez , Ani Sinha , Paolo Bonzini , Eduardo Habkost , Jiaxun Yang , Jason Wang , Richard Henderson , Yanan Wang , Gerd Hoffmann , =?utf-8?q?Cl=C3=A9ment_Mathieu--Drif?= , Zhao Liu , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Yi Liu , "Michael S. Tsirkin" Subject: [PATCH v3 05/19] hw/i386/x86: Remove X86MachineClass::fwcfg_dma_enabled field Date: Fri, 2 May 2025 20:56:37 +0200 Message-ID: <20250502185652.67370-6-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250502185652.67370-1-philmd@linaro.org> References: <20250502185652.67370-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=philmd@linaro.org; helo=mail-ej1-x62b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The X86MachineClass::fwcfg_dma_enabled boolean was only used by the pc-q35-2.6 and pc-i440fx-2.6 machines, which got removed. Remove it and simplify. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/x86.h | 2 -- hw/i386/microvm.c | 3 --- hw/i386/multiboot.c | 7 +------ hw/i386/x86-common.c | 3 +-- hw/i386/x86.c | 2 -- 5 files changed, 2 insertions(+), 15 deletions(-) diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h index fc460b82f82..29d37af11e6 100644 --- a/include/hw/i386/x86.h +++ b/include/hw/i386/x86.h @@ -29,8 +29,6 @@ struct X86MachineClass { MachineClass parent; - /* use DMA capable linuxboot option rom */ - bool fwcfg_dma_enabled; /* CPU and apic information: */ bool apic_xrupt_override; }; diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c index e0daf0d4fc3..b1262fb1523 100644 --- a/hw/i386/microvm.c +++ b/hw/i386/microvm.c @@ -637,7 +637,6 @@ GlobalProperty microvm_properties[] = { static void microvm_class_init(ObjectClass *oc, const void *data) { - X86MachineClass *x86mc = X86_MACHINE_CLASS(oc); MicrovmMachineClass *mmc = MICROVM_MACHINE_CLASS(oc); MachineClass *mc = MACHINE_CLASS(oc); HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(oc); @@ -671,8 +670,6 @@ static void microvm_class_init(ObjectClass *oc, const void *data) hc->unplug_request = microvm_device_unplug_request_cb; hc->unplug = microvm_device_unplug_cb; - x86mc->fwcfg_dma_enabled = true; - object_class_property_add(oc, MICROVM_MACHINE_RTC, "OnOffAuto", microvm_machine_get_rtc, microvm_machine_set_rtc, diff --git a/hw/i386/multiboot.c b/hw/i386/multiboot.c index 6e6b96bc345..bfa7e8f1e83 100644 --- a/hw/i386/multiboot.c +++ b/hw/i386/multiboot.c @@ -153,7 +153,6 @@ int load_multiboot(X86MachineState *x86ms, int kernel_file_size, uint8_t *header) { - bool multiboot_dma_enabled = X86_MACHINE_GET_CLASS(x86ms)->fwcfg_dma_enabled; int i, is_multiboot = 0; uint32_t flags = 0; uint32_t mh_entry_addr; @@ -402,11 +401,7 @@ int load_multiboot(X86MachineState *x86ms, fw_cfg_add_bytes(fw_cfg, FW_CFG_INITRD_DATA, mb_bootinfo_data, sizeof(bootinfo)); - if (multiboot_dma_enabled) { - option_rom[nb_option_roms].name = "multiboot_dma.bin"; - } else { - option_rom[nb_option_roms].name = "multiboot.bin"; - } + option_rom[nb_option_roms].name = "multiboot_dma.bin"; option_rom[nb_option_roms].bootindex = 0; nb_option_roms++; diff --git a/hw/i386/x86-common.c b/hw/i386/x86-common.c index 1b0671c5239..27254a0e9f1 100644 --- a/hw/i386/x86-common.c +++ b/hw/i386/x86-common.c @@ -634,7 +634,6 @@ void x86_load_linux(X86MachineState *x86ms, int acpi_data_size, bool pvh_enabled) { - bool linuxboot_dma_enabled = X86_MACHINE_GET_CLASS(x86ms)->fwcfg_dma_enabled; uint16_t protocol; int setup_size, kernel_size, cmdline_size; int dtb_size, setup_data_offset; @@ -993,7 +992,7 @@ void x86_load_linux(X86MachineState *x86ms, option_rom[nb_option_roms].bootindex = 0; option_rom[nb_option_roms].name = "linuxboot.bin"; - if (linuxboot_dma_enabled && fw_cfg_dma_enabled(fw_cfg)) { + if (fw_cfg_dma_enabled(fw_cfg)) { option_rom[nb_option_roms].name = "linuxboot_dma.bin"; } nb_option_roms++; diff --git a/hw/i386/x86.c b/hw/i386/x86.c index f80533df1c5..dbf104d60af 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -375,14 +375,12 @@ static void x86_machine_initfn(Object *obj) static void x86_machine_class_init(ObjectClass *oc, const void *data) { MachineClass *mc = MACHINE_CLASS(oc); - X86MachineClass *x86mc = X86_MACHINE_CLASS(oc); NMIClass *nc = NMI_CLASS(oc); mc->cpu_index_to_instance_props = x86_cpu_index_to_props; 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->fwcfg_dma_enabled = true; nc->nmi_monitor_handler = x86_nmi; object_class_property_add(oc, X86_MACHINE_SMM, "OnOffAuto", From patchwork Fri May 2 18:56:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 886640 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp962032wrq; Fri, 2 May 2025 12:00:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVsCnGp0kGt2yEr/+7ktimoMbLbQ9hlT5Sv0v5BTVCY8QC6p9rSKDkyFbil/9jxD27Ph3QbfA==@linaro.org X-Google-Smtp-Source: AGHT+IFqYUWOJkpD4M5+LFw74J8Bqn7gjPjkxb9UL8r4vM3VAfP0u3bApfNCZdn4APDHMjBl3vpu X-Received: by 2002:a05:6214:c47:b0:6e8:ebc6:fd5f with SMTP id 6a1803df08f44-6f523777f16mr2209356d6.20.1746212449565; Fri, 02 May 2025 12:00:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746212449; cv=none; d=google.com; s=arc-20240605; b=lsyGIt8qfSKYiS0xlGOcjoTSmN7ymu0k4TENLNC1/YBac8q4Rfv8IKMQXo6NRtuWak QHEl2k/jeww7LJA71NQU7Fw1usd7oUK1ktismtkvgPd/6kswyOmLZPD6jePugGUv1hT+ sCWki/7XYtlC1kfw37G/4QYwqahtDG5getKclKeegfOhLt1B7XT9o/S9nzv1uNNoQpt0 /Ozd3sFrdVEO4+Dvy0nvuajNz2RAFiMkNo4rXBmIm6g0DDfoGD4SmcUo4uHBWioedsI5 R3bxT6bMjGX+ZM19F3Ea4fEbUGiWM+ElPNLd7ZKljvhgT61TzpF0qYBWR+aiat7fB+9i ftHA== 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=kKc325giSSG2jMz6IXz+I31l486LYr2x6p+yz3FOCTQ=; fh=Mi6rIaSWSDxP/DH2kogK8jGulyKPJuFbWNIs/qeUzeE=; b=cK3G/f81TIf1lRDh6p0xlS31bAYkLCY23glT/OtkeVTS/pEZ+oR2/nLEPy5PPAP+JL 7+zjn9S7K5K6/ebzHYbnvrR7r/pVzXY3wpBupsIa8npPzhKCoXGlgaotieFuTrjBHS23 2NYPsXMpxK4bKYAcyKlwGfMWikR7jorcP+fF1lQ723464slPc9DZOxCjViA/ekq+aY7W gfr5X/FRLlCykZxiFBjET4wqkLHUurgcFn4zvBt5ZAAG0E3RACRAOYrASBXufYIZAGn5 yHCVkalTuNHmtj9bStAfWMC+XvMSMbOxOmnI3ZXVywfzS4riI8S/55D9BZdC+8gPJ+O9 SGlQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LbYJAXqe; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-48b98246e97si36551301cf.262.2025.05.02.12.00.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 May 2025 12:00:49 -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=@linaro.org header.s=google header.b=LbYJAXqe; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAvZo-00056q-AV; Fri, 02 May 2025 14:57:36 -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 1uAvZm-00053N-G1 for qemu-devel@nongnu.org; Fri, 02 May 2025 14:57:34 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAvZk-0005Ry-NO for qemu-devel@nongnu.org; Fri, 02 May 2025 14:57:34 -0400 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-ace94273f0dso513668466b.3 for ; Fri, 02 May 2025 11:57:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746212250; x=1746817050; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kKc325giSSG2jMz6IXz+I31l486LYr2x6p+yz3FOCTQ=; b=LbYJAXqeYlyA+n48oQPf1aDKuXQ6z0RTYiD3c2R7GFGBMtceu3SugEvvc1JNX322mH N9ljLW879TxLzchXf77SvL/2l2aAqXROuXLrG+SZfcxF2iWlvZu3Epip0+u7hGqkTz0A rbS7pI3xuV7rsjYfSSDDAM98KPwpKb0EdwSipcuy7U1cn+gsh3dh+7sqAZIxn90iLtCR kIfv1jeCF2JfYzG9QxX4XdaH6osdRUkmbQi29owwTntLbuQOrY41jVf2KlB756opB2Yy jHI8v/TplCs9nO9QI6Ncbj9hsWUgYQ6J0ha7uE6AeLbDTSEn6H3J7SqoMAWCCgEnQ7nD XOFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746212250; x=1746817050; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kKc325giSSG2jMz6IXz+I31l486LYr2x6p+yz3FOCTQ=; b=KQNtwoO2TqfqnJKsl9YWtFSz65b8q0giAnWIebpt54M86U4d1qRZL7kxtdCnDN/I1j HFWYREX8CBynVwTW85o8uCc4ePFg9O0Ls8gkWMNAoXppJ1pbgJkoh34qEtiShXTpbQNL +jGhwTgDly/q0qs7+DP49g9y2CKvP9uXy82AHS8FyisilPss7OifIpZz1JpVqHrrcb/W hdMt6mX++3adFi2Zf+wFkau7+T7cnVjNqUw2uv/YQO0PXK1H4FI6IEQWwB7PrWD31dIp Kgr5kaelgORxoY4WKM8uBg9o5fLGfl8GFetElvmZi6lkFq7LBprFdtbYfohK3Xcu8iGh UAMw== X-Gm-Message-State: AOJu0Yz76BLUQtO/CCRGl7f7zi+hu3J+eN1SZc+dTvorHn6swdZm/eOj QKgSVtcHwIKTviajUkC8i2UAA/cHGbAGLtSzoQs99K2mJE49FmUXMnR6ohTdjuaxlB5zeo+dRE3 1 X-Gm-Gg: ASbGncup/lR25KOnXh5StOtuNwrG2vysukNp86gzd5G7vGK9W7FLzlWcuLGICrEIvm0 sQP1vwdxdzL2/tmiqi7TYgrQpllIRanvHXt6iRa/dGtfwiEJ0/GeB81KAT2ZmM3rI61GD/+hhCg spMuhRhS6YqlpfAGCZZkrcH2PWpsOP5mYr1N0eoQ52TARKIJ/aDJK6jWq2H0pks84d2sBIP6K99 LLs840Eg30wYXPUrzYfYN1DBMzaa63kPArpPbvdzEuZCXBYjT90yW2JCIs5d+GwoOFl/7D5y5iZ 6wWRn4suYoUAUUKKgPKTI1hSmdeuCF4vSjjJCfKSnCO5lD9Ey83UK3kFqqdM3wuscCMGs3nHvXo 5f8NpQSnvZxo3ze5+DhYH X-Received: by 2002:a17:907:1999:b0:acb:b966:3a8f with SMTP id a640c23a62f3a-ad17af47f9fmr369374766b.39.1746212250389; Fri, 02 May 2025 11:57:30 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ad1895094basm85876966b.145.2025.05.02.11.57.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 02 May 2025 11:57:29 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Laurent Vivier , Igor Mammedov , Huacai Chen , Amit Shah , Marcel Apfelbaum , Sergio Lopez , Ani Sinha , Paolo Bonzini , Eduardo Habkost , Jiaxun Yang , Jason Wang , Richard Henderson , Yanan Wang , Gerd Hoffmann , =?utf-8?q?Cl=C3=A9ment_Mathieu--Drif?= , Zhao Liu , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Yi Liu , "Michael S. Tsirkin" Subject: [PATCH v3 06/19] hw/nvram/fw_cfg: Remove fw_cfg_io_properties::dma_enabled Date: Fri, 2 May 2025 20:56:38 +0200 Message-ID: <20250502185652.67370-7-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250502185652.67370-1-philmd@linaro.org> References: <20250502185652.67370-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=philmd@linaro.org; helo=mail-ej1-x633.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Now than all calls to fw_cfg_init_io_dma() pass DMA arguments, the 'dma_enabled' of the TYPE_FW_CFG_IO type is not used anymore. Remove it, simplifying fw_cfg_init_io_dma() and fw_cfg_io_realize(). Note, we can not remove the equivalent in fw_cfg_mem_properties[] because it is still used in HPPA and MIPS Loongson3 machines: $ git grep -w fw_cfg_init_mem hw/hppa/machine.c:204: fw_cfg = fw_cfg_init_mem(addr, addr + 4); hw/mips/loongson3_virt.c:289: fw_cfg = fw_cfg_init_mem(cfg_addr, cfg_addr + 8, 8); Signed-off-by: Philippe Mathieu-Daudé --- hw/nvram/fw_cfg.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c index d119c10d308..c1bd229e8f3 100644 --- a/hw/nvram/fw_cfg.c +++ b/hw/nvram/fw_cfg.c @@ -1026,12 +1026,9 @@ FWCfgState *fw_cfg_init_io_dma(uint32_t iobase, uint32_t dma_iobase, FWCfgIoState *ios; FWCfgState *s; MemoryRegion *iomem = get_system_io(); - bool dma_requested = dma_iobase && dma_as; + assert(dma_iobase && dma_as); dev = qdev_new(TYPE_FW_CFG_IO); - if (!dma_requested) { - qdev_prop_set_bit(dev, "dma_enabled", false); - } object_property_add_child(OBJECT(qdev_get_machine()), TYPE_FW_CFG, OBJECT(dev)); @@ -1042,13 +1039,10 @@ FWCfgState *fw_cfg_init_io_dma(uint32_t iobase, uint32_t dma_iobase, memory_region_add_subregion(iomem, iobase, &ios->comb_iomem); s = FW_CFG(dev); - - if (s->dma_enabled) { - /* 64 bits for the address field */ - s->dma_as = dma_as; - s->dma_addr = 0; - memory_region_add_subregion(iomem, dma_iobase, &s->dma_iomem); - } + /* 64 bits for the address field */ + s->dma_as = dma_as; + s->dma_addr = 0; + memory_region_add_subregion(iomem, dma_iobase, &s->dma_iomem); return s; } @@ -1185,8 +1179,6 @@ static void fw_cfg_file_slots_allocate(FWCfgState *s, Error **errp) } static const Property fw_cfg_io_properties[] = { - DEFINE_PROP_BOOL("dma_enabled", FWCfgIoState, parent_obj.dma_enabled, - true), DEFINE_PROP_UINT16("x-file-slots", FWCfgIoState, parent_obj.file_slots, FW_CFG_FILE_SLOTS_DFLT), }; @@ -1207,11 +1199,9 @@ static void fw_cfg_io_realize(DeviceState *dev, Error **errp) memory_region_init_io(&s->comb_iomem, OBJECT(s), &fw_cfg_comb_mem_ops, FW_CFG(s), "fwcfg", FW_CFG_CTL_SIZE); - if (FW_CFG(s)->dma_enabled) { - memory_region_init_io(&FW_CFG(s)->dma_iomem, OBJECT(s), - &fw_cfg_dma_mem_ops, FW_CFG(s), "fwcfg.dma", - sizeof(dma_addr_t)); - } + memory_region_init_io(&FW_CFG(s)->dma_iomem, OBJECT(s), + &fw_cfg_dma_mem_ops, FW_CFG(s), "fwcfg.dma", + sizeof(dma_addr_t)); fw_cfg_common_realize(dev, errp); } From patchwork Fri May 2 18:56:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 886632 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp961010wrq; Fri, 2 May 2025 11:58:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXFpgPKk9AZMOKhN1jqzt4blsgcORa6cdgBAMZhCCavXIxE+/R30w9hXbdRPgBySVaMoUw/bQ==@linaro.org X-Google-Smtp-Source: AGHT+IHNkVc9fIKozIyuV8tf2pD5AKyhCRkt17RSQxeyO6cK8Oocreokz3kCVnWh2zS45hLlI2yz X-Received: by 2002:a05:620a:c46:b0:7c5:6b46:e1ee with SMTP id af79cd13be357-7cace97069amr1082499085a.4.1746212312665; Fri, 02 May 2025 11:58:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746212312; cv=none; d=google.com; s=arc-20240605; b=fAVkQV1yNSleket+bmqVL1JwZECNjSIMkJCuLWtEOdvgGQJ/ib9pCyIrO0yiTwbSnj 9ytBCLJwADUmstz0y8D5Ws4hCqNi5vcC2bp+62UOXAStX5PbwrG7CdvPL8RjGpa9bA3N 4mH7u2RUFE86JwagFYnc35TfeyXs+r8gRJ+mGSkslDnPAg6UyJExy4Wy0BPZ+bHHPvE1 W5u93ZRER7nvSHTTmCOgz3iYC0atqxn1Hol9VZvqBwcl2ef3EClMVLi1hAb8H3f5Rxrl ajG0342JsjgOAW0NHEEZFYiEBgIK+maJeowXI4bsDsW3vbIe9hk509wZhnQczDxTfrXG 28UQ== 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=7W0BMY8RW+QgVy2DDvRgW0zJIWF8qk5txc1xkIoqDmI=; fh=zA7MiWWYdZ7nPYzFPsisQ1XfjLk8wRfRNbrxI2kr3EE=; b=aBJpwfq80H1sOrFFUdypsWsM+NqycEEsObu2A5YyqgpBOvIJMtgNpro3ctCQH3eiYh 4APB0cJHPPfq6ChVq1+50T8BFYgf47WcJEO1+USVh0xHNwbfJo5JMrw8CSo3BAL9TVmR 7+7ukWjAY389xu91dk89Iod93Mxu0LKM/IXlGYvZPy8wrURf8MTiMs8GWXS+H6o3f/Bl cIqazdfFjdolZRP4Q9TKTBfK+Eq/3i59Y/j2+cHAo8KvUBx1vmHlEaIHV6DQ0Yj6qh5w pIS5H2AZWEiA7+hB9p8WRqlSxqU+b0vKR4B9tclDcat4RML80CDAp7nxAybNG0+4ytCo gZ1Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=okKwYrCH; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7cad24480a5si368843285a.553.2025.05.02.11.58.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 May 2025 11:58:32 -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=@linaro.org header.s=google header.b=okKwYrCH; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAvZt-0005FJ-QL; Fri, 02 May 2025 14:57:41 -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 1uAvZr-00059m-U6 for qemu-devel@nongnu.org; Fri, 02 May 2025 14:57:39 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAvZp-0005TX-V7 for qemu-devel@nongnu.org; Fri, 02 May 2025 14:57:39 -0400 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-ac3eb3fdd2eso436825566b.0 for ; Fri, 02 May 2025 11:57:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746212256; x=1746817056; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7W0BMY8RW+QgVy2DDvRgW0zJIWF8qk5txc1xkIoqDmI=; b=okKwYrCH4fb0GAwxyZUireMgFtNBlnquyTJl+scP2BgYKObt96paspU8yAaFhakmr2 VrmCi8P62Jhe2KaPE4V2s8mqGmqajR31Fdm2BU+0/jPGvg7ZMx55XoETp7PQ8Cp4Eu5A DsbEZsXAieRZMIkY6izlCJrf1QEExT91dV1CjcpigFHiotRGN2s892AlDj2rCWDWDgGj E7J5ftsn3laa0AmBs1iBYnYZE5SP+3bmTPbOvU3QPMD/b9T6kf8KJ8/3NehvTFiniHfv V/x8Uu8g6lI805iUIZnCVg1k7gElSOQxvojXb0FxlKvhvnXgekBSH/nHyVzgakVNCYwi EqdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746212256; x=1746817056; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7W0BMY8RW+QgVy2DDvRgW0zJIWF8qk5txc1xkIoqDmI=; b=BtBv6PfgeYaX3745e2bHmspQDo6i2EQjZaRZrtAFLiZRNBJy+G8wHu2PtAAoS8eXI2 PpDVmJCISP0b+hseilIoQcPAlQl6zGHtpmgdFzU46Wl3WI3F4Wt/Fyv5dP0hk5I37qIT RawjwhYszXze2ECIpHRiM0MGZsT3+cLpfHckBLPv5S/qW527q2Jpdtaptw69YH1ltTOk TJko7vId7CzgNCCiEy6pCdsH+vq8Ko+ab5HLgW1MS84W3lp3dbW9Gx5sq8NxCdxMsz+E P4QxXCk6j//AMZYSX2oIANQNHF9IW7u0MaDKbDEVysDkvYsls2oaapa+j76D74h6xsQH 0S/w== X-Gm-Message-State: AOJu0Yw2Rf2iXOrlmhFmcim1t6FxUFEKWQaZ1SIeN/VW8JXAjMQSJJBw CleLPMlrv3rBC7my6jVXAhjCslcqe6dYV9iLXrZTTERN10s/D7LBcbRITXm8Z6ECr2UuLIXMFG2 m X-Gm-Gg: ASbGncuFWkhZGWh6C0jdhLfVS3c7G8alsvr6xVYV0MGlxUMcBd2sm22ZPe+WiOIjF1k dkW3QujjqjRMrDoQyGC8KgGYOVkPWlaXEnS+8dqcRpZZtRW3Yb4rV5/Rr73g+g8HAoDHiENFokc u/IcaKnqU/V0GM8fHkqgObgzb6xP/mHjk64SmQaZt9nN6wKMgMp00fIZVRBigGry8NzPGxkJw0l QBmnJulFNbOfbnZyion1iJpDAa4Yzd7jRQDQL0w44tTPk9930knpbunNFxM9b7I5FsFIUOT2qd8 rGTD50N0WvnDH4YkiwNkef0TkxshvwOBZZU0t5/XDyKu8VkpfSVR+KNEMvd2X6iYzX8iJguspB1 mUecl7UvORZ/GSUuGjEC9 X-Received: by 2002:a17:907:394a:b0:ac4:2ae:c970 with SMTP id a640c23a62f3a-ad17b5ac529mr354547966b.21.1746212256211; Fri, 02 May 2025 11:57:36 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ad18e68b571sm31491866b.104.2025.05.02.11.57.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 02 May 2025 11:57:35 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Laurent Vivier , Igor Mammedov , Huacai Chen , Amit Shah , Marcel Apfelbaum , Sergio Lopez , Ani Sinha , Paolo Bonzini , Eduardo Habkost , Jiaxun Yang , Jason Wang , Richard Henderson , Yanan Wang , Gerd Hoffmann , =?utf-8?q?Cl=C3=A9ment_Mathieu--Drif?= , Zhao Liu , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Yi Liu , "Michael S. Tsirkin" , Mark Cave-Ayland Subject: [PATCH v3 07/19] hw/i386/pc: Remove pc_compat_2_6[] array Date: Fri, 2 May 2025 20:56:39 +0200 Message-ID: <20250502185652.67370-8-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250502185652.67370-1-philmd@linaro.org> References: <20250502185652.67370-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=philmd@linaro.org; helo=mail-ej1-x633.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The pc_compat_2_6[] array was only used by the pc-q35-2.6 and pc-i440fx-2.6 machines, which got removed. Remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland --- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 8 -------- 2 files changed, 11 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index a3de3e9560d..4fb2033bc54 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -292,9 +292,6 @@ extern const size_t pc_compat_2_8_len; extern GlobalProperty pc_compat_2_7[]; extern const size_t pc_compat_2_7_len; -extern GlobalProperty pc_compat_2_6[]; -extern const size_t pc_compat_2_6_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 49632b69d29..7573b880905 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -251,14 +251,6 @@ GlobalProperty pc_compat_2_7[] = { }; const size_t pc_compat_2_7_len = G_N_ELEMENTS(pc_compat_2_7); -GlobalProperty pc_compat_2_6[] = { - { TYPE_X86_CPU, "cpuid-0xb", "off" }, - { "vmxnet3", "romfile", "" }, - { TYPE_X86_CPU, "fill-mtrr-mask", "off" }, - { "apic-common", "legacy-instance-id", "on", } -}; -const size_t pc_compat_2_6_len = G_N_ELEMENTS(pc_compat_2_6); - /* * @PC_FW_DATA: * Size of the chunk of memory at the top of RAM for the BIOS ACPI tables From patchwork Fri May 2 18:56:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 886645 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp963584wrq; Fri, 2 May 2025 12:03:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWVzJcJWtk+t3kZGJtEXcLtnoMoCIUoqC9EHuiZ00nDp3SZsq8kOOWxa8EzeJMSl3TetVRGpA==@linaro.org X-Google-Smtp-Source: AGHT+IG7brGRoykdskUxQzVYoDphwizTDNOuIaHeFY7O0EXsam2SSdfjuJvr8JUc9fgdSf8EtNPs X-Received: by 2002:ad4:5ced:0:b0:6e4:6ee1:a282 with SMTP id 6a1803df08f44-6f51574cd88mr77036476d6.18.1746212599668; Fri, 02 May 2025 12:03:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746212599; cv=none; d=google.com; s=arc-20240605; b=ZotvfStkGXNe6i5AdezuUROkvAhMpV8Ubnv7C9j2/e8NstC0L8PbffoAkoI8p0wvCA Ce59rDw2FD75g11Va9fL0FGUC5AftcJA4GTggxbnvZU+ctjPrPimeQQ6uGRS4wZKyXuh TR7zDtLHgRDqun7dqjMH3NdLp+Afaee99Eu7Ib5TMEHWHue4J2LqkdJC7JhgUFhbKVBR AkKC/Z+AgJP10pYrOC6kN1+U4GFfyivoAyuObuate6RmvM/ycKzgloSArdrdae2FaeE/ TGn/F98qtwdWOAUbPWPFOHrwxoZonfj+embPA7QVv8udV8IfTHhB4gdDuGsNUiW0tK3j ezGw== 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=bJup76xViPoYlcZ6DgY2Il03anUYcrocSLmxC3mshks=; fh=zA7MiWWYdZ7nPYzFPsisQ1XfjLk8wRfRNbrxI2kr3EE=; b=h/oOk8Bw/qPZlZHhTVmPU0TFUVq8A2tP7bYU9gcoagTCax05friHw+rddGmpewY1Kv 00hQExicd/wEqDaJ5CV2W1XOAEuecCFiGHWhQMDBxDA/sCe7iBAV/uWsrjPn34TneokY LmVAETSL14eIg9+rA6WYAAqMY78y0cpTLVW6yxpy9PDhBeuQy2gJCfVsq8jhyLRKVn8n XAR5t4481daz5nszKf6+GJX/AE/Y4mm4oYgudS1tyHgFF0IfgiVBWtF8PvHURmsxK729 GrdcXa8eOxNr80r0t43Pa3RPvF8O5OVxnAXKpv1Dh80DptthkcLhJn1ly8HE3Svi1zeV F3GA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hnakHWOL; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f50f3ae219si35139976d6.38.2025.05.02.12.03.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 May 2025 12:03: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=@linaro.org header.s=google header.b=hnakHWOL; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAvZz-0005Sp-3u; Fri, 02 May 2025 14:57:47 -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 1uAvZx-0005PZ-JQ for qemu-devel@nongnu.org; Fri, 02 May 2025 14:57:45 -0400 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAvZv-0005UW-Um for qemu-devel@nongnu.org; Fri, 02 May 2025 14:57:45 -0400 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-5f624291db6so3623086a12.3 for ; Fri, 02 May 2025 11:57:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746212262; x=1746817062; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bJup76xViPoYlcZ6DgY2Il03anUYcrocSLmxC3mshks=; b=hnakHWOLYk2WSEY+1dgT1PIWStT/daysp4VTectjn05QDT0j3ShXb0gkt2TBvyQ9Q1 ZFDfEtua/d+iOKC67pIXfJK5buU93OtqbV86fMkEC9V6bFaH/VgK8hYk+S3Tpc/U3Q2/ kagaVo12QVyofsYrKyxoOVnDv7DPvKY4vVBx+zLRVppKTrIRpf6YaoR5FhU8iQXBx+sa zN98NcFqhOmW+b6nuX1S4OB1cP0KXbcSsdjOFjgccMBdPwSJKcHg9rTDvKYzsHKdgrht BOff37dGrhXGuom4f/ygevuKXqZrq0RqA25QJTglHdOuGDmLA7GEtKE2XQ476ocPzv6o Dfog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746212262; x=1746817062; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bJup76xViPoYlcZ6DgY2Il03anUYcrocSLmxC3mshks=; b=IIb5/97HgqSC6j9N16NYYPYbNXoYw0QXGrjbZ+INs9edfaItoN5s6HVyooAGVtVpg3 qNT6lKLZHVxuzLWL/ZPgx6/hjC8GlXWT5hqRRAPcRucXrwmDdeuYblUPFP0qDpzYsGK2 wqQu2gTzsLLt3jTf4+N872+C1/yWshbrMfqcb3GjJKnOqv45Qs/uZOfKJgofrXhPVoXA tEl5HncSz4bDGdyzrPj7YwuQDDcA8ihPIQM6pABfm0HUdg3F8FAiNe0CChVu6YBXLpNA 6pPSJUpgFR5dRmuHOfRi/EEMx2UmmKxEF66R9PeYPHOGsIOFLTfKT7amDT+kDWF5730Q 94mw== X-Gm-Message-State: AOJu0YzPA5tIW3zV4rnCu75+fC24eOHdKt91YC0pujhfSNAJG+HITRdy x1pZ/SWET0LYCBOxkCjYMi75EwTgKtJeM7zMSIdec3IGOZxSF3Nl26xjw2KXpKtSDyNAEopRByq 9 X-Gm-Gg: ASbGnctdreAbYKNE+SxEa9KUQm6JtSSGakTq16HWHliv2ZZOlrFne4M/cFh9Aj4kaxS 10pmnW9U8x7xQP+Lneu0TpU6iNEJMXVPVBYgo7A+5OD1yl1rOPFQW88B1s3dgJ3ia9xbblB1+p6 VvM2+ynDfLegvzc5ILSbQX0tsg4j0AuW2al7Qa2opTYAbMrX0QC5nW1BghnMp633sveZMWT2BbC 7lSo+aD0agTB/orwAyTCXE7xQefGpc+1tC0HUtmU6nO1I5m2xKVeZHxD8dc9T3zs4oD8t/70t4v Z/PCRzp1rUx7cnpqLA05jeQzFNIZNoQeXnsONaM9eksmvZhqVsVSaKQDZd7vjcLdBzjYUrf0zep uMQjYVqGB1V2uJoOqKULMGn5MSLUb4Sg= X-Received: by 2002:a05:6402:270b:b0:5f6:ace4:9fa6 with SMTP id 4fb4d7f45d1cf-5fa7804467bmr3246373a12.16.1746212261963; Fri, 02 May 2025 11:57:41 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5fa777561basm1617455a12.9.2025.05.02.11.57.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 02 May 2025 11:57:41 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Laurent Vivier , Igor Mammedov , Huacai Chen , Amit Shah , Marcel Apfelbaum , Sergio Lopez , Ani Sinha , Paolo Bonzini , Eduardo Habkost , Jiaxun Yang , Jason Wang , Richard Henderson , Yanan Wang , Gerd Hoffmann , =?utf-8?q?Cl=C3=A9ment_Mathieu--Drif?= , Zhao Liu , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Yi Liu , "Michael S. Tsirkin" , Mark Cave-Ayland Subject: [PATCH v3 08/19] hw/intc/apic: Remove APICCommonState::legacy_instance_id field Date: Fri, 2 May 2025 20:56:40 +0200 Message-ID: <20250502185652.67370-9-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250502185652.67370-1-philmd@linaro.org> References: <20250502185652.67370-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=philmd@linaro.org; helo=mail-ed1-x52f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The APICCommonState::legacy_instance_id boolean was only set in the pc_compat_2_6[] array, via the 'legacy-instance-id=on' property. We removed all machines using that array, lets remove that property, simplifying apic_common_realize(). Because instance_id is initialized as initial_apic_id, we can not register vmstate_apic_common directly via dc->vmsd. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland --- include/hw/i386/apic_internal.h | 1 - hw/intc/apic_common.c | 5 ----- 2 files changed, 6 deletions(-) diff --git a/include/hw/i386/apic_internal.h b/include/hw/i386/apic_internal.h index 429278da618..db6a9101530 100644 --- a/include/hw/i386/apic_internal.h +++ b/include/hw/i386/apic_internal.h @@ -188,7 +188,6 @@ struct APICCommonState { uint32_t vapic_control; DeviceState *vapic; hwaddr vapic_paddr; /* note: persistence via kvmvapic */ - bool legacy_instance_id; uint32_t extended_log_dest; }; diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c index 37a7a7019d3..1d259b97e63 100644 --- a/hw/intc/apic_common.c +++ b/hw/intc/apic_common.c @@ -294,9 +294,6 @@ static void apic_common_realize(DeviceState *dev, Error **errp) info->enable_tpr_reporting(s, true); } - if (s->legacy_instance_id) { - instance_id = VMSTATE_INSTANCE_ID_ANY; - } vmstate_register_with_alias_id(NULL, instance_id, &vmstate_apic_common, s, -1, 0, NULL); @@ -412,8 +409,6 @@ static const Property apic_properties_common[] = { DEFINE_PROP_UINT8("version", APICCommonState, version, 0x14), DEFINE_PROP_BIT("vapic", APICCommonState, vapic_control, VAPIC_ENABLE_BIT, true), - DEFINE_PROP_BOOL("legacy-instance-id", APICCommonState, legacy_instance_id, - false), }; static void apic_common_get_id(Object *obj, Visitor *v, const char *name, From patchwork Fri May 2 18:56:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 886646 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp963602wrq; Fri, 2 May 2025 12:03:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVwIT182clK5M4KMsTrBzgmlNQC08+dTpaSbXSK5E4OfRK+LGdtrAGaQqb+e2zQk7oD2Gg8KQ==@linaro.org X-Google-Smtp-Source: AGHT+IE7KaHgXT/2rvZqWvxvipgeaEZZRWgW2X0jC5FdIe2B7lOJAqYoVxw1BO+58ni7Z7t97G+g X-Received: by 2002:a05:6122:d05:b0:52a:cdda:f2a5 with SMTP id 71dfb90a1353d-52afd10d3e3mr68210e0c.0.1746212600670; Fri, 02 May 2025 12:03:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746212600; cv=none; d=google.com; s=arc-20240605; b=SRgPC/fiE+IPhttv1FLt26n0qBNffxSbjgl/PoyUjP93/hOemYsW1xnP14tq2A6jJB OVIDCsnxbH3lRk3r9K/vB9+dRqAuxn9s0bDmDNRw0zi95jColt88kdZ6cj/VMaiPTNbb DiG31Fu4wr9vdPfoUso9OAYpGsHrh1nIpYLDhuEWQ4XS8piGsgI6nS42r6oR1Dm7YTfu fIIwblBRS4FNc2ynd+aYDgeJh4G8WfbuYlNI7+cK/fBGlOXJ/n+J7LvCXDeBdkTpVTKb WUI38EhmjfAiYNIGKt7f4eJg1GI9pLNNDZZT+qJ3hflpo1rwyOsGOBU7QbEiK9dioqDv GpKw== 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=3TW3tFLk+SFIUpM+sKCrlySl9FAqtO+XAtqZuiOgbN0=; fh=zA7MiWWYdZ7nPYzFPsisQ1XfjLk8wRfRNbrxI2kr3EE=; b=QNzA7AVDc8c2XWuADji+NaAK/ZlzTHLJcVjAh26hTB9CkpiwAPhA5q8TvU7TAcNb6C UMSbk3r6/H6PSYpv6lPH0fwRfOQ4RN34TH5n9mtMPKMOik6E1XC7yg1uRNirp4IpL08V 7k+TN2k4zq4pJssRjSpsEvUAijKvY4gQCc+jHqkaF0DFj8hZz262WgAJO0N9t97Ga1Nc G7eQwmNbFcRix+ITl9Hw1zRBe/6fhP4Px8XOWAQ1eFomBW9arKlJYEh8TSqxOv4sK3xg XvY+616HiW/f0YcuteD5Smb689si2wpCIOyIt4aFWlk/1ElDOyZ9IFqnpr8uQev2GpaD 5SOQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Rdrw0tjy; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 71dfb90a1353d-52ae419cc65si1056815e0c.262.2025.05.02.12.03.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 May 2025 12:03: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=@linaro.org header.s=google header.b=Rdrw0tjy; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAvaZ-0006B2-9t; Fri, 02 May 2025 14:58:23 -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 1uAva3-0005X8-Aw for qemu-devel@nongnu.org; Fri, 02 May 2025 14:57:54 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAva1-0005Vv-Hy for qemu-devel@nongnu.org; Fri, 02 May 2025 14:57:51 -0400 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-acbb85ce788so549025766b.3 for ; Fri, 02 May 2025 11:57:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746212267; x=1746817067; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3TW3tFLk+SFIUpM+sKCrlySl9FAqtO+XAtqZuiOgbN0=; b=Rdrw0tjyDqEsXE9p8yb21Q0rwMOQYhgqZNt3ut1x/FE5IjH9ZOIOCJnwNpz0rwX+sr uFjDecu1TrQKhqFasA4EaDciVXTPfl/yUrjXlZ6NehDgljE82GHtVrtIHGvgWr4ti5/h zHqxsZvTMbDfF2UVVkSj3uEYNQyOlaXc5e8XJ83/fPo6oENvy35oFQwux/ELXN0AjPRi /O7b0FQfHIoqkb3/ERoprztwTyhcT73rP5pyEKbxVsUjLdhh/IvoHSg3wDSyyNQmQft6 0aSLdToFYrW63QrZZouigV3dYhjhQxLOBl9wHTbZiWSvZrT7bqdiT+uYybevaj9rSUbP hmtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746212267; x=1746817067; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3TW3tFLk+SFIUpM+sKCrlySl9FAqtO+XAtqZuiOgbN0=; b=cJ49NKGdORGr0h1PY+q8KGtIhxvdmXz7x5TNpRptHjE7F+IkN6ua9/t1XYgtClhcq8 3jm7qOtH62jhWfOodz5mw3G/MuJ/Zn4zI3o9hFt5TaG3z6NZefZtqaIKgDsq0PsKJbSL x0Vd82GNdbNaoMv2Km1RoEsnz4yjmQYkahP727qKxHbr25xcWlLSvzcfBcdzynNEwZVl xIneG2+EP9zFnM6JJyPxe0M6bOE6s2nacfbiR4+6Qhv7H7FZoRDHpzO7JE+PMxdTztCP QXvCub+JJe/q2uqRcDN1yL70ErfyB8a954HKYnrfK2pT2jRhkW2JRe7uZvy0wJVPj34z hYFQ== X-Gm-Message-State: AOJu0YxFtIk6VjHp3xidmqBzJF2bSQUySPTIsENBjr8MyPXWh4pVB8w9 6sKrhs+Purj2W2RYGMZumnUYM0J0F8G7dJjE8XVwHPxCh3GYEkpdHLvx88v9bAODiIWwRyOtjCx 7 X-Gm-Gg: ASbGncvBQVLS2vYcLEYQdlJB6z+XlumOMVHbkO98IRUNz+5QtkGYOPLBafEPnMFvazp vA5XgXGQxA2KjlQ383fKenxmI992U8I9ixUBEAMFRVYwec6rbiHU4zVVF08Zb3hfR6W7I1skj64 YdlskDzo9Z4mN01exjhmza7a2eSsgZyZP2w2ksK5mHCEjPN6br61D4HBDhjH54vXUPQRVRGJtIj Di3zf1CoYK2h9y6DWOCPJ7Z5h8VB1KrNnDwCAffsDgCGYOqe2vJ8jIeBy3X0wi9E6lKtofJFuPP X/ItWH9B+0hImGtahSz3p7nvpYt0yXdw8Z9ur1UNMs4JAaIMxjoj0a1hwACWFhDO28ij2ZXVrSG CI9Dvu/uON+gIU2YPp4WN X-Received: by 2002:a17:907:86a8:b0:ace:c2d5:d91 with SMTP id a640c23a62f3a-ad19069af47mr41696066b.25.1746212267506; Fri, 02 May 2025 11:57:47 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ad1891a7321sm87544166b.65.2025.05.02.11.57.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 02 May 2025 11:57:46 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Laurent Vivier , Igor Mammedov , Huacai Chen , Amit Shah , Marcel Apfelbaum , Sergio Lopez , Ani Sinha , Paolo Bonzini , Eduardo Habkost , Jiaxun Yang , Jason Wang , Richard Henderson , Yanan Wang , Gerd Hoffmann , =?utf-8?q?Cl=C3=A9ment_Mathieu--Drif?= , Zhao Liu , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Yi Liu , "Michael S. Tsirkin" , Mark Cave-Ayland Subject: [PATCH v3 09/19] hw/core/machine: Remove hw_compat_2_6[] array Date: Fri, 2 May 2025 20:56:41 +0200 Message-ID: <20250502185652.67370-10-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250502185652.67370-1-philmd@linaro.org> References: <20250502185652.67370-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=philmd@linaro.org; helo=mail-ej1-x62a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The hw_compat_2_6[] array was only used by the pc-q35-2.6 and pc-i440fx-2.6 machines, which got removed. Remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland --- include/hw/boards.h | 3 --- hw/core/machine.c | 8 -------- 2 files changed, 11 deletions(-) diff --git a/include/hw/boards.h b/include/hw/boards.h index 5f1a0fb7e28..a881db8e7d6 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -841,7 +841,4 @@ extern const size_t hw_compat_2_8_len; extern GlobalProperty hw_compat_2_7[]; extern const size_t hw_compat_2_7_len; -extern GlobalProperty hw_compat_2_6[]; -extern const size_t hw_compat_2_6_len; - #endif diff --git a/hw/core/machine.c b/hw/core/machine.c index e7001bf92cd..ce98820f277 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -275,14 +275,6 @@ GlobalProperty hw_compat_2_7[] = { }; const size_t hw_compat_2_7_len = G_N_ELEMENTS(hw_compat_2_7); -GlobalProperty hw_compat_2_6[] = { - { "virtio-mmio", "format_transport_address", "off" }, - /* Optional because not all virtio-pci devices support legacy mode */ - { "virtio-pci", "disable-modern", "on", .optional = true }, - { "virtio-pci", "disable-legacy", "off", .optional = true }, -}; -const size_t hw_compat_2_6_len = G_N_ELEMENTS(hw_compat_2_6); - MachineState *current_machine; static char *machine_get_kernel(Object *obj, Error **errp) From patchwork Fri May 2 18:56:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 886634 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp961055wrq; Fri, 2 May 2025 11:58:40 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWgTRCp0XFn4Oemt2gxCx1gChvGR8Ae5n0mGdgvPUvb8j7kgRSsJ7jHMsDVCLEq4awKN1cqog==@linaro.org X-Google-Smtp-Source: AGHT+IEAgBDNVFaxUqzQmM3lz0QjuYaiUvPnIJH6z0OPECVTSXTgGuBNB9dI3Uyz64fzp8amoxaB X-Received: by 2002:a05:622a:480c:b0:48a:e2ec:a3cf with SMTP id d75a77b69052e-48c3106a23emr71777901cf.4.1746212319911; Fri, 02 May 2025 11:58:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746212319; cv=none; d=google.com; s=arc-20240605; b=M+iJSto2y9oLOdG8KxNT4adQ7qDmUO8z55mv6mUurg2kMCQtHpXrXZ0yROnBJeBUTL aA0myEqzIVH8KjwMFUWMrW3nedDcKP/CCXT3eG76x2zIX0X69mcSjq/PliSwh83hw77X Zhwpsmpg8WlsAyGV7PGLyEa2ae3tfqTaZLYQeaZkaOuuS2M54gNRtTVxCoNNkGt01R0f J73/oZqSGwOMoQQebaBVBKZ2oGkKAiKKwBYTvUzXgdU4EYuKC8yhYGyoKkyAklJmkDQz SQSTi5MPRlRInZ7GH+wYTxZxknVarLdcDKYRxuRo2aVk58eRMSezZ9GEiiCsgpuP6tpO i5Ew== 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=wdDlI5qLVUtiJXLSpG9OpY8RG/p/SqrqX/ncOt5okGA=; fh=zA7MiWWYdZ7nPYzFPsisQ1XfjLk8wRfRNbrxI2kr3EE=; b=JjI433K5jTJYK0xASeltWh9pmd2uHk3CLlyJdwb0U82NHeujFguuGLNy+AHpo4EHK2 zKZGDniPozxM/5Wno6EgdzCM7npbpR4/80A/g5OcVc3motOVNpGEI+U2nR1TzX++83sA +FCu7S5MIenqUDaKsZ7ZpUD+rmUI0OTMgt2w5PG18qNo5ML6100sX+9h14zRUB/elUyY j4bsKF8hVfhg5CKbWeHmON9ONVBj8W8Wt4Q4KJZtwh28alZKNJi7w7SqOWypDABF7N/r hWLXpluGrJj40fg85UcXko0DW2Oa/s61EyzyJw6B23ksYvFOKBoR52eMdz5Q2+ubUBnd zy2w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="BO/+snOk"; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-48b987245b6si36680251cf.392.2025.05.02.11.58.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 May 2025 11:58:39 -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=@linaro.org header.s=google header.b="BO/+snOk"; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAvag-0006Wf-JZ; Fri, 02 May 2025 14:58:30 -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 1uAvaB-0005k8-Ey for qemu-devel@nongnu.org; Fri, 02 May 2025 14:58:12 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAva7-0005Xp-T7 for qemu-devel@nongnu.org; Fri, 02 May 2025 14:57:57 -0400 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-ac339f53df9so496270766b.1 for ; Fri, 02 May 2025 11:57:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746212273; x=1746817073; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wdDlI5qLVUtiJXLSpG9OpY8RG/p/SqrqX/ncOt5okGA=; b=BO/+snOkPJunjr+lJRkPsOtZSUkcRnuiexGnj5Tyy5GeTYm9QVhb7mNzD5L23pi48X Sb5ZcENQFPn9mX1HwPnLZe/z49BunhzofGS2i1jbGVOKgUuSttVpLDKx0LEp9CG5v604 w0XRuYrMyGRELMTdgIHRACmnSwT1RdpUL/23tPcjAXSwCQjdo7+7o8qU/RJRwBQ0QuL+ uTR4RGca09YaRIgGVdxPepeA3aNjgdDK0vm8LwvqOd37WKgvwoeboGMumToDByb959yW 66T6nIWXMMXzIT1y+bNmNHQnYXBWIdGZNBYrnKALWBlMJ/aeZmoYiqBHin8z8naZXIQC pz9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746212273; x=1746817073; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wdDlI5qLVUtiJXLSpG9OpY8RG/p/SqrqX/ncOt5okGA=; b=toqFEo/dPBsVQd5MtqJSZGP9lO7+YiQbL2wHYJgxhx355YmwoEQi9/X2fZd8CIHE0z //ytaydwfZSFUCFhMAvasWN430NnmV3SGUVbdtE5gE7oWERGZ3D5PFRfMJ+e2H/Z/eVg hKAwgmuUBgiaC2HVZMXiDOaqo9ZMVWOvWsj2qp/yMhtholmKP4DknydGnq/Fjuwotgq5 mur7X86JMFOXQHs4L1TwNonOzBh25Q3qsaQSs4TPENOgLAvmO8bdKCgD+mLtvYRYvd+H 9iwFRD0xNRgRq/lwRGP1wh2N8yAbc9N0dwKo+gBTW2yeSlQreuh16jcnMWAIGKYvjIYx KwOA== X-Gm-Message-State: AOJu0YymTikEO+LeW5oeNR5bfsAOboLQbqL8OV0kchGIXynkFGwqwSUJ AT/ZjkQDyjvgSW2rlW8xV3ZqTAhwB/fCi0vvsrg2DcPDUDE2MjhAe2K3EupuNa5KRuv5sCseYzF i X-Gm-Gg: ASbGncuQ35SuhmyBoqlcpYDkgqGY2iy7yS3lcSOwlI33jTRZowOy9IW3nO2bKIp2ww4 +KSqC6Mlc+PRDXF3KWeA7fmAmrO5S//o53dUzikv2e7l/JCaaOs6X5WVndNMz4E0q5S5j1/nVQc Wci6F0/ZY/u2rYraB3Q+SZ1m/e7RF19gYcHFTabDCgyQkflscfsuYX7fDLh3odaYlAcOnNWVtX2 XQKp5G+lJ9XXU2txbU1DcPpm5651QCZWAfDovOcjLLZlWtWc5k0u31Ca0CQ7vD+TlrFa3lF+G93 cgwv0mqk3BfUyXP3jHRc+/xqlBqU8yCIPr/L+w6EYrD8lPlGnT23EMIHX9Gy7XjZVVE5xD61za5 jThhCpZ5TGUhxUMX7inIa X-Received: by 2002:a17:907:7b87:b0:ac3:b613:a651 with SMTP id a640c23a62f3a-ad17ad87102mr421439666b.17.1746212272985; Fri, 02 May 2025 11:57:52 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ad1894c0276sm86005966b.108.2025.05.02.11.57.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 02 May 2025 11:57:52 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Laurent Vivier , Igor Mammedov , Huacai Chen , Amit Shah , Marcel Apfelbaum , Sergio Lopez , Ani Sinha , Paolo Bonzini , Eduardo Habkost , Jiaxun Yang , Jason Wang , Richard Henderson , Yanan Wang , Gerd Hoffmann , =?utf-8?q?Cl=C3=A9ment_Mathieu--Drif?= , Zhao Liu , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Yi Liu , "Michael S. Tsirkin" , Mark Cave-Ayland Subject: [PATCH v3 10/19] hw/virtio/virtio-mmio: Remove VirtIOMMIOProxy::format_transport_address field Date: Fri, 2 May 2025 20:56:42 +0200 Message-ID: <20250502185652.67370-11-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250502185652.67370-1-philmd@linaro.org> References: <20250502185652.67370-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=philmd@linaro.org; helo=mail-ej1-x62f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The VirtIOMMIOProxy::format_transport_address boolean was only set in the hw_compat_2_6[] array, via the 'format_transport_address=off' property. We removed all machines using that array, lets remove that property, simplifying virtio_mmio_bus_get_dev_path(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland --- include/hw/virtio/virtio-mmio.h | 1 - hw/virtio/virtio-mmio.c | 15 --------------- 2 files changed, 16 deletions(-) diff --git a/include/hw/virtio/virtio-mmio.h b/include/hw/virtio/virtio-mmio.h index aa492620228..8b19ec2291a 100644 --- a/include/hw/virtio/virtio-mmio.h +++ b/include/hw/virtio/virtio-mmio.h @@ -66,7 +66,6 @@ struct VirtIOMMIOProxy { uint32_t guest_page_shift; /* virtio-bus */ VirtioBusState bus; - bool format_transport_address; /* Fields only used for non-legacy (v2) devices */ uint32_t guest_features[2]; VirtIOMMIOQueue vqs[VIRTIO_QUEUE_MAX]; diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index 532c67107ba..b7ee115b990 100644 --- a/hw/virtio/virtio-mmio.c +++ b/hw/virtio/virtio-mmio.c @@ -752,8 +752,6 @@ static void virtio_mmio_pre_plugged(DeviceState *d, Error **errp) /* virtio-mmio device */ static const Property virtio_mmio_properties[] = { - DEFINE_PROP_BOOL("format_transport_address", VirtIOMMIOProxy, - format_transport_address, true), DEFINE_PROP_BOOL("force-legacy", VirtIOMMIOProxy, legacy, true), DEFINE_PROP_BIT("ioeventfd", VirtIOMMIOProxy, flags, VIRTIO_IOMMIO_FLAG_USE_IOEVENTFD_BIT, true), @@ -815,19 +813,6 @@ static char *virtio_mmio_bus_get_dev_path(DeviceState *dev) virtio_mmio_proxy = VIRTIO_MMIO(virtio_mmio_bus->parent); proxy_path = qdev_get_dev_path(DEVICE(virtio_mmio_proxy)); - /* - * If @format_transport_address is false, then we just perform the same as - * virtio_bus_get_dev_path(): we delegate the address formatting for the - * device on the virtio-mmio bus to the bus that the virtio-mmio proxy - * (i.e., the device that implements the virtio-mmio bus) resides on. In - * this case the base address of the virtio-mmio transport will be - * invisible. - */ - if (!virtio_mmio_proxy->format_transport_address) { - return proxy_path; - } - - /* Otherwise, we append the base address of the transport. */ section = memory_region_find(&virtio_mmio_proxy->iomem, 0, 0x200); assert(section.mr); From patchwork Fri May 2 18:56:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 886639 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp961975wrq; Fri, 2 May 2025 12:00:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXPeWLfvoES8jtVJa4DGlHb+9GJnXaQBfbqOPW9r10FX/G+cJVsMdf9u+eGHjQKHp8/UbViuA==@linaro.org X-Google-Smtp-Source: AGHT+IFEf96F5NGXd+pYwcOMDA7T36T7fIF3abZ1PzxQeu1oD7e+wPFFMg6N4oq8RnBI/Psr39bf X-Received: by 2002:a05:6214:f2f:b0:6f4:c63e:4cdc with SMTP id 6a1803df08f44-6f52363b728mr3338216d6.0.1746212445677; Fri, 02 May 2025 12:00:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746212445; cv=none; d=google.com; s=arc-20240605; b=ecyv2vGxOGE7JF6RN+12z1Jki+KiupiPkryM/GkSIo/RTAsrZ81LiCCq8N3f6N7Gqq vixHJpI86gWgUwPCObXKPDoNirPmKiyij31hZoF6GB2M9bpTGiRXAJOZXGH4/f8S0BXa ydiMZtJN0aFuZVqZpsXO1+HE/RWdKBJ/gc/AZW3NfClabxvM2MefbBEU2AIe+V5SHEmD XGGWXVxXemoG+qQTG1O3c0a7HUmzpJoRY/rMHydjYJ/87jGuuuBS2Xk2GklPCAG0nQVP uatJA5JrSEiKvqr+U/jCLCX7dDpZQ4UJHRjS6VYdGE7vYTv27jWtUBytYbzEsFmN5YWI Qcyg== 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=Ym7wSrcTG0iPDZDcZJp5AGoZOnw5NMHUmUvpm+lkeJQ=; fh=zA7MiWWYdZ7nPYzFPsisQ1XfjLk8wRfRNbrxI2kr3EE=; b=cVbmrSKn7+2ycGp+qhNuJInNhHR3pweRZyiaEn4TGwbAwMTkoZHBH47hDQN4qct2ue 8QE+hzQfel+BScuAvUbj00TnFHSvb3ZdPU9/I5oMgD0fbGqHyfs7RBYYc3QporafLNfo DxnLuAwsUJA1gmX0FDChHW9k1Q6mHm2OuzQ2PYX54xLdEeehH9tciAPboD3ReDbtb4u9 6VMIWyxxX11rL1ZaeOThNM+qwj3YMYOb3gDDwY5JVCJ3B+xU4KvHexTeHtDCqKi7tBBJ G9soaLkMipQCagsrQ9iG62sdrto+gjxQFj/l2CrKXadYC5+jn3wHaXXkNFAA9qUuSNwr vAGw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jqKnH5p6; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f50f4aa111si36377336d6.374.2025.05.02.12.00.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 May 2025 12:00:45 -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=@linaro.org header.s=google header.b=jqKnH5p6; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAvaq-0007HJ-TD; Fri, 02 May 2025 14:58:41 -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 1uAvaH-0005xO-7J for qemu-devel@nongnu.org; Fri, 02 May 2025 14:58:16 -0400 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAvaF-0005ai-2a for qemu-devel@nongnu.org; Fri, 02 May 2025 14:58:04 -0400 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5e677f59438so3549542a12.2 for ; Fri, 02 May 2025 11:58:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746212280; x=1746817080; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ym7wSrcTG0iPDZDcZJp5AGoZOnw5NMHUmUvpm+lkeJQ=; b=jqKnH5p6jrCCTxHr+PtCwz0R2xWUSSrSXO5d8xst2UsO0rDejyt/M4kLx60nYBhbC8 sXh5WBd73eZK6xcvY3wRwI7EEJ2Hef2RBATDOnhHscS+8HC6nshVTpcuTMmpFYr6tNhe o6SVwQ+lrTYiATwtXJKQzUk1w6t2OKPzraaMafaH7Cwd77JnbN0Th6PgrIUrxld2OW3o DlOzQ7zR12ynDaQRyA6I/1RR1B0uoXOwWD9MPxfzfzFkko9JN6N4+qzpb2dD3FATxYQG gaCp51GBkzuisuCvEqilqLfDWxCI26XqfvJAPx2wZxzu6cHJvFxxrfJ2aEA6rVY4tBvv 5Y5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746212280; x=1746817080; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ym7wSrcTG0iPDZDcZJp5AGoZOnw5NMHUmUvpm+lkeJQ=; b=WFv2p83VoNYXBg/M6JkMEdFDyNrc8L5TVosOW2TIR8spaPc98GHxbvAfi6y1axS3/I xCSmAESb9Ck6p9OCoN7clDTmF/JlBoNpmjMIsihlcylemb9rlzaO8n8Y91Xw9LFnqq3d fC0HFZESfuff+fNnyz9HRLv3SwwEEWuE4EP9iZiGqHnn2lnGnmiecI87pOVLnQLxQb/Z beX8VUfO/lmUkICAESbFDzS1xa0E/buDNl1Q9iKBDfPHNQJwxR36RbjpnafswZcvMAQY d2jvUUnW+7g7HQugTnu88qAXPN4l8lYf3j1cnnnkSjAMJGfAmYbbfB7eI6WNDVkqYw5h Ffzw== X-Gm-Message-State: AOJu0YxSjMj4avRDjhOZSqEtnvUD2Ae5RdR7vZ5S183hg8QScS92koHE PNu8xjRZpMAfWQT3U8e9rVRB4CUpxJ5jpdec7nBv2N/yy5nU5qulIs/BLmTWfbcC2CLEu3KrnH5 J X-Gm-Gg: ASbGncsOFnLAKTMEz3tFPojUNImA9uD6chqHsdHqglMUkPUqH83gW7mnceDCKdFqCYV 2yAaoHkfAbnPpQw9Fn7jVHQSGVhSsvwdH3EAmY4YFYlc//tTTtuIETpqYK5vpEdvG/KawgfJ0Yn jUPZICdYv/t6G6fmYNmI8+cL2tcwxqhFCZiW3zZKbOwrP8pssOck2v97AdG2ej9tdArFdLY3P4/ 8xu63yg+PhjSjDse0tRDnmxHyb8vyRFqdccACd5IjjZRtta7TAFIEk27kbV2MJ4ns62EB139aAT GQ5uekAh3CbQcEuoBA6ZccfCKhyowsKnSDMU/PP+8/o4ICgW74S3qXzr9xp4RCyD6lnhpMt3GN3 IgKxgMre/TfnsucYRcMcU X-Received: by 2002:a50:c8c2:0:b0:5f8:357e:bb1 with SMTP id 4fb4d7f45d1cf-5fa788ed11dmr2890471a12.22.1746212280005; Fri, 02 May 2025 11:58:00 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5fa777c74acsm1637679a12.23.2025.05.02.11.57.56 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 02 May 2025 11:57:58 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Laurent Vivier , Igor Mammedov , Huacai Chen , Amit Shah , Marcel Apfelbaum , Sergio Lopez , Ani Sinha , Paolo Bonzini , Eduardo Habkost , Jiaxun Yang , Jason Wang , Richard Henderson , Yanan Wang , Gerd Hoffmann , =?utf-8?q?Cl=C3=A9ment_Mathieu--Drif?= , Zhao Liu , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Yi Liu , "Michael S. Tsirkin" , Mark Cave-Ayland Subject: [PATCH v3 11/19] hw/i386/pc: Remove deprecated pc-q35-2.7 and pc-i440fx-2.7 machines Date: Fri, 2 May 2025 20:56:43 +0200 Message-ID: <20250502185652.67370-12-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250502185652.67370-1-philmd@linaro.org> References: <20250502185652.67370-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=philmd@linaro.org; helo=mail-ed1-x533.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland --- hw/i386/pc_piix.c | 9 --------- hw/i386/pc_q35.c | 10 ---------- 2 files changed, 19 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 98a118fd4a0..98bd8d0e67b 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -755,15 +755,6 @@ static void pc_i440fx_machine_2_8_options(MachineClass *m) DEFINE_I440FX_MACHINE(2, 8); -static void pc_i440fx_machine_2_7_options(MachineClass *m) -{ - pc_i440fx_machine_2_8_options(m); - compat_props_add(m->compat_props, hw_compat_2_7, hw_compat_2_7_len); - compat_props_add(m->compat_props, pc_compat_2_7, pc_compat_2_7_len); -} - -DEFINE_I440FX_MACHINE(2, 7); - #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 b7ffb5f1216..a1f46cd8f03 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -648,13 +648,3 @@ static void pc_q35_machine_2_8_options(MachineClass *m) } DEFINE_Q35_MACHINE(2, 8); - -static void pc_q35_machine_2_7_options(MachineClass *m) -{ - pc_q35_machine_2_8_options(m); - m->max_cpus = 255; - compat_props_add(m->compat_props, hw_compat_2_7, hw_compat_2_7_len); - compat_props_add(m->compat_props, pc_compat_2_7, pc_compat_2_7_len); -} - -DEFINE_Q35_MACHINE(2, 7); From patchwork Fri May 2 18:56:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 886648 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp964310wrq; Fri, 2 May 2025 12:04:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXTZbKFTH+nwom1Aa3QMaOiYjmZCqeFsAcBFvJbtGuEP07XP1dn0HBEnjnVxyuIaZuJYn9WLQ==@linaro.org X-Google-Smtp-Source: AGHT+IFtSqaq8EPkJV6CtEVcgla51wwMQ4BfCd1X4hXazB34R0aD/PXVVD52CzsPW+S4bkWuK9FA X-Received: by 2002:a05:6102:5615:b0:4da:ed5d:e2e8 with SMTP id ada2fe7eead31-4db0c3daa32mr310754137.18.1746212685212; Fri, 02 May 2025 12:04:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746212685; cv=none; d=google.com; s=arc-20240605; b=FFmFDfnnT/t1Yddv9+urnlaRWWgNnFSkJ68hVZAzixWyHYuqTPj+HpS28wLuQ3/W2k ekZvKv0O+ChqIM7HGeWyzpIRGgLUtXPUOZhg0r+mXjZryNDz0eoJZ+ztdK54rG/CrPoY lO1xB1OEUa7yXeugSNT1gpsC6O0KqRk2UxA2i1BChlrQ/U2Jfe6OO5o/sW7CDVP9P75/ OYRn4fgaBh21NGCkuNJTzR6OEWgN9AXp6v3n2yZHiHRvNPsrJjPereQojadKwQUVbUVx CyBtxFxZbKvoy5/eTTMG6YKOwM5A7HweMRyAU7XRZs8zinmW6Dfo5kvTngJV9Zu76PSF QLjQ== 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=5zGgsDeHzR+ozHnHRK5ouuBtclIGW7njUHY2p1Mlkmk=; fh=zA7MiWWYdZ7nPYzFPsisQ1XfjLk8wRfRNbrxI2kr3EE=; b=L55EPJ8Fj7rzGJEaUZUZLb6D1G3epwgg1czXH7oXecx+CUhet25qxN6sdaNZACJa7a H8IsYtbCutGMT6vNCPcmzVhMs4+URiBUm/uxOx+BjM7ZHosYqpgEPc8eMlUCXV1f9smm zhXy3DrGcQpJQQh3Z9GZFVqM8ainLPpZdxs2L4lj0cFbJgtZe/gZh+B2hZgFCNOyV6l1 cFSYvR5famL7RTvm8dE8NZCiF0Ip2dpZz9zo7tog0/T4RlptFBmc3boNr9f81CdXSoig XH9e0szq9vlSJ13B1q0iwGETHS3QXANk9cO8snl7PkLWMDZqjQS2sI0qcSiWj5VCRxGr PvRw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="WRbewv/4"; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ada2fe7eead31-4daf22e7501si947212137.72.2025.05.02.12.04.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 May 2025 12:04:45 -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=@linaro.org header.s=google header.b="WRbewv/4"; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAvat-0007TJ-Sb; Fri, 02 May 2025 14:58:44 -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 1uAvaO-00060K-2C for qemu-devel@nongnu.org; Fri, 02 May 2025 14:58:18 -0400 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAvaL-0005bP-8T for qemu-devel@nongnu.org; Fri, 02 May 2025 14:58:11 -0400 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-acb2faa9f55so300216566b.3 for ; Fri, 02 May 2025 11:58:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746212285; x=1746817085; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5zGgsDeHzR+ozHnHRK5ouuBtclIGW7njUHY2p1Mlkmk=; b=WRbewv/4rnI876E3WCc473i2QMrEVJvs7IMiaRI8p1f9NsXAVZwPjrnJEhPbZe2sbS qSgdJPYp96J5pg3gCQ/yxhj0arLelN2JhP/GDaiVYXFbmKbng6zKV3Hk7Dfe2HjaCR1D 12QCsCFEIbPEt46959FcTHZXmJ86R9dWdsrAMxqVzQojP1qgmn670a6ZGxLBVLZ6HYnf q5iReID9lElcbvLI1n66c7w5X+6cx2ji61+vuTu14/SAN4aVeEygl80BiA4zyNzkIehr jmJncVoRrb8CrptSpcUHJkModEmqceRRn2BtilZE7heOPQbGU/j7xifkvZGh2cYJoWLX 3jSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746212285; x=1746817085; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5zGgsDeHzR+ozHnHRK5ouuBtclIGW7njUHY2p1Mlkmk=; b=PwTAoIrFCp3KVkoPMQT6yEuH40Er33bE3szq6LqNcyCfiUrQjC5Wvbd64SF8g+1GgG Na/cUvwDXbqgkxxY76I2dt9P8AekRiB3QiBVgtv2UrOzjgt0bHkuKZbOa+ibvRF5fB0W wqcC+tneUr8xQkC9UyDsryiSUtMMqGQTIchCSSPVC/raGSs3gedbAS9zCELU1dfOPK1Q sbfrT+89ifvzaFuY1kLWCuJMC+8F1AQQ7DPzYV4zRH40RWvJwFai9plCM/I0gJnhLN7E rMz59xVJGjk422Jp1Vty1GwQmvmvOmjJeUorLKKXCzt7dVqob5C3F2WZsibECsw8Z7XL w8Dg== X-Gm-Message-State: AOJu0YwJxj1Qhk3OKPw9lZnXGZ/Gx1aY8ohrxQc1T5596LaaAt+pnz9T GAo3O+ukQG1dL0pFzdbvmEXrY+wTK9pPO/i/mqHy1X60xowD0dc+Wo9oMAvvlxIPnE8OQ5CamJW K X-Gm-Gg: ASbGnctyIlkdNmoLtCXliVOWrzPv3VRFauSEX16GjlurEhYgB5fsSwfTs6gSbzoLjpH 5sAC3ABPu/jlOqX4a+uQu2TQHZzPGEogeKYC1etM5TFzVHLR+eqbdRnzlOUkI7ppkc1An+HBR7j R81P42Dpwp0l2OqtakHQ00FvWo2SxY4g58wKlXTUTC5sUgzYOC5JNnoKWFtd6LmyWVYB3+7RG4m dIOPGEiWJFElpPkZ2JBkwsel3KAr2iiJTYQ2XZZ0+LC3TfvStZ8TqbNeJnaPvTTCOf8G6whx6VG Ta3x7IiYDuPVR36dZZjv1Z46DmxKvpEtBJwA6GBpyArdv1B4eV9kQq0sMGHRxmb0HRX1j5F0m4P jo3S94lf507gVVwlhRyIgW9I8Clo6fdE= X-Received: by 2002:a17:907:3f9d:b0:ac4:169:3664 with SMTP id a640c23a62f3a-ad17adaedf5mr416356766b.33.1746212285509; Fri, 02 May 2025 11:58:05 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ad18914733esm85933366b.33.2025.05.02.11.58.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 02 May 2025 11:58:04 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Laurent Vivier , Igor Mammedov , Huacai Chen , Amit Shah , Marcel Apfelbaum , Sergio Lopez , Ani Sinha , Paolo Bonzini , Eduardo Habkost , Jiaxun Yang , Jason Wang , Richard Henderson , Yanan Wang , Gerd Hoffmann , =?utf-8?q?Cl=C3=A9ment_Mathieu--Drif?= , Zhao Liu , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Yi Liu , "Michael S. Tsirkin" , Mark Cave-Ayland Subject: [PATCH v3 12/19] hw/i386/pc: Remove pc_compat_2_7[] array Date: Fri, 2 May 2025 20:56:44 +0200 Message-ID: <20250502185652.67370-13-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250502185652.67370-1-philmd@linaro.org> References: <20250502185652.67370-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=philmd@linaro.org; helo=mail-ej1-x634.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The pc_compat_2_7[] array was only used by the pc-q35-2.7 and pc-i440fx-2.7 machines, which got removed. Remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland --- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 10 ---------- 2 files changed, 13 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 4fb2033bc54..319ec82f709 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -289,9 +289,6 @@ extern const size_t pc_compat_2_9_len; extern GlobalProperty pc_compat_2_8[]; extern const size_t pc_compat_2_8_len; -extern GlobalProperty pc_compat_2_7[]; -extern const size_t pc_compat_2_7_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 7573b880905..ee7095c89a8 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -241,16 +241,6 @@ GlobalProperty pc_compat_2_8[] = { }; const size_t pc_compat_2_8_len = G_N_ELEMENTS(pc_compat_2_8); -GlobalProperty pc_compat_2_7[] = { - { TYPE_X86_CPU, "l3-cache", "off" }, - { TYPE_X86_CPU, "full-cpuid-auto-level", "off" }, - { "Opteron_G3" "-" TYPE_X86_CPU, "family", "15" }, - { "Opteron_G3" "-" TYPE_X86_CPU, "model", "6" }, - { "Opteron_G3" "-" TYPE_X86_CPU, "stepping", "1" }, - { "isa-pcspk", "migrate", "off" }, -}; -const size_t pc_compat_2_7_len = G_N_ELEMENTS(pc_compat_2_7); - /* * @PC_FW_DATA: * Size of the chunk of memory at the top of RAM for the BIOS ACPI tables From patchwork Fri May 2 18:56:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 886637 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp961285wrq; Fri, 2 May 2025 11:59:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW9FFF5PFoCgZnoNFuIwDDXRdy+PpfS9PDDt7GlMxtA5B+X/x2POBSxvcUO2duZlEClKtJ8iA==@linaro.org X-Google-Smtp-Source: AGHT+IFLNVzMddU3GeEBByL3grvpCAKTBV8MQd8DI5FV7CAQmZh7itNuPcRkInAu/9P7FurTF7/t X-Received: by 2002:a05:6214:260a:b0:6e8:9170:9d06 with SMTP id 6a1803df08f44-6f523848961mr1893446d6.37.1746212358699; Fri, 02 May 2025 11:59:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746212358; cv=none; d=google.com; s=arc-20240605; b=QBhciv8On/k9lHpaXyGx5xDMp+lEJKqkbSsFI2wEcyBxHcwUJFBlUxgpkkGJA+7OO7 JaTtKJvlW3wQOwYIiXBivGznnmCj8pck5d5bMb/rmpbB6twt2CbFfIEoaXRGxAB9IG8d bcHHYecXK5XXKnm46AS77ouNuNYtZ/pRejl9gpVfnphJDWYq3/ySzbIUcqTNBUAUfJdV qCm42um7r/hPHxSGmHVNSGv/hxZJwZNBJHijn228mujwbFBKWkM+zT0gn5RS9B7xxI79 yncCrTOgRPglab16H+1/FruVQLSvFOSVgRfvxKsUcNe5iHGu/DsaTA0KnKpJqMHi4bi+ W9Yg== 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=iOAW9p4ck3r31lLX8gMavE55BXuL7nNj0tlEn6BG7jc=; fh=zA7MiWWYdZ7nPYzFPsisQ1XfjLk8wRfRNbrxI2kr3EE=; b=FDQuXOZrx1Y/a3Ma6q3T1gQZ2QkK4NOwmtjWWS6rmsL0DkbDjXofcRm8rOnygzvgZ1 n+GIjB+WRW4VFkXubzsiLBh9lNVO+hPKJSs9avp1e25dPJs5iwFoJxDbgvlH39p6sibm 24BHSipeCV2m5ouTu3tcF0cOWXLu0REhtLKZRFChGmXgZCfsSwyL5fPtdMEejaSu+Asm EMrrGbYCuJprMCwP60wQl6ae4a13TadoXNc/IKpyMtlX23SaBhrvAdcrnPXpSvA++t1K UmG4PfFNsFWc3LYaOo5aduQbQkiUcSVv3XRuL+lzFw/2mTvF0AIvRud5r3ebqOI/zDbY 3meQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fvAUFww6; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f50f3abde5si35384776d6.54.2025.05.02.11.59.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 May 2025 11:59:18 -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=@linaro.org header.s=google header.b=fvAUFww6; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAvay-0007pQ-H2; Fri, 02 May 2025 14:58: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 1uAvaR-000614-QP for qemu-devel@nongnu.org; Fri, 02 May 2025 14:58:20 -0400 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAvaP-0005cC-1V for qemu-devel@nongnu.org; Fri, 02 May 2025 14:58:15 -0400 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-acb2faa9f55so300238366b.3 for ; Fri, 02 May 2025 11:58:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746212291; x=1746817091; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iOAW9p4ck3r31lLX8gMavE55BXuL7nNj0tlEn6BG7jc=; b=fvAUFww6RIybGhfDfReNzIk+Sy3Hgo7rWd0f5nPap5vNHl49CwGzMIEanq9BQNVWSI vluNhVuE25FIu0VuO1AoDHnj+GNXqNDcS955hNhzCYiYHZbr3YNzPKcGO+U5lGKVFXgL 2oEVIYYcs9D4CAE4jg99xmvkcT2jUcY7SSN9Gp5uWrZGVeGHtXV3jvzKEY3D+fSQsV4J eeCw2flLjRn/cFjN1p4UA9cpOXHSZHyw6gC4NZvW4k4nGvMp+m/aiu0szpmCTNaGU/rh 0cSMluXgbprUqQuSxe94jZPGBxfsj2RSggVgGo0w/WY8r7jhiyLsWeScFNPtKHBv0TBJ kPog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746212291; x=1746817091; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iOAW9p4ck3r31lLX8gMavE55BXuL7nNj0tlEn6BG7jc=; b=tkn7vBKP+oO1oXAvHu4AlqQtjwNsZnEGXWViraVa3agb2M+jbeZuZUTBqkSfsetD1W WtcR7cfm/JuaDAec+PHymJY7yYZHpSqs46ly9Uf1SQPGjGEjxJExJ1mm4SrG+HnPI5i1 BZV/ObpfqC4cI/CcEJ8um5W2Y+mgPlp8SCmWtJ46qr6eZCSQ5EZXhqls64vGRLzJM3SZ 093YRMw0FORJqwMP+2IAbm3Qrs13tq7zXQQff/aKoVwfsm9mQDrDj1s0/nUVB42iEFvk zH1aSLfksE59S4HEDi2VNh18mSOMme0mI/MJDtONGkle521cT3MeBqBjDQkSPCzcTZEH VWqg== X-Gm-Message-State: AOJu0YyQWmZu0b+yXOxzVuh23q+dS1+vq4eci/q0y/AXgbu1Uoe0pK53 3Rh4vUVCzfS6sDZA1YnuJr+eVMZH+S20AlLl7QmiD1J/PKx73TZIOAnbz3tv41sjUG6vD5LYmU/ y X-Gm-Gg: ASbGncveLFgQu65Z5BAyjVJBP1iv2L7uh6RbO3UT0uFN9P3Pjcq0fEIJ747tzg1Zez7 PpPO7LXpGfPb+uhJ2AEuhJxSr4jo3R1+wkrUr3p3/LQb3/4V5wksOV0uchTwMOsaiam7sbde/m/ TOSXLcUsVOwqDxEMsSZgifDbL4k9nVIbFfJB/gN9soPHepaV1eW+7lkiBhGmop6m1IKqpohK9ha b7MgsNlMfUF+OVzUeDilIaSMwwQW2vHHnSkXN7EgkjX0KPE6RciJH99N3YyNKUgQyn7YrMlgSyv i4GMfHEdaUbSPCKFj8voG7lXASMxaUY052ugDuxUVzb8MCc0D3VyL5hsS6sSiuVzTuV1ioEHuw7 ykotH73ZdpXw7OLHbbqr1XltJdzYmfTg= X-Received: by 2002:a17:907:97c2:b0:ac6:fc40:c996 with SMTP id a640c23a62f3a-ad17ada7320mr391516066b.23.1746212291072; Fri, 02 May 2025 11:58:11 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ad1894c028fsm85922566b.97.2025.05.02.11.58.09 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 02 May 2025 11:58:10 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Laurent Vivier , Igor Mammedov , Huacai Chen , Amit Shah , Marcel Apfelbaum , Sergio Lopez , Ani Sinha , Paolo Bonzini , Eduardo Habkost , Jiaxun Yang , Jason Wang , Richard Henderson , Yanan Wang , Gerd Hoffmann , =?utf-8?q?Cl=C3=A9ment_Mathieu--Drif?= , Zhao Liu , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Yi Liu , "Michael S. Tsirkin" , Mark Cave-Ayland Subject: [PATCH v3 13/19] hw/audio/pcspk: Remove PCSpkState::migrate field Date: Fri, 2 May 2025 20:56:45 +0200 Message-ID: <20250502185652.67370-14-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250502185652.67370-1-philmd@linaro.org> References: <20250502185652.67370-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=philmd@linaro.org; helo=mail-ej1-x62e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The PCSpkState::migrate boolean was only set in the pc_compat_2_7[] array, via the 'migrate=off' property. We removed all machines using that array, lets remove that property, simplifying vmstate_spk[]. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland --- hw/audio/pcspk.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/hw/audio/pcspk.c b/hw/audio/pcspk.c index a419161b5b1..0e83ba0bf73 100644 --- a/hw/audio/pcspk.c +++ b/hw/audio/pcspk.c @@ -56,7 +56,6 @@ struct PCSpkState { unsigned int play_pos; uint8_t data_on; uint8_t dummy_refresh_clock; - bool migrate; }; static const char *s_spk = "pcspk"; @@ -196,18 +195,10 @@ static void pcspk_realizefn(DeviceState *dev, Error **errp) pcspk_state = s; } -static bool migrate_needed(void *opaque) -{ - PCSpkState *s = opaque; - - return s->migrate; -} - static const VMStateDescription vmstate_spk = { .name = "pcspk", .version_id = 1, .minimum_version_id = 1, - .needed = migrate_needed, .fields = (const VMStateField[]) { VMSTATE_UINT8(data_on, PCSpkState), VMSTATE_UINT8(dummy_refresh_clock, PCSpkState), @@ -218,7 +209,6 @@ static const VMStateDescription vmstate_spk = { static const Property pcspk_properties[] = { DEFINE_AUDIO_PROPERTIES(PCSpkState, card), DEFINE_PROP_UINT32("iobase", PCSpkState, iobase, 0x61), - DEFINE_PROP_BOOL("migrate", PCSpkState, migrate, true), }; static void pcspk_class_initfn(ObjectClass *klass, const void *data) From patchwork Fri May 2 18:56:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 886636 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp961277wrq; Fri, 2 May 2025 11:59:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXhDXV46W/ktVfBZN1rBU22d8sRE6UQ5wes4fHKAbOiIH+3dmVPFSi0+g7TqC9Qxuw5Lvs6OA==@linaro.org X-Google-Smtp-Source: AGHT+IGpxA7+uU4lFCTpXpn4dL1mbunDUni9kHSxMUaQbhcbN5Vlj4X8s5SrO6d1rGIZnAxZmL+v X-Received: by 2002:a05:6214:4009:b0:6e8:f433:20a8 with SMTP id 6a1803df08f44-6f52372586emr2521166d6.9.1746212357078; Fri, 02 May 2025 11:59:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746212357; cv=none; d=google.com; s=arc-20240605; b=ikpQCQL4X5nStXodPBPCqIFSggjatJo1D9R4VzPfrF86/BL5qQSTQweg2ejzHO+h8Q ycqPq5LgH6focwPPZpRfyXG8PgriC5f4aUSO4sIt9azoREPircIleveO56naeGUlUgkq /56EQHiJl58usvOMb0jRpv8qku1mNPZERggVowHrXls+nkcsioBTo8NIENSQr+89E/kj cNJRCBp9lVn6IljTDxcnBRISSOJG47dGzsIaRG7wS7oh8wYpyHImes0HXot+yIil2Ppg 8aXnAmSraX9UR7jIir4B/PF/1Ssc1dma2tP3yyxUSpnYUEIGrDhzkJ6tNwfe5msFQ3Hs zjLg== 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=gMLC32cD5rQa4ngqh9n69biVbtvyYihadQEH/qk7LQg=; fh=zA7MiWWYdZ7nPYzFPsisQ1XfjLk8wRfRNbrxI2kr3EE=; b=M7NNX0CEXX7XE2738qwbiJ1ZuNWgdW6IekD15NRIevZ43nFzilVpNB+IYABpRTUR11 DYj1TT7NNIIZwg158X3s/0iyQRpA7KgmJ/YpLTGmp1fwdm+cFjxpzJcrRpYOUzetGzxv eMzjMdEtlUwlBBLtwgTcagGXKX1xgtjV61Ge24zIjd3LJ095QDbQEaaYpPyLsNWFQ7D9 3AyzELhHPdXBgppWQKgTLs0narN2T7yoPzib2NXHqeUZq1z0PP0WqUPQ1lgXcdMLen0N 0BCQ5kIJRx4MVNPkkyGKMtSLAarUZdNBPRxXsoPYW7uxKHHj5uT8I0DW/SuAdmwmg2Za zh0A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bTj3zb4Y; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f50f3a8ebcsi35176996d6.60.2025.05.02.11.59.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 May 2025 11:59:17 -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=@linaro.org header.s=google header.b=bTj3zb4Y; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAvaq-0007HS-UG; Fri, 02 May 2025 14:58:41 -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 1uAvaY-0006Bt-4j for qemu-devel@nongnu.org; Fri, 02 May 2025 14:58:22 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAvaV-0005e1-RD for qemu-devel@nongnu.org; Fri, 02 May 2025 14:58:21 -0400 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-5efe8d9eb12so3680614a12.1 for ; Fri, 02 May 2025 11:58:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746212297; x=1746817097; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gMLC32cD5rQa4ngqh9n69biVbtvyYihadQEH/qk7LQg=; b=bTj3zb4YYpplrpSJQdjGYcGtQM6woAhzXH9QWA7breTP2nUTldJL+fCj2tOkJtK5NR HXCs57b1nsWkSyuNhcPc6Kb7+cdRzAVxRI0hn7n0YRAe3uqDBxIL3TJ4H2sakRc0/lNc HOR2c56J+CHPHbj9JrTuXXnfOfxE8DDdlVYgtPqcUE0ozc2TFd8IhiLPrOiQdBe2cuzZ ewYyArOiqV30tZZIbTlDGmnFdZckm8OB2VKvOfcVYMZlr6xnQdcKINn6MO2O+uCALOAt 2MPb0kW2DlqNP8fym1YXk5HdiHVClirZvWAu84z7I4R/OgAMKunPj4bjadEFhOoFWdjc KWUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746212297; x=1746817097; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gMLC32cD5rQa4ngqh9n69biVbtvyYihadQEH/qk7LQg=; b=AQh22v6Lp0NWdMTEw4ONe/UiVyUJ0+Vc15N0GBqulkdUFM14kKDwyA2x7jXxjs+nZX cz/svCAvLqs5B1rloMbJ/cz1fjL0O/tY+x2yasGCvFsPAu3r+Pmn44n3n1kz6PtOC5M6 TTCj8BX9mYpck6AzqLa1TjObyzoAYNVKaeKIPs2313ZNP2olK5YofYhTFoVJqFtIEVZ3 DPW1kv/sW4FZ4BU7EUS+B7MghFI3l2FB2AgYNYUcnNbsYoTmGJTvL85M2lonWDixvmgs BDn2YP4PepJUrbdd+Jw0VIL3W/fmYZ4QE6H90/cBitsL7rckdQPnws6CJCTj2Vbw5vP1 /CZQ== X-Gm-Message-State: AOJu0YyvkbhV23udjaY+Pc5PpMpsZaju+EseGvmZ46hQhSDSOjskJZxV KQzIr4CL0PxTbiWxClYWNhfiTtjIMW6n7/8aSPb5ccmvy4ijFtaneKXt39i1zpige1QJwBvfj7/ K X-Gm-Gg: ASbGnctC/ghpgj1ttKYrj7FH3U+ZuV1Van2mbYGNpBFXiRg4u9l5RCTuKpBKXpFgwpJ FbWaKvfQ5DsIO8MBdmjK5XZ8mZILu6a1ccmredJhko16v3G1kA8IANHB4j2PCGg+Ys5995xWjtC WInNNBNwCLt2UZ6Rci1bt9QlhZVgodbZZJsY3FszR++UemWNk83yCMVgzHv2eooNGEoiYLMUZOf TyDR7m8m+6rtwGabA2NWB04mEXrW4T2Sf5RCA9t50JgDN0IDqTYmz+mUEl/FtFt+SKTnaZnbk3z YRk+hQCYTJQaGCmGO9r9jCj5hDa+wziwK7EQRpCzBIH494PaiP4FrpyDhnUiBT1eOoNy7J7Uwhj jfyd30/9kYuDL7M1rN6Cn X-Received: by 2002:a05:6402:34c4:b0:5f8:36b2:dc07 with SMTP id 4fb4d7f45d1cf-5fa78044b3cmr3338594a12.16.1746212296712; Fri, 02 May 2025 11:58:16 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5fa7fd0705csm1083137a12.13.2025.05.02.11.58.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 02 May 2025 11:58:16 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Laurent Vivier , Igor Mammedov , Huacai Chen , Amit Shah , Marcel Apfelbaum , Sergio Lopez , Ani Sinha , Paolo Bonzini , Eduardo Habkost , Jiaxun Yang , Jason Wang , Richard Henderson , Yanan Wang , Gerd Hoffmann , =?utf-8?q?Cl=C3=A9ment_Mathieu--Drif?= , Zhao Liu , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Yi Liu , "Michael S. Tsirkin" , Mark Cave-Ayland Subject: [PATCH v3 14/19] hw/core/machine: Remove hw_compat_2_7[] array Date: Fri, 2 May 2025 20:56:46 +0200 Message-ID: <20250502185652.67370-15-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250502185652.67370-1-philmd@linaro.org> References: <20250502185652.67370-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=philmd@linaro.org; helo=mail-ed1-x52d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The hw_compat_2_7[] array was only used by the pc-q35-2.7 and pc-i440fx-2.7 machines, which got removed. Remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland --- 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 a881db8e7d6..77707c4376a 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -838,7 +838,4 @@ extern const size_t hw_compat_2_9_len; extern GlobalProperty hw_compat_2_8[]; extern const size_t hw_compat_2_8_len; -extern GlobalProperty hw_compat_2_7[]; -extern const size_t hw_compat_2_7_len; - #endif diff --git a/hw/core/machine.c b/hw/core/machine.c index ce98820f277..bde19a2ff67 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -266,15 +266,6 @@ GlobalProperty hw_compat_2_8[] = { }; const size_t hw_compat_2_8_len = G_N_ELEMENTS(hw_compat_2_8); -GlobalProperty hw_compat_2_7[] = { - { "virtio-pci", "page-per-vq", "on" }, - { "virtio-serial-device", "emergency-write", "off" }, - { "ioapic", "version", "0x11" }, - { "intel-iommu", "x-buggy-eim", "true" }, - { "virtio-pci", "x-ignore-backend-features", "on" }, -}; -const size_t hw_compat_2_7_len = G_N_ELEMENTS(hw_compat_2_7); - MachineState *current_machine; static char *machine_get_kernel(Object *obj, Error **errp) From patchwork Fri May 2 18:56:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 886647 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp963788wrq; Fri, 2 May 2025 12:03:39 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVWYfzdA0p0TYtmsX40512xwoVxYZJu6f3LlUfVqwj1phQDBns8NfCj6ksT+P7SzSkZcFn0zg==@linaro.org X-Google-Smtp-Source: AGHT+IE8itbn9a6FxggrjD636oIxGMrKrZ3Njnyx6Jd6WzCfxqUq7t/tkAqyIPBW0mgyx8dMfQRk X-Received: by 2002:a05:6122:32cf:b0:52a:863f:78dd with SMTP id 71dfb90a1353d-52aed79f92amr3200733e0c.6.1746212619681; Fri, 02 May 2025 12:03:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746212619; cv=none; d=google.com; s=arc-20240605; b=U2eFQxE3yxerT1XjFj0dL0cik2lO0x+sy4Y/BTFZtlrunInLBcAZNOVVVhR29oMPmZ is3T60A9m6I+5nJXw5/oDIhVVo59GbpFzCbIKO4NJh6ICQgr3uSOoCqIMBTVM21gwPQ1 1K+cqprMKrqsdTtjRB/hUIU/uJ3uFFV8fZvmEyu3ZtTTRzmTwg3E4sL1Tc7hozLh5TVP 4qhAlKpDhZOgKHVZ/m70NpyUuVALSUGdwPAk/zOyBrvM4fexlsXEkxa38qneK5+G4PSf nbMdIEJs7YKII2zRmftuU7kAFa8CrbqvFE9ZfGadny0HbNZoQ64RxnZKCeO2hGssmq9b ROQQ== 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=ABC8+QfGyso1WyDvOcXI+0OZWgW+TnNwcrP3jxKT+bs=; fh=zA7MiWWYdZ7nPYzFPsisQ1XfjLk8wRfRNbrxI2kr3EE=; b=e1FJq1bepLbxHnrr44vm123kNzZ9bkrPpyoynnavOSnszJ8O2gwkQgcau3V0ehpLNJ rNdfFS2VlictGvSkHdAqPVjiKU1wmZJ5Gyo4CSDRU0hy6TIMH8vvlio8Toup4tVkQalV 4QeJvmp2PMzGj7+r+/xIrC9aKPrj4f7WDWRt4EZf+3+gHRNuFKWLQZeNUX3tzl4Sqqp4 tgFgHK75xfe2I6XwpKyF+OdG4WWVGYsENARBcxv9JRslpsZkbetbGaQGuEW+oCMaxYbQ 8yix5qfyeWW35rBF4mlNbudRNrZcdfEJt/Xxp8oju84lFOnUF5KlpHMSSoiPzWaiNNeK 2nAA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RL7w98xi; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 71dfb90a1353d-52ae419752fsi1162541e0c.225.2025.05.02.12.03.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 May 2025 12:03:39 -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=@linaro.org header.s=google header.b=RL7w98xi; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAvar-0007LK-Q9; Fri, 02 May 2025 14:58:42 -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 1uAvad-0006Qv-Tg for qemu-devel@nongnu.org; Fri, 02 May 2025 14:58:28 -0400 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAvab-0005el-MT for qemu-devel@nongnu.org; Fri, 02 May 2025 14:58:27 -0400 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-aca99fc253bso369738166b.0 for ; Fri, 02 May 2025 11:58:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746212302; x=1746817102; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ABC8+QfGyso1WyDvOcXI+0OZWgW+TnNwcrP3jxKT+bs=; b=RL7w98xih3fjFfElmNHdixUCO/AJpZ3/GBJBsKCH5V9vcGXmN/KbnRktUVkQVeONRT L427/3QkkRGhV4mlJDosO0OFuEuOZsngS5X9Nh9bEtwU4nugPCABfkD+4N+vqajdaEje vNQmtfhaYyHuT31FxKWIMcccbQAxP4LONbGWnutZYm46N6N7fS315o6QgnwCJni6x/bB ysIrml2BayGqWVFKLEq02SHakh02tRWMCB/s2Uu0xfaxs8YHCVNb5XWlOADX/Dgua4st knpD/GNqgneVrks/Vhn39t2AqIu7QB+wk6xlGIN+oUm5GVk+bUoNK+kiQMjwnhO5WybP earA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746212302; x=1746817102; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ABC8+QfGyso1WyDvOcXI+0OZWgW+TnNwcrP3jxKT+bs=; b=kySE8vy/LpXYFO/rEYY8ySCCi/8+n6z0Iveilx3ViBmJZh7emahFT9obMZ0360kJyi w8NOVI+mXRcNyGUZoO98MFVGFXFgmzXzp3/g3NAB0oLI86E4SdWbanTQZHx8uPbp/GHr B2yb5eFUb4gBeOZ609k9Sy2sqweW/k9Lrh74cBl78owuxzEe9uTorCN+bt7Z7WlSwbwU c55W+jPFJ+gIVTWVtybTC7ecXv2vAmerYMKaNNs9tbs+T6S26paO/JK5KDS58OE40GHD A8QZWwfG2UJu/YwdoTcoAAxHdxHrPwI3CLm5kvbAhFxUs17L3KuJs4WT+IUsJnmsZAUZ dgig== X-Gm-Message-State: AOJu0YxGUn5ZybNd7Zgv4wOuWCXeVePWBqTDyVuvXV4x0ic4F56Rc8KF j4omUbQZt5F3KoZxJJ5VZZLXOB8D5uaj+NVIuO5UGUWwK+ogpgpeMb8cT8xx965D+yRWaWl+gB1 Q X-Gm-Gg: ASbGncszMPZDduNccekIVqzY/4WNO0tP+IvuucckvBk/atk0KVA185H1Np0USt4Bo30 D+h9y6iAwR8Egd52eepHou2s+sxGx4gBnYiDvQkuc+O+DVYVRUNlidruE/5CD/i1K7dZNLLZmBj CzKdgAuUFpBDVK49etSTIfnMlsKoS7yP6gEclZo5jiys7/ILGzMvruahkdElh3z2iao8Dram7aK D+YCugSLk+nKcPFSGj196c7+svk730TzrEva0I6BNnY6omacMOpUaqosM4RUoFfV+vuRgYOK4PI L/QJzOfwQ4/bDF0qiY0xluN6F8eqvQY0VtWbqLCZ4xtXMXGwqF/WWFN8vLnBTJ3bgiupCg7lvwC GiMJeu73eru/Ghy6da2ai X-Received: by 2002:a17:907:94c1:b0:aca:d6f2:5d5 with SMTP id a640c23a62f3a-ad17af8f6famr328521366b.39.1746212302362; Fri, 02 May 2025 11:58:22 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ad18950830csm84058166b.124.2025.05.02.11.58.20 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 02 May 2025 11:58:21 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Laurent Vivier , Igor Mammedov , Huacai Chen , Amit Shah , Marcel Apfelbaum , Sergio Lopez , Ani Sinha , Paolo Bonzini , Eduardo Habkost , Jiaxun Yang , Jason Wang , Richard Henderson , Yanan Wang , Gerd Hoffmann , =?utf-8?q?Cl=C3=A9ment_Mathieu--Drif?= , Zhao Liu , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Yi Liu , "Michael S. Tsirkin" , Mark Cave-Ayland Subject: [PATCH v3 15/19] hw/i386/intel_iommu: Remove IntelIOMMUState::buggy_eim field Date: Fri, 2 May 2025 20:56:47 +0200 Message-ID: <20250502185652.67370-16-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250502185652.67370-1-philmd@linaro.org> References: <20250502185652.67370-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=philmd@linaro.org; helo=mail-ej1-x62e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The IntelIOMMUState::buggy_eim boolean was only set in the hw_compat_2_7[] array, via the 'x-buggy-eim=true' property. We removed all machines using that array, lets remove that property, simplifying vtd_decide_config(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland --- include/hw/i386/intel_iommu.h | 1 - hw/i386/intel_iommu.c | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/hw/i386/intel_iommu.h b/include/hw/i386/intel_iommu.h index e95477e8554..29304329d05 100644 --- a/include/hw/i386/intel_iommu.h +++ b/include/hw/i386/intel_iommu.h @@ -303,7 +303,6 @@ struct IntelIOMMUState { uint32_t intr_size; /* Number of IR table entries */ bool intr_eime; /* Extended interrupt mode enabled */ OnOffAuto intr_eim; /* Toggle for EIM cabability */ - bool buggy_eim; /* Force buggy EIM unless eim=off */ uint8_t aw_bits; /* Host/IOVA address width (in bits) */ bool dma_drain; /* Whether DMA r/w draining enabled */ bool dma_translation; /* Whether DMA translation supported */ diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 5f8ed1243d1..c980cecb4ee 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -3823,7 +3823,6 @@ static const Property vtd_properties[] = { DEFINE_PROP_UINT32("version", IntelIOMMUState, version, 0), DEFINE_PROP_ON_OFF_AUTO("eim", IntelIOMMUState, intr_eim, ON_OFF_AUTO_AUTO), - DEFINE_PROP_BOOL("x-buggy-eim", IntelIOMMUState, buggy_eim, false), DEFINE_PROP_UINT8("aw-bits", IntelIOMMUState, aw_bits, VTD_HOST_ADDRESS_WIDTH), DEFINE_PROP_BOOL("caching-mode", IntelIOMMUState, caching_mode, FALSE), @@ -4731,11 +4730,11 @@ static bool vtd_decide_config(IntelIOMMUState *s, Error **errp) } if (s->intr_eim == ON_OFF_AUTO_AUTO) { - s->intr_eim = (kvm_irqchip_in_kernel() || s->buggy_eim) + s->intr_eim = kvm_irqchip_in_kernel() && x86_iommu_ir_supported(x86_iommu) ? ON_OFF_AUTO_ON : ON_OFF_AUTO_OFF; } - if (s->intr_eim == ON_OFF_AUTO_ON && !s->buggy_eim) { + if (s->intr_eim == ON_OFF_AUTO_ON) { if (kvm_irqchip_is_split() && !kvm_enable_x2apic()) { error_setg(errp, "eim=on requires support on the KVM side" "(X2APIC_API, first shipped in v4.7)"); From patchwork Fri May 2 18:56:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 886635 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp961265wrq; Fri, 2 May 2025 11:59:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUuinyuG+5zdLTZtdBePFYcTgX3mWHRy16XK+22XqVf7cQDaYx7MgSumFTz/igfrBAnlGeuqA==@linaro.org X-Google-Smtp-Source: AGHT+IGUm50bStlEaX6Bvz/Js+jZ8yu2svLWwMAevX7ou0kZFR43G/t23zleQ+V6TUvZlUXVBfsE X-Received: by 2002:a05:622a:1c05:b0:476:aa7a:2f78 with SMTP id d75a77b69052e-48d5da65fcamr3599471cf.49.1746212355565; Fri, 02 May 2025 11:59:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746212355; cv=none; d=google.com; s=arc-20240605; b=CUtIPcSCVpMGRLljt6Un2Yun5TYktwl/44lgrISKg407X2velUhXGdMnitq7YzMZdl 46aAfcaLiOHfemKLc380HKn0UltW0kuQ0cGzrQc+p5x0mZEhTZ8P2kWlMVhQUvdv5jxr nbQQrmCAFE0ejKg+NoOh9+2pslBLfEd7B0bomaFPWRHQqwvq9j910qUfxY0ZSszHf+zI DFh13Yr79uA6y9BKfCdyHzni2rHxTtB05BUde/HJiopdRH1uCH3mxAduZP39eZArcGet C2AEUAxOrcemRmJOlOI/H0Lt6xFGvkWb9llBiFGTCq3KJOrjP0zK3O+LolJpk/HKDO0X L9MA== 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=J0A/U1sPooJ/zOn+77YMR3kP+UO0nbbTuEYORNZS6uE=; fh=zA7MiWWYdZ7nPYzFPsisQ1XfjLk8wRfRNbrxI2kr3EE=; b=OA/rVm8EtEeMKDosSn/KtXBNU81X7P6LKUCx2D2fYsU8ur0P50HT84+wA+J/5kpYaD i4WCz0JDEpFSoXf24eqB9HwnlHrmbaPbsjCzjyJuaLJrEwkoQlgh0X6M+1g2T/uhanE7 x+RdOYY57vZ8gGL8G3ZUwkDolq5cGF9/l57AIOz26T3SeTbONcXEs8ym7wsGk9BIy8WB 4EKrFFZXGmySeIH0qi9sNjIQuZu8o4qlWyFgdmFBgoqzToM7w19jTwxI62hajPVclygf q0/ZKZ9wO8Hao1N10K7pNMV544Vntt1ZJGeIG6P2vhNcu3VO4zifiNLlPlq7cCCEPTFw UXtQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=x5KxkQGG; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-48b98246bb0si33946571cf.286.2025.05.02.11.59.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 May 2025 11:59: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=@linaro.org header.s=google header.b=x5KxkQGG; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAvay-0007nu-4N; Fri, 02 May 2025 14:58: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 1uAvao-000798-67 for qemu-devel@nongnu.org; Fri, 02 May 2025 14:58:38 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAvag-0005fr-7w for qemu-devel@nongnu.org; Fri, 02 May 2025 14:58:37 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5e6c18e2c7dso4475891a12.3 for ; Fri, 02 May 2025 11:58:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746212308; x=1746817108; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=J0A/U1sPooJ/zOn+77YMR3kP+UO0nbbTuEYORNZS6uE=; b=x5KxkQGG4OHsTeQYxdaiSMb+lGwRt/DOjlBCyzs05wKWWjKYnvMAAlaMDrjyl9/MTl I5Zqd/JjDQXOZXybxgl6sV1KdaUehdi5n8KyRH4YkeNHEXg49+C+DuOl+KbReiEDGMx1 0qONppMlXJkusx8Z43eyIGeQyDuQD5+jZ8e1Xui0rxAimWZjAoAHb17F8+P8QONAK/m7 R2N1PaaPyV8nJvEquFBM1etHO0tHDapM4IXvPocWGm8GoWshQgZho2zI6rpv3xoEojIL Uk+2Jwl/+sjhzw1w5/iP0ebARmHoj71n/ha6Gf7A0fk3NU27QW3EWDkY0F/YfaAqN4Ou VyCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746212308; x=1746817108; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J0A/U1sPooJ/zOn+77YMR3kP+UO0nbbTuEYORNZS6uE=; b=OmCPNp3Vv360C3WKP7tFB4Ap4nxQ3cmGd+8QcT/EN4lr0NN0NpKcEksXbUHR1J2lLB bS/Ssv9M/lJd/QZkQ/E72Gt9wIID4FQTFQcqKWgDDiN8wzQiBGtG4YJoochuZIi1kY+X 7YoDm9j6+UuiVStugelzDrGaFwGAducxDi2DMC7YxLlze3N+xt8xXx38WMex+xoA9RYV HWayynZ5gHfNOYR83TT484v0CE/4vqteJLx2jcMxI/RSETf7T3YuwfFQ6c9408ROxFPT s5VgRF438zGCr8jPMB8ARuDC4VhW6ZLAgu153QSJ99+be3fX+ekyUr5VlNoiTScS0C0K aIPA== X-Gm-Message-State: AOJu0Yy9Sl232i7EMR63gaXB/XA2Y5aKaHm4OY0VEtk2gDLjkOf0W2qp ips4/yVagWvOJMebYfYtbBotQ6hO2FafJXYECuPgaM8lGcYejLE/HK5+qanEBSfpiRnjrMBVFxY U X-Gm-Gg: ASbGncv/4C5UomfsRKQEJPmD611htwfBNj2+OA16N51y82k+PZRrCYQCP96/L9W+P+M NSm4+/4DDU3OIByifRv87UFSDYAXDaPGKbvU6QA83O3iI5pWvy50LLxOjbfnWNfUlKoGiUogvzM vfe5qinkl9pInKBNm+1k6L1DbSf6BPknVsDjT1bgaufU36B21wWSZ8mHdrfQI/v3nwH0FnCL41O nrxccnXyvTG4+c/Mo+EXL7uA7itPcp0PsCXHXTKbplnYMj97IyW4P4pXJegPqDQC+1jff503PMA wtMdNYTZc3RhsB0w1mj3VZm/ccHWJhe9hDyk7rLVBH5W6V7CgCiMF0A12j3W0VRkxlvhqRti+Uh ticvzOUfn+PwXl5jCKTo6xYdfl3dmKz4= X-Received: by 2002:a05:6402:350c:b0:5f8:504a:88d5 with SMTP id 4fb4d7f45d1cf-5faa7f31700mr178673a12.7.1746212307893; Fri, 02 May 2025 11:58:27 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5fa777c732bsm1620533a12.20.2025.05.02.11.58.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 02 May 2025 11:58:27 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Laurent Vivier , Igor Mammedov , Huacai Chen , Amit Shah , Marcel Apfelbaum , Sergio Lopez , Ani Sinha , Paolo Bonzini , Eduardo Habkost , Jiaxun Yang , Jason Wang , Richard Henderson , Yanan Wang , Gerd Hoffmann , =?utf-8?q?Cl=C3=A9ment_Mathieu--Drif?= , Zhao Liu , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Yi Liu , "Michael S. Tsirkin" , Mark Cave-Ayland Subject: [PATCH v3 16/19] hw/intc/ioapic: Remove IOAPICCommonState::version field Date: Fri, 2 May 2025 20:56:48 +0200 Message-ID: <20250502185652.67370-17-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250502185652.67370-1-philmd@linaro.org> References: <20250502185652.67370-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=philmd@linaro.org; helo=mail-ed1-x529.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The IOAPICCommonState::version integer was only set in the hw_compat_2_7[] array, via the 'version=0x11' property. We removed all machines using that array, lets remove that property, simplify by only using the default version (defined as IOAPIC_VER_DEF). For the record, this field was introduced in commit 20fd4b7b6d9 ("x86: ioapic: add support for explicit EOI"): > Some old Linux kernels (upstream before v4.0), or any released RHEL > kernels has problem in sending APIC EOI when IR is enabled. > Meanwhile, many of them only support explicit EOI for IOAPIC, which > is only introduced in IOAPIC version 0x20. This patch provide a way > to boost QEMU IOAPIC to version 0x20, in order for QEMU to correctly > receive EOI messages. > > Without boosting IOAPIC version to 0x20, kernels before commit > d32932d ("x86/irq: Convert IOAPIC to use hierarchical irqdomain > interfaces") will have trouble enabling both IR and level-triggered > interrupt devices (like e1000). > > To upgrade IOAPIC to version 0x20, we need to specify: > > -global ioapic.version=0x20 > > To be compatible with old systems, 0x11 will still be the default > IOAPIC version. Here 0x11 and 0x20 are the only versions to be > supported. > > One thing to mention: this patch only applies to emulated IOAPIC. It > does not affect kernel IOAPIC behavior. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland --- hw/intc/ioapic_internal.h | 3 +-- hw/intc/ioapic.c | 18 ++---------------- hw/intc/ioapic_common.c | 2 +- 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/hw/intc/ioapic_internal.h b/hw/intc/ioapic_internal.h index 51205767f44..330ce195222 100644 --- a/hw/intc/ioapic_internal.h +++ b/hw/intc/ioapic_internal.h @@ -82,7 +82,7 @@ #define IOAPIC_ID_MASK 0xf #define IOAPIC_VER_ENTRIES_SHIFT 16 - +#define IOAPIC_VER_DEF 0x20 #define TYPE_IOAPIC_COMMON "ioapic-common" OBJECT_DECLARE_TYPE(IOAPICCommonState, IOAPICCommonClass, IOAPIC_COMMON) @@ -104,7 +104,6 @@ struct IOAPICCommonState { uint32_t irr; uint64_t ioredtbl[IOAPIC_NUM_PINS]; Notifier machine_done; - uint8_t version; uint64_t irq_count[IOAPIC_NUM_PINS]; int irq_level[IOAPIC_NUM_PINS]; int irq_eoi[IOAPIC_NUM_PINS]; diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c index 133bef852d1..5cc97767d9d 100644 --- a/hw/intc/ioapic.c +++ b/hw/intc/ioapic.c @@ -315,7 +315,7 @@ ioapic_mem_read(void *opaque, hwaddr addr, unsigned int size) val = s->id << IOAPIC_ID_SHIFT; break; case IOAPIC_REG_VER: - val = s->version | + val = IOAPIC_VER_DEF | ((IOAPIC_NUM_PINS - 1) << IOAPIC_VER_ENTRIES_SHIFT); break; default: @@ -411,8 +411,7 @@ ioapic_mem_write(void *opaque, hwaddr addr, uint64_t val, } break; case IOAPIC_EOI: - /* Explicit EOI is only supported for IOAPIC version 0x20 */ - if (size != 4 || s->version != 0x20) { + if (size != 4) { break; } ioapic_eoi_broadcast(val); @@ -444,18 +443,10 @@ static void ioapic_machine_done_notify(Notifier *notifier, void *data) #endif } -#define IOAPIC_VER_DEF 0x20 - static void ioapic_realize(DeviceState *dev, Error **errp) { IOAPICCommonState *s = IOAPIC_COMMON(dev); - if (s->version != 0x11 && s->version != 0x20) { - error_setg(errp, "IOAPIC only supports version 0x11 or 0x20 " - "(default: 0x%x).", IOAPIC_VER_DEF); - return; - } - memory_region_init_io(&s->io_memory, OBJECT(s), &ioapic_io_ops, s, "ioapic", 0x1000); @@ -476,10 +467,6 @@ static void ioapic_unrealize(DeviceState *dev) timer_free(s->delayed_ioapic_service_timer); } -static const Property ioapic_properties[] = { - DEFINE_PROP_UINT8("version", IOAPICCommonState, version, IOAPIC_VER_DEF), -}; - static void ioapic_class_init(ObjectClass *klass, const void *data) { IOAPICCommonClass *k = IOAPIC_COMMON_CLASS(klass); @@ -493,7 +480,6 @@ static void ioapic_class_init(ObjectClass *klass, const void *data) */ k->post_load = ioapic_update_kvm_routes; device_class_set_legacy_reset(dc, ioapic_reset_common); - device_class_set_props(dc, ioapic_properties); } static const TypeInfo ioapic_info = { diff --git a/hw/intc/ioapic_common.c b/hw/intc/ioapic_common.c index fce3486e519..8b3e2ba9384 100644 --- a/hw/intc/ioapic_common.c +++ b/hw/intc/ioapic_common.c @@ -83,7 +83,7 @@ static void ioapic_print_redtbl(GString *buf, IOAPICCommonState *s) int i; g_string_append_printf(buf, "ioapic0: ver=0x%x id=0x%02x sel=0x%02x", - s->version, s->id, s->ioregsel); + IOAPIC_VER_DEF, s->id, s->ioregsel); if (s->ioregsel) { g_string_append_printf(buf, " (redir[%u])\n", (s->ioregsel - IOAPIC_REG_REDTBL_BASE) >> 1); From patchwork Fri May 2 18:56:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 886644 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp963588wrq; Fri, 2 May 2025 12:03:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV/yqvy5dnjKYlOixjp3yIfrmC+MPOsgB6EEAU0xDevnjvP2ORRZfgToC/MnYCWRbV2mB1sKw==@linaro.org X-Google-Smtp-Source: AGHT+IE2S85iUNxzAJn0ERNoXjlEbmDvmPEYkJgWgVSlz4tCpQMrwLeoWQ4ionDFEpBSsdzt+JVj X-Received: by 2002:a05:6102:8016:b0:4cb:5ec2:52ea with SMTP id ada2fe7eead31-4dafb6e514bmr3503786137.22.1746212599840; Fri, 02 May 2025 12:03:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746212599; cv=none; d=google.com; s=arc-20240605; b=Pmo5o1LPf1gfdmFpgJyJklb3zbwSDE5+CMrOXGqkahNx7Sj8sS1cE3lqnV7eXb/v1+ qpM+UeHnyVh55Zxcfyg0vq3JNRncai19gYFOueuPnSmP8kVLpMY1ZtVWrBsTzuTqA3El 0J5wdi9PseO/aD+W8323G0Mz/tuK2EcOy30an5IqNOo4TuAXsnOz/onGVgiFmcV1YSih Vf74UcaxP4+udd5PIPdNN2wzHje/FUyu5c6ZEEMa3ufmzJGGiFA/bYX+r9R+I+l2Bc/W lICvKfMVJYbgjfeDLVPXdFNi8J6cnjJWUUyvLR1GsPrtfCbGmKrianpkT8XCsZ2yMRig Mqjw== 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=OvirrR3TiqgBPme4BwNGSV4VqzG47GBw5DwB3TzFavY=; fh=zA7MiWWYdZ7nPYzFPsisQ1XfjLk8wRfRNbrxI2kr3EE=; b=E6WAHRPtUvokfuae2881ga3EJIg/lUkKudL8Yg3APe7fyzXWMD3Dn6Z6maKH2vkPTI eBIiuNTi6jdPpYTJpiYVvrDY0tcd3lgEgl5vIMD0/+vNQ/DtOCY4bq/JDnsFhNFx3opO Xbflu9ruNlpp2coctiuPZOJAh3X79TNRVlgNkroaUHKWB5WiyQ8nZynEblT4UbvLOLQE 6dGBz80JOAmeQMUmsRMc/FLAp0nRyaOT6DGyJwRp+n2VEyc3eI5F0DUdTZT8ylEp4Kz6 lFfxsLmx4HW/yqSld3sp1llT1LZwM1wfZiWM1li1zWRSReQwgiczftAaqog6ZzK9qsHF 7vlg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=afZqr4MI; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ada2fe7eead31-4daf2584a49si962792137.356.2025.05.02.12.03.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 May 2025 12:03: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=@linaro.org header.s=google header.b=afZqr4MI; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAvbb-00014E-V8; Fri, 02 May 2025 14:59:28 -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 1uAvao-00079b-9B for qemu-devel@nongnu.org; Fri, 02 May 2025 14:58:38 -0400 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAval-0005go-E3 for qemu-devel@nongnu.org; Fri, 02 May 2025 14:58:37 -0400 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-5e5deb6482cso6238450a12.1 for ; Fri, 02 May 2025 11:58:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746212313; x=1746817113; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OvirrR3TiqgBPme4BwNGSV4VqzG47GBw5DwB3TzFavY=; b=afZqr4MI3noG/qSTyUTCbppF3OXeyj01ByXbyxvhFCFT6XKWo2+q0XnaI+VMonWfFV JbeNsKCMWRhtPLc2OU4TgY14d5ra0hGMkVPGdB+mgvyFUhlx+0+l5cLLB4SV9XtouMCh lt7j+aX7KOiMyGGTCnS/l5ApkqOAqgc4MsrAIxi4zsnrbHkOnQBPubptp6h9T9LDuup0 3j7vv+U74vDjhLEoceHDptg/cQRzwfpr2e7USeiaM+UXVUsdMW67BmeqXM82/b7r0Ze7 vVUxGsSFkgjtIz2JU+kMieftADh7sFmJKvIcV3pGw3yPLZJZv40X5b50wqStKBlhcYTJ JwdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746212313; x=1746817113; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OvirrR3TiqgBPme4BwNGSV4VqzG47GBw5DwB3TzFavY=; b=Op+d4TvJU1/qaCBoHGD5ukD2d6XKtbbXOZmqZ/TaPmjFjb1ohXEB6d82MftgvT7Tw5 g1+td4ciBZnNMN0JtbSE/5B2q8zRybeEO/guun1LfvpIvx5p7DtMLRRGVr64wGVpckMo dcr4MhyoRbhizCTDn5MOuXN4N5qDltpPy8YEwxLRZpogaEFTzbzuT03P3xlTQfp10R24 0I0VRm421ipZet2OTUPtG8efC+SrEJFTEBJXAB5OcFmFIRJDgwpGEcKO8NIuDCgjXa0D NoO4OV2EoEegKGAUoBfUglHVz9heSHgnFG3A7I51t2aUoEBbsPWb/GAg8tVyaJAMZoKa Vc4w== X-Gm-Message-State: AOJu0Yxw1ytJvQvZYeCbg0OPrEpMnZL30prIpGFEEnDXz1Ypwncjr0nv /Cm3QOJPi2KlpFRFdiZFb1gYQ6k9j5JepYvF8fyLn6omu8rYGsEWPGew0G4WiaZFbLxgkHlXlxW 4 X-Gm-Gg: ASbGnct58kdvocslDh2jpShZ4BAelocux77/4pOMl6HEE5bHC+DSNZhh67H3FkVI7dp JAO8xY9Uh3OoObr/VQg7MlND00ojxDrzNbQR6USkdDWPKGVoXWtBHVAVQRRhFgl/6TjS0SaJg5A 8xHDtrx70finPvmet+DjppfQYWrH0siVs8jL0h67PwzYsA5jvbQtpP6MTn6m8GLp0MyBd9qAi/y wG/xXpEopLFzdF7MaJvoO34SjoAOnc7mVcBJpZpH0NdxfGavMfjWVgy+gL6RB0Sgx8i2N4jWAcC WEhLefDNBEW2QnUY+mqwPesqZ+utC+bLffDN7xPdFpef/n+imsgujJ/nCwbjszKTCc01cKFdi7y Js7MTbcBKNmwMq5C5G5uLuqfXH0GrSZQ= X-Received: by 2002:a17:906:4fc5:b0:aca:c67d:eac0 with SMTP id a640c23a62f3a-acefe63defemr673247266b.0.1746212313493; Fri, 02 May 2025 11:58:33 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ad1891a311bsm88214366b.54.2025.05.02.11.58.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 02 May 2025 11:58:32 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Laurent Vivier , Igor Mammedov , Huacai Chen , Amit Shah , Marcel Apfelbaum , Sergio Lopez , Ani Sinha , Paolo Bonzini , Eduardo Habkost , Jiaxun Yang , Jason Wang , Richard Henderson , Yanan Wang , Gerd Hoffmann , =?utf-8?q?Cl=C3=A9ment_Mathieu--Drif?= , Zhao Liu , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Yi Liu , "Michael S. Tsirkin" , Mark Cave-Ayland Subject: [PATCH v3 17/19] hw/virtio/virtio-pci: Remove VirtIOPCIProxy::ignore_backend_features field Date: Fri, 2 May 2025 20:56:49 +0200 Message-ID: <20250502185652.67370-18-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250502185652.67370-1-philmd@linaro.org> References: <20250502185652.67370-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=philmd@linaro.org; helo=mail-ed1-x532.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The VirtIOPCIProxy::ignore_backend_features boolean was only set in the hw_compat_2_7[] array, via the 'x-ignore-backend-features=on' property. We removed all machines using that array, lets remove that property, simplify by only using the default version. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland --- include/hw/virtio/virtio-pci.h | 1 - hw/virtio/virtio-pci.c | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/include/hw/virtio/virtio-pci.h b/include/hw/virtio/virtio-pci.h index f962c9116c1..9838e8650a6 100644 --- a/include/hw/virtio/virtio-pci.h +++ b/include/hw/virtio/virtio-pci.h @@ -149,7 +149,6 @@ struct VirtIOPCIProxy { int config_cap; uint32_t flags; bool disable_modern; - bool ignore_backend_features; OnOffAuto disable_legacy; /* Transitional device id */ uint16_t trans_devid; diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 8d68e56641a..7c965771907 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -1965,8 +1965,7 @@ static void virtio_pci_device_plugged(DeviceState *d, Error **errp) * Virtio capabilities present without * VIRTIO_F_VERSION_1 confuses guests */ - if (!proxy->ignore_backend_features && - !virtio_has_feature(vdev->host_features, VIRTIO_F_VERSION_1)) { + if (!virtio_has_feature(vdev->host_features, VIRTIO_F_VERSION_1)) { virtio_pci_disable_modern(proxy); if (!legacy) { @@ -2351,8 +2350,6 @@ static const Property virtio_pci_properties[] = { VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_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, - ignore_backend_features, false), DEFINE_PROP_BIT("ats", VirtIOPCIProxy, flags, VIRTIO_PCI_FLAG_ATS_BIT, false), DEFINE_PROP_BIT("x-ats-page-aligned", VirtIOPCIProxy, flags, From patchwork Fri May 2 18:56:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 886642 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp962593wrq; Fri, 2 May 2025 12:01:41 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWiVAIFs4qBdzDbYUYB15SyLFQdaG9LWZeIFtFDXW9LbDc77l83XFhJq5TuicV/EKKoMNpG7g==@linaro.org X-Google-Smtp-Source: AGHT+IGagpMqypAAbvsjnLSqUkReOd8d5Tnbe5Y+MA+S+BE3wp0bQgONP3UCC2vwQtFjShS+LFjJ X-Received: by 2002:a05:620a:3949:b0:7c5:ad56:46c6 with SMTP id af79cd13be357-7cad572ba50mr574420385a.2.1746212501348; Fri, 02 May 2025 12:01:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746212501; cv=none; d=google.com; s=arc-20240605; b=iXm6weNWEqSgpsmDpOvabnnCvG5359RVKp429UwLJFRJPw9aFyGGQ/f/W+WztnwxWw QRVXHzze867dqFWt8acW5bI9cq//DDJZOzNZTUPptSG+CULSoIrnoI0m+KZNJoGAc03m bndnunF24TwZiFhnyG81I6D1RUZmNm+1l8rr1aPu8PeUzqW2OvAl9PdLFMGsLIW801L0 4DTZAX15Z6Hm63IzQ/6gf3BT2LUls2AYCKl3NVOP7yHqWCOUZHEk5Z/xrmlA9NyEq/9B 7U49aDrxTejZpFAVb8QFVFqvuWzx9fElKrG+ysRLfc9ZDDLibBX8+In9KhvyBSC2Rvyn /FiA== 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=ns6abkUGaM6ukyij9Yk70LzU+Vns27nmI4rpIretkkk=; fh=Mi6rIaSWSDxP/DH2kogK8jGulyKPJuFbWNIs/qeUzeE=; b=JsnROodqAa6oWXgZ7Gw7jIDmVnWRbPxL6k+ubwnazoDayVOpD56kEjxc0UDVfLoJdB pLwwbeU0KwebJinAgdSBn/U8mkpmfub9MBegsweKt65shvPG46mXyHS8OrIQTexFGaMs TsK9IdeItGkTuNqKml76e6CdosNtEXC7Tce/dnOz7XzIv2ZSXupgsy1CZ9e6+62Vj0d1 W211PFY0PCtU9IdfD0dzwA9TjTvq0KlpUntEjchaJ+NKFTtfrfNBCH3lZ78HJoM96XES C00lhXsdG4Y8FR4XJekybsqZvbXBokxjnvVtwiAay2gzmLFGIxrutChT8DBMwN3CveC+ 048A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GjB5VlRJ; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7cad242106bsi354233485a.292.2025.05.02.12.01.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 May 2025 12:01: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=@linaro.org header.s=google header.b=GjB5VlRJ; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAvcD-0001mw-Ok; Fri, 02 May 2025 15:00:16 -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 1uAvat-0007WS-Dk for qemu-devel@nongnu.org; Fri, 02 May 2025 14:58:43 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAvar-0005iI-LB for qemu-devel@nongnu.org; Fri, 02 May 2025 14:58:43 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5f4d28d9fd8so3268052a12.3 for ; Fri, 02 May 2025 11:58:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746212320; x=1746817120; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ns6abkUGaM6ukyij9Yk70LzU+Vns27nmI4rpIretkkk=; b=GjB5VlRJwG2MFEdyIm2nevJQf3UlnnEJhs2ykew65Leh2t8PluWMdUkmew2dJ7bUW9 dtVGfeMYLEak9vyEBN0OaJ4ChMP7yTNDgrAQSHGIjbBvXAz28vyKH3PPxv2mwRxf2cIV VLrpyXYeIyQirhYxh5/lUkkqy1N2jrjExLUza+AIPZ0p/oESX6z4rtJ+2TGtSZ46Qo6+ a0Ou/uGZDVdDKFCfSP9BU4RKIJz/p3p98YelowUUURGFAYinGp2m7DCv0Fht4gX1wglB v3IlYlkG62N6b/ovA22jxHsPbK23ZSVpo/RGm0nVx9yGqICKGxfnLhTEtTtRmOOEYe+n /gGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746212320; x=1746817120; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ns6abkUGaM6ukyij9Yk70LzU+Vns27nmI4rpIretkkk=; b=V9CsSGZ5fItVmBdkDnehzeYUkuRy1cs6xp6NWZQ21HDKFuLju0Xf4uUToNTIfeiHwq 9EBeFFXHW+RzLNt5EuS//JhPoukeR93VdjLVVkiTowylFNcbf07gieTF4kZZkHBJ33BY qre/oXa57KUrqWDjwRDv2gaO5QJ7U3p0+MAGOkG8rhBIn91oMoRUIxwUVA4o8tsw/2rG Pbl9bTgRzzvSJnXjBD4au7uv2zdUIwCg39DHpdjMZ1NrZCl1lwTENMOQNzy/ex0IL6mq xfmFcM9PJEwk3//8iIRygTaGn0hGElmfV3knMRTqm/EEtIFEBHOPkJhAnRBG9UmaLMnm /Lrw== X-Gm-Message-State: AOJu0Yx9vgMbwSu/rZ8CHIMvIo4tTrn/KiytM8Ib+cxcV1jwwem/YoyH hNtGNZqlmVCX5tcpOmRAmPQMxyFKgE3rXBKTGBjqmASsGuvEkk1e7CUNFsGhwkKG9wODVoPFwlq i X-Gm-Gg: ASbGncsqjmz4ri4k3cvDJQHFYTg2YpZkKXx1E53LBr2FHh6Zeyl4WPYz+Jdms/GCN+A 0zNCrBicGur89kXyZjoBWQdJZd8mFW41Lou4L1PxZvawgXNDApEY3B9aYkenzbUFpchpmVAh/OA Cr74t1AEXL2ZohhNYbMU3RywtdoXevtlIqFby71yv+QjQnHLAu3slvwEJo/9a1WXUKvyLtUqSnG 9+Kmi3AdWXdAIyIw9TTYS2ZnfnJyIXAv0IJS+oMYfrpVQX1WA+o0P76Hm7Y49GvW7uGmiaMYRws Y1sz40YwMKCmy3CzKdPC9HUYjlBqNqQvdhu7mGeItYbuNA67UNPxIOAo4VkkkqNpWoLCqRLY4/O nzQiHiOEbgellIrBghI4p X-Received: by 2002:a05:6402:84c:b0:5fa:82a4:4c03 with SMTP id 4fb4d7f45d1cf-5fa82a44cc2mr2325996a12.13.1746212319716; Fri, 02 May 2025 11:58:39 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5fa77816ffbsm1558875a12.34.2025.05.02.11.58.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 02 May 2025 11:58:39 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Laurent Vivier , Igor Mammedov , Huacai Chen , Amit Shah , Marcel Apfelbaum , Sergio Lopez , Ani Sinha , Paolo Bonzini , Eduardo Habkost , Jiaxun Yang , Jason Wang , Richard Henderson , Yanan Wang , Gerd Hoffmann , =?utf-8?q?Cl=C3=A9ment_Mathieu--Drif?= , Zhao Liu , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Yi Liu , "Michael S. Tsirkin" Subject: [PATCH v3 18/19] hw/char/virtio-serial: Do not expose the 'emergency-write' property Date: Fri, 2 May 2025 20:56:50 +0200 Message-ID: <20250502185652.67370-19-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250502185652.67370-1-philmd@linaro.org> References: <20250502185652.67370-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=philmd@linaro.org; helo=mail-ed1-x529.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The VIRTIO_CONSOLE_F_EMERG_WRITE feature bit was only set in the hw_compat_2_7[] array, via the 'emergency-write=off' property. We removed all machines using that array, lets remove that property. All instances have this feature bit set and it can not be disabled. VirtIOSerial::host_features mask is now unused, remove it. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/virtio/virtio-serial.h | 2 -- hw/char/virtio-serial-bus.c | 9 +++------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/include/hw/virtio/virtio-serial.h b/include/hw/virtio/virtio-serial.h index d87c62eab7a..e6ceacec309 100644 --- a/include/hw/virtio/virtio-serial.h +++ b/include/hw/virtio/virtio-serial.h @@ -185,8 +185,6 @@ struct VirtIOSerial { struct VirtIOSerialPostLoad *post_load; virtio_serial_conf serial; - - uint64_t host_features; }; /* Interface to the virtio-serial bus */ diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index eb79f5258b6..cfc8fa42186 100644 --- a/hw/char/virtio-serial-bus.c +++ b/hw/char/virtio-serial-bus.c @@ -557,7 +557,7 @@ static uint64_t get_features(VirtIODevice *vdev, uint64_t features, vser = VIRTIO_SERIAL(vdev); - features |= vser->host_features; + features |= BIT_ULL(VIRTIO_CONSOLE_F_EMERG_WRITE); if (vser->bus.max_nr_ports > 1) { virtio_add_feature(&features, VIRTIO_CONSOLE_F_MULTIPORT); } @@ -587,8 +587,7 @@ static void set_config(VirtIODevice *vdev, const uint8_t *config_data) VirtIOSerialPortClass *vsc; uint8_t emerg_wr_lo; - if (!virtio_has_feature(vser->host_features, - VIRTIO_CONSOLE_F_EMERG_WRITE) || !config->emerg_wr) { + if (!config->emerg_wr) { return; } @@ -1039,7 +1038,7 @@ static void virtio_serial_device_realize(DeviceState *dev, Error **errp) return; } - if (!virtio_has_feature(vser->host_features, + if (!virtio_has_feature(vdev->host_features, VIRTIO_CONSOLE_F_EMERG_WRITE)) { config_size = offsetof(struct virtio_console_config, emerg_wr); } @@ -1155,8 +1154,6 @@ static const VMStateDescription vmstate_virtio_console = { static const Property virtio_serial_properties[] = { DEFINE_PROP_UINT32("max_ports", VirtIOSerial, serial.max_virtserial_ports, 31), - DEFINE_PROP_BIT64("emergency-write", VirtIOSerial, host_features, - VIRTIO_CONSOLE_F_EMERG_WRITE, true), }; static void virtio_serial_class_init(ObjectClass *klass, const void *data) From patchwork Fri May 2 18:56:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 886638 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp961442wrq; Fri, 2 May 2025 11:59:48 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUhAYmG4lf++/mgcNgMtEsJGsRK7EaIEF+Uep/idnA0rnZkmc3jYSK6H8t3ixC6dXfh5WzfBQ==@linaro.org X-Google-Smtp-Source: AGHT+IGFIVmxfh+4x4Wi0rInqy2VWZ292xs3XHeqshEbSmyR8VSBJ4r4yhYx/J3nn/WDuOoXK6zX X-Received: by 2002:a05:620a:2455:b0:7c7:9a85:d395 with SMTP id af79cd13be357-7cadfea85edmr28870085a.44.1746212388429; Fri, 02 May 2025 11:59:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746212388; cv=none; d=google.com; s=arc-20240605; b=gjPPc2QVQRu4u8/4bLxehdtH3tRz5QIasXhboOIhmpqDYLMhkX2ERDfG4/p1J5ZZF/ TRos6Kn9I9P+SbZng+g0ubSsVAbhFN72j3frubasQOg0sFSCYTWGwUrDjPx6GzTc/U2D hp3GqkrgLBcXwFZzP0JGC160dzmQy8lbi/Emq43aeLXVl+svowW5OvLRWwZEzK31WwHQ 0Rk8YENEX2dflbWUVOHnSJhSygweBj9Ey98G4/wsF7EKvejSSsxWEuAnvO2/3h43qpWw 36CzwwAKjyt+USmQPQH4YiyV+fBwIQgK+oCZdi3hhRBGY9RLvyH9mPnR0f4n6Fry8JFr IprA== 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=dAEnpROpQK6DxM6uJJQ1bpWzbrmSzQalAkAVB3r0tgU=; fh=zA7MiWWYdZ7nPYzFPsisQ1XfjLk8wRfRNbrxI2kr3EE=; b=jaSXILEy4eeHcMcdW1q/dvVPYUBnvJQSKUkXsrV43999uvEoFeQkExnkCfs27A+Z43 QTTXMLkXh6QzhYnsH4uMFwRIIRdLXVuWs0/1v11qfITpfOnJDrUqrcffdzICXskFzjjR dsJkUZBktci1172KDLhkQx/wq6dosHE3K6S2vB/UuNLZADzcVA8MmYMFWmb4Uzl7Kzag 9j5NWOgXqXMdwdG0+UfoaO24PM71hz69crPAr8LyNHadLL8LJfG7GKICILLJyCpUJK0A +OBR0Xbf1SzOGMm0XauNONpH0UzPaWntMO+xRKCTcveyRPfVkTYkGY0ZfHrjH1uDnLY7 eCpQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=c9bTdyiS; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7cada49e6e4si129443485a.436.2025.05.02.11.59.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 May 2025 11:59:48 -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=@linaro.org header.s=google header.b=c9bTdyiS; 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=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAvbH-0008FE-L8; Fri, 02 May 2025 14:59:13 -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 1uAvaz-0007ur-Iw for qemu-devel@nongnu.org; Fri, 02 May 2025 14:58:49 -0400 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAvax-0005jD-D0 for qemu-devel@nongnu.org; Fri, 02 May 2025 14:58:49 -0400 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-ace94273f0dso513912066b.3 for ; Fri, 02 May 2025 11:58:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746212325; x=1746817125; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dAEnpROpQK6DxM6uJJQ1bpWzbrmSzQalAkAVB3r0tgU=; b=c9bTdyiSQzZQabGbuFIuF1vr42BCnDGuAJsaSKWYXOXUsUHiEiXArh/oDZT6hBViWH qJecubv/rCmnIKoMmixoTQaUNMJ8/gi4MIGXH+pbjQH5qbIJl2vdtGLuKXaeun6sKg1t KpbTU4Eel4VUPkds+8ML22LG6tZzw812gaGF5giA720p6BSHj3PzZi9BJNQBLUeMFUf2 Gr3sZLhmycuaB4kauT4dC0lDguUe4br06keY27cOygtiygIj9te0ps4/QfcPE/8m33kH KhdUQVR+pqkvRqI4ssDaLjQIzIkGkxfib7oj2mjgRE+6VDrB5ZV6kfZM2elIlx+fCUUa KhDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746212325; x=1746817125; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dAEnpROpQK6DxM6uJJQ1bpWzbrmSzQalAkAVB3r0tgU=; b=rGTW6RtLlZbcBCLpwgMuBHjC/EqhPpew8PKde6gxjrjWADNf7aP67HWywQpY9g8IcC ITTd82cFiNK6qo0PM60ZO7Ewvj2bhogufraW1POXEW22TMd7naCOYioukwzYDgFP/L9H UEvVUwHbHfwCnFpbLlY7qksSB54oYuKch/hvFYVY/4hoLDtE+sIwmAUHH/r1crX7RSvx TutNEDThU9k6AhxWmikd413M5s+6bOExZ6COjqbPCwfNdvSF/33UOoDHOvmBn0AwHAhD eHoV2NQBHXhbASHi2ScHedEM27B+zFAuND3pAyVW/hBVUD7fbGBPbRL1hx49XTbVDWRl v+vw== X-Gm-Message-State: AOJu0Yy15Eqq1s9qO0WZ+767Ag9YpoZ+OG/UAw39IhSlWCGBhdSRNiuC 9ru7kZyC43HxxOCozgbBEN7TWfkyF07JfOmvl1yosgWtthSSVOa4ng76/2LReW0b2bpSNqUatUH M X-Gm-Gg: ASbGncuj0WAruUgZys1twcYGLu3ISJMlzjBpVegx3iXtqD6yTnE7dieRsqG/p6jQfan rYExPpbuT+0XPMmNr2199v03DVttSvv0q9x67fVgbOsc19kR48RYI6E3aiRq0/eEXxgJdXQIaCX HYOJhDc9h7Mg0iSuPs3LVK60NGoZab21S4uTHSonhP6yLYnhUAVIJZBwBO8iAGlVqdfKFXLGvp4 zO4pxPuWKwl77+NmgIdkR/Ab1/LpppjwmJUAsKvLk2KH/pvng4TWyQ2NfP7a3YqtkNrpiiHGKNm DDeVxBiWEY8R039volpmJ/y/+hNY2/8MOdtQ0HjeDwYPD9Aoc1p9/AS6ogOSf4wqy6IGzTc40jv h4SV6Vlfy/lR0CUSxipgD X-Received: by 2002:a17:907:3e87:b0:acb:b966:3a7c with SMTP id a640c23a62f3a-ad17af4d344mr389294366b.47.1746212325279; Fri, 02 May 2025 11:58:45 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ad1891490afsm86709466b.23.2025.05.02.11.58.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 02 May 2025 11:58:44 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Laurent Vivier , Igor Mammedov , Huacai Chen , Amit Shah , Marcel Apfelbaum , Sergio Lopez , Ani Sinha , Paolo Bonzini , Eduardo Habkost , Jiaxun Yang , Jason Wang , Richard Henderson , Yanan Wang , Gerd Hoffmann , =?utf-8?q?Cl=C3=A9ment_Mathieu--Drif?= , Zhao Liu , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Yi Liu , "Michael S. Tsirkin" , Mark Cave-Ayland Subject: [PATCH v3 19/19] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_PAGE_PER_VQ definition Date: Fri, 2 May 2025 20:56:51 +0200 Message-ID: <20250502185652.67370-20-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250502185652.67370-1-philmd@linaro.org> References: <20250502185652.67370-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=philmd@linaro.org; helo=mail-ej1-x62e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org VIRTIO_PCI_FLAG_PAGE_PER_VQ was only used by the hw_compat_2_7[] array, via the 'page-per-vq=on' property. We removed all machines using that array, lets remove all the code around VIRTIO_PCI_FLAG_PAGE_PER_VQ (see commit 9a4c0e220d8 for similar VIRTIO_PCI_FLAG_* enum removal). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland --- include/hw/virtio/virtio-pci.h | 1 - hw/display/virtio-vga.c | 10 ---------- hw/virtio/virtio-pci.c | 7 +------ 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/include/hw/virtio/virtio-pci.h b/include/hw/virtio/virtio-pci.h index 9838e8650a6..8abc5f8f20d 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_PAGE_PER_VQ_BIT, VIRTIO_PCI_FLAG_ATS_BIT, VIRTIO_PCI_FLAG_INIT_DEVERR_BIT, VIRTIO_PCI_FLAG_INIT_LNKCTL_BIT, diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c index 40e60f70fcd..83d01f089b5 100644 --- a/hw/display/virtio-vga.c +++ b/hw/display/virtio-vga.c @@ -141,16 +141,6 @@ static void virtio_vga_base_realize(VirtIOPCIProxy *vpci_dev, Error **errp) VIRTIO_GPU_SHM_ID_HOST_VISIBLE); } - if (!(vpci_dev->flags & VIRTIO_PCI_FLAG_PAGE_PER_VQ)) { - /* - * with page-per-vq=off there is no padding space we can use - * for the stdvga registers. Make the common and isr regions - * smaller then. - */ - vpci_dev->common.size /= 2; - vpci_dev->isr.size /= 2; - } - offset = memory_region_size(&vpci_dev->modern_bar); offset -= vpci_dev->notify.size; vpci_dev->notify.offset = offset; diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 7c965771907..4e0d4bda6ed 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -314,12 +314,9 @@ static bool virtio_pci_ioeventfd_enabled(DeviceState *d) return (proxy->flags & VIRTIO_PCI_FLAG_USE_IOEVENTFD) != 0; } -#define QEMU_VIRTIO_PCI_QUEUE_MEM_MULT 0x1000 - static inline int virtio_pci_queue_mem_mult(struct VirtIOPCIProxy *proxy) { - return (proxy->flags & VIRTIO_PCI_FLAG_PAGE_PER_VQ) ? - QEMU_VIRTIO_PCI_QUEUE_MEM_MULT : 4; + return 4; } static int virtio_pci_ioeventfd_assign(DeviceState *d, EventNotifier *notifier, @@ -2348,8 +2345,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("page-per-vq", VirtIOPCIProxy, flags, - VIRTIO_PCI_FLAG_PAGE_PER_VQ_BIT, false), DEFINE_PROP_BIT("ats", VirtIOPCIProxy, flags, VIRTIO_PCI_FLAG_ATS_BIT, false), DEFINE_PROP_BIT("x-ats-page-aligned", VirtIOPCIProxy, flags,