From patchwork Wed Mar 27 09:51:03 2024 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: 783099 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2106943wrt; Wed, 27 Mar 2024 02:52:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXRlWGe1sWR3UxhOwqq6T0OV7wthicXgISDa7sjwG7U8S1NLLPRn4EpTYNQIhcfauywB+o/YBry0h464o/avmQa X-Google-Smtp-Source: AGHT+IF+HX9jC+hhOdLNJ2cPF+bJxYAAt1seYUwmFrD33TL+L67WWXjBXYSoAHReVrEN8eSfae7l X-Received: by 2002:a05:6214:2242:b0:696:4256:9fa6 with SMTP id c2-20020a056214224200b0069642569fa6mr824509qvc.26.1711533136191; Wed, 27 Mar 2024 02:52:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711533136; cv=none; d=google.com; s=arc-20160816; b=pR9vHfJSYtUAH7JiyFaXoRi+oJMqTOGri8cNMRerAP3OxCYoGGmjjngJvqC7Sase3P O7Tl2yqQFXRKOnL6WN/flj28OS0gOddP4uo/45Aw12NoOugznHLC5OmPKDler6CTSbjS 61+gLWBOs5yLB4POvQ70O7H8u5W4my8D9qhC/nqM45YZS/N7AR5VNUnN93c/2JhSoZhG /LbPnmJTyk9GjcEhLjB9mowxbXKiItAJ5l9WzjnU3nGKdR5rLrVhD0xEYKPezmklpOSf /1Q+RrXtLLs4TbFed0LgwQS8HubJ7apOEdaJ9puC/J3QsjzFdr+A9Zogets1VRkkFCxw 5GTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=nBAy082BGnicpTR9HTkkFTBoGpDwmw0PRBVIrlqsu0g=; fh=PJ0vdt3CGkUVxIPoPrkWX139nZhYciGO7ygiAaDArFY=; b=noPqqHXde8Lw5qg453TCLpk+KInkLIZvgYTE8wbaAwXywTrbhvOBde0r8s5LMRdmQA 5oUBMOITshBGKDrBQOTzIjOz/19WedNkRdrcWlChFAEy92GlOeEah1FNA4gZxeQklL4y PXKkU1Dr0HbgzjIkmoZZM+FwFQ28kCNmcSCAxMuIMmoQffUMbxMELTGe5rhzKoor9PTs ucbTrOoYX5+JlLKcrG+T30krmi4tOciQ381M/m1cY7mtbw41oehfPZEWds9lIjNjeUOs d0QzIes4E2oH5ujbScJEdQ6etS7lYZphrx+tyD6boAVrJX4SfH2VbW/ZZO8i7T4IPgnj vT/Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bvsrENBN; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r1-20020a056214212100b0069613dca4a9si12034906qvc.151.2024.03.27.02.52.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2024 02:52:16 -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=bvsrENBN; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpPwY-0002FO-T4; Wed, 27 Mar 2024 05:51:38 -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 1rpPwX-0002F6-7q for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:51:37 -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 1rpPwV-0006cM-DY for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:51:37 -0400 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-56bf6591865so6191541a12.0 for ; Wed, 27 Mar 2024 02:51:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711533093; x=1712137893; 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=nBAy082BGnicpTR9HTkkFTBoGpDwmw0PRBVIrlqsu0g=; b=bvsrENBNyBTi72XTAyP7IbOMKmFqRwLZDQXozlVxVpjW+Vf+tGf2kEDB+r4PrNIGOH QcZbIwF/d/QQJ3H9STROQ55FDixzeR3VNUkebvMntYr3x2Qj+JeqneJpTS9kN7mLp74s 2YaL/eDyE/NkpD78ykxs5no4Az0piPrSPIQMZNmflRoDi3KHr8GrkXdRvef6z05cCDRA SoR3uHwezKdRYDixhtHMmCtniOL3ClR/igE1mZEVZUVGViKfssXy1vYskMQluSHZWgKi fQW1TojObe+qLz+cCEilGnaZfJeU5zlyaTVxi0xRrrYjuz60xAdkAsYN0yKQ+Mu1no9K ZV2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711533093; x=1712137893; 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=nBAy082BGnicpTR9HTkkFTBoGpDwmw0PRBVIrlqsu0g=; b=OiqrGBZrRW85Jn5kzmjuPSaOE5DMoX5lE3/aw5RRPP0ItDOGSJ9wtDvrgWeKS+hpNA IpSEJAU60i8zDUyiXeFCrOwhB/fP4b/syISOCt3ak8SWtEwfNCTkgMKAkhIeoKL96Uem zaWTfPqq+Y9OO/zCx1w0b+bTlQpaUUIeiD3ZAgdwG3iM/xlgN+lODrlRe+VlF2akbzwm HQ7L8pO4A0XgFhwaYKm9FbQYD1YR91t8RwC6pcLaTnRF45T8qSQYz8+KppSThsYUwN+U jvUK6RPekOVT8AHV63D3L6LImK8g8Nz667XOsO1OcJ2pQzv31+LlxBCZqqlmAgWlllOG tuXA== X-Forwarded-Encrypted: i=1; AJvYcCXlcvu19RmtxYj8ea5wz+SaeJQ+n5seuPTwJ6h5vxLA/nnXoIGZRg0ala9suahFqETs65ozkQ34RQW8JCZf8Cvvqhm1Cks= X-Gm-Message-State: AOJu0Yy1NHUaVrLka2RNRupAqW6f8vNLrZlpTr5BMvQ6m/CzLfSyAVpv IwilePfZA5UtLG4E3DZxYWUpPGs+r9mgAPIGkTvCCbDgyxu1n4eUa89aTHnuuZw= X-Received: by 2002:a17:906:53ce:b0:a47:3526:81a3 with SMTP id p14-20020a17090653ce00b00a47352681a3mr2425820ejo.48.1711533093526; Wed, 27 Mar 2024 02:51:33 -0700 (PDT) Received: from m1x-phil.lan ([176.187.205.175]) by smtp.gmail.com with ESMTPSA id x15-20020a1709060a4f00b00a455519bcb3sm5236741ejf.55.2024.03.27.02.51.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 27 Mar 2024 02:51:32 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Thomas Huth , qemu-devel@nongnu.org, Igor Mammedov Cc: Paolo Bonzini , devel@lists.libvirt.org, Zhao Liu , Gerd Hoffmann , "Michael S. Tsirkin" , Ani Sinha , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Eduardo Habkost , Marcel Apfelbaum Subject: [PATCH-for-9.1 v2 01/21] hw/i386/pc: Remove deprecated pc-i440fx-2.0 machine Date: Wed, 27 Mar 2024 10:51:03 +0100 Message-ID: <20240327095124.73639-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240327095124.73639-1-philmd@linaro.org> References: <20240327095124.73639-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 pc-i440fx-2.0 machine was deprecated for the 8.2 release (see commit c7437f0ddb "docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated"), time to remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20240305134221.30924-2-philmd@linaro.org> Reviewed-by: Zhao Liu --- docs/about/deprecated.rst | 2 +- docs/about/removed-features.rst | 2 +- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 15 ------------- hw/i386/pc_piix.c | 37 --------------------------------- 5 files changed, 2 insertions(+), 57 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 7b548519b5..b567415d62 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -219,7 +219,7 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name better reflects the way this property affects all random data within the device tree blob, not just the ``kaslr-seed`` node. -``pc-i440fx-2.0`` up to ``pc-i440fx-2.3`` (since 8.2) +``pc-i440fx-2.1`` up to ``pc-i440fx-2.3`` (since 8.2) ''''''''''''''''''''''''''''''''''''''''''''''''''''' These old machine types are quite neglected nowadays and thus might have diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index f9cf874f7b..51119e623f 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -816,7 +816,7 @@ mips ``fulong2e`` machine alias (removed in 6.0) This machine has been renamed ``fuloong2e``. -``pc-0.10`` up to ``pc-i440fx-1.7`` (removed in 4.0 up to 8.2) +``pc-0.10`` up to ``pc-i440fx-2.0`` (removed in 4.0 up to 9.0) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These machine types were very old and likely could not be used for live diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 27a68071d7..67856f54c3 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -285,9 +285,6 @@ extern const size_t pc_compat_2_2_len; extern GlobalProperty pc_compat_2_1[]; extern const size_t pc_compat_2_1_len; -extern GlobalProperty pc_compat_2_0[]; -extern const size_t pc_compat_2_0_len; - #define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \ static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \ { \ diff --git a/hw/i386/pc.c b/hw/i386/pc.c index e80f02bef4..e7b6abf237 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -311,21 +311,6 @@ GlobalProperty pc_compat_2_1[] = { }; const size_t pc_compat_2_1_len = G_N_ELEMENTS(pc_compat_2_1); -GlobalProperty pc_compat_2_0[] = { - PC_CPU_MODEL_IDS("2.0.0") - { "virtio-scsi-pci", "any_layout", "off" }, - { "PIIX4_PM", "memory-hotplug-support", "off" }, - { "apic", "version", "0x11" }, - { "nec-usb-xhci", "superspeed-ports-first", "off" }, - { "nec-usb-xhci", "force-pcie-endcap", "on" }, - { "pci-serial", "prog_if", "0" }, - { "pci-serial-2x", "prog_if", "0" }, - { "pci-serial-4x", "prog_if", "0" }, - { "virtio-net-pci", "guest_announce", "off" }, - { "ICH9-LPC", "memory-hotplug-support", "off" }, -}; -const size_t pc_compat_2_0_len = G_N_ELEMENTS(pc_compat_2_0); - GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled) { GSIState *s; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 18ba076609..585231ef7b 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -441,11 +441,6 @@ static void pc_compat_2_1_fn(MachineState *machine) x86_cpu_change_kvm_default("svm", NULL); } -static void pc_compat_2_0_fn(MachineState *machine) -{ - pc_compat_2_1_fn(machine); -} - #ifdef CONFIG_ISAPC static void pc_init_isa(MachineState *machine) { @@ -872,38 +867,6 @@ static void pc_i440fx_2_1_machine_options(MachineClass *m) DEFINE_I440FX_MACHINE(v2_1, "pc-i440fx-2.1", pc_compat_2_1_fn, pc_i440fx_2_1_machine_options); -static void pc_i440fx_2_0_machine_options(MachineClass *m) -{ - PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - - pc_i440fx_2_1_machine_options(m); - m->hw_version = "2.0.0"; - compat_props_add(m->compat_props, pc_compat_2_0, pc_compat_2_0_len); - pcmc->smbios_legacy_mode = true; - pcmc->has_reserved_memory = false; - /* This value depends on the actual DSDT and SSDT compiled into - * the source QEMU; unfortunately it depends on the binary and - * not on the machine type, so we cannot make pc-i440fx-1.7 work on - * both QEMU 1.7 and QEMU 2.0. - * - * Large variations cause migration to fail for more than one - * consecutive value of the "-smp" maxcpus option. - * - * For small variations of the kind caused by different iasl versions, - * the 4k rounding usually leaves slack. However, there could be still - * one or two values that break. For QEMU 1.7 and QEMU 2.0 the - * slack is only ~10 bytes before one "-smp maxcpus" value breaks! - * - * 6652 is valid for QEMU 2.0, the right value for pc-i440fx-1.7 on - * QEMU 1.7 it is 6414. For RHEL/CentOS 7.0 it is 6418. - */ - pcmc->legacy_acpi_table_size = 6652; - pcmc->acpi_data_size = 0x10000; -} - -DEFINE_I440FX_MACHINE(v2_0, "pc-i440fx-2.0", pc_compat_2_0_fn, - pc_i440fx_2_0_machine_options); - #ifdef CONFIG_ISAPC static void isapc_machine_options(MachineClass *m) { From patchwork Wed Mar 27 09:51:04 2024 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: 783103 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2107175wrt; Wed, 27 Mar 2024 02:52:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVoPYzYjSzfG+hMYqki0RUBTbNXT/AdttQZx7jtgJniq1k+sE6MU6cj3f7n1+rAL36TyMZLEZAnESYjvUX9aLCj X-Google-Smtp-Source: AGHT+IHjB++FtGlRl1q2hLHWqqA5g42rPmUoG4WXq7OVgv1Ow4txlBkXsQTJYqfwYZHIbJzpzaun X-Received: by 2002:a05:6122:168a:b0:4c9:2540:8520 with SMTP id 10-20020a056122168a00b004c925408520mr5638421vkl.1.1711533175539; Wed, 27 Mar 2024 02:52:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711533175; cv=none; d=google.com; s=arc-20160816; b=mQwUXa6EsfRDW1HAXBh/mBkiX9bNXuCuNiM8wtGZEsBjF2k4IwCbaGedDv+yvMJkIs xrlXD8YFRzNgZkXVuiGMedgHDmiDJdFNgklKZQHrMSwjw2ZfUqGiXe0bx93hMDvuOTww ayc35dBVS0pHgjLf4r3rXMDQraKR5fziXY/3IJ7pFvvyU8ilT4N6HlFn4UOYAC9ykEDz HbuhrDA3RBfqwr8zVb6PJJV7s6SEFA61Naatd84UVzNBwWkD71cDLrrykAihCormmN1I QSPKc0/T+eqwd81Q3HNgVl0NtbeNj20hYBFoEKLoKJCFG1P8yTGVISuGEDOgnpVHdqHP tjig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=vS70cG5/b/toW0T3Vv9S7wwrpoW0NWEALf1HsSx3Xqo=; fh=j9SEdRaoiJ4QQqKhHXYZTKmLes7lV4MbZSigcigvKTQ=; b=SRpcSO3f27vvWWxsDBxUJdriFbQ4AEB+2mlJzo4UdReArejbyyXZNrikj/fJHRnfNP SAFpKjHDmU87djAYWaeQPSRUdjDm+NsmAyJ3jaM848lphPUDPm9Q63oDogHLOIxZcsgX EMNCb0FLliJSGIneomY9MGfI3wOvlDpbU2zw94A4rI4dVcQ8c3hdBMPq199auNqaoCCs 023r1ZXaHYceANmnFDr3TTxWzo9JbQwxaJARkjWH1iCOBGKKK3t0m9ZAIzI8Goy/sRvu viqj3OR1R1eV8Q740c0VY7OSF2gKsPeLBSBFiDSTK0ureiZtP9gagE+odMxdF9HrPTuM g5Fg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SEee6GPn; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ge9-20020a05621427c900b00696a896283fsi1980895qvb.545.2024.03.27.02.52.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2024 02:52:55 -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=SEee6GPn; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpPwe-0002HW-RQ; Wed, 27 Mar 2024 05:51: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 1rpPwc-0002HO-I0 for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:51:42 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpPwa-0006ek-TF for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:51:42 -0400 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-56c197d042fso3305305a12.0 for ; Wed, 27 Mar 2024 02:51:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711533099; x=1712137899; 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=vS70cG5/b/toW0T3Vv9S7wwrpoW0NWEALf1HsSx3Xqo=; b=SEee6GPnEvFs/JbroJS4aChJuPnZAUFGMxKujmUA7Nfft2ZUwZowUsAu6/Qe95EVUr uBaBxU5uP1fmgKIgTzH5zd/XmhoEZVrtdxeON/aOg4JlTiTGUtoyz5VKlae5ZNnlCYO0 f+vomRRHQaeLQpmMKBcMnUw5axKdZXjp8SRw3AB6Jfczav/6Fcsnucuw9PV/souRuClF 6e/PiV3jJT1wpOoilHeJlNw3qBWBKhWqKhKFUWgKF+LBqjFUt9vNg8+bbRremY+dmqHB 9n28uG1IQSzGY95JCIFsiBWgqQgnaFQZaPslLaV1AJ2gJ1/+dE5LH4PGJaWkt9antDx5 XRmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711533099; x=1712137899; 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=vS70cG5/b/toW0T3Vv9S7wwrpoW0NWEALf1HsSx3Xqo=; b=tzSW/Ev/P0vLztQrxkUhwIKRXMvK3ja1Zv6MW6cQR0NGd4X133646Dsq9QEuu0ZpoV TG6MeSdIlAycbJORPftrRjlOzkbq6/40y54KNxfQR2QRTyns3FFbhwLu35VUkpj4e9VO Z/RxzSz1JFwzGHU1UOCmUYYk090Yuv9ENRXSiHmnumEfI4XWb2TbGfroXElX9TZqedOB caWo53FAFpGGDWUKk4vMEbskYGFm5omTcg6UzFrnI+dVM6ceY16W0KAJZpnMrV33kEHL QW+WNYq3stgDwWXnByGSpUU4SHT7K7QGHA6GqNtlYPL+dXSmr61w/Ck7wvp4y7JZYwdX t5uQ== X-Forwarded-Encrypted: i=1; AJvYcCX43yO6jRDcnDP8MspO7DfeP+mJIZRlxOhiOF6/ddgvZpG0R6Z2cnHfJEa5lu8UW7yT1jUBr+TwVIxPxylPxAGEL2CRhAI= X-Gm-Message-State: AOJu0YxHaDW91nWmssYkpfPHkxffywwuXhLnYJ43MmdHcnVTjyFfhoVi vmpg2jjOq8n50G4YjSYs/+EuJAAU6YhCy7m6WSqS8kskadn/1uHNbNzcPsEfFRI= X-Received: by 2002:a17:906:eea:b0:a46:53e9:aef9 with SMTP id x10-20020a1709060eea00b00a4653e9aef9mr1408180eji.65.1711533099502; Wed, 27 Mar 2024 02:51:39 -0700 (PDT) Received: from m1x-phil.lan ([176.187.205.175]) by smtp.gmail.com with ESMTPSA id m5-20020a170906720500b00a4df01f4232sm1947350ejk.189.2024.03.27.02.51.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 27 Mar 2024 02:51:39 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Thomas Huth , qemu-devel@nongnu.org, Igor Mammedov Cc: Paolo Bonzini , devel@lists.libvirt.org, Zhao Liu , Gerd Hoffmann , "Michael S. Tsirkin" , Ani Sinha , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-9.1 v2 02/21] hw/usb/hcd-xhci: Remove XHCI_FLAG_FORCE_PCIE_ENDCAP flag Date: Wed, 27 Mar 2024 10:51:04 +0100 Message-ID: <20240327095124.73639-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240327095124.73639-1-philmd@linaro.org> References: <20240327095124.73639-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=philmd@linaro.org; helo=mail-ed1-x535.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 XHCI_FLAG_FORCE_PCIE_ENDCAP was only used by the pc-i440fx-2.0 machine, which got removed. Remove it and simplify usb_xhci_pci_realize(). Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- hw/usb/hcd-xhci.h | 1 - hw/usb/hcd-xhci-nec.c | 2 -- hw/usb/hcd-xhci-pci.c | 3 +-- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h index 98f598382a..1efa4858fb 100644 --- a/hw/usb/hcd-xhci.h +++ b/hw/usb/hcd-xhci.h @@ -37,7 +37,6 @@ typedef struct XHCIEPContext XHCIEPContext; enum xhci_flags { XHCI_FLAG_SS_FIRST = 1, - XHCI_FLAG_FORCE_PCIE_ENDCAP, XHCI_FLAG_ENABLE_STREAMS, }; diff --git a/hw/usb/hcd-xhci-nec.c b/hw/usb/hcd-xhci-nec.c index 328e5bfe7c..5d5b069cf9 100644 --- a/hw/usb/hcd-xhci-nec.c +++ b/hw/usb/hcd-xhci-nec.c @@ -43,8 +43,6 @@ static Property nec_xhci_properties[] = { DEFINE_PROP_ON_OFF_AUTO("msix", XHCIPciState, msix, ON_OFF_AUTO_AUTO), DEFINE_PROP_BIT("superspeed-ports-first", XHCINecState, flags, XHCI_FLAG_SS_FIRST, true), - DEFINE_PROP_BIT("force-pcie-endcap", XHCINecState, flags, - XHCI_FLAG_FORCE_PCIE_ENDCAP, false), DEFINE_PROP_UINT32("intrs", XHCINecState, intrs, XHCI_MAXINTRS), DEFINE_PROP_UINT32("slots", XHCINecState, slots, XHCI_MAXSLOTS), DEFINE_PROP_END_OF_LIST(), diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c index 4423983308..cbad96f393 100644 --- a/hw/usb/hcd-xhci-pci.c +++ b/hw/usb/hcd-xhci-pci.c @@ -148,8 +148,7 @@ static void usb_xhci_pci_realize(struct PCIDevice *dev, Error **errp) PCI_BASE_ADDRESS_MEM_TYPE_64, &s->xhci.mem); - if (pci_bus_is_express(pci_get_bus(dev)) || - xhci_get_flag(&s->xhci, XHCI_FLAG_FORCE_PCIE_ENDCAP)) { + if (pci_bus_is_express(pci_get_bus(dev))) { ret = pcie_endpoint_cap_init(dev, 0xa0); assert(ret > 0); } From patchwork Wed Mar 27 09:51:05 2024 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: 783108 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2107391wrt; Wed, 27 Mar 2024 02:53:40 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVidkCC4S0pLMRVcpkGqnYwp1ARBfAHtHBfMbTE5NQ380e2NBw344lHgJw1+1NzOHEjvhaW/S44JW1uZaKTuj01 X-Google-Smtp-Source: AGHT+IHNb7sSCLuz4MefiyMqeHFQfn4Jm+VluR337Op3DtC7MiOWldVkPkfvhZOQiqNTw7oSQ+1s X-Received: by 2002:a05:620a:5e07:b0:789:e3ee:532c with SMTP id xz7-20020a05620a5e0700b00789e3ee532cmr703411qkn.26.1711533220202; Wed, 27 Mar 2024 02:53:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711533220; cv=none; d=google.com; s=arc-20160816; b=tor4MvOlVlTN9DBzWYSz6KGPw6rD/UIWU9xiEZ5ajOn0PFlc5CI+hYV2MkdwaTsQC+ BSrDyUz6Of6hm2cAkRBNIhOZFB/yGy1+RXi9fyfB5LoeZQdgIXCg8NBRD8M6FRVJuIY1 5M9el3+sA+2nRIcPX1y2s9un8lhwJVB7AroFtj33fhVDxogMNfPOnR4gqbBJkSek689z 7DBznedgsjCCkNvgLmOYgXCklZSJOhBvfZW+JlVPHBjyNNGP9g1u0DcM991IlS3MdtKI CqqpPpfLEwqzyNehTIvXnAIU8Rzlt1OPd0sCd83KyXawZjytfGZ4Z4oaJ7Y32GBtGbjI T1FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=lfnexeanp2sgT0hsw3byAGvWLRwN/Jj6s1AZCFW+ugA=; fh=4YeD3BMkPEX4PvfiCR5lvDSUSZ8MiKsUz4smwZVqLug=; b=Z4qZE4tHwT5RRVlS8gC/JEqTYhQ+rYxZpZ9Le2TJC+MX30jsFeFFeYSN9w3trDD6QF /jZGQB76je8C0yzgk/YJkoEMllA1HYMt+ivJNhdSgs5bJgj3OSBp3c0n0YDzP7kwmr/D fKNHiN321qUm/sz3hpBAn5jcE5cxAmKGLD0Yn67dqMIUQ/eWRuj+W/l+/gGSgd7gV9rH mxHuvWzBwoOTxEYMiP0BtbPKn6K/Xn5CVZCVKWBywyV6si6TtyG9uELB9nhM+3gvdjKQ BkLCpATSphE2g/JQo5dkI4jZzk2CHfCAWCRmg3FB+bSXaoxjrSuDgpqqmxsIpW3I35AW ii/A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bvxke30T; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z26-20020a05620a08da00b0078a43d4b8basi9415260qkz.193.2024.03.27.02.53.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2024 02:53:40 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bvxke30T; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpPwm-0002Iq-D9; Wed, 27 Mar 2024 05:51:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpPwk-0002IE-Ch for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:51:50 -0400 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpPwi-0006i4-2F for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:51:50 -0400 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-56890b533aaso7620889a12.3 for ; Wed, 27 Mar 2024 02:51:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711533106; x=1712137906; 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=lfnexeanp2sgT0hsw3byAGvWLRwN/Jj6s1AZCFW+ugA=; b=bvxke30TIo/nbOXVP6SezUEDRsHJwNgoIkrLdGcNuYLWzF/0FZHE9j+FDft53DAYen dk1xGC/wivCuYDoYROhWeqYYAUeG5Rg/27yCU5Yl1AVzGNqIQbhcyc/KNNaZdAOAKywO iakZXt2pFkmWxmo9OeC/q0Kkln2G2KHdfvu8c4lt8sWY8WN9IVIIZL9tEaGWL//3UBuz TdytpRCKEN/NnyQR3zTUupWMZ6CUpbBRNtFSI4dawVBS0YJoxYYdNEJKskrJdLqTAYjE wYqkessAwsxTYrsfmaOlYzlEylRSzSY8DIxgtSdApoInJyT5+EqjtJcaLFCyEYtbAyHU Efhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711533106; x=1712137906; 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=lfnexeanp2sgT0hsw3byAGvWLRwN/Jj6s1AZCFW+ugA=; b=YUPLque9srQg6oWk2l3W4uPAIr/R0tbWo68gIJGdsJTBDThKboF5HuZD0yZtEJy7yJ bkkl10TRSzU2b9MKTWyaHislfXyXH/zR/WFegZXBd77BJN9kW+X3UCQ/1KyhBYHrqnb4 QlHElmN74z/V2uKRtxWdyZBd3bYMLu69OI4NB2WHcbBlFCuDwxCz2+IrA9X0mHlfYrRk VwEOabLy6WkBqzj9R3bYXi73RB1zt0uogc3zdh2hppdCVPQPNkjTAAC5JzOK7RvIBxqu /s3nRaMk97vWaxUrEMMgntfRHPeWDqcob9KPD9B/ot9agyGMShAOJpKVG8sYwvRLzPrP Nvjw== X-Forwarded-Encrypted: i=1; AJvYcCW/0K/b/VkkHw52SQUH70AfPRgps60H+QlxT7oEE0H7nO6tehqxhpa8DgCA5tmCNN4Zips0+Y1xz3QGhthxbFQP9QoS+Xo= X-Gm-Message-State: AOJu0Yy+Celwvk4PBOrxaWxEyxW1Yf0ffVUlL5jtutD3iwyxmvYzlACA DHb4J2cRc8MxAm1r8uq6UlyAKQ/XxF1yJi2g8cjHXkndeEX2WZJ0Dx/0Hxxklow= X-Received: by 2002:a50:9f27:0:b0:568:d7fe:a857 with SMTP id b36-20020a509f27000000b00568d7fea857mr568657edf.11.1711533105386; Wed, 27 Mar 2024 02:51:45 -0700 (PDT) Received: from m1x-phil.lan ([176.187.205.175]) by smtp.gmail.com with ESMTPSA id eo3-20020a056402530300b0056bf66a0c36sm5005218edb.58.2024.03.27.02.51.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 27 Mar 2024 02:51:44 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Thomas Huth , qemu-devel@nongnu.org, Igor Mammedov Cc: Paolo Bonzini , devel@lists.libvirt.org, Zhao Liu , Gerd Hoffmann , "Michael S. Tsirkin" , Ani Sinha , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-9.1 v2 03/21] hw/usb/hcd-xhci: Remove XHCI_FLAG_SS_FIRST flag Date: Wed, 27 Mar 2024 10:51:05 +0100 Message-ID: <20240327095124.73639-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240327095124.73639-1-philmd@linaro.org> References: <20240327095124.73639-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=philmd@linaro.org; helo=mail-ed1-x530.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 XHCI_FLAG_SS_FIRST was only used by the pc-i440fx-2.0 machine, which got removed. Remove it and simplify various functions in hcd-xhci.c. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- hw/usb/hcd-xhci.h | 3 +-- hw/usb/hcd-xhci-nec.c | 2 -- hw/usb/hcd-xhci-pci.c | 1 - hw/usb/hcd-xhci.c | 42 ++++++++---------------------------------- 4 files changed, 9 insertions(+), 39 deletions(-) diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h index 1efa4858fb..fe16d7ad05 100644 --- a/hw/usb/hcd-xhci.h +++ b/hw/usb/hcd-xhci.h @@ -36,8 +36,7 @@ typedef struct XHCIStreamContext XHCIStreamContext; typedef struct XHCIEPContext XHCIEPContext; enum xhci_flags { - XHCI_FLAG_SS_FIRST = 1, - XHCI_FLAG_ENABLE_STREAMS, + XHCI_FLAG_ENABLE_STREAMS = 1, }; typedef enum TRBType { diff --git a/hw/usb/hcd-xhci-nec.c b/hw/usb/hcd-xhci-nec.c index 5d5b069cf9..0c063b3697 100644 --- a/hw/usb/hcd-xhci-nec.c +++ b/hw/usb/hcd-xhci-nec.c @@ -41,8 +41,6 @@ struct XHCINecState { static Property nec_xhci_properties[] = { DEFINE_PROP_ON_OFF_AUTO("msi", XHCIPciState, msi, ON_OFF_AUTO_AUTO), DEFINE_PROP_ON_OFF_AUTO("msix", XHCIPciState, msix, ON_OFF_AUTO_AUTO), - DEFINE_PROP_BIT("superspeed-ports-first", XHCINecState, flags, - XHCI_FLAG_SS_FIRST, true), DEFINE_PROP_UINT32("intrs", XHCINecState, intrs, XHCI_MAXINTRS), DEFINE_PROP_UINT32("slots", XHCINecState, slots, XHCI_MAXSLOTS), DEFINE_PROP_END_OF_LIST(), diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c index cbad96f393..264d7ebb77 100644 --- a/hw/usb/hcd-xhci-pci.c +++ b/hw/usb/hcd-xhci-pci.c @@ -242,7 +242,6 @@ static void qemu_xhci_instance_init(Object *obj) s->msix = ON_OFF_AUTO_AUTO; xhci->numintrs = XHCI_MAXINTRS; xhci->numslots = XHCI_MAXSLOTS; - xhci_set_flag(xhci, XHCI_FLAG_SS_FIRST); } static const TypeInfo qemu_xhci_info = { diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index ad40232eb6..b6411f0bda 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -541,18 +541,10 @@ static XHCIPort *xhci_lookup_port(XHCIState *xhci, struct USBPort *uport) case USB_SPEED_LOW: case USB_SPEED_FULL: case USB_SPEED_HIGH: - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - index = uport->index + xhci->numports_3; - } else { - index = uport->index; - } + index = uport->index + xhci->numports_3; break; case USB_SPEED_SUPER: - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - index = uport->index; - } else { - index = uport->index + xhci->numports_2; - } + index = uport->index; break; default: return NULL; @@ -2779,11 +2771,7 @@ static uint64_t xhci_cap_read(void *ptr, hwaddr reg, unsigned size) ret = 0x20425355; /* "USB " */ break; case 0x28: /* Supported Protocol:08 */ - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - ret = (xhci->numports_2<<8) | (xhci->numports_3+1); - } else { - ret = (xhci->numports_2<<8) | 1; - } + ret = (xhci->numports_2 << 8) | (xhci->numports_3 + 1); break; case 0x2c: /* Supported Protocol:0c */ ret = 0x00000000; /* reserved */ @@ -2795,11 +2783,7 @@ static uint64_t xhci_cap_read(void *ptr, hwaddr reg, unsigned size) ret = 0x20425355; /* "USB " */ break; case 0x38: /* Supported Protocol:08 */ - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - ret = (xhci->numports_3<<8) | 1; - } else { - ret = (xhci->numports_3<<8) | (xhci->numports_2+1); - } + ret = (xhci->numports_3 << 8) | 1; break; case 0x3c: /* Supported Protocol:0c */ ret = 0x00000000; /* reserved */ @@ -3349,13 +3333,8 @@ static void usb_xhci_init(XHCIState *xhci) for (i = 0; i < usbports; i++) { speedmask = 0; if (i < xhci->numports_2) { - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - port = &xhci->ports[i + xhci->numports_3]; - port->portnr = i + 1 + xhci->numports_3; - } else { - port = &xhci->ports[i]; - port->portnr = i + 1; - } + port = &xhci->ports[i + xhci->numports_3]; + port->portnr = i + 1 + xhci->numports_3; port->uport = &xhci->uports[i]; port->speedmask = USB_SPEED_MASK_LOW | @@ -3366,13 +3345,8 @@ static void usb_xhci_init(XHCIState *xhci) speedmask |= port->speedmask; } if (i < xhci->numports_3) { - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - port = &xhci->ports[i]; - port->portnr = i + 1; - } else { - port = &xhci->ports[i + xhci->numports_2]; - port->portnr = i + 1 + xhci->numports_2; - } + port = &xhci->ports[i]; + port->portnr = i + 1; port->uport = &xhci->uports[i]; port->speedmask = USB_SPEED_MASK_SUPER; assert(i < XHCI_MAXPORTS); From patchwork Wed Mar 27 09:51:06 2024 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: 783101 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2107050wrt; Wed, 27 Mar 2024 02:52:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXSZpWQq07d7kNMUuo0wCVSPJhy6Dm3j9wAZ6xO5WD8CsksnCCIkrlaRwMINrCv61W/GAHgW54BqVnHvA3i0T3o X-Google-Smtp-Source: AGHT+IHiS8/lczx4EPVRYmZnaiQtRqP5MS9bFskcXQrAPF8ygvsapWWU1THeKucqGJIsDHRVuwHR X-Received: by 2002:ac8:590f:0:b0:431:5bf9:26ac with SMTP id 15-20020ac8590f000000b004315bf926acmr6778091qty.23.1711533155313; Wed, 27 Mar 2024 02:52:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711533155; cv=none; d=google.com; s=arc-20160816; b=BrXdt40MIKcZ0z5f+jT3H7CKkjYVjLYOf6NkCvtJwGUPHM0QJW3ky+DaAgCKfyO9bk k8HTvRcATEr9y/yJUbZQW5mvM2jtA3nHqx74aA7Lruy9nFXOdZfRUxKvnX3w0mmkInWd OVdTcD7oJ6VHuleZtFbE4zD1va4l2crQY1DM3NHYHkSolFjLwFnQKibJTuRdagNgJ22L lZkCQK1hcMj2x6vuAxe/+0JRYzsDTc3Pu7PBlhfnMmBWKiZQ14gkrZXVYLzrsRsapC1A QBCCSmi3E42oLn4jTltamMZrd3TRKAYXiWU7QpeQld+7anJjkJbyimnm69f5dfvBIJuM ibrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=5EOMeI+cmJTs9JUVO4oguXe/gFC99HulgRN8N2p2Hs4=; fh=dyiv88o3GskAtoJEUAPKvKQYI0JJzpsXaZUtSnFVfls=; b=NTbRJcbMs10fWvhnDNvzihYd2hi31g2nvOtHtakLi9rsw2iHQl+BC86VdmF1gUA18/ kousF/AG+slPDGe2F8xxbmfFPbvdIJRvgjhmGJUNePEgu1BUr1odQXno9A8AfLAzsOeD siW/HJxc/D06haSkU6hUfgFsVgsM7flpQVSEq7zFzju+eysv0qw5R3xtHLwEhib6E0u7 FUocsYnF6mo0hS9fUx3GD0VjM4zY05YLP6w1cQBux4r64xQb6o1Ob1603sI3gY1SMwhz PCKVIpq8y7Lm0yIaKNASm/z8ZN54XdhigfBmZREkxOBTrwZPZBoPDTiEcO+RqpuvTi4E Y+DA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s9xWxC7S; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w9-20020ac857c9000000b004313dfbbc2csi9499619qta.64.2024.03.27.02.52.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2024 02:52:35 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s9xWxC7S; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpPwq-0002KN-W8; Wed, 27 Mar 2024 05:51:57 -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 1rpPwp-0002J0-40 for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:51:55 -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 1rpPwn-0006iz-3P for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:51:54 -0400 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a46ba938de0so866503366b.3 for ; Wed, 27 Mar 2024 02:51:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711533111; x=1712137911; 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=5EOMeI+cmJTs9JUVO4oguXe/gFC99HulgRN8N2p2Hs4=; b=s9xWxC7SwkhzkeR+FLXbln33qWvBy2o3AzsBu2eaqp8LSr4c8fyIZM2MKYWe8/q1vq ruVbHCXLZkTkawWI8cDW8Uu2qNMxHLVBlk3648iSxhEEMfNP9DLKhEBy96vfxJ2yPvhn TGnDNyfHIBe8OItOXHWtvHnjZzQktoepul6LRk2lBdNdv5T2Nm4UYBcfvRE0s4c9/Ix3 ZNDFSJjpISLQxV/aHtbclwoIXzuFMfpE71cVQgRLp5Hume04m0fSaOsqdx50SbNCOfhd W6hiLUHfKCcGBYxBBWENsSJyGvPUe74c8y8j7xz+4hY/+ojXjy0WmkCU7jC4REC1sx0y nR1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711533111; x=1712137911; 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=5EOMeI+cmJTs9JUVO4oguXe/gFC99HulgRN8N2p2Hs4=; b=dggIbrWugJ1woSCn8hG56uXcE3DGrdNUW1hg1oIwOPQIWX9Tbf6tBdp3wBFCn9vNVW 9DTSzW0xJarVVCCY5yjYFyw9D2On1VBmMqBqvKxvXgIvyTRQT2LDtuy9cEtISiLMmWCS Lpbu1SV5tg22LZTurZ9qCw/b+qxbQCBhNmInzfrrWHRb9vdX2gf68DJUxPUrTROLq+c9 xZhBRjzRO7iOhHVan+zlozEAc1zCyjqvarmLT/AGR3w3LTqPjaybw4NxWfmZtlG09Tka Jt5rVZCUM+3BQSO0ohP4l5h2DkVWFMANx0ZupHpPbzcW18j5qQeEnBtHbiKIaS7fbRzF 2INg== X-Forwarded-Encrypted: i=1; AJvYcCXdJac2foieABKQ5kOeJmMno2NzbtK0Q5easSjDK+1oZ8Lt/q029Aw5W1KIkCxTF6xcW9L62pdCK4D9EkM98sxKCoTr4WQ= X-Gm-Message-State: AOJu0YyvkEmfVtYktmo4rDfjKT09QM82kDZ2Lsb1w4ckEhgtwWWC/3fh +/DNcN+apRXEi8FSlja+QlLuI1DofiDrxWkBGKGo0patBusKvXCKjTlm0i9krDw= X-Received: by 2002:a17:906:4f85:b0:a46:cef3:4aba with SMTP id o5-20020a1709064f8500b00a46cef34abamr3515420eju.75.1711533111466; Wed, 27 Mar 2024 02:51:51 -0700 (PDT) Received: from m1x-phil.lan ([176.187.205.175]) by smtp.gmail.com with ESMTPSA id y10-20020a1709063daa00b00a4d9e714efbsm2337434ejh.76.2024.03.27.02.51.49 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 27 Mar 2024 02:51:51 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Thomas Huth , qemu-devel@nongnu.org, Igor Mammedov Cc: Paolo Bonzini , devel@lists.libvirt.org, Zhao Liu , Gerd Hoffmann , "Michael S. Tsirkin" , Ani Sinha , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Eduardo Habkost , Marcel Apfelbaum Subject: [PATCH-for-9.1 v2 04/21] hw/i386/acpi: Remove PCMachineClass::legacy_acpi_table_size Date: Wed, 27 Mar 2024 10:51:06 +0100 Message-ID: <20240327095124.73639-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240327095124.73639-1-philmd@linaro.org> References: <20240327095124.73639-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 PCMachineClass::legacy_acpi_table_size was only used by the pc-i440fx-2.0 machine, which got removed. Remove it and simplify acpi_build(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- include/hw/i386/pc.h | 1 - hw/i386/acpi-build.c | 62 +++++++++----------------------------------- 2 files changed, 12 insertions(+), 51 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 67856f54c3..4ad724601a 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -103,7 +103,6 @@ struct PCMachineClass { /* ACPI compat: */ bool has_acpi_build; bool rsdp_in_ram; - int legacy_acpi_table_size; unsigned acpi_data_size; int pci_root_uid; diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 53f804ac16..a6f8203460 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2499,13 +2499,12 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) X86MachineState *x86ms = X86_MACHINE(machine); DeviceState *iommu = pcms->iommu; GArray *table_offsets; - unsigned facs, dsdt, rsdt, fadt; + unsigned facs, dsdt, rsdt; AcpiPmInfo pm; AcpiMiscInfo misc; AcpiMcfgInfo mcfg; Range pci_hole = {}, pci_hole64 = {}; uint8_t *u; - size_t aml_len = 0; GArray *tables_blob = tables->table_data; AcpiSlicOem slic_oem = { .id = NULL, .table_id = NULL }; Object *vmgenid_dev; @@ -2551,19 +2550,12 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) build_dsdt(tables_blob, tables->linker, &pm, &misc, &pci_hole, &pci_hole64, machine); - /* Count the size of the DSDT and SSDT, we will need it for legacy - * sizing of ACPI tables. - */ - aml_len += tables_blob->len - dsdt; - /* ACPI tables pointed to by RSDT */ - fadt = tables_blob->len; acpi_add_table(table_offsets, tables_blob); pm.fadt.facs_tbl_offset = &facs; pm.fadt.dsdt_tbl_offset = &dsdt; pm.fadt.xdsdt_tbl_offset = &dsdt; build_fadt(tables_blob, tables->linker, &pm.fadt, oem_id, oem_table_id); - aml_len += tables_blob->len - fadt; acpi_add_table(table_offsets, tables_blob); acpi_build_madt(tables_blob, tables->linker, x86ms, @@ -2694,49 +2686,19 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) * too simple to be enough. 4k turned out to be too small an * alignment very soon, and in fact it is almost impossible to * keep the table size stable for all (max_cpus, max_memory_slots) - * combinations. So the table size is always 64k for pc-i440fx-2.1 - * and we give an error if the table grows beyond that limit. - * - * We still have the problem of migrating from "-M pc-i440fx-2.0". For - * that, we exploit the fact that QEMU 2.1 generates _smaller_ tables - * than 2.0 and we can always pad the smaller tables with zeros. We can - * then use the exact size of the 2.0 tables. - * - * All this is for PIIX4, since QEMU 2.0 didn't support Q35 migration. + * combinations. */ - if (pcmc->legacy_acpi_table_size) { - /* Subtracting aml_len gives the size of fixed tables. Then add the - * size of the PIIX4 DSDT/SSDT in QEMU 2.0. - */ - int legacy_aml_len = - pcmc->legacy_acpi_table_size + - ACPI_BUILD_LEGACY_CPU_AML_SIZE * x86ms->apic_id_limit; - int legacy_table_size = - ROUND_UP(tables_blob->len - aml_len + legacy_aml_len, - ACPI_BUILD_ALIGN_SIZE); - if ((tables_blob->len > legacy_table_size) && - !pcmc->resizable_acpi_blob) { - /* Should happen only with PCI bridges and -M pc-i440fx-2.0. */ - warn_report("ACPI table size %u exceeds %d bytes," - " migration may not work", - tables_blob->len, legacy_table_size); - error_printf("Try removing CPUs, NUMA nodes, memory slots" - " or PCI bridges.\n"); - } - g_array_set_size(tables_blob, legacy_table_size); - } else { - /* Make sure we have a buffer in case we need to resize the tables. */ - if ((tables_blob->len > ACPI_BUILD_TABLE_SIZE / 2) && - !pcmc->resizable_acpi_blob) { - /* As of QEMU 2.1, this fires with 160 VCPUs and 255 memory slots. */ - warn_report("ACPI table size %u exceeds %d bytes," - " migration may not work", - tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2); - error_printf("Try removing CPUs, NUMA nodes, memory slots" - " or PCI bridges.\n"); - } - acpi_align_size(tables_blob, ACPI_BUILD_TABLE_SIZE); + /* Make sure we have a buffer in case we need to resize the tables. */ + if ((tables_blob->len > ACPI_BUILD_TABLE_SIZE / 2) && + !pcmc->resizable_acpi_blob) { + /* As of QEMU 2.1, this fires with 160 VCPUs and 255 memory slots. */ + warn_report("ACPI table size %u exceeds %d bytes," + " migration may not work", + tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2); + error_printf("Try removing CPUs, NUMA nodes, memory slots" + " or PCI bridges.\n"); } + acpi_align_size(tables_blob, ACPI_BUILD_TABLE_SIZE); acpi_align_size(tables->linker->cmd_blob, ACPI_BUILD_ALIGN_SIZE); From patchwork Wed Mar 27 09:51:07 2024 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: 783102 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2107138wrt; Wed, 27 Mar 2024 02:52:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUIxxaQfvL4WxfuZOwSh1TdsJJMSSvig6I4RxVozhfK1diDYjnYOiDeQG+A+/ZKkrNaO1IECCyY8T6Gdvp8zJ+B X-Google-Smtp-Source: AGHT+IGo2p7u+2smgx4PSDmbQs315A+KegavcYcQHHYxVNxgLtNjMxSclZ3bmBKtxXrvJetatwTu X-Received: by 2002:a05:620a:47d4:b0:789:e800:b39f with SMTP id du20-20020a05620a47d400b00789e800b39fmr604358qkb.76.1711533168966; Wed, 27 Mar 2024 02:52:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711533168; cv=none; d=google.com; s=arc-20160816; b=JeFft0UaOr7IHhWpkgILA1UsFY6RVmu9tp9mIglQ/xa1VIwqp2dkUG6KIkfEKbcTMe iOQtmG1/keOMWM2/CDy8aSnrjYA5ON0Lp3bshl93EhiNg0bsjpQCOCdoGZ4GfJ1uanoQ 1JQxEf5ycdcAGSH5zh0NR+OPdy/d98lYkHRQEP7XR27Qyq3gEsUQXuLFj+4yvHEOK77v UJJQCx2xXyniTZnzsRnTZnxmCw2gamMO12OTvqMQ5HSKoNJqg57kstKIz37WTGB1luHf Tp6MAb7N1BUG4/D6TvMhofkI2H3EolNtqB2eVNjqdEOSZSaGhpfbpC1ad/TDhD2SEyVj YHow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=I9jqAsBPS2eVGtQ2Oyj66VMF1DnqaRA4xDyhtZgk1fo=; fh=6QERA8YrVozsQRpMlZluwbOF1k1UEiJ+Ru3Er6ZVxZY=; b=WS28yutcdyS8Gd3LeRUXk5WLtj/f91rHb2tDk+xpaPVmzu6VDWaveIGj5X+8uK4/5U EIoHxJQzdGC52rv8yXKwSnQ+TE8VEjyZykspQ2lV1vJUvQ15JZwIcpunEiXMApFY8hy3 oB3OzKYPLZqb2h34PER9kBiRARHvW+v62nskFMOQXM/Zcfu84BcLvlWS7p8OUu0z2ss7 KmHMRdv7xH54LR5c6yg+KNTQNVP0AP70wYpmJiLk7zWE7xJiJrv69PjQmGyj44q/f5c/ zhqf/9HdWC6iYWxjdUGaII2/zCURuP4ME8Ykiij/mAGU3eeEp57SPk69tDhnx79yDLmW CM9w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zI2UhLxg; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k8-20020ae9f108000000b0078a54c289e0si6473633qkg.167.2024.03.27.02.52.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2024 02:52: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=zI2UhLxg; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpPww-0002UY-Vc; Wed, 27 Mar 2024 05:52:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpPwu-0002S1-Vx for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:52:01 -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 1rpPws-0006k9-UF for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:52:00 -0400 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a466e53f8c0so855144966b.1 for ; Wed, 27 Mar 2024 02:51:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711533117; x=1712137917; 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=I9jqAsBPS2eVGtQ2Oyj66VMF1DnqaRA4xDyhtZgk1fo=; b=zI2UhLxgzCJ9YeSnbr9CixSjGwTOp2i29IiExWxgvEY2uGvHA2RW2JRXeksgHB47F8 71EL8CA1evLbSktSoMf/K2jTViGVdbbymjgVoyHMAus/G/hT0TYhu3KSrKTmWJ8XoWk4 2sO9tuzIs1bvMgCr/ntHBzt/AUGWJ8AMoj0thnMexQw/GcrFdazHOy/YTBqz4B0EdoiR QI7n7Fi2FwNzRmZsysiPZ8bdX4uos+SmCr9+JAvJBUYwVbWxJ4AT4KLC7Cm2W72OOZjd qhjCnR0kilzq9BIc03MoI1eioyYFFXe8wf6k6Isye4nzmlKLbxFc7jMMR8iN5rxef+GW gLjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711533117; x=1712137917; 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=I9jqAsBPS2eVGtQ2Oyj66VMF1DnqaRA4xDyhtZgk1fo=; b=JpkjrFkVjzZohRkGNMFBgdddkN1vvDdar+mDVSNqHUUMh+dE8Z4DNYsJ0tMvQILlTX zcDswXFFMhhtOl0IERmYS1dGglbEnv2VUuup3cBzVuSWpMLvZp1zpisyBsut+a8BcGlu VxBq94tkXvv0sw4aF4/wp82YyMJIQEU9DmU3Jn60/c9RZ6gfzae+pLwbMUpx+qDXbIqG LQxLDyFGwA/EeHUgvK9Ogvgg+4HbHmETNmVCOFK9RtWh1Pa/IJ+9M+Y5m7EC8NVCWU60 WnocxCJ4e4lU7CTZSbL71KnRRmTUhIdcXENxLsM8VsnD0MQ02aBVnMwUG0jfdui7jcMd 12pg== X-Forwarded-Encrypted: i=1; AJvYcCUIPN8VIcvOUvOZvB2lyXWB3U1ldiI3ELdQqkXNT5FY6EC0OqwEAgC1eQxyJXqQVKL3ry+895Orz4Vte9yg0o/DdMZkOrI= X-Gm-Message-State: AOJu0YzdHkz/GGK8q8/MTQ9DEW4wc/YFaRruWdZ90npgeOPyrb5sOMF2 SbohED466VsUMbUVxPvSNzQKmbzNOF0Nkz2lSNIjDLfB3OCOLedlJgtcrHEZA5k= X-Received: by 2002:a17:906:2a16:b0:a46:5f04:134 with SMTP id j22-20020a1709062a1600b00a465f040134mr571425eje.70.1711533117342; Wed, 27 Mar 2024 02:51:57 -0700 (PDT) Received: from m1x-phil.lan ([176.187.205.175]) by smtp.gmail.com with ESMTPSA id q7-20020a1709060f8700b00a46faaf7427sm5204278ejj.121.2024.03.27.02.51.55 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 27 Mar 2024 02:51:56 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Thomas Huth , qemu-devel@nongnu.org, Igor Mammedov Cc: Paolo Bonzini , devel@lists.libvirt.org, Zhao Liu , Gerd Hoffmann , "Michael S. Tsirkin" , Ani Sinha , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Marcel Apfelbaum Subject: [PATCH-for-9.1 v2 05/21] hw/acpi/ich9: Remove 'memory-hotplug-support' property Date: Wed, 27 Mar 2024 10:51:07 +0100 Message-ID: <20240327095124.73639-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240327095124.73639-1-philmd@linaro.org> References: <20240327095124.73639-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 No external code sets the 'memory-hotplug-support' property, remove it. Suggested-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- hw/acpi/ich9.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index 573d032e8e..9b605af21a 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c @@ -351,21 +351,6 @@ static void ich9_pm_get_gpe0_blk(Object *obj, Visitor *v, const char *name, visit_type_uint32(v, name, &value, errp); } -static bool ich9_pm_get_memory_hotplug_support(Object *obj, Error **errp) -{ - ICH9LPCState *s = ICH9_LPC_DEVICE(obj); - - return s->pm.acpi_memory_hotplug.is_enabled; -} - -static void ich9_pm_set_memory_hotplug_support(Object *obj, bool value, - Error **errp) -{ - ICH9LPCState *s = ICH9_LPC_DEVICE(obj); - - s->pm.acpi_memory_hotplug.is_enabled = value; -} - static bool ich9_pm_get_cpu_hotplug_legacy(Object *obj, Error **errp) { ICH9LPCState *s = ICH9_LPC_DEVICE(obj); @@ -445,9 +430,6 @@ void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm) NULL, NULL, pm); object_property_add_uint32_ptr(obj, ACPI_PM_PROP_GPE0_BLK_LEN, &gpe0_len, OBJ_PROP_FLAG_READ); - object_property_add_bool(obj, "memory-hotplug-support", - ich9_pm_get_memory_hotplug_support, - ich9_pm_set_memory_hotplug_support); object_property_add_bool(obj, "cpu-hotplug-legacy", ich9_pm_get_cpu_hotplug_legacy, ich9_pm_set_cpu_hotplug_legacy); From patchwork Wed Mar 27 09:51:08 2024 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: 783107 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2107323wrt; Wed, 27 Mar 2024 02:53:23 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVBPBlrnXGDEI4Auz6py6vWCLUiVuwcovWLuHPOXppYd5TPvgvBPd9XN7hheNGlu5dUArWw5wOpk0yqm/Tk9R5J X-Google-Smtp-Source: AGHT+IGIFEnZZy0rDowUpNSWeezm5zvFrl1rOkHQUV6rYey9hZSpzpZNCHBvj60uplWlq+XF12xM X-Received: by 2002:a05:620a:1099:b0:78a:34a0:6354 with SMTP id g25-20020a05620a109900b0078a34a06354mr2212460qkk.42.1711533203358; Wed, 27 Mar 2024 02:53:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711533203; cv=none; d=google.com; s=arc-20160816; b=OBUT4KGEfXf5dWyKBapck/mw8yVhsw4c10RAt+YMiVPK/P59gG42JXtDMv1W+REx7q 9LrkLfINg398PcdDWedr/OcP8c9Vgoz/tzsmyP9RAa/bH964GLLGXia0dZU4Bxolr+1F y1pJIeyQUzv3KsonrSK49zfTZlzCr+l1QD+rraay7uLBLAv25zdUzdnXmDUXVHkJ0eav FztXxfJHYLUc5EQL6HgpX8l/H9JX9qWptGWUSmEfJzyRNxSj58KgpDnNNRarrdfxQP0U fSvJl4/SM8xXFFiQKiN9nxpmvYTOKkSdr5vsOxfO0FSUOFxtsubElCU9pjcCHYfV85RG Q3pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=Js0WEaSYuml8ErvbskM5ta30rxhDRoSlwVbQCDwzIUk=; fh=+tTB4Cxjb2hzER2qDFvjnmGFASCWpdrBm6Izi30cyDo=; b=s/FNSyb9r89HkirkGoaUoXozsn37ibUCrgOAo79KELT86Lxi8ymaTV67b+vtfvkozP 6KOs9RJlccuT1rxicM8jplWNRntzed5bl1DtE95k4vKCtZs8peCAXEC2Wd+iI65UhINP l0/kFc/b3wswHPLdWmiCN2svSWTpvb2Jeb6ppwqaZ5hn2LGzg8nu3U+IfBbh3wlpVAUP sZXHC/82q8Ws/eDSUhtBnNrjXAAkYSsEOPs558slUQYFBnIyjy+bQoJLfJdX4caJOssm Y23+Pvwa5DaHxTCoZ5ZPst0S4d9aBm9o3iRtQJvgIBB7xb6CewcU9O2aRTj2aDB5pxvh Xg9Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xanmuq6q; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id wx8-20020a05620a5a4800b0078a66f6e402si2806693qkn.25.2024.03.27.02.53.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2024 02:53:23 -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=Xanmuq6q; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpPxD-0002c7-4R; Wed, 27 Mar 2024 05:52:19 -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 1rpPx9-0002Zz-Ub for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:52:17 -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 1rpPx7-0006ke-DN for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:52:15 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-56c1364ff79so3818564a12.1 for ; Wed, 27 Mar 2024 02:52:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711533123; x=1712137923; 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=Js0WEaSYuml8ErvbskM5ta30rxhDRoSlwVbQCDwzIUk=; b=Xanmuq6qbSqz3CZfpTIDzgLahQuD3mSzMVBZ4JE+Fc4gJUy7fmkDfD8h/PwC/Q34D4 +2zomZVW3kjrTdWwyKjnej1560EAWQ6Gp1e16ehZyKWcbOqFBN4WpblW1XbLH26nlZPb aSaxIc4CJfxS6CkNcsoyvDzAK/prNTvIGQcAwE6gK3NUIIDSR3AkPXEPRYQURxV2ka0O sAN7D9GqoY+X5+/uOcZ6UHv7Jx5rgS+EHphF+tuF5rShUgkXGg6ONHvnLp+MvTVJBRVZ gdGj8toXEmrXo512+ugC0qr2NG7w3hiFHlfdEWpkBlxy1WwTy1+hoebUtdm2iT68ywNu vuxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711533123; x=1712137923; 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=Js0WEaSYuml8ErvbskM5ta30rxhDRoSlwVbQCDwzIUk=; b=IgybcYXx6tLjIW+6tcU/Euy7E6js1XTwm2YPpdFPZKvXVy6BZj4ut2tq2V9u3YFByf DifYV/HE65ohV0E1ntTlCPznfZ+ZnoUX0HaZhAupbzWUFVzCb6H7WLb7IhDmbHENykLz NorcwpAKAmSxnOUMEVhUh6MsUGX0GKqpn5OIwGM0mN2ZCPe4CCtEzWXWoqt4o+HqKK3w OmbjVf0uWHLP7JocprMeQ1mPUIApt3BPmp7zoBx021/aIEzKOAXj9qvL22D8Aa6WWfmL JR62j/AjKZ6ciKKlHcOeDO+ivgh9mT4VUirqV4p4sqIwu2djNVODt6clYuUjSoH2nTD7 XFHA== X-Forwarded-Encrypted: i=1; AJvYcCU09rH07nzevgmbObMe2Kafg6hSpcH97hXFk1g0OVdMvwP+TNeKzzqWfAt8zPV1H+gx6oWh0iVU3IsKgJOBAdP6vUA3KmM= X-Gm-Message-State: AOJu0YyYIFYEGvsFqvinyKDPpUjbK4Z55QduG00zmAUbvoWa7GNSj5j1 MCB9zruEuO8VTszCAWziSg2SFvd+qtOLD7pQPKN7ezwpYBIVaa2fdTQyG2sP2DLC9nPbzjABUVa b X-Received: by 2002:a17:906:3412:b0:a47:330f:f110 with SMTP id c18-20020a170906341200b00a47330ff110mr1508335ejb.7.1711533123448; Wed, 27 Mar 2024 02:52:03 -0700 (PDT) Received: from m1x-phil.lan ([176.187.205.175]) by smtp.gmail.com with ESMTPSA id a10-20020a170906244a00b00a46ab5aaffcsm5238971ejb.178.2024.03.27.02.52.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 27 Mar 2024 02:52:03 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Thomas Huth , qemu-devel@nongnu.org, Igor Mammedov Cc: Paolo Bonzini , devel@lists.libvirt.org, Zhao Liu , Gerd Hoffmann , "Michael S. Tsirkin" , Ani Sinha , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Marcel Apfelbaum Subject: [PATCH-for-9.1 v2 06/21] hw/acpi/ich9: Remove dead code related to 'acpi_memory_hotplug' Date: Wed, 27 Mar 2024 10:51:08 +0100 Message-ID: <20240327095124.73639-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240327095124.73639-1-philmd@linaro.org> References: <20240327095124.73639-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 acpi_memory_hotplug::is_enabled is set to %true once via ich9_lpc_initfn() -> ich9_pm_add_properties(). No need to check it, so remove now dead code. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- hw/acpi/ich9.c | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index 9b605af21a..02d8546bd3 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c @@ -153,17 +153,10 @@ static int ich9_pm_post_load(void *opaque, int version_id) .offset = vmstate_offset_pointer(_state, _field, uint8_t), \ } -static bool vmstate_test_use_memhp(void *opaque) -{ - ICH9LPCPMRegs *s = opaque; - return s->acpi_memory_hotplug.is_enabled; -} - static const VMStateDescription vmstate_memhp_state = { .name = "ich9_pm/memhp", .version_id = 1, .minimum_version_id = 1, - .needed = vmstate_test_use_memhp, .fields = (const VMStateField[]) { VMSTATE_MEMORY_HOTPLUG(acpi_memory_hotplug, ICH9LPCPMRegs), VMSTATE_END_OF_LIST() @@ -335,11 +328,9 @@ void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm, qemu_irq sci_irq) legacy_acpi_cpu_hotplug_init(pci_address_space_io(lpc_pci), OBJECT(lpc_pci), &pm->gpe_cpu, ICH9_CPU_HOTPLUG_IO_BASE); - if (pm->acpi_memory_hotplug.is_enabled) { - acpi_memory_hotplug_init(pci_address_space_io(lpc_pci), OBJECT(lpc_pci), - &pm->acpi_memory_hotplug, - ACPI_MEMORY_HOTPLUG_BASE); - } + acpi_memory_hotplug_init(pci_address_space_io(lpc_pci), OBJECT(lpc_pci), + &pm->acpi_memory_hotplug, + ACPI_MEMORY_HOTPLUG_BASE); } static void ich9_pm_get_gpe0_blk(Object *obj, Visitor *v, const char *name, @@ -460,12 +451,7 @@ void ich9_pm_device_pre_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev, return; } - if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM) && - !lpc->pm.acpi_memory_hotplug.is_enabled) { - error_setg(errp, - "memory hotplug is not enabled: %s.memory-hotplug-support " - "is not set", object_get_typename(OBJECT(lpc))); - } else if (object_dynamic_cast(OBJECT(dev), TYPE_CPU)) { + if (object_dynamic_cast(OBJECT(dev), TYPE_CPU)) { uint64_t negotiated = lpc->smi_negotiated_features; if (negotiated & BIT_ULL(ICH9_LPC_SMI_F_BROADCAST_BIT) && @@ -509,8 +495,7 @@ void ich9_pm_device_unplug_request_cb(HotplugHandler *hotplug_dev, { ICH9LPCState *lpc = ICH9_LPC_DEVICE(hotplug_dev); - if (lpc->pm.acpi_memory_hotplug.is_enabled && - object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) { + if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) { acpi_memory_unplug_request_cb(hotplug_dev, &lpc->pm.acpi_memory_hotplug, dev, errp); @@ -545,8 +530,7 @@ void ich9_pm_device_unplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev, { ICH9LPCState *lpc = ICH9_LPC_DEVICE(hotplug_dev); - if (lpc->pm.acpi_memory_hotplug.is_enabled && - object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) { + if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) { acpi_memory_unplug_cb(&lpc->pm.acpi_memory_hotplug, dev, errp); } else if (object_dynamic_cast(OBJECT(dev), TYPE_CPU) && !lpc->pm.cpu_hotplug_legacy) { From patchwork Wed Mar 27 09:51:09 2024 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: 783111 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2107602wrt; Wed, 27 Mar 2024 02:54:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVlvAUs5p2n1hGRr8INbNbrW+HU0/3p4UNu1fyIwlw+gWKtbrsIu3PaqI6eUaa7WsGOY79fyO4fq/ldsIln4Mzc X-Google-Smtp-Source: AGHT+IEQJOmxXBFEQqgubbiLptLR8EHdgoYBd9kZgZ0fVZNy8x7/eONFXRNb2mhjXIAMVPKdLFx1 X-Received: by 2002:a0c:c210:0:b0:696:b16d:9f0 with SMTP id l16-20020a0cc210000000b00696b16d09f0mr264888qvh.11.1711533261327; Wed, 27 Mar 2024 02:54:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711533261; cv=none; d=google.com; s=arc-20160816; b=KXhhaW8nnGdgpeOVXKTMuzONJ0wxxhClyalLfJmE6cyIpePCToVsVexVGWViitwecA 8haY2YStHkI8PgYf9ohmLSFvV/otNtRgCfkFAYFeg99kIku4JAULJ5wLRff1A1qCT6rX BrY0WSrdQ8ybO2yNL13P5EG5S4I+WQMTxarXm1gbAXRDvyBobBOajxv8+SeHRKNSVaEj IHvxHB9ZHZg7lkDQL+HomutjVNFyMT3ZaPvOcFVfqFQornsysGdoyjpQnE+iGoFt4DTo ud9CvvR90YmXMdaOoj0Z8Xic7huuY3qwD4Xo2vblfWAJqacJLQ7h1/v5RjDnU8lvWIJA 5olQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=1UJHCIaFDAoAGncjXPu5537QBhDZBufOcLaysXXn6Ec=; fh=dEWy6EVZ87IZjKS+Q9HMLOqMIJ8CrajFYbcF9kwk55U=; b=vqWC0m/0LMRmED19wxz+ATnnQmffhKhTmUZ46zmSMdqTkyCjIaQR+ilT9yfDashy0Y c/BNySyjcrnmZpbV11JgGn8V/M+C4wyfbEBfM/Oy1Ule5BvV3cx7sv5GhgXR19tf1SU5 7fLAsaWYUYpym8IG+yiZDGmGHfCO+DZBIBYgn/OmksRkaEGxkoDWqmxVK4XHm70P5nmt bJt7jJOMorWLcF4JZnoQEZj7yZf+D9veWOJLLM2slmAQypUxmTdvpgGZYkZTEozbaqGz bZ6RwisPmLw2OXCSkwX7Plv7nB91EyBDCoRmrmb3zO9yjzxECHwYy2eeaD7UR9ehok4t HtAQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jymGrSWQ; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ke14-20020a056214300e00b006968b87cdd0si6608632qvb.329.2024.03.27.02.54.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2024 02:54:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jymGrSWQ; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpPxD-0002iR-WF; Wed, 27 Mar 2024 05:52:20 -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 1rpPxB-0002a3-FY for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:52:17 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpPx8-0006lA-Dp for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:52:17 -0400 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a46a7208eedso884691866b.0 for ; Wed, 27 Mar 2024 02:52:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711533129; x=1712137929; 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=1UJHCIaFDAoAGncjXPu5537QBhDZBufOcLaysXXn6Ec=; b=jymGrSWQgsaRkGALuZMzegJewtHJtEfuZzwxrutxTjvkbbEL/aVZM0pdqTNYj9b4Jz cx1uCvjPO1K8dxCijR73MSfj2REx8kmHZ7kWpn1usJf1UzPJiN/lD+on9ZwaNdfBgU7q SGb/FCturi5BsumwmXm3DZUnx2BH+vtcW9bW1UfAX/EG3mNo/msG1+htSJL8OcZ0NBed KHTc3ClakoJjOLTc/S/aGZRN3KWxHnHIlaetIMPFCEUdbOtKS3o7AZtYb793wZJQl/QI NHBpLiDdULYr41zaxxNtOIjLWzZPUwg0HrP4K2+PiKMrrgwiyVeZJjegF7kgX/UCNp+X /TZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711533129; x=1712137929; 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=1UJHCIaFDAoAGncjXPu5537QBhDZBufOcLaysXXn6Ec=; b=i4QhkxEZqGqXH49UOszr9jr/8WWsKFPtJR5r73abait40dhSuBk9+fKEdLMcBxUKr/ wLkwa/BR27+k7TmRFgXcgEmUougGmt0Ahh/z54dLRmnBr/WLxO0U5Ob6crvcpJABgINp ooM/HyaUTvHwXsN4b2H/OMliLoBtw+lhZQcumBI7L9K6eUtH4q0kMdXdAu/G1e9w+mpM LsyEJOHPjGE0U2KrPF8efAvJW/xqgvh2hHjjWQN+KJbIc6e+XC4BdPMPKaCWQLH5F3pu gUQD/dWGe52shoYu+lmyn38mD5dwqY//76MWBMcBjp06PABOiRy9b8hPowKK/utg5lW7 xuuw== X-Forwarded-Encrypted: i=1; AJvYcCVyUDKjg/6qig/b5VMX4xqO9dMmzDomjqU+og8cs3mHcrofaIW1sgtS4ukJl3AggMUCT5wc76ri021ihY+HCuEf0Qh8pag= X-Gm-Message-State: AOJu0Yz48nhBn2RLrWAph48k3vJmdhYp3FSvhm3Cn07VYXPpY9GLcyf8 nCrtf7K0snUCEHZ5/vs4SwI0fHxI9XUmiON2DqOVFEAkRI2i/y1tJt52aKISWw0= X-Received: by 2002:a17:906:913:b0:a47:2f8c:7614 with SMTP id i19-20020a170906091300b00a472f8c7614mr2507485ejd.43.1711533129485; Wed, 27 Mar 2024 02:52:09 -0700 (PDT) Received: from m1x-phil.lan ([176.187.205.175]) by smtp.gmail.com with ESMTPSA id la5-20020a170907780500b00a45621ded4bsm5281900ejc.146.2024.03.27.02.52.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 27 Mar 2024 02:52:09 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Thomas Huth , qemu-devel@nongnu.org, Igor Mammedov Cc: Paolo Bonzini , devel@lists.libvirt.org, Zhao Liu , Gerd Hoffmann , "Michael S. Tsirkin" , Ani Sinha , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , Richard Henderson , Eduardo Habkost Subject: [PATCH-for-9.1 v2 07/21] hw/i386/pc: Remove deprecated pc-i440fx-2.1 machine Date: Wed, 27 Mar 2024 10:51:09 +0100 Message-ID: <20240327095124.73639-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240327095124.73639-1-philmd@linaro.org> References: <20240327095124.73639-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=philmd@linaro.org; helo=mail-ej1-x629.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-i440fx-2.1 machine was deprecated for the 8.2 release (see commit c7437f0ddb "docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated"), time to remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20240305134221.30924-7-philmd@linaro.org> Reviewed-by: Zhao Liu --- docs/about/deprecated.rst | 2 +- docs/about/removed-features.rst | 2 +- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 7 ------- hw/i386/pc_piix.c | 23 ----------------------- 5 files changed, 2 insertions(+), 35 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index b567415d62..deadcc044f 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -219,7 +219,7 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name better reflects the way this property affects all random data within the device tree blob, not just the ``kaslr-seed`` node. -``pc-i440fx-2.1`` up to ``pc-i440fx-2.3`` (since 8.2) +``pc-i440fx-2.2`` up to ``pc-i440fx-2.3`` (since 8.2) ''''''''''''''''''''''''''''''''''''''''''''''''''''' These old machine types are quite neglected nowadays and thus might have diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index 51119e623f..01c55103d3 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -816,7 +816,7 @@ mips ``fulong2e`` machine alias (removed in 6.0) This machine has been renamed ``fuloong2e``. -``pc-0.10`` up to ``pc-i440fx-2.0`` (removed in 4.0 up to 9.0) +``pc-0.10`` up to ``pc-i440fx-2.1`` (removed in 4.0 up to 9.0) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These machine types were very old and likely could not be used for live diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 4ad724601a..b528f17904 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -281,9 +281,6 @@ extern const size_t pc_compat_2_3_len; extern GlobalProperty pc_compat_2_2[]; extern const size_t pc_compat_2_2_len; -extern GlobalProperty pc_compat_2_1[]; -extern const size_t pc_compat_2_1_len; - #define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \ static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \ { \ diff --git a/hw/i386/pc.c b/hw/i386/pc.c index e7b6abf237..21a19f9f9f 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -304,13 +304,6 @@ GlobalProperty pc_compat_2_2[] = { }; const size_t pc_compat_2_2_len = G_N_ELEMENTS(pc_compat_2_2); -GlobalProperty pc_compat_2_1[] = { - PC_CPU_MODEL_IDS("2.1.0") - { "coreduo" "-" TYPE_X86_CPU, "vmx", "on" }, - { "core2duo" "-" TYPE_X86_CPU, "vmx", "on" }, -}; -const size_t pc_compat_2_1_len = G_N_ELEMENTS(pc_compat_2_1); - GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled) { GSIState *s; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 585231ef7b..02f3bce4f3 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -66,7 +66,6 @@ #include "hw/hyperv/vmbus-bridge.h" #include "hw/mem/nvdimm.h" #include "hw/i386/acpi-build.h" -#include "kvm/kvm-cpu.h" #include "target/i386/cpu.h" #define XEN_IOAPIC_NUM_PIRQS 128ULL @@ -435,12 +434,6 @@ static void pc_compat_2_2_fn(MachineState *machine) pc_compat_2_3_fn(machine); } -static void pc_compat_2_1_fn(MachineState *machine) -{ - pc_compat_2_2_fn(machine); - x86_cpu_change_kvm_default("svm", NULL); -} - #ifdef CONFIG_ISAPC static void pc_init_isa(MachineState *machine) { @@ -851,22 +844,6 @@ static void pc_i440fx_2_2_machine_options(MachineClass *m) DEFINE_I440FX_MACHINE(v2_2, "pc-i440fx-2.2", pc_compat_2_2_fn, pc_i440fx_2_2_machine_options); -static void pc_i440fx_2_1_machine_options(MachineClass *m) -{ - PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - - pc_i440fx_2_2_machine_options(m); - m->hw_version = "2.1.0"; - m->default_display = NULL; - compat_props_add(m->compat_props, hw_compat_2_1, hw_compat_2_1_len); - compat_props_add(m->compat_props, pc_compat_2_1, pc_compat_2_1_len); - pcmc->smbios_uuid_encoded = false; - pcmc->enforce_aligned_dimm = false; -} - -DEFINE_I440FX_MACHINE(v2_1, "pc-i440fx-2.1", pc_compat_2_1_fn, - pc_i440fx_2_1_machine_options); - #ifdef CONFIG_ISAPC static void isapc_machine_options(MachineClass *m) { From patchwork Wed Mar 27 09:51:10 2024 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: 783100 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2107045wrt; Wed, 27 Mar 2024 02:52:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV5gLl8+A3vj1CnBZL0HP65wdnvcKRKu3eMr+ES35R/T1Rdq4I1wvipiWfl6HBtXT1qZp+5iYhZbwhjiza+t180 X-Google-Smtp-Source: AGHT+IFtC0X73VEWyk+bntFUh2CJXRuVCgQW8gk+4IfobPgRSWG1tfajMYCCCgE3IRuJ82F49drc X-Received: by 2002:a25:6b48:0:b0:dc6:ebca:c2e8 with SMTP id o8-20020a256b48000000b00dc6ebcac2e8mr5526410ybm.5.1711533154973; Wed, 27 Mar 2024 02:52:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711533154; cv=none; d=google.com; s=arc-20160816; b=YPrTgy1nuwwWhzRxTk+KE5sQgyYhh2qxD2G8Gz0tMpgnycUeRCQsK0Pw25PR+g/gFi gBuq3FD7EjT7LBLjZZ/WPtGNyPMKutI0y/QtBKel7HZh7p5qsS9ccExdnJ/vZTShzq6e wAi/QrY88fcVp2g/ts1B4NSAIzv6foe+wwIoU8lu9mgXrf1RjiMQMs9Q6ea0wgi9bvvU Gdz/bZF8kgek8v0ceiVBBNnsvS13yevhVFaH8ev91/bJxYqWgeuBWrEOSOoCSqYtggLi jfJlxvAicn2lrNmDWw1WV1JYqax5llQT/Xl5hHrfVN5VHAQ+ksWsJG5QW5PMNRBsXU4f F2Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=3Vuzow4wRuBRA6M1t6JbWbYyMIQl6k4id2ay+d/vaQI=; fh=6BYQXfjo4KEgaiHL5PdZGDVkGwzpCn+0PPBsYNO7slU=; b=YF2XyN4bX8be4FqkXaN2UTuTW6jUSIGZgSwSdQGzjuJLnaw6AawNb99th59FdrD2nn Mt8tnD5dhkgNNKLy9jzDl1iSJI7kiU9jRUoV6xCz1h2+Zt7bA/1Xd/OYlwqcxRbEi23f SLF7RYhMa0snoie7J+jfS9zdfftagy82KIqjOFduhcPPCTq+03NlLXbLM5T+zao3t0yo oQ1YVUXjqWNKAFlBo/fXX5e0o9D0T9DIO0KXJXwpDrh1JJvn3RSiP2CN+gkU9/prpBa0 NKqVcaIi4xH3uGNmOZzMkl9mlUaVzPjm25nB3pc+QWqSZ27hKgN2hsFuf07NOehmfxiY 5HNA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=evp8jxkK; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id jo9-20020a056214500900b006968ed5fc2bsi6078256qvb.596.2024.03.27.02.52.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2024 02:52:34 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=evp8jxkK; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpPxF-0002to-My; Wed, 27 Mar 2024 05:52:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpPxC-0002c5-UR for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:52:18 -0400 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpPxB-0006m2-1a for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:52:18 -0400 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-56c3689ad2cso1438747a12.1 for ; Wed, 27 Mar 2024 02:52:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711533135; x=1712137935; 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=3Vuzow4wRuBRA6M1t6JbWbYyMIQl6k4id2ay+d/vaQI=; b=evp8jxkKX4lOKE6ulNpIJ7o0wQu+bFrLdezU56pxjsCuhCTTxq9wK9Mg6l2QVWYhVn SQn8JqjfnRc37Cdbyt9QDK92FcZKkl21A2pQ7eez0Gbq3I+gMgzyMXlZHmn7juXyCjbH lCzgY+rqmXkvVgJwJA6yWqRwTs5trlpxXSFgF6gFWz0xTiY7Fhjl/t7V6+BJMJekGQRp oAvWvf8WsmjQz/Qbe3AIIR2J921ok+rTabgLV/go4nyC1lTWMFSLrTdFioMZieUQKKHG /y+Ko7j4/mRbgI3mhgvN0PkmQVZEedOmEgN3uWHB2DmX0mL4J5+MX19Vtdma1WyO/Qiw E6Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711533135; x=1712137935; 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=3Vuzow4wRuBRA6M1t6JbWbYyMIQl6k4id2ay+d/vaQI=; b=mkU16B43bYxRdgPccqo/E4JQUwT5D4tVacsw1uPIZyNxWhpqmhTsfYtzBlYlfKmuUP Or8ZPn/wD5iJqKkl1eZGgp2LBebDZmnIJ13Zx5ragcs7YtORAEtMHaJrRWbcfxo2lWLV IbcuRUQ2/t6c7suhTWjzLJqXClrU9zyUf8jVADWMBGluMj3wl2ZrGEXt9eNbI/F0Cc49 WViGMF86q/Dxv/1Bkye9gAZWoNiSWYuA70pbkRuR0ny3P5kb4790jFfDLtYYYY0cfQ40 6887cISAAksfzCKZQJ1W2SjKBykyEe9gfc5Ecplqp23DWuppLNJwSNX24FgW3vopKpeF RzhQ== X-Forwarded-Encrypted: i=1; AJvYcCWzQyMVkPrXEuSymo/RsPmCcSvLN6ieXXwmUpixWR1Cpe3t7beeVkeNaF2s3RBIUANN3QzJN1rkMa1h+r43Eku5zalpL+g= X-Gm-Message-State: AOJu0YyfrdfmLyIlrOKtlWl5cJMS0VhQnsAs4mKeW2uO/5Fp8nF2o1M0 3Be9vVfYHuWK58IuXkbnanpXDvYZF0QfNKd9FJQNh0R0kSXXlgja4sMx7KzDrK0= X-Received: by 2002:a50:d781:0:b0:568:9d96:b2d1 with SMTP id w1-20020a50d781000000b005689d96b2d1mr3486483edi.32.1711533135591; Wed, 27 Mar 2024 02:52:15 -0700 (PDT) Received: from m1x-phil.lan ([176.187.205.175]) by smtp.gmail.com with ESMTPSA id l2-20020aa7cac2000000b00568e3d3337bsm5050818edt.18.2024.03.27.02.52.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 27 Mar 2024 02:52:15 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Thomas Huth , qemu-devel@nongnu.org, Igor Mammedov Cc: Paolo Bonzini , devel@lists.libvirt.org, Zhao Liu , Gerd Hoffmann , "Michael S. Tsirkin" , Ani Sinha , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Marcelo Tosatti , kvm@vger.kernel.org Subject: [PATCH-for-9.1 v2 08/21] target/i386/kvm: Remove x86_cpu_change_kvm_default() and 'kvm-cpu.h' Date: Wed, 27 Mar 2024 10:51:10 +0100 Message-ID: <20240327095124.73639-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240327095124.73639-1-philmd@linaro.org> References: <20240327095124.73639-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=philmd@linaro.org; helo=mail-ed1-x52c.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 x86_cpu_change_kvm_default() was only used out of kvm-cpu.c by the pc-i440fx-2.1 machine, which got removed. Make it static, and remove its declaration. "kvm-cpu.h" is now empty, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20240305134221.30924-8-philmd@linaro.org> Reviewed-by: Zhao Liu --- target/i386/kvm/kvm-cpu.h | 41 --------------------------------------- target/i386/kvm/kvm-cpu.c | 3 +-- 2 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 target/i386/kvm/kvm-cpu.h diff --git a/target/i386/kvm/kvm-cpu.h b/target/i386/kvm/kvm-cpu.h deleted file mode 100644 index e858ca21e5..0000000000 --- a/target/i386/kvm/kvm-cpu.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * i386 KVM CPU type and functions - * - * Copyright (c) 2003 Fabrice Bellard - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, see . - */ - -#ifndef KVM_CPU_H -#define KVM_CPU_H - -#ifdef CONFIG_KVM -/* - * Change the value of a KVM-specific default - * - * If value is NULL, no default will be set and the original - * value from the CPU model table will be kept. - * - * It is valid to call this function only for properties that - * are already present in the kvm_default_props table. - */ -void x86_cpu_change_kvm_default(const char *prop, const char *value); - -#else /* !CONFIG_KVM */ - -#define x86_cpu_change_kvm_default(a, b) - -#endif /* CONFIG_KVM */ - -#endif /* KVM_CPU_H */ diff --git a/target/i386/kvm/kvm-cpu.c b/target/i386/kvm/kvm-cpu.c index 9c791b7b05..cb8c73d20c 100644 --- a/target/i386/kvm/kvm-cpu.c +++ b/target/i386/kvm/kvm-cpu.c @@ -10,7 +10,6 @@ #include "qemu/osdep.h" #include "cpu.h" #include "host-cpu.h" -#include "kvm-cpu.h" #include "qapi/error.h" #include "sysemu/sysemu.h" #include "hw/boards.h" @@ -144,7 +143,7 @@ static PropValue kvm_default_props[] = { /* * Only for builtin_x86_defs models initialized with x86_register_cpudef_types. */ -void x86_cpu_change_kvm_default(const char *prop, const char *value) +static void x86_cpu_change_kvm_default(const char *prop, const char *value) { PropValue *pv; for (pv = kvm_default_props; pv->prop; pv++) { From patchwork Wed Mar 27 09:51:11 2024 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: 783105 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2107277wrt; Wed, 27 Mar 2024 02:53:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVo8zQEUmwYAvJf6QdsTiXT44uF/mcx8s+XBtBN+94AwQhjESOYWY1qFgkiUUwptYIs/B2oMAXdhIk+eErrPp4w X-Google-Smtp-Source: AGHT+IGNgp602bunM2hNndcYt8rdkaeDUEfxtLL8eccF2fw1r8V2u1Y7L/KLLt6axemQzZz9UEgI X-Received: by 2002:a05:620a:578a:b0:788:2e47:b290 with SMTP id wk10-20020a05620a578a00b007882e47b290mr2290460qkn.73.1711533192278; Wed, 27 Mar 2024 02:53:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711533192; cv=none; d=google.com; s=arc-20160816; b=NLvjYPBrUOFKEn/8X3ughwJHm7gMqpufdkm+fMdlJuWe2P2zqRcigBFhdFpoTexu3q oohSPbqwt3b2ShN1QQ0p6rSmvWer7Sx23D+63ZJ6fIyuWAwrXX26ge68BpsX1e+P9GK0 9J9gSTjfBMJajVdsZu/vfzjStfO+ozz0V3mwjvnwv2yRT9UeO+ScxQf47fLH/o0cXSwX /FaFiet7bFBzv8X1ZQvZp+pHbplgToCqLIzNqhZWlLoPeDR6PsaIY1/1fvsyliO1/pvs C3EOZ/cZ2uswsSnioXzZOB+JjCtf7JZXt7YPaYKMBitIygdcAlGTFmRl93/PINuOUMvi vIUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=moMRgwVbBcI6V0GvPpasfOh1Y8vOj0lwuTNViKRW0J4=; fh=7snM2LTjcVd7L5tFBOmKnMtYRTLbNuGb676QGKJAIgk=; b=B+9jCZZp1eebXYX4uB/g7b6L24cUDn1b6FcGMxHngnVCgkVJXC22/p9nncSuNSJD0O NNWDJ0iEeQWuoB7GjC/qj6BSi54X5kDFHJgCB1mrYmad5YdVSkK9XaKkhzsOl9Np/Bny RcknliTFmATL7Z0LNyPMBzaa1NB3UCAzawqdIMTwhFeH965QwIv4OkTjuI0dH1uVX6ct LrVhDOEUwOFm3Ea7tw7NjvCH8iHP7GlGowO73GkkcCiSp5zMJzd9imdz+Xw6ynu4c5st 4Yw0MTIQH+DlEBxjCjxQYBspHCQbmucqr06zsREDe60nq6vzrElvO1fn+5AUhE1k2NrE Om9Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cighFEa0; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n6-20020ae9c306000000b0078841f78cc3si9361856qkg.398.2024.03.27.02.53.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2024 02:53:12 -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=cighFEa0; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpPxK-0003Oy-Hp; Wed, 27 Mar 2024 05:52:26 -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 1rpPxI-0003C9-MN for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:52:24 -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 1rpPxH-0006n4-3b for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:52:24 -0400 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a468004667aso877389766b.2 for ; Wed, 27 Mar 2024 02:52:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711533141; x=1712137941; 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=moMRgwVbBcI6V0GvPpasfOh1Y8vOj0lwuTNViKRW0J4=; b=cighFEa0SSY5elw7R8hguzTcc+TNFd7OFTL7vVC3rfau0yWnHJMasile17QM65TxDm Ec+tNfHh3QF4rQNN5aqrmGrZFSYcB6/9XDjxqJsCbIiD0Tj35GzIk0EG1V20EU4PMqkr SntIplNe4Ij2KKGcYm2VYfH5NsiFkRH5fQK/u//6f5Bws7E4NyqaZPy8QHz2gwX1wnud kZgn4SA75oV0tnk51Sdnp2TvYUMVtn62QYpoOB6RCSm9jgeEMJBBYgjArFXzUN+j/jov ve7XXTjBuB6z2IldiAH+Cg8q6CVJiD1VKYIIXrZmJc5Uj6p9CA5x6bn0UJOmP0IVa3Cz uW4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711533141; x=1712137941; 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=moMRgwVbBcI6V0GvPpasfOh1Y8vOj0lwuTNViKRW0J4=; b=OhXF05PHRLTyfOFu2t+TmsuOzSfhZOc6jVBSoZPqDC/plmrTpy4UUDjQ5OwMvDtxlU VqwkAfKzzQ/S8qJaoAEQG8oZa0ubjVytqoQfkgkTLXFqWdOoPXoz38XVaTsNAWAhp/FJ 1N3I10AfJpVM40cluHvCXriPziiHGskl7U/1ylsqQK/bWeM5q3eCPK5yXEpDV8hsk3FZ 49mOXRdg63cXR9OkIhVYSozOOBSDMrT8UxFDYPXVOS56GKu88MWG6KsbP8rV4pgCrDZE rVPFu+wgC1gFQXSOrMHL19N8vTGqigYfhDLd9kNS4xJa3yO0qbzRepDrgRJBsvwfUT4S gSeA== X-Forwarded-Encrypted: i=1; AJvYcCXX1aNDjlOKfODkm1tA18oEmC68iK1j3C+0JMpFOthaf67ARKCC2VlDhgAUbB2aylzOrwH5fFPNhEuZoHcoZJEtGyv4m/A= X-Gm-Message-State: AOJu0Yxr6ubY2U5FZ/FWirw1RE/rw+tYa473RJsuHSV28SLghT9dPwSe hYFPLqDiixGDrYYcz6xtRi8wU7RDz/z+RIw+Zv/ajOkClSMennPdvXUHki2v1h5ZihoTbGUV3SF 9 X-Received: by 2002:a17:906:8c3:b0:a47:3312:b32a with SMTP id o3-20020a17090608c300b00a473312b32amr2637994eje.58.1711533141593; Wed, 27 Mar 2024 02:52:21 -0700 (PDT) Received: from m1x-phil.lan ([176.187.205.175]) by smtp.gmail.com with ESMTPSA id t26-20020a170906a11a00b00a473792da26sm5303969ejy.19.2024.03.27.02.52.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 27 Mar 2024 02:52:21 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Thomas Huth , qemu-devel@nongnu.org, Igor Mammedov Cc: Paolo Bonzini , devel@lists.libvirt.org, Zhao Liu , Gerd Hoffmann , "Michael S. Tsirkin" , Ani Sinha , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , Richard Henderson , Eduardo Habkost Subject: [PATCH-for-9.1 v2 09/21] hw/i386/pc: Remove PCMachineClass::smbios_uuid_encoded Date: Wed, 27 Mar 2024 10:51:11 +0100 Message-ID: <20240327095124.73639-10-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240327095124.73639-1-philmd@linaro.org> References: <20240327095124.73639-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 PCMachineClass::smbios_uuid_encoded was only used by the pc-i440fx-2.1 machine, which got removed. It is now always true, remove it. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- include/hw/i386/pc.h | 1 - hw/i386/fw_cfg.c | 3 +-- hw/i386/pc.c | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index b528f17904..c2d9af36b2 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -109,7 +109,6 @@ struct PCMachineClass { /* SMBIOS compat: */ bool smbios_defaults; bool smbios_legacy_mode; - bool smbios_uuid_encoded; SmbiosEntryPointType default_smbios_ep_type; /* RAM / address space compat: */ diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c index d802d2787f..f7c2501161 100644 --- a/hw/i386/fw_cfg.c +++ b/hw/i386/fw_cfg.c @@ -63,8 +63,7 @@ void fw_cfg_build_smbios(PCMachineState *pcms, FWCfgState *fw_cfg, if (pcmc->smbios_defaults) { /* These values are guest ABI, do not change */ - smbios_set_defaults("QEMU", mc->desc, mc->name, - pcmc->smbios_uuid_encoded); + smbios_set_defaults("QEMU", mc->desc, mc->name, true); } /* tell smbios about cpuid version and features */ diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 21a19f9f9f..f9650a2821 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1776,7 +1776,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->has_acpi_build = true; pcmc->rsdp_in_ram = true; pcmc->smbios_defaults = true; - pcmc->smbios_uuid_encoded = true; pcmc->gigabyte_align = true; pcmc->has_reserved_memory = true; pcmc->enforce_aligned_dimm = true; From patchwork Wed Mar 27 09:51:12 2024 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: 783116 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2108095wrt; Wed, 27 Mar 2024 02:55:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUxt3LRRYnnOfs7qem5jWIe7temrRpiIvTBDNI8Sp7TDgm7Iu0Seu7NZL6N+0Axa4TS0qM6LOAbfQmrHQf1883H X-Google-Smtp-Source: AGHT+IHGeFWo4PjhK39rCh2nugbeM2UgCb4rh3NcknJlHSM0OYdgApiOK5KSoG3hnJPl88IO3DPe X-Received: by 2002:a05:620a:12c8:b0:78a:270d:cf9e with SMTP id e8-20020a05620a12c800b0078a270dcf9emr665960qkl.47.1711533355723; Wed, 27 Mar 2024 02:55:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711533355; cv=none; d=google.com; s=arc-20160816; b=wEJIuS05b4SqYYFaEeoGGivGh0jWoqwWWOLu4LPpxxYvbT8cDyJRoUoleHvFqIa2Zy Jh+FtAcvXBk7GEwQreKBDD/gF4G16PpA/z0tz2hjqfQvl+cKmmiKYf5fmDtJSYyd17zd dCTSrxvJUe9mXwpR1C/j5vuBOSgI3kQhZfjACWBlEHuwDfsURHIbaw+Otb0Bil4g/J7A syfvlqcJaZ/x0L2NBrz4T8cVPoJB8KYk9owapQ3sf64sv7Q/cZDXWuc1fQOxUSRL8TYT 4PBrLQLA+wAW18KCCxnmeg8UHWlOuN2vmHfXjR+aSu9vTvj9IZKkxWWS5zvDeFa3uBAe 2Qeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=PbL9DbUU/VwqkR1vuLb4yIgDr+6Vr1z3If7UjhII6YI=; fh=9wFtJOsbzEJZUDkN1ciDLPLsgnH0XeEQynw7AVbE7r4=; b=leKWbK7ov65RztWVufUCKs68L7NBoqU7qWHBuvm/UNokUS7oR2dkXbrxvJ5yl2zyev n3VMD1/IaFOsQ88c/e+9onQhmrV5EFdkpPf6SiVePUc19nT0RYjjRKfQ+IqXnQp2tS1R ePkNQdCYiu04yzEMwil5wV6Cq1zPF9glmYj7RM3XRm5oV2ZOIAiWphrIyRt0W3kVfJUl BF1xzMjhlDL45iCXLmAb7N/s4e9j8duMLDtoz4zg3FhI2PSdw81Grxk1lxd3Tq0SCXIT ZEitgXHPVzNRdmaEkUwNccYwqH86FxX3rLbhA2THFGTWaOTHYnlV6B377nG+x4b6tt6v zNew==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oshKLjFL; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bj6-20020a05620a190600b0078a3d28988fsi11315743qkb.267.2024.03.27.02.55.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2024 02:55:55 -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=oshKLjFL; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpPxX-0004Sy-2h; Wed, 27 Mar 2024 05:52:39 -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 1rpPxU-00048Y-GI for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:52:36 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpPxO-0006ns-7C for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:52:31 -0400 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a2f22bfb4e6so857620966b.0 for ; Wed, 27 Mar 2024 02:52:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711533148; x=1712137948; 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=PbL9DbUU/VwqkR1vuLb4yIgDr+6Vr1z3If7UjhII6YI=; b=oshKLjFLYApqxWaVs1GZ40igalfXY7g+8FwJhTvrmvj7zFS+DOyxqJicvcr9o741z+ K/zMyEI2i3nB7tdgSKfOJ1jqs37eh6Vo8WrWp0lBBDtA3HGv6t3rFpZ7sfJ6xqamJ1tY BoOHNjhBIcji2bv/Xld3uIXlqs1YSTpDPMosq2RqhhY6BXTi+QfbVTJjlWFbQr+2nxnk hR9wwlthGTa3ClUIONVmMZAOb56ZJ7lb3c1W6V8V8yAEuIzOW+j8fr40p/CNE5Qfp6Tl e1XXaUUdSU/kG+xW+msvmT/MuO9JqpFtHC7GOzChFPLYy6fI7hy1qNb+/nutF5zUfEKg e6Ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711533148; x=1712137948; 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=PbL9DbUU/VwqkR1vuLb4yIgDr+6Vr1z3If7UjhII6YI=; b=oRJ+Dogp82t3XvdHQ6usMA2QK2P8qunIuMqBcSdeC0+dMi6bodtTUYzWj8T6XyeszF CgLJS4AtMlfTSX7BDGea3tD1bYypahJwIA077yC7XaWpn8BsYsVj3iRukr+M48UzzwIT NvwGhYFXAFnrlyNroidEIj87FEkfbv+5Fq3PPtvWswdGJkj8Z6xKud0fQ6RBYxpOeKkf i6gdd/LEB0U0v+MG5yXRogzRI2Tt6K2bvZysO0e3cECiGNaPI/dxXXw2Ze5X+Z1Z1hip ki+wCqRfwZKZoC9Mn4kWeCBR7oc10HyGvca/PL+KbQN3ad33VvYvfUPDD0Cf7pURizUO cYRg== X-Forwarded-Encrypted: i=1; AJvYcCXiq15NcsHKNij9CmspkWovJtebNeTU+5bAABHohC9/uQnrKQyZvlURvDIrVUZCgQj6Lbgvw9vGNu6yaCUHRlGHg86BMNY= X-Gm-Message-State: AOJu0YzFfl4ynYGBcBfxH8pzNuSRmKNlAtN+ByPgxaifp3KpJXrkkXbo s3Rvv+Wglzvewr3UYuMNLmmkwgwa5AISmTrQNH6xkHvXzU3+ley1x0kJvSqbhoA= X-Received: by 2002:a17:906:2998:b0:a49:dfe7:834f with SMTP id x24-20020a170906299800b00a49dfe7834fmr492717eje.59.1711533148505; Wed, 27 Mar 2024 02:52:28 -0700 (PDT) Received: from m1x-phil.lan ([176.187.205.175]) by smtp.gmail.com with ESMTPSA id e10-20020a170906504a00b00a4735e440e1sm5219836ejk.97.2024.03.27.02.52.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 27 Mar 2024 02:52:28 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Thomas Huth , qemu-devel@nongnu.org, Igor Mammedov Cc: Paolo Bonzini , devel@lists.libvirt.org, Zhao Liu , Gerd Hoffmann , "Michael S. Tsirkin" , Ani Sinha , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , Marcel Apfelbaum , Richard Henderson , Eduardo Habkost , Song Gao , Palmer Dabbelt , Alistair Francis , Bin Meng , Weiwei Li , Daniel Henrique Barboza , Liu Zhiwei , qemu-arm@nongnu.org, qemu-riscv@nongnu.org Subject: [PATCH-for-9.1 v2 10/21] hw/smbios: Remove 'uuid_encoded' argument from smbios_set_defaults() Date: Wed, 27 Mar 2024 10:51:12 +0100 Message-ID: <20240327095124.73639-11-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240327095124.73639-1-philmd@linaro.org> References: <20240327095124.73639-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=philmd@linaro.org; helo=mail-ej1-x629.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 'uuid_encoded' is always NULL, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- include/hw/firmware/smbios.h | 3 +-- hw/arm/virt.c | 3 +-- hw/i386/fw_cfg.c | 2 +- hw/loongarch/virt.c | 2 +- hw/riscv/virt.c | 2 +- hw/smbios/smbios.c | 6 ++---- 6 files changed, 7 insertions(+), 11 deletions(-) diff --git a/include/hw/firmware/smbios.h b/include/hw/firmware/smbios.h index 8d3fb2fb3b..f066ab7262 100644 --- a/include/hw/firmware/smbios.h +++ b/include/hw/firmware/smbios.h @@ -331,8 +331,7 @@ void smbios_add_usr_blob_size(size_t size); void smbios_entry_add(QemuOpts *opts, Error **errp); void smbios_set_cpuid(uint32_t version, uint32_t features); void smbios_set_defaults(const char *manufacturer, const char *product, - const char *version, - bool uuid_encoded); + const char *version); void smbios_set_default_processor_family(uint16_t processor_family); uint8_t *smbios_get_table_legacy(size_t *length, Error **errp); void smbios_get_tables(MachineState *ms, diff --git a/hw/arm/virt.c b/hw/arm/virt.c index a9a913aead..a55ef916cb 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1650,8 +1650,7 @@ static void virt_build_smbios(VirtMachineState *vms) } smbios_set_defaults("QEMU", product, - vmc->smbios_old_sys_ver ? "1.0" : mc->name, - true); + vmc->smbios_old_sys_ver ? "1.0" : mc->name); /* build the array of physical mem area from base_memmap */ mem_array.address = vms->memmap[VIRT_MEM].base; diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c index f7c2501161..ecc4047a4b 100644 --- a/hw/i386/fw_cfg.c +++ b/hw/i386/fw_cfg.c @@ -63,7 +63,7 @@ void fw_cfg_build_smbios(PCMachineState *pcms, FWCfgState *fw_cfg, if (pcmc->smbios_defaults) { /* These values are guest ABI, do not change */ - smbios_set_defaults("QEMU", mc->desc, mc->name, true); + smbios_set_defaults("QEMU", mc->desc, mc->name); } /* tell smbios about cpuid version and features */ diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index 441d764843..00d3005e54 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -355,7 +355,7 @@ static void virt_build_smbios(LoongArchMachineState *lams) return; } - smbios_set_defaults("QEMU", product, mc->name, true); + smbios_set_defaults("QEMU", product, mc->name); smbios_get_tables(ms, SMBIOS_ENTRY_POINT_TYPE_64, NULL, 0, diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index d171e74f7b..1ed9b0552e 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -1277,7 +1277,7 @@ static void virt_build_smbios(RISCVVirtState *s) product = "KVM Virtual Machine"; } - smbios_set_defaults("QEMU", product, mc->name, true); + smbios_set_defaults("QEMU", product, mc->name); if (riscv_is_32bit(&s->soc[0])) { smbios_set_default_processor_family(0x200); diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index eed5787b15..8261eb716f 100644 --- a/hw/smbios/smbios.c +++ b/hw/smbios/smbios.c @@ -30,7 +30,7 @@ #include "hw/pci/pci_device.h" #include "smbios_build.h" -static bool smbios_uuid_encoded = true; +static const bool smbios_uuid_encoded = true; /* * SMBIOS tables provided by user with '-smbios file=' option */ @@ -1017,11 +1017,9 @@ void smbios_set_default_processor_family(uint16_t processor_family) } void smbios_set_defaults(const char *manufacturer, const char *product, - const char *version, - bool uuid_encoded) + const char *version) { smbios_have_defaults = true; - smbios_uuid_encoded = uuid_encoded; SMBIOS_SET_DEFAULT(smbios_type1.manufacturer, manufacturer); SMBIOS_SET_DEFAULT(smbios_type1.product, product); From patchwork Wed Mar 27 09:51:13 2024 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: 783117 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2108250wrt; Wed, 27 Mar 2024 02:56:29 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXzHKdeYd/5rjCytk0X+DqLpGJOOWYuD+gYS6dfYJ+zJEKvErYAqOoyUgiTDZuCL0X/2912jNyr+cKmnwayEPu6 X-Google-Smtp-Source: AGHT+IFl47LEIkIb3WGZUEPTHF3YHeF1TMCOGTjvi1x6DlE0lnKWH+09OjaPEU74UYd+BPz9NmNw X-Received: by 2002:a0d:c746:0:b0:611:2aae:40f with SMTP id j67-20020a0dc746000000b006112aae040fmr478643ywd.0.1711533389580; Wed, 27 Mar 2024 02:56:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711533389; cv=none; d=google.com; s=arc-20160816; b=RdMPwMDCo7/0e6V7+jR3NOdH4k1bcMkvuB0EVpfFjfx2f6ACQXOZnroQiGSq3OPPSV PluW1WGERRPd349utzk7UFEbi6CgiqWRPNjdOJq/MtjdroJmfKblpTVnpGFufcbi031x L38H/jToQzuPtYo1p0wsjiE1GFNLGI1sUZOZWQ6V9HPoF4UZysNcycd6NHLZaxr+gBKI NIqRhqqHJFOVxHcj+LhAAnom1Oc4vGDIcewRTHAN+vj0LPzwNElPguyjA03paWz4oU/s HXjigdt0vB/HqggjXvc9MLcReVi4RhpoJ6Duhp8d7K1L7ujC0K9t7IIARG/+JQdu71Hx ro7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=OsIizV2m9/3hMtPiDzFMJ5egzT3hkg2W7UMGOxAPpCY=; fh=i6gJH94/tScEf9GtbJboQdc+nTNdusa7/J/erPfrMAE=; b=tnrJXvHmzHHlMVUTIZTEMBJJxRmsqJqNIv8hAclxRDqpKPz4KEKHGP244fm00RWp3P 3hXHlyZAP+HJjyXfoPCkR6nB/syfbGpYAlMJ0vDaoyyJHE6cWoHNQb0q4WNhWYjooMOr rNnTuHKVvX64oNL7v1puE6di8ZrrY0+ukAumLoSxEhdZtizBRZsTDnJIUE0bgzEi0QTh UjxeMcJ5cuSHSYP5GQszxxPvU+6RmnubwMpabhoKCjLVPwyeNv1fRoeaTMPAgQguaPDm KwjzEXAmUZvXT7kD9IASRu41t9ohoiUgofaxnY4pteLPpyZg9YsdWP7ZhaHcPX/otFry eZlw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=a0+aSuiq; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h21-20020a37de15000000b0078a40127b4esi9321105qkj.33.2024.03.27.02.56.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2024 02:56:29 -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=a0+aSuiq; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpPxX-0004Xf-FP; Wed, 27 Mar 2024 05:52:39 -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 1rpPxV-0004Jd-P4 for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:52:37 -0400 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpPxU-0006oe-77 for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:52:37 -0400 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-515a86daf09so4808043e87.3 for ; Wed, 27 Mar 2024 02:52:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711533154; x=1712137954; 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=OsIizV2m9/3hMtPiDzFMJ5egzT3hkg2W7UMGOxAPpCY=; b=a0+aSuiqnIhw/kQIpKKPglJ8y4hl6qpncGmMSU7PUni5TdKVb/FZCaNX0aBpOQyJ14 L89ZEwNV9BztbR9AkUBtOz3WKy5nmX1pHLps+nNSttdxV/aqDIu8LO0GGyNOn5JlZpL6 Hax5QgZDpbp+7gHtu3eA3QX0AePwi1HvRFHoT/IS/F82AMzJCIaoJEXXq9tCKqgiwWhU BvdLNYXdTLiOVh97cIT6rHUM/vZV0dYrAF4rGE2sBuiCltfcqtONGypCxuW8JKCEkxKe Ky+RdzsHAzRvk6WuhsBohv+E15ggrSyNHg0u0LDlDved+7kAAOkLfapc+sC+RD8ZO0q7 CDAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711533154; x=1712137954; 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=OsIizV2m9/3hMtPiDzFMJ5egzT3hkg2W7UMGOxAPpCY=; b=w2G2ea1SJwNdBbcVJY0UlRlBgDV1ypS5k5kti2JMLAbCrkRaE0vS9V/mrsz3l+v5oE ilK7GaFq6OLINW1ESpCd6ILdpphc5ytj0dssmUHn3CJJKQDi+p9EWgpW24zl+f8LIOER ppuggMp22HbcbSLGyDRpSAdK1oWAZWduyIiSHEwkBdsJX3Y+o+GyjINaKzw/3pTVINsY 3ZYLHEt1pxcKttBdBOsKjNIW1IYlSELKU9K2gov9DMwO+4ZtqoNlS1KU7kmfpd2V4V/h 6hoaU8txontAtBbG5Fd3ssUb8AQyqNoaxQBqPKquzpu8o5CnE1s6PjvOqY/lXK04TsBu VLtg== X-Forwarded-Encrypted: i=1; AJvYcCUWeMzEB+44ubqcF7993KAcofH7RzB9bCst0vwcUZpO9Wf7t/6f1DGMUF+CdGIkuB2i9iDufnuk2mIFECC7ldiRaehaiMQ= X-Gm-Message-State: AOJu0YxF+eGdyfUpUoeXyUXUEm8VO+GjK9EIbztR9q55PdhstOfBxXh4 bkJrJUyx1J7BrkOpYB/A+/JUZMFYw64/dRVGwI0ZoVdFs8PeLRWC49n8Kn7EsxM= X-Received: by 2002:ac2:5a5d:0:b0:515:8c3e:566b with SMTP id r29-20020ac25a5d000000b005158c3e566bmr582754lfn.31.1711533154397; Wed, 27 Mar 2024 02:52:34 -0700 (PDT) Received: from m1x-phil.lan ([176.187.205.175]) by smtp.gmail.com with ESMTPSA id i18-20020a170906265200b00a4df5e48d11sm1558656ejc.72.2024.03.27.02.52.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 27 Mar 2024 02:52:34 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Thomas Huth , qemu-devel@nongnu.org, Igor Mammedov Cc: Paolo Bonzini , devel@lists.libvirt.org, Zhao Liu , Gerd Hoffmann , "Michael S. Tsirkin" , Ani Sinha , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-9.1 v2 11/21] hw/smbios: Remove 'smbios_uuid_encoded', simplify smbios_encode_uuid() Date: Wed, 27 Mar 2024 10:51:13 +0100 Message-ID: <20240327095124.73639-12-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240327095124.73639-1-philmd@linaro.org> References: <20240327095124.73639-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=philmd@linaro.org; helo=mail-lf1-x135.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 'smbios_encode_uuid' is always true, remove it, simplifying smbios_encode_uuid(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- hw/smbios/smbios.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index 8261eb716f..3b7703489d 100644 --- a/hw/smbios/smbios.c +++ b/hw/smbios/smbios.c @@ -30,7 +30,6 @@ #include "hw/pci/pci_device.h" #include "smbios_build.h" -static const bool smbios_uuid_encoded = true; /* * SMBIOS tables provided by user with '-smbios file=' option */ @@ -600,11 +599,9 @@ static void smbios_build_type_0_table(void) static void smbios_encode_uuid(struct smbios_uuid *uuid, QemuUUID *in) { memcpy(uuid, in, 16); - if (smbios_uuid_encoded) { - uuid->time_low = bswap32(uuid->time_low); - uuid->time_mid = bswap16(uuid->time_mid); - uuid->time_hi_and_version = bswap16(uuid->time_hi_and_version); - } + uuid->time_low = bswap32(uuid->time_low); + uuid->time_mid = bswap16(uuid->time_mid); + uuid->time_hi_and_version = bswap16(uuid->time_hi_and_version); } static void smbios_build_type_1_table(void) From patchwork Wed Mar 27 09:51:14 2024 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: 783104 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2107244wrt; Wed, 27 Mar 2024 02:53:07 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXXZ/eQDyEXWfryc4LE0RJHBuRsGNE6jtrgJC80vfhHGaYFIJwC5kosJKMvYUS5yqg6fZTr5y+e9DwfEqiyjquZ X-Google-Smtp-Source: AGHT+IHeFZrzT7fUi+t735FWfCf03M9VNQus1YGfDco1oSxKyOerapDxm6cGuaSudcUPAegv8XL1 X-Received: by 2002:a05:622a:94:b0:431:5241:2ef9 with SMTP id o20-20020a05622a009400b0043152412ef9mr2545122qtw.11.1711533186711; Wed, 27 Mar 2024 02:53:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711533186; cv=none; d=google.com; s=arc-20160816; b=A9OEqRYF67qduCAwfpqEtGYC4RDUt6E0LT0mL1Br7PPAicBBxHVNLyfapGHhhF+pDa 7EZYg71jkfhYsXqTCRSHyPrIbPlHK54rWA1D7prhXla5O7Hk//gJRG9HPMvXXCTQ6HH/ TAsQKktX4Ogk4mp5xfEQMZSMDGvHj9opUpUFvu8C30GEGhZ6pxuJWTdN1l7HiGkKpCdA p9Bcox6evriTrO7fyV95BIVevl3/csdzErCyLDMvEih8zDWPNGrsb1GP5qJggPijalnC 6bKRr5xq2hGTX/cRYuTfiNhA2VIjLqXawqILih6KqyQO8AP/0kkZy33DeiuhIfqo6zPV Hwzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=TS+v/eLxATnG0O4x0k9d/m89qYtDW6sLXZHCB+9mUOM=; fh=d0uiyMzj4pUbnvG25JeDgu3gWdvZboxndhRjU7qsVCo=; b=qqke+YrwXW8mCmiTo6WQrqH1Haq1/jsmsN3CIYMt1iKR/fV3pQM8uKpoGNQc8Hkmel t0llukWDg7/sgH/cG7XvBAhWLBv9XORHPmyd5iHiMuuB/HSCuAnNcykBEPzx4VRbWy0E gRRaogLDp4fV10awWG5dADRUaWQNPPx0IZVu2VHo+J5M4Gn2MnqeS9UPFz5grR1XN6KB 9WMEf1JsEnrF9dCTVWYMdOrn7gIR09GiDeId7fwdBfyDvI9HkGAzPnDeabmkBywQ/cnI iobuEmJaBUixbtMlNjQ8xGsqoReb66x/j2nxCzV0RrKH3sV+9L+SVAj4VmLWdjj8kRaK FPjg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jdQBZRnO; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n7-20020ac85a07000000b004315e736b20si5260822qta.541.2024.03.27.02.53.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2024 02:53:06 -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=jdQBZRnO; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpPxf-00050v-0o; Wed, 27 Mar 2024 05:52: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 1rpPxd-0004xN-C5 for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:52:45 -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 1rpPxa-0006rK-C9 for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:52:45 -0400 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a466a27d30aso799594766b.1 for ; Wed, 27 Mar 2024 02:52:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711533161; x=1712137961; 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=TS+v/eLxATnG0O4x0k9d/m89qYtDW6sLXZHCB+9mUOM=; b=jdQBZRnOkpJ8/r4tBy+y31qMhhw/Qd8zOrxk5Dl7CvjavlM5srxochgjV1prS8gLKP t3mCsoYKyOqf/ieytxrA7jwoJ2gayui9zIqukuxOspf4s4bIqyNPUKPqu8n3+NSOhrQ6 /VwVttCMA4QcSRx08WlqJ+ogTqR9O8dyI1a0xBP6+k0bkKENSmJUshDEs99TzjEXhuQb 4q/szYbSA3XcJyQYMyPXHueRv5cRsHx40k7WbKyKGfhpuwFfUkW1WhUdfOvpl4zcSIph NScH8h9D4HAuD/l/brM554D6VyLA0k9og/kLiGoIqJWEvGWlLSwUIOKttp77/Cz+VlBY 4LXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711533161; x=1712137961; 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=TS+v/eLxATnG0O4x0k9d/m89qYtDW6sLXZHCB+9mUOM=; b=FIf2yiO72OoJrJIczyS6i7EttftD5UEotp/kldiQ0Cr00m4TBQVrQgAZkMao9sQZmL lhM7cSpoojl0qjvKZ3zvIG4MWt4h+HWXEFYn+pEsI7A70Qs6rr63H2TV5Ki2ZnTqorMR xyr0k8En5kxLGhxmllrKdrQE8aMNLxZztEAvYCa+hWzFI/Eas1RvZubOa+KLBEuRva7O Zq8mC5NfzI6ecf8sdg4+r5wkJSMPfkVZUhI7uE9tWVN7ZoG0rNFzFLDDQRb0CO5mbrwR UqF9rTHW+Cdn0ReUqn3Kdpc5H+5Sn10aTR4erZn8wg9kn5mBoDWmPKWMANaun/KLDK0y etCw== X-Forwarded-Encrypted: i=1; AJvYcCVlR/Qn2lNJINpXZCDCdNdhdR+z7FTJsKRWsbvvuF35//Bxtm8zdDYNcYonwNzq7w00mbJ1waw98aSh2VQKi7b7XP9MfWY= X-Gm-Message-State: AOJu0YxVWl2eIBTQz5SN0JO3iFrxbQxxDdZBaBxQlu/kjKz3s13ErsEo OM1QQx3xVdwIj1CURhYEUP77YPXOuwNhFFoOxlQU6l9SbvUGIrPUWIR058Cp0Js= X-Received: by 2002:a17:907:9805:b0:a4e:c5b:4b08 with SMTP id ji5-20020a170907980500b00a4e0c5b4b08mr161880ejc.11.1711533160796; Wed, 27 Mar 2024 02:52:40 -0700 (PDT) Received: from m1x-phil.lan ([176.187.205.175]) by smtp.gmail.com with ESMTPSA id z3-20020a170906668300b00a4750a4a1f7sm4032454ejo.6.2024.03.27.02.52.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 27 Mar 2024 02:52:40 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Thomas Huth , qemu-devel@nongnu.org, Igor Mammedov Cc: Paolo Bonzini , devel@lists.libvirt.org, Zhao Liu , Gerd Hoffmann , "Michael S. Tsirkin" , Ani Sinha , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Eduardo Habkost , Marcel Apfelbaum , Cleber Rosa , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PATCH-for-9.1 v2 12/21] hw/i386/pc: Remove PCMachineClass::enforce_aligned_dimm Date: Wed, 27 Mar 2024 10:51:14 +0100 Message-ID: <20240327095124.73639-13-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240327095124.73639-1-philmd@linaro.org> References: <20240327095124.73639-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 PCMachineClass::enforce_aligned_dimm was only used by the pc-i440fx-2.1 machine, which got removed. It is now always true. Remove it, simplifying pc_get_device_memory_range(). Update the comment in Avocado test_phybits_low_pse36(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 14 +++----------- tests/avocado/mem-addr-space-check.py | 3 +-- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index c2d9af36b2..231aae92ed 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -74,8 +74,6 @@ typedef struct PCMachineState { * * Compat fields: * - * @enforce_aligned_dimm: check that DIMM's address/size is aligned by - * backend's alignment value if provided * @acpi_data_size: Size of the chunk of memory at the top of RAM * for the BIOS ACPI tables and other BIOS * datastructures. @@ -114,7 +112,6 @@ struct PCMachineClass { /* RAM / address space compat: */ bool gigabyte_align; bool has_reserved_memory; - bool enforce_aligned_dimm; bool broken_reserved_end; bool enforce_amd_1tb_hole; diff --git a/hw/i386/pc.c b/hw/i386/pc.c index f9650a2821..adbc43ab90 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -716,7 +716,6 @@ static void pc_get_device_memory_range(PCMachineState *pcms, hwaddr *base, ram_addr_t *device_mem_size) { - PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms); MachineState *machine = MACHINE(pcms); ram_addr_t size; hwaddr addr; @@ -724,10 +723,8 @@ static void pc_get_device_memory_range(PCMachineState *pcms, size = machine->maxram_size - machine->ram_size; addr = ROUND_UP(pc_above_4g_end(pcms), 1 * GiB); - if (pcmc->enforce_aligned_dimm) { - /* size device region assuming 1G page max alignment per slot */ - size += (1 * GiB) * machine->ram_slots; - } + /* size device region assuming 1G page max alignment per slot */ + size += (1 * GiB) * machine->ram_slots; *base = addr; *device_mem_size = size; @@ -1285,12 +1282,9 @@ void pc_i8259_create(ISABus *isa_bus, qemu_irq *i8259_irqs) static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp) { - const PCMachineState *pcms = PC_MACHINE(hotplug_dev); const X86MachineState *x86ms = X86_MACHINE(hotplug_dev); - const PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms); const MachineState *ms = MACHINE(hotplug_dev); const bool is_nvdimm = object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM); - const uint64_t legacy_align = TARGET_PAGE_SIZE; Error *local_err = NULL; /* @@ -1315,8 +1309,7 @@ static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, return; } - pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), - pcmc->enforce_aligned_dimm ? NULL : &legacy_align, errp); + pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), NULL, errp); } static void pc_memory_plug(HotplugHandler *hotplug_dev, @@ -1778,7 +1771,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->smbios_defaults = true; pcmc->gigabyte_align = true; pcmc->has_reserved_memory = true; - pcmc->enforce_aligned_dimm = true; pcmc->enforce_amd_1tb_hole = true; /* BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K reported * to be used at the moment, 32K should be enough for a while. */ diff --git a/tests/avocado/mem-addr-space-check.py b/tests/avocado/mem-addr-space-check.py index af019969c0..ad75170d52 100644 --- a/tests/avocado/mem-addr-space-check.py +++ b/tests/avocado/mem-addr-space-check.py @@ -31,8 +31,7 @@ def test_phybits_low_pse36(self): at 4 GiB boundary when "above_4g_mem_size" is 0 (this would be true when we have 0.5 GiB of VM memory, see pc_q35_init()). This means total hotpluggable memory size is 60 GiB. Per slot, we reserve 1 GiB of memory - for dimm alignment for all newer machines (see enforce_aligned_dimm - property for pc machines and pc_get_device_memory_range()). That leaves + for dimm alignment for all machines. That leaves total hotpluggable actual memory size of 59 GiB. If the VM is started with 0.5 GiB of memory, maxmem should be set to a maximum value of 59.5 GiB to ensure that the processor can address all memory directly. From patchwork Wed Mar 27 09:51:15 2024 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: 783106 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2107303wrt; Wed, 27 Mar 2024 02:53:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUxfbjqU6OO4AcuqlBWaJ+cmINExBAGUlhvcRqJSoax2ZP6C//5+RL+BwkIuQ6yRabVejzH1kuJrIZcZ9EYp4NP X-Google-Smtp-Source: AGHT+IH7h1cbH0PQMShU+grnxHOoZDnLWg4Ngy5ffh0MISgHHQNkOen7h11/hRddSg28MpYmf35X X-Received: by 2002:a05:622a:299b:b0:431:828e:6e1c with SMTP id hd27-20020a05622a299b00b00431828e6e1cmr340660qtb.32.1711533197790; Wed, 27 Mar 2024 02:53:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711533197; cv=none; d=google.com; s=arc-20160816; b=UvT3VbJkpMJ6LLtpWOuICaVDpzfM1rd8VviWc9muiaDr9xXkvO98iZvkEzFHV6+lc/ H+mrLJHoX8QRro7w2OMCnKEvRoENMJo7999sD9Wh92KCG2WKUFERES/rTGPyFBxlgiIx 7EV2jPZwYy+pcsKHwhfsP1KtBCDSPLMf7kFXYnvX/WtJpGlwT1Z2UJ9j06Pa8cSRn5bz DcUq/nx19s1hME5VO52d3jcXZXx9emIUKCS8x0AvSPDIEo5ZYdQCQFDiseCehSg2xiKQ TzOBd7mNlL27pskZYbppldWEtNl4wxb3c8qa2zS4e6FCaDDs77x7aHfBC8+YpqaPakIg 4VTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=7V80jUeGTGxhiiHyRsegHQtV9uanGmJ469Am8fhnxrM=; fh=Rqwtk/CTbtJ4Vf3eAHEC1905a9eyyxBkuvmzPrtGfr8=; b=IGsVi3z0zHTKrLiGJeGVWx7dTu8Mnybiq7+AI5/zzclq4bAOWpE+w9zK3umr7CN813 UEmCcXyEJTiGRNOjPnreE4gM2kjwaqhcl3KTAml098u8ORLihbdlPwc7pOQt7qJrlUJk u/r9L0CUw9yYfmVT7xUa2PE9/iyPuoApMs8j3Ei2uXG/PYqsHjjhM5lENrWpCVZDYTv/ IwYHQvxMnxFO7CpL1sBjemtbqhcmhRUyAqa6DWcSsVFh0hfdvwfc6ArY/KGzifuwcu2B z5wzuXfN+vEmfJuYDV/Kn8GEiqQoWSne/DK9gboTpnuSnM3IIps9fo/8M01kLPHcXmus B3lA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="M/lNm6pj"; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v30-20020a05622a189e00b0043180eca9f0si563997qtc.49.2024.03.27.02.53.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2024 02:53: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="M/lNm6pj"; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpPxl-0005XB-Tm; Wed, 27 Mar 2024 05:52:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpPxk-0005QE-7Z for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:52:52 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpPxh-0006ts-9O for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:52:51 -0400 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-56c404da0ebso417526a12.0 for ; Wed, 27 Mar 2024 02:52:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711533168; x=1712137968; 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=7V80jUeGTGxhiiHyRsegHQtV9uanGmJ469Am8fhnxrM=; b=M/lNm6pjB6oOE9TIOd6Wqdnd24XjYOL68l5e4mK5vTuVHwyvNiXGcfV01+xFc54c2b bJCS424XIyVNQXMQ+OfQ7ynhHcNRhkUWhrJt2uXLJymFDLc6NLAXpEEFGimljmw/u67E yUkfJLBdgKTWgLq5TCaZY0kdhde8cfpWTjrk36qZorQRiyUyDVyFmTXkX4mPS8F97Ljv 5yrIac7IBAe0Q8I9IaTkRaVBue+Ug6hFEcC6ulicwnejb3BDNWqa2EX/mN3oq7ngBuxT 8gBnlzdXZnYhSjK5OR0sFgYNFlyOPb/dLMf1b5uhN5tuyJ12asWDY/BilpRI75db2i0R YKXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711533168; x=1712137968; 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=7V80jUeGTGxhiiHyRsegHQtV9uanGmJ469Am8fhnxrM=; b=US3Qmey9bX0THg5UyDhP3r/qjwllOx+FVdwZERL3PjOrqZnVSU09JKFU5Sn4Rau7Bl L3lhNbfM5nkyJX21f9JiRNMS51shNscFEhRXzTKZztmQeCgBDaAu3LqyCKhW2LAL04c9 50Y8YrWnyREare7KOj1TYmSxz7cSfVXm5ehi3fNMuyjMoSt5R6OqTNcHdEbsA8xlWX/O JYtuESJuVe8b3SNZhrK1H8+0NJSdku2o3AxFLDJUpjT3r5gLiivcJ2XnUxZoDaNeS4+k mgsjpOQmr+JWW+SkyuatlHD3BNoH2CgeCLyfIRQOddMQluaenfkJPsJV5EP5jGXQG03s m/9g== X-Forwarded-Encrypted: i=1; AJvYcCW8cJ1Kdstro1EL9dIDVPBmzwE1PsRTBzHnZhGMtyUKjlzg6T1Chk/m2nRgmiSrp4h2KlZgRZVXo5DJo1DSb/QABhqZBU8= X-Gm-Message-State: AOJu0YzWim4UDBp+uJAzcOczk3K7yu6WWAFGdMUGxn/PpllNON4lu2hO ahMM+vClvhRNnLMiUhWVFpsOi4yYFKHmwbXs8VaGny41bnBfAgt1Udfu5X7KU3s= X-Received: by 2002:a17:906:b34c:b0:a4d:f56b:b310 with SMTP id cd12-20020a170906b34c00b00a4df56bb310mr2532375ejb.61.1711533167762; Wed, 27 Mar 2024 02:52:47 -0700 (PDT) Received: from m1x-phil.lan ([176.187.205.175]) by smtp.gmail.com with ESMTPSA id p9-20020a170906614900b00a46af5f023bsm5196099ejl.202.2024.03.27.02.52.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 27 Mar 2024 02:52:47 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Thomas Huth , qemu-devel@nongnu.org, Igor Mammedov Cc: Paolo Bonzini , devel@lists.libvirt.org, Zhao Liu , Gerd Hoffmann , "Michael S. Tsirkin" , Ani Sinha , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , Marcel Apfelbaum , Richard Henderson , Eduardo Habkost , Song Gao , David Hildenbrand , Xiao Guangrong , Nicholas Piggin , Daniel Henrique Barboza , David Gibson , Harsh Prateek Bora , qemu-arm@nongnu.org, qemu-ppc@nongnu.org Subject: [PATCH-for-9.1 v2 13/21] hw/mem/pc-dimm: Remove legacy_align argument from pc_dimm_pre_plug() Date: Wed, 27 Mar 2024 10:51:15 +0100 Message-ID: <20240327095124.73639-14-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240327095124.73639-1-philmd@linaro.org> References: <20240327095124.73639-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=philmd@linaro.org; helo=mail-ed1-x535.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 'legacy_align' is always NULL, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20240305134221.30924-11-philmd@linaro.org> Reviewed-by: Zhao Liu --- include/hw/mem/pc-dimm.h | 3 +-- hw/arm/virt.c | 2 +- hw/i386/pc.c | 2 +- hw/loongarch/virt.c | 2 +- hw/mem/pc-dimm.c | 6 ++---- hw/ppc/spapr.c | 2 +- 6 files changed, 7 insertions(+), 10 deletions(-) diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h index 322bebe555..fe0f3ea963 100644 --- a/include/hw/mem/pc-dimm.h +++ b/include/hw/mem/pc-dimm.h @@ -66,8 +66,7 @@ struct PCDIMMDeviceClass { void (*unrealize)(PCDIMMDevice *dimm); }; -void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, - const uint64_t *legacy_align, Error **errp); +void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, Error **errp); void pc_dimm_plug(PCDIMMDevice *dimm, MachineState *machine); void pc_dimm_unplug(PCDIMMDevice *dimm, MachineState *machine); #endif diff --git a/hw/arm/virt.c b/hw/arm/virt.c index a55ef916cb..7af05a6a2d 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2736,7 +2736,7 @@ static void virt_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, return; } - pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), NULL, errp); + pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), errp); } static void virt_memory_plug(HotplugHandler *hotplug_dev, diff --git a/hw/i386/pc.c b/hw/i386/pc.c index adbc43ab90..baa1b228a9 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1309,7 +1309,7 @@ static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, return; } - pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), NULL, errp); + pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), errp); } static void pc_memory_plug(HotplugHandler *hotplug_dev, diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index 00d3005e54..af71bd2a99 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -1025,7 +1025,7 @@ static bool memhp_type_supported(DeviceState *dev) static void virt_mem_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp) { - pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), NULL, errp); + pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), errp); } static void virt_machine_device_pre_plug(HotplugHandler *hotplug_dev, diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c index 37f1f4ccfd..836384a90f 100644 --- a/hw/mem/pc-dimm.c +++ b/hw/mem/pc-dimm.c @@ -44,8 +44,7 @@ static MemoryRegion *pc_dimm_get_memory_region(PCDIMMDevice *dimm, Error **errp) return host_memory_backend_get_memory(dimm->hostmem); } -void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, - const uint64_t *legacy_align, Error **errp) +void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, Error **errp) { Error *local_err = NULL; int slot; @@ -70,8 +69,7 @@ void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, &error_abort); trace_mhp_pc_dimm_assigned_slot(slot); - memory_device_pre_plug(MEMORY_DEVICE(dimm), machine, legacy_align, - errp); + memory_device_pre_plug(MEMORY_DEVICE(dimm), machine, NULL, errp); } void pc_dimm_plug(PCDIMMDevice *dimm, MachineState *machine) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index c417f9dd52..770b49456a 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3667,7 +3667,7 @@ static void spapr_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, return; } - pc_dimm_pre_plug(dimm, MACHINE(hotplug_dev), NULL, errp); + pc_dimm_pre_plug(dimm, MACHINE(hotplug_dev), errp); } struct SpaprDimmState { From patchwork Wed Mar 27 09:51:16 2024 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: 783118 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2108263wrt; Wed, 27 Mar 2024 02:56:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXrkVZfDe5H3YmPhhgNGCzFnErelb+Bj4REM32ESMoqWXOJdd+/8jhbQhVgj3YSHdOHwtsmSeGc+Q2QK2mBrTsF X-Google-Smtp-Source: AGHT+IEmPQ4FYqlg9zZB1sKegae/4w+YPwkSzc+IGF1QjsxsErgZBoPhnMj6Wm2ET0acDdE0N3F1 X-Received: by 2002:a05:620a:4389:b0:789:ea39:51e3 with SMTP id a9-20020a05620a438900b00789ea3951e3mr4440014qkp.18.1711533391812; Wed, 27 Mar 2024 02:56:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711533391; cv=none; d=google.com; s=arc-20160816; b=QRRP7Ku9xDPUxm23QLiofaF2sKk76Z5oMPo9Ek1oU+iCtPsTOVd9vAoT5zE6dyuoPb 9E8SWcfeNIuHqgXutGo/EZL+lsvBRhp6lE0LKyaoQhN9urHMJzCq2sG8+RZA3vqIglU2 L4Mvn/0OvVXA2/zj1+DGUxKh3i+SjVDcnjLFhe1IWv+TiAvBukhloKHVjdpbdUGWmLg6 rp+P+H4wZamP8V6bOyimETfC8WJlEuE7y4BLQB+JwMXCXwSkarNXIplcBPuyil1ZWLul V0wrBlWbtL64PG3HtnubYY8EOk2t1a/JmUvSEU9S1ZG4IhY8QzVr+pcqY/vvBh9hVW/W 2kTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=gPtQl8VQdcPIthcbUuo8ZeG6r8Vl6GIVI8lnD51wSpI=; fh=AInXy0aQEW+seEi0PXroErHJrc42kY5riVhcr+nhyKM=; b=KnUzaVNqdGPFKxB54FZFLEzF/Tu006bUTrg6tv20KxZaGr5pJs6MT3/iqGFelIkdA6 Ywty830LO2Vd8JdslMmZSMkQY7X7Jp71pdJWu3Hln5jXWjzY708esLKxlLj8ElKK9dYv KCoN5PCGuCTirEJrwE/3XqMSbfzjTjfWXU27F6OsxOvKS0kD5WthRmUzcaFkL1Gpdo3Q wdW7jiRirwfoK0if/MHyjXlSqDGO7QBBsyvcCTq9+l51lMhsNSSQxGGigJtIiLIz67tq hUfwEWzysT3aq+JAkKaPjN9nWu2NnpqhfPeXou/zvTUY7wC3GRjFWrnTmvgKRAskXz4x 8PJw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=axfc6iue; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id az31-20020a05620a171f00b0078a6fac853asi987191qkb.645.2024.03.27.02.56.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2024 02:56:31 -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=axfc6iue; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpPxr-0005lm-IB; Wed, 27 Mar 2024 05:52:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpPxp-0005hT-Cv for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:52:57 -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 1rpPxn-0006vo-OD for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:52:57 -0400 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-56b8e4f38a2so8325175a12.3 for ; Wed, 27 Mar 2024 02:52:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711533174; x=1712137974; 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=gPtQl8VQdcPIthcbUuo8ZeG6r8Vl6GIVI8lnD51wSpI=; b=axfc6iuezntewMLBzO6nHlUzvyuMoK/KXDe9ikcqcMhEpaSTBc8Gz2CbFx1jG5cdWU 6z+p96fkHZt+Dv+6k4ytGZeK5vM/ebTjawdV8v9oVyPKEP/fF/piNMfmXzvw6/9TFuUh mfdbEKb8FVvs6S5SWEHsD1/sBF5sgpujAFXJJhoPfeU06+ED5Bk1iKWFPr5YvSHAoHSh S4Aps3b8DkCaIwu9XYkIhf49kNWB6TLYNEB+8H2Iy6RggnQKvHD500V8wL3+OtW7zFMA 6DzLJIsMsuIYQax/K03ekLQkvcHtWVGlesd64zQNDIGttvRdLf7eSyD0peIbCGSH9sRi nWAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711533174; x=1712137974; 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=gPtQl8VQdcPIthcbUuo8ZeG6r8Vl6GIVI8lnD51wSpI=; b=SWLYpBOuExdasTZzyB0Vf7xoY0ScQ2ppdZIZ8N9XtAXpK4KelKW4A6/nAgdh1yGk9Z QdHzPlrGUVEM0C3FjCOT2wJ8HSjh3cAdSjq9yBeFV6QqceRvZKWkodRShdcWGrACTUh0 4EOJulzPePGb6hnKynOVo1IgKKutE4Whb7sVpvxT4UkiE8NQvBP31ALYm1CW/DHSH2Kr 4bZEtRmfNZcB0WKFI5F+XJWbfFQkPhyt934zr+SYBW8cY9misx5CAQlq0ij8oUcoB7XR HFim/Q5YL4GJ7MmGONfnN3WAL4aNuQo3HtLDL/QWoYKbmOapduvblN5Z2ws0J8HEROR7 /n9w== X-Forwarded-Encrypted: i=1; AJvYcCUiCZFV9vfVID3CGDqIUuLuH186p0FG6tS8Ad0RPQgqG7xDeyMo2DGsIixTLeE9dKNjth4U1WQXmCbWv3QTr17GpUwij1k= X-Gm-Message-State: AOJu0Yy/wO8wlcod8kScVzg8vMW+AP3U0oKdy7sPO3K7Yia2DqqSUZXi o2GogUYx/myUJd1DcYiJ9C4LkFwfqR3AeNxT5ZGCnUpoVRcIFPPQCw4ZAU3MYww= X-Received: by 2002:a50:8706:0:b0:56c:19d2:85b2 with SMTP id i6-20020a508706000000b0056c19d285b2mr2852259edb.35.1711533174342; Wed, 27 Mar 2024 02:52:54 -0700 (PDT) Received: from m1x-phil.lan ([176.187.205.175]) by smtp.gmail.com with ESMTPSA id r1-20020aa7cb81000000b0056c052f9fafsm4251852edt.53.2024.03.27.02.52.52 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 27 Mar 2024 02:52:53 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Thomas Huth , qemu-devel@nongnu.org, Igor Mammedov Cc: Paolo Bonzini , devel@lists.libvirt.org, Zhao Liu , Gerd Hoffmann , "Michael S. Tsirkin" , Ani Sinha , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Eduardo Habkost , Marcel Apfelbaum , David Hildenbrand , Xiao Guangrong Subject: [PATCH-for-9.1 v2 14/21] hw/mem/memory-device: Remove legacy_align from memory_device_pre_plug() Date: Wed, 27 Mar 2024 10:51:16 +0100 Message-ID: <20240327095124.73639-15-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240327095124.73639-1-philmd@linaro.org> References: <20240327095124.73639-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 'legacy_align' is always NULL, remove it, simplifying memory_device_pre_plug(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20240305134221.30924-12-philmd@linaro.org> Reviewed-by: Zhao Liu --- include/hw/mem/memory-device.h | 2 +- hw/i386/pc.c | 3 +-- hw/mem/memory-device.c | 12 ++++-------- hw/mem/pc-dimm.c | 2 +- hw/virtio/virtio-md-pci.c | 2 +- 5 files changed, 8 insertions(+), 13 deletions(-) diff --git a/include/hw/mem/memory-device.h b/include/hw/mem/memory-device.h index e0571c8a31..c0a58087cc 100644 --- a/include/hw/mem/memory-device.h +++ b/include/hw/mem/memory-device.h @@ -169,7 +169,7 @@ uint64_t get_plugged_memory_size(void); unsigned int memory_devices_get_reserved_memslots(void); bool memory_devices_memslot_auto_decision_active(void); void memory_device_pre_plug(MemoryDeviceState *md, MachineState *ms, - const uint64_t *legacy_align, Error **errp); + Error **errp); void memory_device_plug(MemoryDeviceState *md, MachineState *ms); void memory_device_unplug(MemoryDeviceState *md, MachineState *ms); uint64_t memory_device_get_region_size(const MemoryDeviceState *md, diff --git a/hw/i386/pc.c b/hw/i386/pc.c index baa1b228a9..44283d3165 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1377,8 +1377,7 @@ static void pc_hv_balloon_pre_plug(HotplugHandler *hotplug_dev, { /* The vmbus handler has no hotplug handler; we should never end up here. */ g_assert(!dev->hotplugged); - memory_device_pre_plug(MEMORY_DEVICE(dev), MACHINE(hotplug_dev), NULL, - errp); + memory_device_pre_plug(MEMORY_DEVICE(dev), MACHINE(hotplug_dev), errp); } static void pc_hv_balloon_plug(HotplugHandler *hotplug_dev, diff --git a/hw/mem/memory-device.c b/hw/mem/memory-device.c index e098585cda..a5f279adcc 100644 --- a/hw/mem/memory-device.c +++ b/hw/mem/memory-device.c @@ -345,7 +345,7 @@ uint64_t get_plugged_memory_size(void) } void memory_device_pre_plug(MemoryDeviceState *md, MachineState *ms, - const uint64_t *legacy_align, Error **errp) + Error **errp) { const MemoryDeviceClass *mdc = MEMORY_DEVICE_GET_CLASS(md); Error *local_err = NULL; @@ -388,14 +388,10 @@ void memory_device_pre_plug(MemoryDeviceState *md, MachineState *ms, return; } - if (legacy_align) { - align = *legacy_align; - } else { - if (mdc->get_min_alignment) { - align = mdc->get_min_alignment(md); - } - align = MAX(align, memory_region_get_alignment(mr)); + if (mdc->get_min_alignment) { + align = mdc->get_min_alignment(md); } + align = MAX(align, memory_region_get_alignment(mr)); addr = mdc->get_addr(md); addr = memory_device_get_free_addr(ms, !addr ? NULL : &addr, align, memory_region_size(mr), &local_err); diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c index 836384a90f..27919ca45d 100644 --- a/hw/mem/pc-dimm.c +++ b/hw/mem/pc-dimm.c @@ -69,7 +69,7 @@ void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, Error **errp) &error_abort); trace_mhp_pc_dimm_assigned_slot(slot); - memory_device_pre_plug(MEMORY_DEVICE(dimm), machine, NULL, errp); + memory_device_pre_plug(MEMORY_DEVICE(dimm), machine, errp); } void pc_dimm_plug(PCDIMMDevice *dimm, MachineState *machine) diff --git a/hw/virtio/virtio-md-pci.c b/hw/virtio/virtio-md-pci.c index 62bfb7920b..9ec5067662 100644 --- a/hw/virtio/virtio-md-pci.c +++ b/hw/virtio/virtio-md-pci.c @@ -37,7 +37,7 @@ void virtio_md_pci_pre_plug(VirtIOMDPCI *vmd, MachineState *ms, Error **errp) * First, see if we can plug this memory device at all. If that * succeeds, branch of to the actual hotplug handler. */ - memory_device_pre_plug(md, ms, NULL, &local_err); + memory_device_pre_plug(md, ms, &local_err); if (!local_err && bus_handler) { hotplug_handler_pre_plug(bus_handler, dev, &local_err); } From patchwork Wed Mar 27 09:51:17 2024 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: 783110 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2107524wrt; Wed, 27 Mar 2024 02:54:04 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW3e5p6uU6SKl1SlET0yh5fy98dzEzns3W9sWIROc6q9MdP/lQNSPeJk4TjozJcOQGqw7YW0OJ6mJDqZiBSLj9F X-Google-Smtp-Source: AGHT+IFUNy7BQ4/m2rlF/755UsIpThNWHexomiPDhvV+BfUzqDMNcvIkphy1l9KIADa4u1FGvkcQ X-Received: by 2002:a05:620a:214d:b0:78a:477d:c0b3 with SMTP id m13-20020a05620a214d00b0078a477dc0b3mr644662qkm.73.1711533244710; Wed, 27 Mar 2024 02:54:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711533244; cv=none; d=google.com; s=arc-20160816; b=z1jalnP82ISeaG7U7DgKqqj5b6DIeMMG4f+FwuRdoqzddh10ontJ6TVyyCY0yEacTV jBwdpnkBDzkZxeYhEFWtdmXFPWoGeuz3wTw863x32XP7BEwFBgfxwkX23Ps2yQT54yxR Xi+s3u5VJ5GrytoMa2AU79wnHbL6lXFyZJ5IZoS+grl4MX6Xn4hN/M+cL2C3CXrnK+dI yTTask1fHSheoPxxzw24w9Zso80BrOQB7XZ9ZGG40Dv3l5izbd5jo409Wk1YGHD9Ixil ppkovEOm6mLYZvygEAiJhyWxnUMp2lIPqPbp/6gLymBkIpj6Jcl8ivFR81i7bx/tbeBv xB5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=Bsu5+X1nq1AR85X+uWS/vN5iskKcor9PwSJpS3W8rtQ=; fh=NC4l1ZhyUK8iKqT60n7w7LUcfNk4hvDrx2E5yZwT08o=; b=voKzg9FP7cpLMGpm9q4ujrszGEHzr4Ni1bco/gbK1ASAVEoqr5BQHmiNhB3j2J1uIg Ij1/vZ+andPC986q0ZoTR1HdZVUpWXMlzcnwZrL5iA8v1NuDBP47h1Jul7AFGKAtTDsD MdiWmYejvDTV2+ibuEmB3aGIZvXXhrp1AcMPiWZNrmXvmFYyckbSNsWJH2OPHWSNzk7H vLlqUxtrerdBF89l8zw3vFyGntD3u9vDbMCfJWPVrB6Mw7j1OMgkESJkqskZy0pbGJEw JCjWpy9zCObrvj5fcvy9oANPvglczhIlY5maJvmUG4xKNtKjgh0q6eyCWn/NW6hhqewx DuTw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EBEaPAvF; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id pe18-20020a05620a851200b0078a00267a7esi9107039qkn.482.2024.03.27.02.54.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2024 02:54:04 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EBEaPAvF; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpPy9-0006Dh-0W; Wed, 27 Mar 2024 05:53:17 -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 1rpPxw-0005yV-H0 for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:53:05 -0400 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpPxu-0006wn-Of for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:53:04 -0400 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-515a86daf09so4808398e87.3 for ; Wed, 27 Mar 2024 02:53:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711533181; x=1712137981; 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=Bsu5+X1nq1AR85X+uWS/vN5iskKcor9PwSJpS3W8rtQ=; b=EBEaPAvFj1PG3jB/cImNbJ+kuBeH3Xo4IrBuWHPFXTk8fOYl7FNTPzZc/fIaZaRX6d 8eYO3Ee2zPgfPL6PPgGyArtbzHpQ+XrWjpeBB3vMiLgVZnfbXeHu619WKEh5l3WBvxBF cnlOjD2TtZUkLLNlH0+KQvhnLwhMJASqfV8RkTakBuaJCzDoQgidCZtb7jZM2PPkTIUV WmZk1rauBJL1qle1V7tqjqFAnI4R4aBzM3grUvuHHnP2SZO9+a5cFIgXy3EwZ8AuTJ0R c+9yIR9NGzL0+JYFQct1bOnkn8D5ML7D1MQly8XH9NsrnsWUad8C00FMglJR/y+3sSYu mhrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711533181; x=1712137981; 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=Bsu5+X1nq1AR85X+uWS/vN5iskKcor9PwSJpS3W8rtQ=; b=g51F1Si+KQbWFD1ci4nk7ZMx5InO5IiX7x1HySqoWWfheKydU8UoL4BPYVgGvjoz1m vZ21T9G+aQIUZqf+U0oAxL5A/FCGaOBAhrwbW4dYF0Tivc2ENsY2VmFf0l/KKU9yZEz3 4ollUsFheIHTllSKAAHpm4RqBvD/MXFFtHoxGbOCWiQMD4LtwXN7LrxcY5xg1esnL83u dSXY4bjbyVzDKAnRuHxRgkoZStYImLxZ+8sHufKQd+QfZezrkSGy78jlK6hNRy0LIAaB Tzn89Hoyx/NMxol1hCjJ1WLzI1/rDWVDgNweE63eguqCKjyMbzNWNv27utfsPIBZcUEl FhTA== X-Forwarded-Encrypted: i=1; AJvYcCXYd8NmaBhO/ut2sI23kfArmr1k0PvZgDPgQvpyoLoSG3Rn12Mn0Gvq4OyNSyhzqUk1iAMHp6txXZFL1CgvBoARAsY+KGo= X-Gm-Message-State: AOJu0YwxqliUo/EahdCfSiwT6SR7E/zWzjcqU/GwfkeTLK32DahI62ZB abVrsH811vS4nzhKIxD8pAZECFOqaIeaui2XesbfSnqnu+VrRdjsy7Ita2SoDic= X-Received: by 2002:ac2:5e2d:0:b0:515:b83f:372e with SMTP id o13-20020ac25e2d000000b00515b83f372emr509331lfg.21.1711533180914; Wed, 27 Mar 2024 02:53:00 -0700 (PDT) Received: from m1x-phil.lan ([176.187.205.175]) by smtp.gmail.com with ESMTPSA id x1-20020a056402414100b0056c4372c161sm42904eda.55.2024.03.27.02.52.58 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 27 Mar 2024 02:53:00 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Thomas Huth , qemu-devel@nongnu.org, Igor Mammedov Cc: Paolo Bonzini , devel@lists.libvirt.org, Zhao Liu , Gerd Hoffmann , "Michael S. Tsirkin" , Ani Sinha , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Eduardo Habkost , Marcel Apfelbaum Subject: [PATCH-for-9.1 v2 15/21] hw/i386/pc: Remove deprecated pc-i440fx-2.2 machine Date: Wed, 27 Mar 2024 10:51:17 +0100 Message-ID: <20240327095124.73639-16-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240327095124.73639-1-philmd@linaro.org> References: <20240327095124.73639-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::130; envelope-from=philmd@linaro.org; helo=mail-lf1-x130.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-i440fx-2.2 machine was deprecated for the 8.2 release (see commit c7437f0ddb "docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated"), time to remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20240305134221.30924-13-philmd@linaro.org> Reviewed-by: Zhao Liu --- docs/about/deprecated.rst | 6 +++--- docs/about/removed-features.rst | 2 +- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 23 ----------------------- hw/i386/pc_piix.c | 21 --------------------- 5 files changed, 4 insertions(+), 51 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index deadcc044f..f6eac988c0 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -219,10 +219,10 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name better reflects the way this property affects all random data within the device tree blob, not just the ``kaslr-seed`` node. -``pc-i440fx-2.2`` up to ``pc-i440fx-2.3`` (since 8.2) -''''''''''''''''''''''''''''''''''''''''''''''''''''' +``pc-i440fx-2.3`` (since 8.2) +''''''''''''''''''''''''''''' -These old machine types are quite neglected nowadays and thus might have +This old machine type is quite neglected nowadays and thus might have various pitfalls with regards to live migration. Use a newer machine type instead. diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index 01c55103d3..4664974a8b 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -816,7 +816,7 @@ mips ``fulong2e`` machine alias (removed in 6.0) This machine has been renamed ``fuloong2e``. -``pc-0.10`` up to ``pc-i440fx-2.1`` (removed in 4.0 up to 9.0) +``pc-0.10`` up to ``pc-i440fx-2.2`` (removed in 4.0 up to 9.0) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These machine types were very old and likely could not be used for live diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 231aae92ed..df97df6ca7 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -274,9 +274,6 @@ extern const size_t pc_compat_2_4_len; extern GlobalProperty pc_compat_2_3[]; extern const size_t pc_compat_2_3_len; -extern GlobalProperty pc_compat_2_2[]; -extern const size_t pc_compat_2_2_len; - #define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \ static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \ { \ diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 44283d3165..c37d813af0 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -281,29 +281,6 @@ GlobalProperty pc_compat_2_3[] = { }; const size_t pc_compat_2_3_len = G_N_ELEMENTS(pc_compat_2_3); -GlobalProperty pc_compat_2_2[] = { - PC_CPU_MODEL_IDS("2.2.0") - { "kvm64" "-" TYPE_X86_CPU, "vme", "off" }, - { "kvm32" "-" TYPE_X86_CPU, "vme", "off" }, - { "Conroe" "-" TYPE_X86_CPU, "vme", "off" }, - { "Penryn" "-" TYPE_X86_CPU, "vme", "off" }, - { "Nehalem" "-" TYPE_X86_CPU, "vme", "off" }, - { "Westmere" "-" TYPE_X86_CPU, "vme", "off" }, - { "SandyBridge" "-" TYPE_X86_CPU, "vme", "off" }, - { "Haswell" "-" TYPE_X86_CPU, "vme", "off" }, - { "Broadwell" "-" TYPE_X86_CPU, "vme", "off" }, - { "Opteron_G1" "-" TYPE_X86_CPU, "vme", "off" }, - { "Opteron_G2" "-" TYPE_X86_CPU, "vme", "off" }, - { "Opteron_G3" "-" TYPE_X86_CPU, "vme", "off" }, - { "Opteron_G4" "-" TYPE_X86_CPU, "vme", "off" }, - { "Opteron_G5" "-" TYPE_X86_CPU, "vme", "off" }, - { "Haswell" "-" TYPE_X86_CPU, "f16c", "off" }, - { "Haswell" "-" TYPE_X86_CPU, "rdrand", "off" }, - { "Broadwell" "-" TYPE_X86_CPU, "f16c", "off" }, - { "Broadwell" "-" TYPE_X86_CPU, "rdrand", "off" }, -}; -const size_t pc_compat_2_2_len = G_N_ELEMENTS(pc_compat_2_2); - GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled) { GSIState *s; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 02f3bce4f3..9615e25d56 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -429,11 +429,6 @@ static void pc_compat_2_3_fn(MachineState *machine) } } -static void pc_compat_2_2_fn(MachineState *machine) -{ - pc_compat_2_3_fn(machine); -} - #ifdef CONFIG_ISAPC static void pc_init_isa(MachineState *machine) { @@ -828,22 +823,6 @@ static void pc_i440fx_2_3_machine_options(MachineClass *m) DEFINE_I440FX_MACHINE(v2_3, "pc-i440fx-2.3", pc_compat_2_3_fn, pc_i440fx_2_3_machine_options); -static void pc_i440fx_2_2_machine_options(MachineClass *m) -{ - PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - - pc_i440fx_2_3_machine_options(m); - m->hw_version = "2.2.0"; - m->default_machine_opts = "firmware=bios-256k.bin,suppress-vmdesc=on"; - compat_props_add(m->compat_props, hw_compat_2_2, hw_compat_2_2_len); - compat_props_add(m->compat_props, pc_compat_2_2, pc_compat_2_2_len); - pcmc->rsdp_in_ram = false; - pcmc->resizable_acpi_blob = false; -} - -DEFINE_I440FX_MACHINE(v2_2, "pc-i440fx-2.2", pc_compat_2_2_fn, - pc_i440fx_2_2_machine_options); - #ifdef CONFIG_ISAPC static void isapc_machine_options(MachineClass *m) { From patchwork Wed Mar 27 09:51:18 2024 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: 783114 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2108017wrt; Wed, 27 Mar 2024 02:55:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUFD5RCSLI1u+NQxYg0o23O6O9OyugzK6+BYOT7zkTqFNhr6Oy+dJKZhJNdLyM8i9WzsSnkdh3O4TNN/pXsy7XG X-Google-Smtp-Source: AGHT+IGfdyMvyIwIi2nfUZZOIML7MxF1UW9odTq3zcx9OguFqu8YEGYAKLnT0c7wJYqek3miHQ5q X-Received: by 2002:a05:622a:47cf:b0:431:74f2:ca50 with SMTP id dp15-20020a05622a47cf00b0043174f2ca50mr3523675qtb.38.1711533342770; Wed, 27 Mar 2024 02:55:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711533342; cv=none; d=google.com; s=arc-20160816; b=V5CPJIH1OFkspORffHagxT3tqj8mAEQHMk7TDuHjhUiaug32V/RBLp2b2orbqQlrFV Ll8rJLhUR78k4iVVUNgJPX17qGuQu9B+MYHkpXp9AEWoTEMETQtLsI6Ys02xx/mnYegX zPRC3JHyNZUOoapnfyrkvIBm4JssTJoQ+wsDjPnb9J8og4VhcGp34GnY0eQqe5UBATXi OaJJeuPW8JTXsUrxoTzpQQmMnxk8acLdfGdqqNXMAkvQWv7nVX6UYkuwLNqvnleWCmVm XqbsBM2E3cWBwpoJP6+BlW34RgKqho3DnfNijIiW8E/8+nEZdVBaAX8IbYkciQL1dYvj S+rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=CpAaHP47+vZlL1G6hguNwYCAsqH5viF1BvNU/Hhh0/U=; fh=XMJoWcuzjtPEInZaUZ9FQA9u/pZbISjmu/ZrZ2dCvqQ=; b=Ccy2JbEvmT55s9Ndh6ncw0Svug5ShLCDpEgnCj0mZLcxltw/Zru+OA3kTtDyg8jnjZ 3b3akVHteTQIcwZwKRy2gFJw9LfZZCB49cIIwMIRNldFLg4TQiRVCEYUYcfOuYbABR/w m8l6MliWZ8gkPOoVzX5jQxjKzjl+RvmC7NR1RFuvkspQgVQt8WNUkI1+GHPojURYUpwv BzkxnSp0nGMDkkU91EOw8WY4JmKu06+w4LvbUAuw+dgq+kor7o02dyuIXl7AiXlraBuP D99bAbk1/aIP+g6+pDcq3E+RbBX4kkRRMlzLD7pZNtEt6RHaUk4FxyRENQBdnML4P6qv pQFg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qzsw+SCy; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q9-20020a05622a030900b004317c7eaec6si1472535qtw.602.2024.03.27.02.55.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2024 02:55:42 -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=Qzsw+SCy; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpPy9-0006J2-HQ; Wed, 27 Mar 2024 05:53:17 -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 1rpPy2-00063S-UA for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:53:11 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpPy1-0006xV-3i for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:53:10 -0400 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-56c0bd07e7bso3647581a12.1 for ; Wed, 27 Mar 2024 02:53:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711533187; x=1712137987; 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=CpAaHP47+vZlL1G6hguNwYCAsqH5viF1BvNU/Hhh0/U=; b=Qzsw+SCyqgpGgt/UDJfNJ+oqgmAHnfK8ff0U8X37E/Bw6JpgZv9FSA7JC583pB91SD lH3AruD4keXlPsspd1S0DZP0pufrdCUyl5lKX6myMoAN+DffMr6tjuagR+scGGUOpXXz kT2dommPPqJCFcjBaCN7GEvHh4iwcxsRB/XU9K/8pTO+DZy51JKs8mapALzU5h/r4isg 7oteI4SZ5Fg4fnFbAGZSHq9ltiJOTb73Ckc0CVsRDz3C96HneIfjPKk/52XeFWCKPI0t 1zrQwakR+1mGLimdu15fDiF9+SOzHnvIvkyEtDR/c0Kx9Bjp2CVd687xKZtI+2jj1x7Q aZkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711533187; x=1712137987; 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=CpAaHP47+vZlL1G6hguNwYCAsqH5viF1BvNU/Hhh0/U=; b=cOrDw+UQjWHtkLgMhksEkhp6Lpcm/+6no6a1sble16bdeu3bcROdK7xUqlWO/3nyjl M9JleHxBgndF9AhwJbR64QySqJdtj+HV+W893Lv+zL7O6MIcj+vKMC9D1eDZkUXskMqh 1wU2hcfbcCgknKYJHnpoU/HSGmMNKdmymg6WHT2gNx3ImCiuWJ1uVY0qMOL/by5F08Q9 6ZRtFXrVEtIMpgApmhrJIQiXvtyIvj4nPrJ3C7goebKP2N3cfkty2C4hT2jscDITN6x/ QGP/y2x/WbM0hqSxLCrvuutEL/1vv9DtHw4ehtP4UvyXb4oJ3Uh3LsYyi+uO5+a5qjE7 ptSA== X-Forwarded-Encrypted: i=1; AJvYcCV8op2FuOnp6VknpscASAJnWo8sOLjcbd/55u2UU2pu9CMtUPEr7zYCq1MrRpUP42SOenHv+AKncHueGCO/Am7fF0qsVXQ= X-Gm-Message-State: AOJu0YySQ3B0H7Uo/jOe7pmdCTmcX0A8o/A6ETk93AxmXgsP+GXK3vlC pEHcsJYR/B2H4X/13xt48HGS6gaAEE98wPNHOrMNzqBIQEBbESo8tcPS8EhiAeA= X-Received: by 2002:a50:9f0f:0:b0:568:ac09:4a5c with SMTP id b15-20020a509f0f000000b00568ac094a5cmr1614638edf.11.1711533187136; Wed, 27 Mar 2024 02:53:07 -0700 (PDT) Received: from m1x-phil.lan ([176.187.205.175]) by smtp.gmail.com with ESMTPSA id o26-20020aa7c7da000000b0056bf34d656dsm5109579eds.29.2024.03.27.02.53.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 27 Mar 2024 02:53:06 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Thomas Huth , qemu-devel@nongnu.org, Igor Mammedov Cc: Paolo Bonzini , devel@lists.libvirt.org, Zhao Liu , Gerd Hoffmann , "Michael S. Tsirkin" , Ani Sinha , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Eduardo Habkost , Marcel Apfelbaum Subject: [PATCH-for-9.1 v2 16/21] hw/i386/pc: Remove PCMachineClass::resizable_acpi_blob Date: Wed, 27 Mar 2024 10:51:18 +0100 Message-ID: <20240327095124.73639-17-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240327095124.73639-1-philmd@linaro.org> References: <20240327095124.73639-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=philmd@linaro.org; helo=mail-ed1-x536.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 PCMachineClass::resizable_acpi_blob was only used by the pc-i440fx-2.2 machine, which got removed. It is now always true. Remove it, simplifying acpi_build(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- include/hw/i386/pc.h | 3 --- hw/i386/acpi-build.c | 10 ---------- hw/i386/pc.c | 1 - 3 files changed, 14 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index df97df6ca7..10a8ffa0de 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -124,9 +124,6 @@ struct PCMachineClass { /* create kvmclock device even when KVM PV features are not exposed */ bool kvmclock_create_always; - /* resizable acpi blob compat */ - bool resizable_acpi_blob; - /* * whether the machine type implements broken 32-bit address space bound * check for memory. diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index a6f8203460..ab2d4d8dcb 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2688,16 +2688,6 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) * keep the table size stable for all (max_cpus, max_memory_slots) * combinations. */ - /* Make sure we have a buffer in case we need to resize the tables. */ - if ((tables_blob->len > ACPI_BUILD_TABLE_SIZE / 2) && - !pcmc->resizable_acpi_blob) { - /* As of QEMU 2.1, this fires with 160 VCPUs and 255 memory slots. */ - warn_report("ACPI table size %u exceeds %d bytes," - " migration may not work", - tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2); - error_printf("Try removing CPUs, NUMA nodes, memory slots" - " or PCI bridges.\n"); - } acpi_align_size(tables_blob, ACPI_BUILD_TABLE_SIZE); acpi_align_size(tables->linker->cmd_blob, ACPI_BUILD_ALIGN_SIZE); diff --git a/hw/i386/pc.c b/hw/i386/pc.c index c37d813af0..ae2d220269 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1753,7 +1753,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->acpi_data_size = 0x20000 + 0x8000; pcmc->pvh_enabled = true; pcmc->kvmclock_create_always = true; - pcmc->resizable_acpi_blob = true; x86mc->apic_xrupt_override = true; assert(!mc->get_hotplug_handler); mc->get_hotplug_handler = pc_get_hotplug_handler; From patchwork Wed Mar 27 09:51:19 2024 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: 783119 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2108273wrt; Wed, 27 Mar 2024 02:56:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXBQo4y117ReKbhcsubREYwL5Lrgu38uiOW1w/RA3JQMkDflwYru/ZIYk1iNyRUROapRRk0jAA0nWknksjS/Nh1 X-Google-Smtp-Source: AGHT+IEG10JwAm43aFTswgdrrVotkZfOUnxzpCvtrBstEWPwx28IeuXAIANkZH8cC/Zl1smHVSNi X-Received: by 2002:a67:bd18:0:b0:474:d253:e22a with SMTP id y24-20020a67bd18000000b00474d253e22amr542852vsq.17.1711533393627; Wed, 27 Mar 2024 02:56:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711533393; cv=none; d=google.com; s=arc-20160816; b=At4wVzuBoCSOECCk83H8W6/I7Iji0KtI+7tpg0r6VdAiPBw41+wecGM8PF3U/O31rZ 1zI82fZHO3ZG3e+0TbjKgvaA+bSO7ZJxJneCHxmAF5SAinvyWsjuMdeWaFW/JldjjZ4G GX9vFMmgeJDFgbDucbBW+sm4B0CqfFtWYFdbhBoi6XSjiylv8BlaNox26MQoyOzZboNG cczTRI4u9bzdHePATdld41WrGOY1bU7D9QJNqhKHcEuo7fcii/ZcwIbJPRdbIDrdY9vV a5uJiAQXaPKixwk4Ok5GBJhJE+J53xp2ZXR9X3BGPfkvhF1vBHE3/Uvo8VdkeNCMewa4 kdGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=a9YyCBxYzMkp1yNP+M5yr8Vyps4aSvadseHcyYHmLOk=; fh=5LSfKs6tcq/4bEwKDri+gRlqMNuZ+BfHiyRqOOf/NhQ=; b=CwuQLdyvgiAyLi9PGdzJ4kxCxcUwroqmi3o13Z7F/DamqquHEd4xPtM9HLZed/VMgg hxQ5aspGvMdl0DfnW7NhgsnxLHJZQE7DqH3h2HHlUSef7JUqLLtyO+FttbMJ3yRwwKmI A5XEUKf4R2z39hvmEwGpQXaln/6ydbOzSNSypCt19FEJKWjeVvtaIHs6BT/+nLU4tYkm 1a4kBjOzRDvQkjUZdDJ3++U1xoLWRwwX0uovqkpL4lp7oCFwH9jXe88zVvnoRRyMEMAV hMb7/rPkL/Z1t3oaUHFtitGjUQz6FOOtyXasxKG7FFbnOS9J0ZSYkRnARThxkG8fFqBk sfaw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WNGsAH5g; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z22-20020a05620a261600b0078a52f0d116si8133339qko.148.2024.03.27.02.56.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2024 02:56:33 -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=WNGsAH5g; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpPyB-0006Z4-5b; Wed, 27 Mar 2024 05:53:19 -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 1rpPy8-0006GA-HU for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:53:17 -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 1rpPy6-0006zA-QS for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:53:16 -0400 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a466fc8fcccso829662566b.1 for ; Wed, 27 Mar 2024 02:53:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711533193; x=1712137993; 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=a9YyCBxYzMkp1yNP+M5yr8Vyps4aSvadseHcyYHmLOk=; b=WNGsAH5gAgOSJ3fdKIA3PMmaUybln0NxS7/xabJ63WwF2+NWhmTe4X0YEoEBbroZy3 C7jWXy6Bj8Re7DRbTZeY/ugY25Yw8u0eLVCEDgcvMd0LORKTYFeH6/7xeDHurrfRgsFT dWPqVAIOYVOMS8rRaeGuy3k+oAsuzYgqmKR2ymfldIzS2xiKzizDrEXX9UV9q0yU+IlB Wr5tTOTpYhhdnszE2A11eE6A9gCRWHMecwFYWEtN10M+VOfQeawi3p78j9HPlHXP9csN jnm4yhQA8M5oB5dcg8AnkLP9hnzet+CMJZOyFOFN3/VeV4eNcsStKFeRgRoSKyQASSlv RDVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711533193; x=1712137993; 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=a9YyCBxYzMkp1yNP+M5yr8Vyps4aSvadseHcyYHmLOk=; b=oAnjSFOrBSyi0fD4ugxat55IusJzzw5Oq3+sL0nYYNp5gG5p2lQrQt1HmSZvWOxKCY GZGvW0Qx+B2rQjeui4MrnxkETuclT5t4001qb+5GMxKpK9SnHjiRHgOXh+og+cRs4WS0 nhsYfF13rKGGkSECtF8RsSguhHoDJX+pYr2M816Vv+83RN768xaLOQ71hQlug7hkIu6l v3q77EEFruO/u+rcCtXNAmvITVlbptHOENsJsOGNJMLJEQByGhBlzHTQBSGrNBwfuZuT RYXL7d6ihseqyjN74LuwW7LNq77ACRkB+Kmddsq9j6iqoTZjge9zeavY2mNLTbAaqIyV ibog== X-Forwarded-Encrypted: i=1; AJvYcCV6g88/ekUU1uiyoCgycibLTLh97DufD+pfuAZKNYjMKueu/pHUiLtlXg/MUUcJgfSKIx3MBZEPLuwVTWD/LATZiD1ZZZY= X-Gm-Message-State: AOJu0YwRPh/xwzHGLdKx5JWnOb/diHZ/hMRma6xNVftf8+r6OJP76kQV TKpeRP2K5npSrkem/rB8m98QBe88J9IKq/WoGzMAdyYcGnvKHb9CUJudVsbjFRM= X-Received: by 2002:a17:907:985b:b0:a47:5265:9aac with SMTP id jj27-20020a170907985b00b00a4752659aacmr2631308ejc.55.1711533193384; Wed, 27 Mar 2024 02:53:13 -0700 (PDT) Received: from m1x-phil.lan ([176.187.205.175]) by smtp.gmail.com with ESMTPSA id jw24-20020a170906e95800b00a49856ae93asm3461551ejb.198.2024.03.27.02.53.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 27 Mar 2024 02:53:12 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Thomas Huth , qemu-devel@nongnu.org, Igor Mammedov Cc: Paolo Bonzini , devel@lists.libvirt.org, Zhao Liu , Gerd Hoffmann , "Michael S. Tsirkin" , Ani Sinha , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Eduardo Habkost , Marcel Apfelbaum Subject: [PATCH-for-9.1 v2 17/21] hw/i386/pc: Remove PCMachineClass::rsdp_in_ram Date: Wed, 27 Mar 2024 10:51:19 +0100 Message-ID: <20240327095124.73639-18-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240327095124.73639-1-philmd@linaro.org> References: <20240327095124.73639-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 PCMachineClass::rsdp_in_ram was only used by the pc-i440fx-2.2 machine, which got removed. It is now always true. Remove it, simplifying acpi_setup(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20240305134221.30924-15-philmd@linaro.org> Reviewed-by: Zhao Liu --- include/hw/i386/pc.h | 1 - hw/i386/acpi-build.c | 35 ++++------------------------------- hw/i386/pc.c | 1 - 3 files changed, 4 insertions(+), 33 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 10a8ffa0de..96ccb4583f 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -100,7 +100,6 @@ struct PCMachineClass { /* ACPI compat: */ bool has_acpi_build; - bool rsdp_in_ram; unsigned acpi_data_size; int pci_root_uid; diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index ab2d4d8dcb..ed0adb0e82 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2495,7 +2495,6 @@ static void acpi_build(AcpiBuildTables *tables, MachineState *machine) { PCMachineState *pcms = PC_MACHINE(machine); - PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms); X86MachineState *x86ms = X86_MACHINE(machine); DeviceState *iommu = pcms->iommu; GArray *table_offsets; @@ -2667,16 +2666,6 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) .rsdt_tbl_offset = &rsdt, }; build_rsdp(tables->rsdp, tables->linker, &rsdp_data); - if (!pcmc->rsdp_in_ram) { - /* We used to allocate some extra space for RSDP revision 2 but - * only used the RSDP revision 0 space. The extra bytes were - * zeroed out and not used. - * Here we continue wasting those extra 16 bytes to make sure we - * don't break migration for machine types 2.2 and older due to - * RSDP blob size mismatch. - */ - build_append_int_noprefix(tables->rsdp, 0, 16); - } } /* We'll expose it all to Guest so we want to reduce @@ -2755,7 +2744,6 @@ static const VMStateDescription vmstate_acpi_build = { void acpi_setup(void) { PCMachineState *pcms = PC_MACHINE(qdev_get_machine()); - PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms); X86MachineState *x86ms = X86_MACHINE(pcms); AcpiBuildTables tables; AcpiBuildState *build_state; @@ -2817,25 +2805,10 @@ void acpi_setup(void) tables.vmgenid); } - if (!pcmc->rsdp_in_ram) { - /* - * Keep for compatibility with old machine types. - * Though RSDP is small, its contents isn't immutable, so - * we'll update it along with the rest of tables on guest access. - */ - uint32_t rsdp_size = acpi_data_len(tables.rsdp); - - build_state->rsdp = g_memdup(tables.rsdp->data, rsdp_size); - fw_cfg_add_file_callback(x86ms->fw_cfg, ACPI_BUILD_RSDP_FILE, - acpi_build_update, NULL, build_state, - build_state->rsdp, rsdp_size, true); - build_state->rsdp_mr = NULL; - } else { - build_state->rsdp = NULL; - build_state->rsdp_mr = acpi_add_rom_blob(acpi_build_update, - build_state, tables.rsdp, - ACPI_BUILD_RSDP_FILE); - } + build_state->rsdp = NULL; + build_state->rsdp_mr = acpi_add_rom_blob(acpi_build_update, + build_state, tables.rsdp, + ACPI_BUILD_RSDP_FILE); qemu_register_reset(acpi_build_reset, build_state); acpi_build_reset(build_state); diff --git a/hw/i386/pc.c b/hw/i386/pc.c index ae2d220269..5fd83010ba 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1743,7 +1743,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->pci_enabled = true; pcmc->has_acpi_build = true; - pcmc->rsdp_in_ram = true; pcmc->smbios_defaults = true; pcmc->gigabyte_align = true; pcmc->has_reserved_memory = true; From patchwork Wed Mar 27 09:51:20 2024 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: 783109 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2107441wrt; Wed, 27 Mar 2024 02:53:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWTjxMmGkEeq4zmY1XBDWzlDEONpIRQSeuxzS/wN61WoeIM5A67wm5tYm09lu1QcjlL3Gid2fDbuYS5/pt+E5rP X-Google-Smtp-Source: AGHT+IEBG3gmYle7Nt8MdHg6p99RO3v175ySv2RaAjfPIeIsrcSu51OgA1er4QAE8HGl9VKLaiVZ X-Received: by 2002:a05:620a:4389:b0:789:f0df:ec2 with SMTP id a9-20020a05620a438900b00789f0df0ec2mr6732560qkp.11.1711533229621; Wed, 27 Mar 2024 02:53:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711533229; cv=none; d=google.com; s=arc-20160816; b=e0rFNm478K6GUmRSDizZy37VoMG2Ol9KA6YZx0j7qj3dRHDL1SShb8gYtvdIh3v9wR EkS96rBg1CJR3FAHAZMLsx5RSWWCs3ZzBcICUzhagThTyDYczRTYNxBdCRaQsMXa898w 553KWVraSgTuESXNfj5Pu0qFFYA+uUkloREB+cGRPa1WW8nN64oSMM99kYwo+xmgLDgh XWnfQeGdOcA983dV37Qvyx6XByjVlgI24edD4j0qOEapmYFNP/L8T0Ri0dDA8uMfeVpy 6/nJ9cVxvjP0jFZ185aRROcbWqe+465cAM9z2uaOcmzKk2M1RWHKCbO6tSmvGpQGLWzu AUXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=yXxR1JayEENwAneVfwOyENbtuFk+v6QHC/g5hLFE3LE=; fh=SLdVUW1XDbCOC/sdvkn68zi8eXj+OEUeyQgS+HwOZi8=; b=LqJSr1ZgJs8RcBVryyvtA5c12bWA16zYAC6AyZqXMS8Eq8GOOjZfVvNHLAPYA0cleA 3OfMX5ZYElYtoxpBQW/Dp+OW7fkSIe4OSd3W6cX2iIZlqjE7lLk7vy1gKkzKBYlSSQFY 1+SMvK/0vDq+uxFheDIdXFagdE/DzpJxjtfVNS8vURL9W3JqqtONcHuifm+IvjQGXeTC j2TtgQ+T64X3V9yYPkyKZRkMueFAlRMdQ17QDBU3pEVD9XYInoHrmmIXPYxnoLgkFeXE e41SfrJpKmJ4uFshn5v95WfS72AR/ZdKaFGwirfbLpQfeWuO+o0GOV9vpUZ9P2fcOal9 4r5Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eyZXeS3S; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y12-20020ae9f40c000000b0078a4d791dd4si8097351qkl.764.2024.03.27.02.53.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2024 02:53: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=eyZXeS3S; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpPyS-0007PQ-Hn; Wed, 27 Mar 2024 05:53:37 -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 1rpPyF-000793-Ac for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:53:23 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpPyC-00073d-Pj for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:53:22 -0400 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a46a7208eedso884865066b.0 for ; Wed, 27 Mar 2024 02:53:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711533199; x=1712137999; 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=yXxR1JayEENwAneVfwOyENbtuFk+v6QHC/g5hLFE3LE=; b=eyZXeS3SGv1nuljx414K5gzvED7pFbX8zFwTpLQGOzYRQXonGsC9bVqaJpLElBHx1T GP75dbPxTzTH4swgWGhzFHLNFgmjtZ3i1mF1oxMDNZkwxLvi/xG3lmMkUUhH7mF71wo6 AZkchue+hQnikF3qDnN8JhOgFWgqGzOqezBm+7OWPVLbolRN2HPMYPzlnx2Ox4X2x9VN T85nrQAX5Fe96TBHIYHQhwwF/fV8e6npkMxX8IBlG2j0JWwUDg1nOW/ooFuccynEJaWm SkPa6TymPnWOk07QBJPIFWdHcP76huoutofcUeTZsWhgeqfg4chOEVm7w+TX2TCnILTl VPnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711533199; x=1712137999; 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=yXxR1JayEENwAneVfwOyENbtuFk+v6QHC/g5hLFE3LE=; b=PCW7CV1BwnYx9N4yHdyg2XtzBdht8bmiymtCrwvkHNDTsz2mdT0TUhcrb4Y5T4omgL jW+YVZS4Ti56AkKPH7RUuxxT9RczG6QN0CVDttOfL8B3if3IekGMUGlHBEuzHBU5EGAR iCxXIbObGPd1kJZ9zCJ2p+QttI2cEh7d+cKHTvPjS5wIO4WORdTpU7/t6HylkZdFp6be ksnGZi3tMw3uMlCsJFCVcoqrRn4G6abf1+HCi6ZkIDdRVlwt4fWvQ2EKN6oQL4R/bG4v vohGxAbcZ6V71eM7nh1weAtBEurWr+U4LHWQla6Xki7VzUxO7tCxCgXCktGpi1NqeQeZ oERA== X-Forwarded-Encrypted: i=1; AJvYcCU7JBiNnjygw0xHtbNyR+uzcAc1A4jucEM7DEAmZ7vLv0fjqG+rWoTsKgDJOPKAy5n8wUbs/epsLMyXXJabvzV9vBRKYRw= X-Gm-Message-State: AOJu0Yw0+jkP9RGqZybcvQE3cg2TusCttlmqMlujMxVKYO1DjljbTkio x4Bcv1R+gj9t+W8orgMFksAT2aQSHp6Xaav6E1a6lECZLeZ/DTkaxe/xp6IGMT0= X-Received: by 2002:a17:906:3b0b:b0:a47:3887:db68 with SMTP id g11-20020a1709063b0b00b00a473887db68mr2521233ejf.38.1711533199430; Wed, 27 Mar 2024 02:53:19 -0700 (PDT) Received: from m1x-phil.lan ([176.187.205.175]) by smtp.gmail.com with ESMTPSA id bm6-20020a170906c04600b00a46b4544da2sm5162665ejb.125.2024.03.27.02.53.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 27 Mar 2024 02:53:19 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Thomas Huth , qemu-devel@nongnu.org, Igor Mammedov Cc: Paolo Bonzini , devel@lists.libvirt.org, Zhao Liu , Gerd Hoffmann , "Michael S. Tsirkin" , Ani Sinha , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , Richard Henderson , Eduardo Habkost Subject: [PATCH-for-9.1 v2 18/21] hw/i386/acpi: Remove AcpiBuildState::rsdp field Date: Wed, 27 Mar 2024 10:51:20 +0100 Message-ID: <20240327095124.73639-19-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240327095124.73639-1-philmd@linaro.org> References: <20240327095124.73639-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=philmd@linaro.org; helo=mail-ej1-x635.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 AcpiBuildState::rsdp is always NULL, remove it, simplifying acpi_build_update(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20240305134221.30924-16-philmd@linaro.org> Reviewed-by: Zhao Liu --- hw/i386/acpi-build.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index ed0adb0e82..6f9925d176 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2459,7 +2459,6 @@ struct AcpiBuildState { MemoryRegion *table_mr; /* Is table patched? */ uint8_t patched; - void *rsdp; MemoryRegion *rsdp_mr; MemoryRegion *linker_mr; } AcpiBuildState; @@ -2715,11 +2714,7 @@ static void acpi_build_update(void *build_opaque) acpi_ram_update(build_state->table_mr, tables.table_data); - if (build_state->rsdp) { - memcpy(build_state->rsdp, tables.rsdp->data, acpi_data_len(tables.rsdp)); - } else { - acpi_ram_update(build_state->rsdp_mr, tables.rsdp); - } + acpi_ram_update(build_state->rsdp_mr, tables.rsdp); acpi_ram_update(build_state->linker_mr, tables.linker->cmd_blob); acpi_build_tables_cleanup(&tables, true); @@ -2805,7 +2800,6 @@ void acpi_setup(void) tables.vmgenid); } - build_state->rsdp = NULL; build_state->rsdp_mr = acpi_add_rom_blob(acpi_build_update, build_state, tables.rsdp, ACPI_BUILD_RSDP_FILE); From patchwork Wed Mar 27 09:51:21 2024 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: 783115 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2108076wrt; Wed, 27 Mar 2024 02:55:53 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWmD4Aic2d4MhC0SxGvPmgN7I0F6BOE34lRC6SSXK/DuRdZTMmaOiT4La+IJPUnK7aRb6HR1D/8jQmpZqpkQj1q X-Google-Smtp-Source: AGHT+IGTc3Xyg2moP2EfCMP5pE6tRwvVLYKtGrljqjV0/3RiTdwU9FM+Q4rAOsb6401tedCllUA8 X-Received: by 2002:a05:6214:766:b0:696:4195:99f1 with SMTP id f6-20020a056214076600b00696419599f1mr3959217qvz.57.1711533353089; Wed, 27 Mar 2024 02:55:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711533353; cv=none; d=google.com; s=arc-20160816; b=fqIo3S4I2hhU5ka2X1Kamz6M4zKoMN0biuv/3a5Zu0Dad6CppHAX2DlTPMLVRbT30Q 9oYMtqErhquS/ZFdjZ2UUR9Foz2yOMYvKNj3b6O236Gbb+F+tRDN9r7sqLd3JIcJL0mr vkddbO3/SB2k4Y+ZeH8x5uxnrnl1dYQwEBYBQgtOGMJf7015Qh2SyAYPU8jvi18ScKPn vD7UzAfaEoN/loNzy1pEF9p5Oe3sZl1MisAO8cF0yvHv0SrxCC01mTHrku52Sd8vteVZ jSw4f0kXCJQjIjKRz+kqXh8shnnBdEZhq+QA93ZwkpHE4NZsFpZeAeR9BWFH8fSTkMNl AswA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=Hg7aD3ta6JZQmhzmuZhz9rmDwJrsQ0H6Vo+PaPMmwrY=; fh=wfPLpPCIwDNCLuwk21u+esEen6pDb7crGsOMjGnz1F0=; b=SbROzz8f5vbU4DbQDY8EfHZp77TCfcXUeiODD9uQ/noOV+S6pop1iQcFmovUYDlPcb fsi1O6MxApbtK8ikth0HhXUUTeTDhffxg0e5JFOA+gGSRIagzgAQvNu+BRYE/k8uc4Uy DczRSGxuNEPv3xz2lcRe10qmsQvZiur0qBxwkf74VPqboSLEhJoujwjKPOqHgJC4HpPh g23kZ3jTIcIAPC62ah0xm9PHXCwEwF8CEZZFBY/vLpppmC+4t7XzkS8MQkojheRXcXin JJc8LK9x3ukmk+gjTxkP6N0mQ9WnOY5MKd4c1KcQ93iadulNcp7pkoUHIg6e1QJa4+x5 IfKQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k2YxGUUP; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r8-20020a056214124800b00696121a27c1si12034625qvv.424.2024.03.27.02.55.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2024 02:55:53 -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=k2YxGUUP; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpPyt-000858-Jg; Wed, 27 Mar 2024 05:54:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpPyL-0007Ox-0C for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:53:30 -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 1rpPyJ-00074M-4k for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:53:28 -0400 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a4702457ccbso827941366b.3 for ; Wed, 27 Mar 2024 02:53:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711533205; x=1712138005; 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=Hg7aD3ta6JZQmhzmuZhz9rmDwJrsQ0H6Vo+PaPMmwrY=; b=k2YxGUUPm0A/UcZZFdBggG71jYRaR7E5Xzd+205iWxV5qr7Y0Z1nFB0cPuSJVcf6um BRN1c+xmYIB2/t9VfAjL51dfnHIUaUfi2M08QmwQlRSpPJdv/LrIfe5S3FM5/bb8zVr5 3jQX+hzHocWXBFwlo6Eb3wGs5ylmt+vAlO+AhP07oFMn/iUo9b8Iqv4TwBW5yQ/OPFPh JDeeblsoPTVYvTxgaeN/o2dC28Q4qenGkOFrrvy2E5M4nXdrRybkd7dfFuFWUa+vfZGw WNqDmtPq9t1c8N+5gZyQdapJJCEE6z4+eDEa4IbTmTcIw7meuzWy39+rbjTXNdX4Vap1 eGNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711533205; x=1712138005; 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=Hg7aD3ta6JZQmhzmuZhz9rmDwJrsQ0H6Vo+PaPMmwrY=; b=gc2sdAUk+43JHJK0FoQPxJTQ5x6MBogk0/piw7okBESSI541Dwr5yl7FoLF159Mv6q Guc4wKOjRxw2aQbYUlRvl+bc+txEpC1d5Ydbk2kiNfelnh2wVR3glWTT4G2VskTKuf5g GI4rnhoRpoiEhuDH1INZpHcwJ4q8u6oFuFgKEfsH8bW+hGGSzABjfeF8UKYCogBloVKG aARJdf7ShbhWyKiHii5L5MKN8rtOf5eAprgGlBgG8YFYa+EIklbtcqh8cLREUO9evR4A 14GQADJ4OPgctOK7CgEf1tpeH1wIJtrlz7/k4hfbIRoDpEQYsmf4ACAnedLo6XnUYlOK eslQ== X-Forwarded-Encrypted: i=1; AJvYcCUIrfILXsBTBADGdvrWch5oA9N+/ceYHWF0GSUKbDxyqpgf//LLjLtrgZGvVZp3RTecR8bndZ1eXSvXOpvW8wFGXVBLaAE= X-Gm-Message-State: AOJu0YzvtTuNwpg1NTJdnXtS01kmD9C5QdeMLhkqv6pMTrz3uKe0yGah z6uIzi4Jki3jBpvZzf2lTFq6xM6IMOpOCdZXfKbOqVUYoCkkIPAiN02spBu/lm8= X-Received: by 2002:a17:906:f809:b0:a47:1f87:206e with SMTP id kh9-20020a170906f80900b00a471f87206emr479336ejb.53.1711533205520; Wed, 27 Mar 2024 02:53:25 -0700 (PDT) Received: from m1x-phil.lan ([176.187.205.175]) by smtp.gmail.com with ESMTPSA id q2-20020a1709060e4200b00a4674ad8ab9sm5162406eji.211.2024.03.27.02.53.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 27 Mar 2024 02:53:25 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Thomas Huth , qemu-devel@nongnu.org, Igor Mammedov Cc: Paolo Bonzini , devel@lists.libvirt.org, Zhao Liu , Gerd Hoffmann , "Michael S. Tsirkin" , Ani Sinha , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , Richard Henderson , Eduardo Habkost Subject: [PATCH-for-9.1 v2 19/21] hw/i386/pc: Remove 2.3 and deprecate 2.4 to 2.7 pc-i440fx machines Date: Wed, 27 Mar 2024 10:51:21 +0100 Message-ID: <20240327095124.73639-20-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240327095124.73639-1-philmd@linaro.org> References: <20240327095124.73639-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 pc-i440fx-2.3 machine was deprecated for the 8.2 release (see commit c7437f0ddb "docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated"), time to remove it. Similarly to the cited commit, deprecate the 2.4 to 2.7 machines. Signed-off-by: Philippe Mathieu-Daudé --- docs/about/deprecated.rst | 6 +++--- docs/about/removed-features.rst | 2 +- hw/i386/pc.c | 25 ------------------------- hw/i386/pc_piix.c | 20 -------------------- 4 files changed, 4 insertions(+), 49 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index f6eac988c0..22335ef6b0 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -219,10 +219,10 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name better reflects the way this property affects all random data within the device tree blob, not just the ``kaslr-seed`` node. -``pc-i440fx-2.3`` (since 8.2) -''''''''''''''''''''''''''''' +``pc-i440fx-2.4`` up to ``pc-i440fx-2.7`` (since 9.1) +''''''''''''''''''''''''''''''''''''''''''''''''''''' -This old machine type is quite neglected nowadays and thus might have +These old machine types are quite neglected nowadays and thus might have various pitfalls with regards to live migration. Use a newer machine type instead. diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index 4664974a8b..0caa6a63e4 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -816,7 +816,7 @@ mips ``fulong2e`` machine alias (removed in 6.0) This machine has been renamed ``fuloong2e``. -``pc-0.10`` up to ``pc-i440fx-2.2`` (removed in 4.0 up to 9.0) +``pc-0.10`` up to ``pc-i440fx-2.3`` (removed in 4.0 up to 9.0) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These machine types were very old and likely could not be used for live diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 5fd83010ba..27e04c52f6 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -256,31 +256,6 @@ GlobalProperty pc_compat_2_4[] = { }; const size_t pc_compat_2_4_len = G_N_ELEMENTS(pc_compat_2_4); -GlobalProperty pc_compat_2_3[] = { - PC_CPU_MODEL_IDS("2.3.0") - { TYPE_X86_CPU, "arat", "off" }, - { "qemu64" "-" TYPE_X86_CPU, "min-level", "4" }, - { "kvm64" "-" TYPE_X86_CPU, "min-level", "5" }, - { "pentium3" "-" TYPE_X86_CPU, "min-level", "2" }, - { "n270" "-" TYPE_X86_CPU, "min-level", "5" }, - { "Conroe" "-" TYPE_X86_CPU, "min-level", "4" }, - { "Penryn" "-" TYPE_X86_CPU, "min-level", "4" }, - { "Nehalem" "-" TYPE_X86_CPU, "min-level", "4" }, - { "n270" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Penryn" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Conroe" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Nehalem" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Westmere" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "SandyBridge" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "IvyBridge" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Haswell" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Haswell-noTSX" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Broadwell" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Broadwell-noTSX" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { TYPE_X86_CPU, "kvm-no-smi-migration", "on" }, -}; -const size_t pc_compat_2_3_len = G_N_ELEMENTS(pc_compat_2_3); - GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled) { GSIState *s; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 9615e25d56..c00d2a66a6 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -421,14 +421,6 @@ static void pc_set_south_bridge(Object *obj, int value, Error **errp) * hw_compat_*, pc_compat_*, or * pc_*_machine_options(). */ -static void pc_compat_2_3_fn(MachineState *machine) -{ - X86MachineState *x86ms = X86_MACHINE(machine); - if (kvm_enabled()) { - x86ms->smm = ON_OFF_AUTO_OFF; - } -} - #ifdef CONFIG_ISAPC static void pc_init_isa(MachineState *machine) { @@ -811,18 +803,6 @@ static void pc_i440fx_2_4_machine_options(MachineClass *m) DEFINE_I440FX_MACHINE(v2_4, "pc-i440fx-2.4", NULL, pc_i440fx_2_4_machine_options) -static void pc_i440fx_2_3_machine_options(MachineClass *m) -{ - pc_i440fx_2_4_machine_options(m); - m->hw_version = "2.3.0"; - m->deprecation_reason = "old and unattended - use a newer version instead"; - compat_props_add(m->compat_props, hw_compat_2_3, hw_compat_2_3_len); - compat_props_add(m->compat_props, pc_compat_2_3, pc_compat_2_3_len); -} - -DEFINE_I440FX_MACHINE(v2_3, "pc-i440fx-2.3", pc_compat_2_3_fn, - pc_i440fx_2_3_machine_options); - #ifdef CONFIG_ISAPC static void isapc_machine_options(MachineClass *m) { From patchwork Wed Mar 27 09:51:22 2024 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: 783112 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2107690wrt; Wed, 27 Mar 2024 02:54:38 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUGPH1Xy4oJ4ZQQ76Pzbbs0f91rq/rxI5OOiV4CXt59dq5/qHUigSdeD6PNiwljLpjmqc5w1cXEeX9ipG2eGjh7 X-Google-Smtp-Source: AGHT+IGah6ZGU4U6IMBnnFH49jUgEA2Vp8czcn1mBbdUE8HQ1AERw9hGg2DM/novyQBGB2E05UZS X-Received: by 2002:a05:6214:f0d:b0:690:ca82:55f7 with SMTP id gw13-20020a0562140f0d00b00690ca8255f7mr2870136qvb.19.1711533278158; Wed, 27 Mar 2024 02:54:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711533278; cv=none; d=google.com; s=arc-20160816; b=IB0mwcsdqsgRZAKf+/5RTFOnXak2GRCdy680x+GdZxUGF9H7gXEvQ1WCC+wZsfkHCd sBXI9L97F1yIMi2/jkUa/jiwXdS3jAuygMSiTT+ngcoI0x0TnbTeqp7riIJ/ONBPfAC7 nbG9zTsws6PxntM3XfbWDjOVbvxDAHxV5BOOarjO3xcHYHJdy1cTDIKcl8yVO2dJ7N24 i4G2r+xvKzfGmX+fTwB4tqVXtzLPR+4X+uJCZP6ShuhzR7QE/ZrsnfcomUOUrKz65HJi DnaJt7rYouQiLUHaflwZh26nioePrd29B5Qs1Sc+Y023Wa4Vj81mnrpJiyIUWvMg74Hg 0wqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=GNAyK3lGFt7pCi07DIyw1qVnA4J8LeB4ju/ikziy2DE=; fh=L3SDrsUOmgI4xfwPxJS3lnaiysCAukfrjzmj7Q83kMM=; b=riLrFtMrQDOnfDmzrw48+MNRZtiukjxcu0MEwm+zMd/DBTQSRli6XbDDpKMwwDDpkt zYfoJG79Ni3RRjkIFCnOTLMrMg6VWxLCLfpMQOXvQ0Ed+gO5dQjZNaIkMq+cpWiyOP5X eVfzr22Tg00WEgRCZV/Xf/sH527jvqKo29j66AiDxrkYoF9g9bj/YCYlI6Evw4/Hdd3L 79KcR30oea8vsA51o4f/eFVWsjpwsxN2GHPfpKSb7qdrl5CIN+C9+zME2Op4WCo4XrBp BfP0W0o1z1m6u2xZ76CtR0nrHV2DiMBY/ONUT9fduHn2IlLWGiylJJ6YKzb3DmM2yCBn Rhlg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Lza21vgm; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id jm14-20020ad45ece000000b0068cd9703420si12050540qvb.332.2024.03.27.02.54.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2024 02:54: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=Lza21vgm; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpPzE-0008OG-Vc; Wed, 27 Mar 2024 05:54: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 1rpPyV-0007fJ-16 for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:53:42 -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 1rpPyT-000750-7q for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:53:38 -0400 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a466fc8fcccso829713666b.1 for ; Wed, 27 Mar 2024 02:53:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711533211; x=1712138011; 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=GNAyK3lGFt7pCi07DIyw1qVnA4J8LeB4ju/ikziy2DE=; b=Lza21vgmE04xxElR9tJzMEGgyx7FbKoJ5hTUJzGu2bCbqu13jjtVMQLtNNJz2QjTxF nQjwdwXGf0LqTQ+U6iJ02eXRbBksxglxTiWX8BQ2KmHTCy1bumkKt3G1ntm+pqV7sR2h jir55obDRwc2QbtM5/0z/CCTb1ofOCkWy4cf+cn7HgQW2jOGtzIXzVHWUzrI3n5I/Zon CBqM5eAbQ3P4TRccU1VjIdSfH/X4asJXrIIaQyJTf/Hw/QUKsxu4tzvIEKivzzepXwYS cxS5KoDSCX7zRGzBzeFPxCokJogD7vGpsQmM5Qy5d8J0kUeDqiXhPc3muVQhhWcfTOIk JWYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711533211; x=1712138011; 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=GNAyK3lGFt7pCi07DIyw1qVnA4J8LeB4ju/ikziy2DE=; b=F3y00a9qFX/x/XiK+wp9QBY++vCrZJ1wlAveRRM2ESfYk/Y7kz6g/CqR7YlGCpTyme 4Urk9BGeSfbfRemDc3yQPCoKeYqG0QQevWsTi2okE/toKvbXvOXjIu+lH7fw9keRlHXF AVRjEaLklZ6oIKOMIBxC83N7oW6CD4qTAX8lR41wO2UZWMQlnx3fKdDNQI4rRk4E+5fv JKFXXBeeqOPKOzO8UnlwXUbND05Iu7DGqTZVAjPTKQYA4zPlrPvgGoiwhu1BOQIeAeER CEGJORRHi70PiCOy5Xufx0IVtjyXiz4hD3QAVQgS9nVE2FiHVmVtFLDScuyHCIz/iyl7 S3/A== X-Forwarded-Encrypted: i=1; AJvYcCVRSl/fI+1paP0DN+9UwruFTeGVJuelqt4UN+7VDPYamj2NDKnhnhgryThVQytXS2/DYlJ1Mzk4sj955KrF3Zu+h8CJUnw= X-Gm-Message-State: AOJu0YxQzZUh9OFcw3gxKr6u/6JzGEBdo1XN9d5xle0GW5Qa6OBOg3Ab PlBhG2zsGj3dLW8rOfoMbU3en+atQ2F+xNTcvRuBI/sFfLshKOaloftLxs8IxlpoR85V158K94N 4 X-Received: by 2002:a17:906:b257:b0:a47:39c6:8970 with SMTP id ce23-20020a170906b25700b00a4739c68970mr2716915ejb.39.1711533211584; Wed, 27 Mar 2024 02:53:31 -0700 (PDT) Received: from m1x-phil.lan ([176.187.205.175]) by smtp.gmail.com with ESMTPSA id n6-20020a170906700600b00a474b3c90c4sm4437161ejj.24.2024.03.27.02.53.29 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 27 Mar 2024 02:53:31 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Thomas Huth , qemu-devel@nongnu.org, Igor Mammedov Cc: Paolo Bonzini , devel@lists.libvirt.org, Zhao Liu , Gerd Hoffmann , "Michael S. Tsirkin" , Ani Sinha , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Marcelo Tosatti , kvm@vger.kernel.org Subject: [PATCH-for-9.1 v2 20/21] target/i386: Remove X86CPU::kvm_no_smi_migration field Date: Wed, 27 Mar 2024 10:51:22 +0100 Message-ID: <20240327095124.73639-21-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240327095124.73639-1-philmd@linaro.org> References: <20240327095124.73639-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 X86CPU::kvm_no_smi_migration was only used by the pc-i440fx-2.3 machine, which got removed. Remove it and simplify kvm_put_vcpu_events(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- target/i386/cpu.h | 3 --- target/i386/cpu.c | 2 -- target/i386/kvm/kvm.c | 7 +------ 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 6b05738079..5b016d6667 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -2018,9 +2018,6 @@ struct ArchCPU { /* if set, limit maximum value for phys_bits when host_phys_bits is true */ uint8_t host_phys_bits_limit; - /* Stop SMI delivery for migration compatibility with old machines */ - bool kvm_no_smi_migration; - /* Forcefully disable KVM PV features not exposed in guest CPUIDs */ bool kvm_pv_enforce_cpuid; diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 33760a2ee1..f9991e7398 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -7905,8 +7905,6 @@ static Property x86_cpu_properties[] = { DEFINE_PROP_BOOL("x-vendor-cpuid-only", X86CPU, vendor_cpuid_only, true), DEFINE_PROP_BOOL("lmce", X86CPU, enable_lmce, false), DEFINE_PROP_BOOL("l3-cache", X86CPU, enable_l3_cache, true), - DEFINE_PROP_BOOL("kvm-no-smi-migration", X86CPU, kvm_no_smi_migration, - false), DEFINE_PROP_BOOL("kvm-pv-enforce-cpuid", X86CPU, kvm_pv_enforce_cpuid, false), DEFINE_PROP_BOOL("vmware-cpuid-freq", X86CPU, vmware_cpuid_freq, true), diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index e68cbe9293..88f4a7da33 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -4337,6 +4337,7 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int level) events.sipi_vector = env->sipi_vector; if (has_msr_smbase) { + events.flags |= KVM_VCPUEVENT_VALID_SMM; events.smi.smm = !!(env->hflags & HF_SMM_MASK); events.smi.smm_inside_nmi = !!(env->hflags2 & HF2_SMM_INSIDE_NMI_MASK); if (kvm_irqchip_in_kernel()) { @@ -4351,12 +4352,6 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int level) events.smi.pending = 0; events.smi.latched_init = 0; } - /* Stop SMI delivery on old machine types to avoid a reboot - * on an inward migration of an old VM. - */ - if (!cpu->kvm_no_smi_migration) { - events.flags |= KVM_VCPUEVENT_VALID_SMM; - } } if (level >= KVM_PUT_RESET_STATE) { From patchwork Wed Mar 27 09:51:23 2024 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: 783113 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2107701wrt; Wed, 27 Mar 2024 02:54:41 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUzJ51PTpPH72rT72QJaMQn7JXA1+9XABiXGNg9kbhWGfWax8bu1arFINIWpZzipr4At6kjzbBSwEsJakyPTKix X-Google-Smtp-Source: AGHT+IFWTMRFuPP4iFKzmQn07lS420RdxA5+mkY/JI99iYEAlM9zblzEAziqnwWQT2aOJN9E4D2Z X-Received: by 2002:ad4:5dc5:0:b0:696:315e:4eeb with SMTP id m5-20020ad45dc5000000b00696315e4eebmr1039876qvh.8.1711533281381; Wed, 27 Mar 2024 02:54:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711533281; cv=none; d=google.com; s=arc-20160816; b=nBIzRoiRONHMT8pKiMkaEhr0WAXPP3sEXOXmVFm2hjZEjXTZKej0+BcDFw1O3yuaZ/ 06qu1MPh3BpzCtyWnpebmfOhXZDE93Qv87TDHrDuwNMRZ9qHhhDiFQslmlI+jGzptTdY RsAaoLKRVoiP7xKMm6zRFX/lydueluY/DS6rB06HhXgo8Fwp44lLT+wRG8vgwwaX8sug 5w9siZ5ntwmxYY2yhfkmoGEjhLu3PhBjoXUmMf/anWX2/+mc+yppQ5HPtmb14NiFp/Tk WIn35Vw7z1KNzpVrfqRpP+vvy7wZfG4gh4KwihQp01Kx9sTn36YiGeVyaW0gmGIahzkR Z/RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=zXPzkwsH5pTrUa0Pgjl4p3bDfrtQHwfhdOq2M84tSsU=; fh=5l+ez2vQh3/RYAe5saSZJWmYLPQuSvkYuIh1ai02LL0=; b=je2SJQ8rLyfMHOy391u6H2oiFa4FhB92rkdgeop8lZiRQOlT1RnjGysOVPPkZSjq9b rIQvYVj9g1OXeopDREPdqiZhEZObxWPDINfnJ8vYH/v81dvy6+pvOQl6DKF7aUHyAew/ Tq9sJMpq/rmMmv97YBOR8N9VUHkecLhgnLGGNDt1nqyC7jz3mzv0t+a3KkCZddWeozKL wWfnKVjH3QKP7KWVXk7Oi3lfz6OEB9HO+jRtjaV6+kBn3w9xLqSLJioaF9wU/OGG4NqZ WHkGb2Ti0VFwEFFBCDe4zEN2yagxllu0qY3r68ZAlin0pHkP34iG8o+o91/h0ushcub/ uj0g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Jio39v6N; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id hf9-20020a0562140e8900b006967acdae5dsi9112279qvb.261.2024.03.27.02.54.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2024 02:54: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=Jio39v6N; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpPyr-00084v-K7; Wed, 27 Mar 2024 05:54:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpPyX-0007tn-Ls for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:53:47 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpPyV-00075f-P7 for qemu-devel@nongnu.org; Wed, 27 Mar 2024 05:53:41 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4149571d4b6so2256515e9.2 for ; Wed, 27 Mar 2024 02:53:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711533217; x=1712138017; 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=zXPzkwsH5pTrUa0Pgjl4p3bDfrtQHwfhdOq2M84tSsU=; b=Jio39v6NHSIQ9dt9tROwMbuiHO3RJiOsPuFLM2NVWbplLlCTfIQmf2Ooqpzu4haoA5 oXZzduslO2ZSEPnvm+/ULIESwYGCo+0vTXFoDc4tnx80ybzR7WKqNRyWRnYDPr0JSj+H aOxFaHGC7Gz63sWjmiO6vrOjBaVzqoCv8e2U19RnxkIB6theN2acixNaXtH/sTeWTSof gfhayn3CjxpvVLqdjj2k+cYwOhM3kTHIjUVGbFd387It0MuLOBXSg4kyFf8JzeggS62e Qq9Puk1KR9+y1tatnpRpSV5iadSOmwk7TK+Z1x84MGTKCs5DQ4//81QYgoxxj8y7j28Y oG6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711533217; x=1712138017; 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=zXPzkwsH5pTrUa0Pgjl4p3bDfrtQHwfhdOq2M84tSsU=; b=NiAdrqq9c9eiLlrNKhfzKKGeGCdSlXKvn60rBgnuLFwjgvceS/Q8DpZ9L4p3wGaPEU fSWPSNwY7KH2eeIkQZ3WwRRNnfPEt9bhRwJRNN1ZmIpzBcQo8MEkm9Ik0JDzpZEuNTul jgALHK37tHp4mG9pmnIfDR+Tg1UBjEPyc0/TgcwW0JRc1/cxprTbsWp7lq4s2CwEHWoK eWRkUi11oftWSn0Ml/OkM4GuZEV1IwB4vAEzgp2OamKBNXaNQvez/n5hqDO8hL3o4X7n xBULCPtIaBSzzW9xus4dRQm/TjgCd/P3DqAoEIfIUupS5YNs6PgLHq71AH/QN/ycBkuu JnXg== X-Forwarded-Encrypted: i=1; AJvYcCX01RRcceKuge0R5Qyetb3KHel3mH8pBo6nN0r6OB0IWJFPiJLnm13FVPQl3FNrGHlGj2CwQ9e7tfE/3o5yu1yWp7jkw6Q= X-Gm-Message-State: AOJu0Yy9p+k6T6+omtaMckHE11q23Hg9S342tc/p2oy3EiA3MTtEj6+Y 6D4qygB/DwUbE1Nm+4LKnAVJjHrOm49tV1Vhyip9UwC7D6uGtHRTtkKXyhikANY= X-Received: by 2002:a05:600c:6d8:b0:413:3110:2d06 with SMTP id b24-20020a05600c06d800b0041331102d06mr1873900wmn.16.1711533217730; Wed, 27 Mar 2024 02:53:37 -0700 (PDT) Received: from m1x-phil.lan ([176.187.205.175]) by smtp.gmail.com with ESMTPSA id fa21-20020a05600c519500b00412a31d2e2asm1604680wmb.32.2024.03.27.02.53.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 27 Mar 2024 02:53:37 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Thomas Huth , qemu-devel@nongnu.org, Igor Mammedov Cc: Paolo Bonzini , devel@lists.libvirt.org, Zhao Liu , Gerd Hoffmann , "Michael S. Tsirkin" , Ani Sinha , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Eduardo Habkost , Marcel Apfelbaum Subject: [PATCH-for-9.1 v2 21/21] hw/i386/pc: Replace PCMachineClass::acpi_data_size by PC_ACPI_DATA_SIZE Date: Wed, 27 Mar 2024 10:51:23 +0100 Message-ID: <20240327095124.73639-22-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240327095124.73639-1-philmd@linaro.org> References: <20240327095124.73639-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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 PCMachineClass::acpi_data_size was only used by the pc-i440fx-2.0 machine, which got removed. Since it is constant, replace the class field by a definition. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20240305134221.30924-19-philmd@linaro.org> Reviewed-by: Zhao Liu --- include/hw/i386/pc.h | 4 ---- hw/i386/pc.c | 19 ++++++++++++------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 96ccb4583f..0ad971782c 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -74,9 +74,6 @@ typedef struct PCMachineState { * * Compat fields: * - * @acpi_data_size: Size of the chunk of memory at the top of RAM - * for the BIOS ACPI tables and other BIOS - * datastructures. * @gigabyte_align: Make sure that guest addresses aligned at * 1Gbyte boundaries get mapped to host * addresses aligned at 1Gbyte boundaries. This @@ -100,7 +97,6 @@ struct PCMachineClass { /* ACPI compat: */ bool has_acpi_build; - unsigned acpi_data_size; int pci_root_uid; /* SMBIOS compat: */ diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 27e04c52f6..f01a30d3d9 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -256,6 +256,16 @@ GlobalProperty pc_compat_2_4[] = { }; const size_t pc_compat_2_4_len = G_N_ELEMENTS(pc_compat_2_4); +/* + * @PC_ACPI_DATA_SIZE: + * Size of the chunk of memory at the top of RAM for the BIOS ACPI tables + * and other BIOS datastructures. + * + * BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K + * reported to be used at the moment, 32K should be enough for a while. + */ +#define PC_ACPI_DATA_SIZE (0x20000 + 0x8000) + GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled) { GSIState *s; @@ -634,8 +644,7 @@ void xen_load_linux(PCMachineState *pcms) fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, x86ms->boot_cpus); rom_set_fw(fw_cfg); - x86_load_linux(x86ms, fw_cfg, pcmc->acpi_data_size, - pcmc->pvh_enabled); + x86_load_linux(x86ms, fw_cfg, PC_ACPI_DATA_SIZE, pcmc->pvh_enabled); for (i = 0; i < nb_option_roms; i++) { assert(!strcmp(option_rom[i].name, "linuxboot.bin") || !strcmp(option_rom[i].name, "linuxboot_dma.bin") || @@ -969,8 +978,7 @@ void pc_memory_init(PCMachineState *pcms, } if (linux_boot) { - x86_load_linux(x86ms, fw_cfg, pcmc->acpi_data_size, - pcmc->pvh_enabled); + x86_load_linux(x86ms, fw_cfg, PC_ACPI_DATA_SIZE, pcmc->pvh_enabled); } for (i = 0; i < nb_option_roms; i++) { @@ -1722,9 +1730,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->gigabyte_align = true; pcmc->has_reserved_memory = true; pcmc->enforce_amd_1tb_hole = true; - /* BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K reported - * to be used at the moment, 32K should be enough for a while. */ - pcmc->acpi_data_size = 0x20000 + 0x8000; pcmc->pvh_enabled = true; pcmc->kvmclock_create_always = true; x86mc->apic_xrupt_override = true;