From nobody Sat Nov 23 20:41:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1730405263; cv=none; d=zohomail.com; s=zohoarc; b=gJVf1rrAQDaZT27LT0Gtkj2ZRc+fLozJWcQJFfujCa/b3nqy8NiE6ZMV8C1S+wpMx+5RhO94driZPmgDmnfcnC6uYoc6HejhETet9nK1H6YW0EDeUNkv7l2VNSQYjtfdu90O6MMquvtE3Q1ELSbtEldIgrQVFj5/pSdxsEG4Wuc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730405263; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=xrN6wuDIzmS+lqPguoKfyWH10F0WTVDqLIckws702rQ=; b=id7hX/0QbWxb4JMhSDPV2zG0XMSmkfscLYaz7fkPPwbcKfBMyNtbDHO61/9809bHWRWQVT4xPOpW+/H4Zfl6FQmOXNKrfyckK17Fi6aMjbrA2X24XpBRnHMUfKZYRHmv6CtPgCNk4YBA6riRcwcj6JXGJ9/ILy/FF6PzXQ0Brag= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730405263815958.6296501592545; Thu, 31 Oct 2024 13:07:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6bQv-00076q-4Y; Thu, 31 Oct 2024 16:06: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 1t6bQq-000764-Sb; Thu, 31 Oct 2024 16:06:12 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6bQo-0007TM-Si; Thu, 31 Oct 2024 16:06:12 -0400 Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4XfZhs6PBpz6JBf6; Fri, 1 Nov 2024 04:04:45 +0800 (CST) Received: from frapeml500007.china.huawei.com (unknown [7.182.85.172]) by mail.maildlp.com (Postfix) with ESMTPS id B2E181400D3; Fri, 1 Nov 2024 04:06:07 +0800 (CST) Received: from 00293818-MRGF.huawei.com (10.48.152.207) by frapeml500007.china.huawei.com (7.182.85.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 31 Oct 2024 21:05:48 +0100 To: , , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH V2 1/6] hw/acpi: Introduce `is_enabled` state in ACPI CPU Hotplug Status Date: Thu, 31 Oct 2024 20:04:57 +0000 Message-ID: <20241031200502.3869-2-salil.mehta@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241031200502.3869-1-salil.mehta@huawei.com> References: <20241031200502.3869-1-salil.mehta@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.48.152.207] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To frapeml500007.china.huawei.com (7.182.85.172) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=185.176.79.56; envelope-from=salil.mehta@huawei.com; helo=frasgout.his.huawei.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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: , Reply-to: Salil Mehta From: Salil Mehta via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1730405265339116600 On most architectures, during vCPU hot-plug and hot-unplug actions, firmware or the VMM/QEMU can convey vCPU status to the OS by toggling the ACPI method `_STA.Present` Bit. However, certain CPU architecture specifications prohibit [1] modifications to CPU's `presence` after the kernel has booted. This limitation [2][3] arises because many per-CPU components, such as interrupt controllers that are closely integrated with CPUs, or other per-CPU features, may not support reconfiguration once the kernel is initialized. These components often cannot be powered down as they might belong to an `always-on` power domain. Consequently, specifications require all CPUs to remain `_STA.Present` after system initialization. To address this issue from an ACPI perspective, an `is_enabled` state has been introduced in the `AcpiCpuStatus`. This state reflects whether a vCPU has been hot-plugged or hot-unplugged in QEMU, thus indicating its availability to the guest kernel. The guest can evaluate this status by calling the ACPI `_STA` method and checking the `_STA.Enabled` bit after QEMU signals the hot-plug event via GED. References: [1] Check comment 5 in the bugzilla entry Link: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4481#c5 [2] KVMForum 2023 Presentation: Challenges Revisited in Supporting Virt CPU= Hotplug on architectures that don=E2=80=99t Support CPU Hotplug (like ARM64) a. Kernel Link: https://kvm-forum.qemu.org/2023/KVM-forum-cpu-hotplug_7= OJ1YyJ.pdf b. Qemu Link: https://kvm-forum.qemu.org/2023/Challenges_Revisited_in_= Supporting_Virt_CPU_Hotplug_-__ii0iNb3.pdf [3] KVMForum 2020 Presentation: Challenges in Supporting Virtual CPU Hotplu= g on SoC Based Systems (like ARM64) Link: https://kvmforum2020.sched.com/event/eE4m Signed-off-by: Salil Mehta Reviewed-by: Gustavo Romero --- hw/acpi/cpu.c | 9 ++++++++- include/hw/acpi/cpu.h | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c index 5cb60ca8bc..238a0edbc1 100644 --- a/hw/acpi/cpu.c +++ b/hw/acpi/cpu.c @@ -225,7 +225,14 @@ void cpu_hotplug_hw_init(MemoryRegion *as, Object *own= er, state->dev_count =3D id_list->len; state->devs =3D g_new0(typeof(*state->devs), state->dev_count); for (i =3D 0; i < id_list->len; i++) { - state->devs[i].cpu =3D CPU(id_list->cpus[i].cpu); + struct CPUState *cpu =3D CPU(id_list->cpus[i].cpu); + + state->devs[i].cpu =3D cpu; + if (cpu && DEVICE(cpu)->realized) { + state->devs[i].is_enabled =3D true; + } else { + state->devs[i].is_enabled =3D false; + } state->devs[i].arch_id =3D id_list->cpus[i].arch_id; } memory_region_init_io(&state->ctrl_reg, owner, &cpu_hotplug_ops, state, diff --git a/include/hw/acpi/cpu.h b/include/hw/acpi/cpu.h index 32654dc274..ff49caa501 100644 --- a/include/hw/acpi/cpu.h +++ b/include/hw/acpi/cpu.h @@ -26,6 +26,7 @@ typedef struct AcpiCpuStatus { uint64_t arch_id; bool is_inserting; bool is_removing; + bool is_enabled; bool fw_remove; uint32_t ost_event; uint32_t ost_status; @@ -74,5 +75,4 @@ extern const VMStateDescription vmstate_cpu_hotplug; #define VMSTATE_CPU_HOTPLUG(cpuhp, state) \ VMSTATE_STRUCT(cpuhp, state, 1, \ vmstate_cpu_hotplug, CPUHotplugState) - #endif --=20 2.34.1 From nobody Sat Nov 23 20:41:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1730405249; cv=none; d=zohomail.com; s=zohoarc; b=Ia5eq/Qp6WNzLsbAd8JwL8sXddNj2XGvDU5EW/Oh1RqcGpI0UCAtlo5zN8jkqWYHVRG6TO1B1VqwPIPa+4wDRLSW+J4Cyk9fizDt/RDprYWKWVy1P1quhoXdKZyJX8pCTksB0DArJgw5Vx0C2cqb6sI4II90jRZq2NW+ioPZkGs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730405249; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=gZKr3pY3O3q/pdei4g/VPf+8LZX7y2VuUAvowshr+z8=; b=BupEBWp/9PrpBHDZ60fZWarraX4rKaPqvoHK/Rd1L4DIWMKkbDLYHHJ4KA/qIYQulzACCKFy+SISGqsXs2RPi9ZnwY5e1DAnN37EEWgt0x5jWuYf7UfMVu6nRb+WuBrXB9r2tMr1O9kyqOte/rO5FN/6cVl9scSicSOcTSMf87A= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730405249474724.856388207624; Thu, 31 Oct 2024 13:07:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6bRD-00078K-Dl; Thu, 31 Oct 2024 16:06:35 -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 1t6bR8-00077p-RF; Thu, 31 Oct 2024 16:06:31 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6bR7-0007Uy-BJ; Thu, 31 Oct 2024 16:06:30 -0400 Received: from mail.maildlp.com (unknown [172.18.186.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4XfZjF54Ynz6JBc6; Fri, 1 Nov 2024 04:05:05 +0800 (CST) Received: from frapeml500007.china.huawei.com (unknown [7.182.85.172]) by mail.maildlp.com (Postfix) with ESMTPS id 8617D140B35; Fri, 1 Nov 2024 04:06:27 +0800 (CST) Received: from 00293818-MRGF.huawei.com (10.48.152.207) by frapeml500007.china.huawei.com (7.182.85.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 31 Oct 2024 21:06:08 +0100 To: , , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH V2 2/6] hw/acpi: Update ACPI CPU Hotplug state during vCPU hot(un)plug Date: Thu, 31 Oct 2024 20:04:58 +0000 Message-ID: <20241031200502.3869-3-salil.mehta@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241031200502.3869-1-salil.mehta@huawei.com> References: <20241031200502.3869-1-salil.mehta@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.48.152.207] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To frapeml500007.china.huawei.com (7.182.85.172) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=185.176.79.56; envelope-from=salil.mehta@huawei.com; helo=frasgout.his.huawei.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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: , Reply-to: Salil Mehta From: Salil Mehta via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1730405251392116600 Content-Type: text/plain; charset="utf-8" Update the `is_enabled` state in `AcpiCpuStatus` when vCPUs are hot-plugged or hot-unplugged. Signed-off-by: Salil Mehta Reviewed-by: Gustavo Romero --- hw/acpi/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c index 238a0edbc1..8940687f90 100644 --- a/hw/acpi/cpu.c +++ b/hw/acpi/cpu.c @@ -265,6 +265,7 @@ void acpi_cpu_plug_cb(HotplugHandler *hotplug_dev, } =20 cdev->cpu =3D CPU(dev); + cdev->is_enabled =3D true; if (dev->hotplugged) { cdev->is_inserting =3D true; acpi_send_event(DEVICE(hotplug_dev), ACPI_CPU_HOTPLUG_STATUS); @@ -296,6 +297,7 @@ void acpi_cpu_unplug_cb(CPUHotplugState *cpu_st, return; } =20 + cdev->is_enabled =3D false; cdev->cpu =3D NULL; } =20 --=20 2.34.1 From nobody Sat Nov 23 20:41:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1730405248; cv=none; d=zohomail.com; s=zohoarc; b=Gi+MtF25hURUxMSqzKprE2Edhad3nLqCAmmv9lfEreFCDn5K6SHHpj8UgSjHlh7JG+1dLbzTRGWZOAFz/OQqxGPVaH/hgn+hi/Ccs/5WfDZ/ig0aTSm0OvMe8bKMYt3OeIDvG/FpV0WqarStFieFA4ALnfKBeoSeYGa6uw0HNfo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730405248; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=hzsP50dTkGg2PCAvMRdu2Rly35OsPtIkf1sK9CN2ySM=; b=IpzxNd1YFwznCwKdpR7EURUBYcrzKP5kNH3hDmL7/x03k9jiwGaXAOFFgnitoVvh/1B/dVJ7/4Y4FnNErf1QaNxdnRFBGAMDuvwKkXGyz4NKyOLbuB7yPD+CyF2nUTG5OVC82l+b1f6f5fVii8uRtZnrDNGtvF3vBIRVCWhw0aE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730405247993454.65945899056476; Thu, 31 Oct 2024 13:07:27 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6bRU-0007Rv-38; Thu, 31 Oct 2024 16:06:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6bRT-0007Qd-18; Thu, 31 Oct 2024 16:06:51 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6bRR-0007WL-BQ; Thu, 31 Oct 2024 16:06:50 -0400 Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4XfZdZ2mSnz6LDK5; Fri, 1 Nov 2024 04:01:54 +0800 (CST) Received: from frapeml500007.china.huawei.com (unknown [7.182.85.172]) by mail.maildlp.com (Postfix) with ESMTPS id 63E2414058E; Fri, 1 Nov 2024 04:06:47 +0800 (CST) Received: from 00293818-MRGF.huawei.com (10.48.152.207) by frapeml500007.china.huawei.com (7.182.85.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 31 Oct 2024 21:06:27 +0100 To: , , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH V2 3/6] qtest: allow ACPI DSDT Table changes Date: Thu, 31 Oct 2024 20:04:59 +0000 Message-ID: <20241031200502.3869-4-salil.mehta@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241031200502.3869-1-salil.mehta@huawei.com> References: <20241031200502.3869-1-salil.mehta@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.48.152.207] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To frapeml500007.china.huawei.com (7.182.85.172) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=185.176.79.56; envelope-from=salil.mehta@huawei.com; helo=frasgout.his.huawei.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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: , Reply-to: Salil Mehta From: Salil Mehta via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1730405249488116600 Content-Type: text/plain; charset="utf-8" list changed files in tests/qtest/bios-tables-test-allowed-diff.h Reported-by: Zhao Liu Signed-off-by: Salil Mehta --- tests/qtest/bios-tables-test-allowed-diff.h | 41 +++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index dfb8523c8b..512d40665d 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,42 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/x86/pc/DSDT", +"tests/data/acpi/x86/pc/DSDT.acpierst", +"tests/data/acpi/x86/pc/DSDT.acpihmat", +"tests/data/acpi/x86/pc/DSDT.bridge", +"tests/data/acpi/x86/pc/DSDT.cphp", +"tests/data/acpi/x86/pc/DSDT.dimmpxm", +"tests/data/acpi/x86/pc/DSDT.hpbridge", +"tests/data/acpi/x86/pc/DSDT.hpbrroot", +"tests/data/acpi/x86/pc/DSDT.ipmikcs", +"tests/data/acpi/x86/pc/DSDT.memhp", +"tests/data/acpi/x86/pc/DSDT.nohpet", +"tests/data/acpi/x86/pc/DSDT.numamem", +"tests/data/acpi/x86/pc/DSDT.roothp", +"tests/data/acpi/x86/q35/DSDT", +"tests/data/acpi/x86/q35/DSDT.acpierst", +"tests/data/acpi/x86/q35/DSDT.acpihmat", +"tests/data/acpi/x86/q35/DSDT.acpihmat-noinitiator", +"tests/data/acpi/x86/q35/DSDT.applesmc", +"tests/data/acpi/x86/q35/DSDT.bridge", +"tests/data/acpi/x86/q35/DSDT.core-count", +"tests/data/acpi/x86/q35/DSDT.core-count2", +"tests/data/acpi/x86/q35/DSDT.cphp", +"tests/data/acpi/x86/q35/DSDT.cxl", +"tests/data/acpi/x86/q35/DSDT.dimmpxm", +"tests/data/acpi/x86/q35/DSDT.ipmibt", +"tests/data/acpi/x86/q35/DSDT.ipmismbus", +"tests/data/acpi/x86/q35/DSDT.ivrs", +"tests/data/acpi/x86/q35/DSDT.memhp", +"tests/data/acpi/x86/q35/DSDT.mmio64", +"tests/data/acpi/x86/q35/DSDT.multi-bridge", +"tests/data/acpi/x86/q35/DSDT.noacpihp", +"tests/data/acpi/x86/q35/DSDT.nohpet", +"tests/data/acpi/x86/q35/DSDT.numamem", +"tests/data/acpi/x86/q35/DSDT.pvpanic-isa", +"tests/data/acpi/x86/q35/DSDT.thread-count", +"tests/data/acpi/x86/q35/DSDT.thread-count2", +"tests/data/acpi/x86/q35/DSDT.tis.tpm12", +"tests/data/acpi/x86/q35/DSDT.tis.tpm2", +"tests/data/acpi/x86/q35/DSDT.type4-count", +"tests/data/acpi/x86/q35/DSDT.viot", +"tests/data/acpi/x86/q35/DSDT.xapic", --=20 2.34.1 From nobody Sat Nov 23 20:41:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1730405257; cv=none; d=zohomail.com; s=zohoarc; b=G1mqZ7wQmcu1dID7u/eC3fBfSb8d8qCMryHvuqLrCVbGKERshMlrEfhiEjoHNkE0WgrVW+ECVnwyQLtJbjt7zaGM5TuCEWE4zYn6mRJfAHCp+WTRg5RjAzUdboiRwkyiNXYXOcxXNwLC8FSIPd9ETB9+oNNyA7ViIuBz+7Wp3Lk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730405257; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=zX1tYM/7WeDtE9ydpsO/CEbXR62lTtOoNbaNQUBhGn0=; b=gFok7E/8ISB8LbDfUPPjWoz8iXi4uhvD4dgo9OkR0zP+HjL2l495XhmGsNB/R3LsJLmK2ILYWpEmb5AxZola/PgWvHYTvJT/sWEyexiI32spGCx77UKpYvRZcApqNrK4DevLIj5lArDxotPLD6lJYMnmpLDxqyJKmRlCDY/a5k8= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730405257658454.22723953841717; Thu, 31 Oct 2024 13:07:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6bRp-00080d-QD; Thu, 31 Oct 2024 16:07:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6bRm-0007rw-RZ; Thu, 31 Oct 2024 16:07:10 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6bRl-0007Xg-3u; Thu, 31 Oct 2024 16:07:10 -0400 Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4XfZdy1Y0Wz6LDJl; Fri, 1 Nov 2024 04:02:14 +0800 (CST) Received: from frapeml500007.china.huawei.com (unknown [7.182.85.172]) by mail.maildlp.com (Postfix) with ESMTPS id 39E5B14058E; Fri, 1 Nov 2024 04:07:07 +0800 (CST) Received: from 00293818-MRGF.huawei.com (10.48.152.207) by frapeml500007.china.huawei.com (7.182.85.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 31 Oct 2024 21:06:47 +0100 To: , , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH V2 4/6] hw/acpi: Update CPUs AML's `is_enabled` state in ACPI _STA method Date: Thu, 31 Oct 2024 20:05:00 +0000 Message-ID: <20241031200502.3869-5-salil.mehta@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241031200502.3869-1-salil.mehta@huawei.com> References: <20241031200502.3869-1-salil.mehta@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.48.152.207] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To frapeml500007.china.huawei.com (7.182.85.172) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=185.176.79.56; envelope-from=salil.mehta@huawei.com; helo=frasgout.his.huawei.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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: , Reply-to: Salil Mehta From: Salil Mehta via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1730405259592116600 Content-Type: text/plain; charset="utf-8" Update the CPUs AML code to reflect the ACPI CPU Hotplug `is_enabled` state in the `_STA.Enabled` Bit when the ACPI `_STA` method is evaluated by the Guest Kernel during initialization, as well as when vCPUs are hot-plugged or hot-unplugged. Signed-off-by: Salil Mehta Reviewed-by: Gustavo Romero --- hw/acpi/cpu.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c index 8940687f90..017b847815 100644 --- a/hw/acpi/cpu.c +++ b/hw/acpi/cpu.c @@ -63,7 +63,7 @@ static uint64_t cpu_hotplug_rd(void *opaque, hwaddr addr,= unsigned size) cdev =3D &cpu_st->devs[cpu_st->selector]; switch (addr) { case ACPI_CPU_FLAGS_OFFSET_RW: /* pack and return is_* fields */ - val |=3D cdev->cpu ? 1 : 0; + val |=3D cdev->is_enabled ? 1 : 0; val |=3D cdev->is_inserting ? 2 : 0; val |=3D cdev->is_removing ? 4 : 0; val |=3D cdev->fw_remove ? 16 : 0; @@ -463,15 +463,23 @@ void build_cpus_aml(Aml *table, MachineState *machine= , CPUHotplugFeatures opts, { Aml *idx =3D aml_arg(0); Aml *sta =3D aml_local(0); + Aml *else_ctx; =20 aml_append(method, aml_acquire(ctrl_lock, 0xFFFF)); aml_append(method, aml_store(idx, cpu_selector)); aml_append(method, aml_store(zero, sta)); ifctx =3D aml_if(aml_equal(is_enabled, one)); { + /* cpu is present and enabled */ aml_append(ifctx, aml_store(aml_int(0xF), sta)); } aml_append(method, ifctx); + else_ctx =3D aml_else(); + { + /* cpu is present but disabled */ + aml_append(else_ctx, aml_store(aml_int(0xD), sta)); + } + aml_append(method, else_ctx); aml_append(method, aml_release(ctrl_lock)); aml_append(method, aml_return(sta)); } --=20 2.34.1 From nobody Sat Nov 23 20:41:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1730405281; cv=none; d=zohomail.com; s=zohoarc; b=Gc0Y3uuc89S//HqfDuAfHrDchCswYspECsdKRvLBl7uUfqProaldWvqPOijcvnQsgnVLKtqbZCzx4B2RVquQSLqvGw/8bPwvLBm4dWWCnl13/3u8BGLProXOeuNeK/MOVOgSVS/K1Ft81hur6yELP2vp1P85b2Qe2ivxZDmwXRk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730405281; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=hKzygCSGlNJUU+YX62pxHM+N8s5Glwr15DypvocAvSU=; b=AtU7L9QK58mfbngalONcNmb5/1mX16nEcdCwfMNmFV2TbeSzdz90V2Nw2QlCWbFNF6OnC3xbPLgvP3kofULfjB/oxkAEqwd7fkjcw79f5byB2lQsO7bRHmt9LD4sv5l9wgUqky8q8GaSysxTD4xO5XBR8SNKfRXF8vs2zlYo18c= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730405281291476.2556031090892; Thu, 31 Oct 2024 13:08:01 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6bSS-0000zv-A2; Thu, 31 Oct 2024 16:07: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 1t6bSJ-0000hY-EN; Thu, 31 Oct 2024 16:07:45 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6bSG-0007aG-F5; Thu, 31 Oct 2024 16:07:43 -0400 Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4XfZkP2wQbz6JBfK; Fri, 1 Nov 2024 04:06:05 +0800 (CST) Received: from frapeml500007.china.huawei.com (unknown [7.182.85.172]) by mail.maildlp.com (Postfix) with ESMTPS id 3ACC51400D3; Fri, 1 Nov 2024 04:07:27 +0800 (CST) Received: from 00293818-MRGF.huawei.com (10.48.152.207) by frapeml500007.china.huawei.com (7.182.85.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 31 Oct 2024 21:07:07 +0100 To: , , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH V2 5/6] tests/qtest/bios-tables-test: Update DSDT golden masters for x86/{pc, q35} Date: Thu, 31 Oct 2024 20:05:01 +0000 Message-ID: <20241031200502.3869-6-salil.mehta@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241031200502.3869-1-salil.mehta@huawei.com> References: <20241031200502.3869-1-salil.mehta@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.48.152.207] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To frapeml500007.china.huawei.com (7.182.85.172) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=185.176.79.56; envelope-from=salil.mehta@huawei.com; helo=frasgout.his.huawei.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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: , Reply-to: Salil Mehta From: Salil Mehta via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1730405283199116600 Content-Type: text/plain; charset="utf-8" Update DSDT golden master files for x86/pc and x86/q35 platforms to accommo= date changes made in the architecture-agnostic CPU AML. These updates notify the guest OS of vCPU hot-plug and hot-unplug status using the ACPI `_STA.Enable= d` bit. The following is a diff of the changes in the .dsl file generated with IASL: * Disassembling to symbolic ASL+ operators * - * Disassembly of tests/data/acpi/x86/pc/DSDT, Wed Oct 30 11:24:52 2024 + * Disassembly of /tmp/aml-2A3EW2, Wed Oct 30 11:24:52 2024 * * Original Table Header: * Signature "DSDT" - * Length 0x0000214F (8527) + * Length 0x00002155 (8533) * Revision 0x01 **** 32-bit table (V1), no 64-bit math support - * Checksum 0x59 + * Checksum 0xD2 * OEM ID "BOCHS " * OEM Table ID "BXPC " * OEM Revision 0x00000001 (1) @@ -1517,6 +1517,10 @@ If ((\_SB.PCI0.PRES.CPEN =3D=3D One)) { Local0 =3D 0x0F + } + Else + { + Local0 =3D 0x0D } Release (\_SB.PCI0.PRES.CPLK) Reported-by: Zhao Liu Signed-off-by: Salil Mehta --- tests/data/acpi/x86/pc/DSDT | Bin 8527 -> 8533 bytes tests/data/acpi/x86/pc/DSDT.acpierst | Bin 8438 -> 8444 bytes tests/data/acpi/x86/pc/DSDT.acpihmat | Bin 9852 -> 9858 bytes tests/data/acpi/x86/pc/DSDT.bridge | Bin 15398 -> 15404 bytes tests/data/acpi/x86/pc/DSDT.cphp | Bin 8991 -> 8997 bytes tests/data/acpi/x86/pc/DSDT.dimmpxm | Bin 10181 -> 10187 bytes tests/data/acpi/x86/pc/DSDT.hpbridge | Bin 8478 -> 8484 bytes tests/data/acpi/x86/pc/DSDT.hpbrroot | Bin 5034 -> 5040 bytes tests/data/acpi/x86/pc/DSDT.ipmikcs | Bin 8599 -> 8605 bytes tests/data/acpi/x86/pc/DSDT.memhp | Bin 9886 -> 9892 bytes tests/data/acpi/x86/pc/DSDT.nohpet | Bin 8385 -> 8391 bytes tests/data/acpi/x86/pc/DSDT.numamem | Bin 8533 -> 8539 bytes tests/data/acpi/x86/pc/DSDT.roothp | Bin 12320 -> 12326 bytes tests/data/acpi/x86/q35/DSDT | Bin 8355 -> 8361 bytes tests/data/acpi/x86/q35/DSDT.acpierst | Bin 8372 -> 8378 bytes tests/data/acpi/x86/q35/DSDT.acpihmat | Bin 9680 -> 9686 bytes .../acpi/x86/q35/DSDT.acpihmat-noinitiator | Bin 8634 -> 8640 bytes tests/data/acpi/x86/q35/DSDT.applesmc | Bin 8401 -> 8407 bytes tests/data/acpi/x86/q35/DSDT.bridge | Bin 11968 -> 11974 bytes tests/data/acpi/x86/q35/DSDT.core-count | Bin 12913 -> 12919 bytes tests/data/acpi/x86/q35/DSDT.core-count2 | Bin 33770 -> 33776 bytes tests/data/acpi/x86/q35/DSDT.cphp | Bin 8819 -> 8825 bytes tests/data/acpi/x86/q35/DSDT.cxl | Bin 13148 -> 13154 bytes tests/data/acpi/x86/q35/DSDT.dimmpxm | Bin 10009 -> 10015 bytes tests/data/acpi/x86/q35/DSDT.ipmibt | Bin 8430 -> 8436 bytes tests/data/acpi/x86/q35/DSDT.ipmismbus | Bin 8443 -> 8449 bytes tests/data/acpi/x86/q35/DSDT.ivrs | Bin 8372 -> 8378 bytes tests/data/acpi/x86/q35/DSDT.memhp | Bin 9714 -> 9720 bytes tests/data/acpi/x86/q35/DSDT.mmio64 | Bin 9485 -> 9491 bytes tests/data/acpi/x86/q35/DSDT.multi-bridge | Bin 13208 -> 13214 bytes tests/data/acpi/x86/q35/DSDT.noacpihp | Bin 8235 -> 8241 bytes tests/data/acpi/x86/q35/DSDT.nohpet | Bin 8213 -> 8219 bytes tests/data/acpi/x86/q35/DSDT.numamem | Bin 8361 -> 8367 bytes tests/data/acpi/x86/q35/DSDT.pvpanic-isa | Bin 8456 -> 8462 bytes tests/data/acpi/x86/q35/DSDT.thread-count | Bin 12913 -> 12919 bytes tests/data/acpi/x86/q35/DSDT.thread-count2 | Bin 33770 -> 33776 bytes tests/data/acpi/x86/q35/DSDT.tis.tpm12 | Bin 8961 -> 8967 bytes tests/data/acpi/x86/q35/DSDT.tis.tpm2 | Bin 8987 -> 8993 bytes tests/data/acpi/x86/q35/DSDT.type4-count | Bin 18589 -> 18595 bytes tests/data/acpi/x86/q35/DSDT.viot | Bin 14615 -> 14621 bytes tests/data/acpi/x86/q35/DSDT.xapic | Bin 35718 -> 35724 bytes tests/qtest/bios-tables-test-allowed-diff.h | 41 ------------------ 42 files changed, 41 deletions(-) diff --git a/tests/data/acpi/x86/pc/DSDT b/tests/data/acpi/x86/pc/DSDT index 92225236e717b2e522a2ee00492fb0ded418dc7b..e9e1a1eba3c81b296804ea50f2a= 42c3841bff6ef 100644 GIT binary patch delta 50 zcmV-20L}l;Le)YFL{mgmRUrTX0n)Jwx(otEKa<7`umVFglXwj_0Zx;z4NwK41#k)t Iv;GZH6P#QR&;S4c delta 44 zcmV+{0Mq}~LeD}9L{mgmPayyR0a>vMx(otOK9j}_umVjplXwj_0Z5at4N$WM4p0*{ C5)Co{ diff --git a/tests/data/acpi/x86/pc/DSDT.acpierst b/tests/data/acpi/x86/pc/= DSDT.acpierst index 25b39955059409b177870800949eaf937cd39005..7d0385b5f9e1f04e55cc190892a= d26050a930122 100644 GIT binary patch delta 50 zcmV-20L}mQLHt1qL{mgm{2%}T0UNOjx(otEKa<7`umVFglXwj_0Zx;z4NwK41#k)t Iv;GbE60H&tu>b%7 delta 44 zcmV+{0Mq~cLH0okL{mgm_8T^Q)x5Q+c* delta 44 zcmV+{0Mq}1P5ev>L{mgmd?o+@0T!_ex(otNM3cr0umVgulXwk50Z5a&4N$WX4ssYW CtPNrS diff --git a/tests/data/acpi/x86/pc/DSDT.bridge b/tests/data/acpi/x86/pc/DS= DT.bridge index 4cef454e379e1009141694e0f4036a2a701c80d7..5f91aafbefa0dd02d2cc18efbe1= 46c9cd6c78063 100644 GIT binary patch delta 50 zcmV-20L}lVc&vB|L{mgmEIa@J0pPI;x(otEKa<7`umVFglXwj_0Zx;z4NwK41#k)t Iv;GYzE}&8m+yDRo delta 44 zcmV+{0Mq}hc&2y?L{mgmCOiND0cWuax(otOK9j}_umVjplXwj_0Z5at4N$WM4ks=3D+ CYz;mD diff --git a/tests/data/acpi/x86/pc/DSDT.cphp b/tests/data/acpi/x86/pc/DSDT= .cphp index 1dc928333d7ae7e4df6bb51d850af5e1cb480158..26f4e272eb4146fffa8182e14d2= ccd110860516b 100644 GIT binary patch delta 55 zcmV-70LcHJMx{myL{mgmB_jX;0XDG;x(otET$9EOumVF-lXwks0ZxjVL{mgm%O?N;0pzg?&I|!gli3Wh0ZfyN4O#(CljaRj1)&9S3JtS0 G4v-n5ED#g` delta 52 zcmV-40L%Z&PsL9PL{mgm#U}s&0g15+&I|!ali3Wh0Y;OH4O$0C218R+K?#!~5G|7# K4jr>R4v!hafDfkt diff --git a/tests/data/acpi/x86/pc/DSDT.hpbridge b/tests/data/acpi/x86/pc/= DSDT.hpbridge index db420593a3c51eced25cd57420353fbb9ccdf63c..0606ddd2016530cc91834ef4186= 0f94655a35a43 100644 GIT binary patch delta 50 zcmV-20L}lNLZm_pL{mgmBq0C*0S2)Ox(otEKa<7`umVFglXwj_0Zx;z4NwK41#k)t Iv;GYr6J)OrKmY&$ delta 44 zcmV+{0Mq}ZLY_hjL{mgm9w7h#0gbT=3Dx(otOK9j}_umVjplXwj_0Z5at4N$WM4j&UE CpA4b^ diff --git a/tests/data/acpi/x86/pc/DSDT.hpbrroot b/tests/data/acpi/x86/pc/= DSDT.hpbrroot index 31b6adb4eb941e5bf0c02ec8c3819c9213adf022..545b4019468d928df92e7f3c458= 280a387914140 100644 GIT binary patch delta 59 zcmV-B0L1^QC$J|9L{mgmuoD0P0rs&9Z3_ZLKa+V2umVFglPe5122KV;Q&d5d&1)&9S3JtUV G4WJl%{STJ_ delta 42 zcmV+_0M-AbO`c5(L{mgmo+bbQ0ZXw8x(oqDlf?|N0Yj5_4L1Quldla>vjq;H7#Z*k A`2YX_ diff --git a/tests/data/acpi/x86/pc/DSDT.nohpet b/tests/data/acpi/x86/pc/DS= DT.nohpet index dd29f5cb620e5164601e303e37524530ddb12684..8e738e4ed34e90741b2af11bae2= 927ab23b9716f 100644 GIT binary patch delta 50 zcmV-20L}lwLB~M~L{mgm#~=3DUz0i3Z4EDQogKa)5NumVFglj;mM0Zx-44NwK41#k)t Ivv3Vj6MnM}CIA2c delta 44 zcmV+{0Mq}+LBT-^L{mgm!5{zt0VA;rEDQoqK9e{MumVjplj;mM0Z5Y}4N$Xp4Nwyz C4h)9? diff --git a/tests/data/acpi/x86/pc/DSDT.numamem b/tests/data/acpi/x86/pc/D= SDT.numamem index 8a6b56fe7da18bf42c339d13b863aabf81780527..78bc2ca8b1b6fa9a01182550dd9= d80fe27035ddb 100644 GIT binary patch delta 48 zcmV-00MGx`Lfb+LL{mgmTOj}d0ba2Rx(oqJlf?|N0ZEg04L1Q!ldla>1)&9S3JtUV G4ObI(HxCN{ delta 42 zcmV+_0M-B7Le)YFL{mgmRUrTX0RyoLx(oqDlf?|N0Yj5_4L1Quldla>vjq-T6BV8e AZ2$lO diff --git a/tests/data/acpi/x86/pc/DSDT.roothp b/tests/data/acpi/x86/pc/DS= DT.roothp index a16b0d9d4becec47fa3cf57ed0077ff6cff88908..f8164f4fb224b1accd45431baee= 9fa002c4f5cc7 100644 GIT binary patch delta 50 zcmV-20L}lPV5VRSL{mgmCNKa10ba2Rx(otEKa<7`umVFglXwj_0Zx;z4NwK41#k)t Iv;GYtB7e{h`Tzg` delta 44 zcmV+{0Mq}bV4z?ML{mgmATR&`0p+m@x(otOK9j}_umVjplXwj_0Z5at4N$WM4k02s C$_-oq diff --git a/tests/data/acpi/x86/q35/DSDT b/tests/data/acpi/x86/q35/DSDT index fb89ae0ac6d4346e33156e9e4d3718698a0a1a8e..de0b8b2511d0ddc72babf40cc4c= e4f206c9306c3 100644 GIT binary patch delta 55 zcmV-70LcHNL8(CsL{mgmsUQFV0kE+O2N?oIKa&#~umVFglf@Y}0Zx*Tg0oSn#2N?oSK9ds}umVjplf@Y}0Z5bl8BnuQ8fXSF C> diff --git a/tests/data/acpi/x86/q35/DSDT.acpihmat b/tests/data/acpi/x86/q3= 5/DSDT.acpihmat index 61c5bd52a42242e85090934e8e45bf01642609d6..3afe828b29962abf2f97bc5cdb0= 4416994570bcf 100644 GIT binary patch delta 71 zcmV-N0J#6qOV&#YL{mgm)+GP{0d27g2N?oHMUxX5umVCllf@Z92~Gw>Q&d3-TO*Sp d921j^8W@v08XX3q1#k)tV3Qvl6|-y_WDDBY6G#96 delta 44 zcmV+{0Mq~0OVCRSL{mgm&?Nu>0ras72N?oRM3WO4umVgulf@Z90Z5Yv8c?%c8hHyq CcMWm? diff --git a/tests/data/acpi/x86/q35/DSDT.acpihmat-noinitiator b/tests/data= /acpi/x86/q35/DSDT.acpihmat-noinitiator index 3aaa2bbdf54a0d0cade14421e84c6ec5a42f96fa..b804c531acb6e8900106dab687c= 8689bec69ef3d 100644 GIT binary patch delta 48 zcmV-00MGxrL%>4{L{mgmz##wt0T{6g2N?lOlM)%R0ZNm^8Cn5OlOGyT1)&9S3JtSv G8cYXG&J7Cy delta 42 zcmV+_0M-A%L%Kr>L{mgmx*-4n0ll#b2N?lIlM)%R0YsC;8Cn5IlOGyTvvnFv2NjkK AYybcN diff --git a/tests/data/acpi/x86/q35/DSDT.applesmc b/tests/data/acpi/x86/q3= 5/DSDT.applesmc index 944209adeaa5bbb722431161c404cb51b8209993..02fdf5b3fd51f7ffb20305335d1= 11b1278c1d645 100644 GIT binary patch delta 55 zcmV-70LcH*LDxYFL{mgm*B}4@0idx82N?oIKa&#~umVFglf@Y}0Zxycmv&I>-0s&5wdK^#&p#^XX O4PcWn9~HCT9Fi6PNfD_4 delta 45 zcmV+|0Mh^WWbtGQL{mgmaWVh^0k5$N2N?p5TayzRu>y)vv&I>-0s%;qdK^%*&>W`~ DX3-C_ diff --git a/tests/data/acpi/x86/q35/DSDT.core-count2 b/tests/data/acpi/x86= /q35/DSDT.core-count2 index 3a0cb8c581c8cc630a2ec21712b7f8b75fcad1c8..2e3cc743567b8c166b2d4dc4ab4= 21af931842418 100644 GIT binary patch delta 72 zcmV-O0Js0@hXU}20t!S^L{#vD00048u?hzn0gRIp8L|P1v&9);3<*vKLsL{i30otR eK`0ZGswNndStcC@p#^XX4PcW$C>67dCSP4Y85Q3E delta 45 zcmV+|0Mh^PhXU${0t!S^L{#d700032u?hzn0fv(j8L|O`v&9);3;{@!CMHm`d?s{V DRk03+ diff --git a/tests/data/acpi/x86/q35/DSDT.cphp b/tests/data/acpi/x86/q35/DS= DT.cphp index 20955d0aa30120553da35d5a6640055d26255cf9..2cfc5a6669b09ca0bf8fda926a5= c6e3848e819c1 100644 GIT binary patch delta 55 zcmV-70LcIIMEOJtL{mgmc_IJ+0Ti(c2N?oIT$2+SumVF-lf@Zw0Zx-R8c+tI1#k)t NV3SZB6|& P9R;BUa0(5xf*O|$)*}#C delta 58 zcmV-A0LA~GPMJ;$L{mgm87BY$0cNoZ8yNvelO`Fl0Y;P98CnTQ218R+K?z$UlkprA QlTI2nlTjQMvz{7(4AgrNjsO4v diff --git a/tests/data/acpi/x86/q35/DSDT.ipmibt b/tests/data/acpi/x86/q35/= DSDT.ipmibt index 45f911ada5645f158f3d6c0c430ec1d52cadc5d8..875781741c0239bd70a6fc4013b= c8f03ea6ced32 100644 GIT binary patch delta 55 zcmV-70LcIDLG(ciL{mgm^dJBL0pzg?2N?oIKa&#~umVFglf@Y}0Zx*Tg0oSn#2N?oSK9ds}umVjplf@Y}0Z5bl8BnuQ8fXSF C> diff --git a/tests/data/acpi/x86/q35/DSDT.memhp b/tests/data/acpi/x86/q35/D= SDT.memhp index 5ce081187a578ba7145a9ba20d30be36c13b7663..2e90fba1e72c1ef94b9e8ddb5b5= 034fe7371e447 100644 GIT binary patch delta 53 zcmV-50LuUJOZZC)L{mgm_$2@U0fey%2N?lNlM)%R0ZEg@88-n=3Dll&P_2B8IT3JqYB Lu^bh%VH%MO*#Z#! delta 42 zcmV+_0M-BaOY%z!L{mgm@+ANO0V%Nx2N?lHlM)%R0Yj6-88-n)ll&P_vr-zS3ntSI AhX4Qo diff --git a/tests/data/acpi/x86/q35/DSDT.mmio64 b/tests/data/acpi/x86/q35/= DSDT.mmio64 index bdf36c4d575bfc4eb2eac3f00c9b7b4270f88677..ebde2fed094fd0eecbbc83e8ccc= 12db3ff471b6a 100644 GIT binary patch delta 53 zcmV-50LuT3N|Q0m`uox)%aZK9j~5umVjplXw_50Z5at7*MkX87v1g CB@H8Bnvt8CM1Z C;0zW3 diff --git a/tests/data/acpi/x86/q35/DSDT.numamem b/tests/data/acpi/x86/q35= /DSDT.numamem index ba6669437e65952f24516ded954b33fe54bdedfb..b97e22e837d05355d75d56fb930= 29cb1b08abf0d 100644 GIT binary patch delta 53 zcmV-50LuTVL9amyL{mgmuOI*b0X(q^2N?lNlM)%R0ZEg@88-n=3Dll&P_2B8IT3JqYB Lu^bh%VH!vVo@@_t delta 42 zcmV+_0M-AmL8(CsL{mgmsUQFV0pYO<2N?lHlM)%R0Yj6-88-n)ll&P_vr-ye1{Ki^ A{Qv*} diff --git a/tests/data/acpi/x86/q35/DSDT.pvpanic-isa b/tests/data/acpi/x86= /q35/DSDT.pvpanic-isa index 6ad42873e91c80cef5a42224cb4d31936dad59b4..ac99bf0cee6ab2e2c20ddefb003= 30b105f524b24 100644 GIT binary patch delta 55 zcmV-70LcG{LXJWTL{mgm4j}*l0b;QV2N?oIKa&#~umVFglf@Y}0Zxycmv&I>-0s&5wdK^#&p#^XX O4PcWn9~HCT9Fi6PNfD_4 delta 45 zcmV+|0Mh^WWbtGQL{mgmaWVh^0k5$N2N?p5TayzRu>y)vv&I>-0s%;qdK^%*&>W`~ DX3-C_ diff --git a/tests/data/acpi/x86/q35/DSDT.thread-count2 b/tests/data/acpi/x= 86/q35/DSDT.thread-count2 index 3a0cb8c581c8cc630a2ec21712b7f8b75fcad1c8..2e3cc743567b8c166b2d4dc4ab4= 21af931842418 100644 GIT binary patch delta 72 zcmV-O0Js0@hXU}20t!S^L{#vD00048u?hzn0gRIp8L|P1v&9);3<*vKLsL{i30otR eK`0ZGswNndStcC@p#^XX4PcW$C>67dCSP4Y85Q3E delta 45 zcmV+|0Mh^PhXU${0t!S^L{#d700032u?hzn0fv(j8L|O`v&9);3;{@!CMHm`d?s{V DRk03+ diff --git a/tests/data/acpi/x86/q35/DSDT.tis.tpm12 b/tests/data/acpi/x86/q= 35/DSDT.tis.tpm12 index e381ce4cbf2b11f56a2d0537db4d21acc97450c9..3305b0a67f4a672096a4c7e19d1= 3e58e771c6c54 100644 GIT binary patch delta 55 zcmV-70LcG=3DMu$cUL{mgm2O|Ig0pPI;2N?oIKa&#~umVFglf@Y}0Zx_l8L|R};bW delta 62 zcmV-E0Kxx^mjZ^D0t!S^L{x^00005)u?hzn0fLhf8L|S8;j_jW%MA%g218R+K?z$U UlTj)YldUH;ld&lkv;8NJV|@P=3DH~;_u diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index 512d40665d..dfb8523c8b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,42 +1 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/x86/pc/DSDT", -"tests/data/acpi/x86/pc/DSDT.acpierst", -"tests/data/acpi/x86/pc/DSDT.acpihmat", -"tests/data/acpi/x86/pc/DSDT.bridge", -"tests/data/acpi/x86/pc/DSDT.cphp", -"tests/data/acpi/x86/pc/DSDT.dimmpxm", -"tests/data/acpi/x86/pc/DSDT.hpbridge", -"tests/data/acpi/x86/pc/DSDT.hpbrroot", -"tests/data/acpi/x86/pc/DSDT.ipmikcs", -"tests/data/acpi/x86/pc/DSDT.memhp", -"tests/data/acpi/x86/pc/DSDT.nohpet", -"tests/data/acpi/x86/pc/DSDT.numamem", -"tests/data/acpi/x86/pc/DSDT.roothp", -"tests/data/acpi/x86/q35/DSDT", -"tests/data/acpi/x86/q35/DSDT.acpierst", -"tests/data/acpi/x86/q35/DSDT.acpihmat", -"tests/data/acpi/x86/q35/DSDT.acpihmat-noinitiator", -"tests/data/acpi/x86/q35/DSDT.applesmc", -"tests/data/acpi/x86/q35/DSDT.bridge", -"tests/data/acpi/x86/q35/DSDT.core-count", -"tests/data/acpi/x86/q35/DSDT.core-count2", -"tests/data/acpi/x86/q35/DSDT.cphp", -"tests/data/acpi/x86/q35/DSDT.cxl", -"tests/data/acpi/x86/q35/DSDT.dimmpxm", -"tests/data/acpi/x86/q35/DSDT.ipmibt", -"tests/data/acpi/x86/q35/DSDT.ipmismbus", -"tests/data/acpi/x86/q35/DSDT.ivrs", -"tests/data/acpi/x86/q35/DSDT.memhp", -"tests/data/acpi/x86/q35/DSDT.mmio64", -"tests/data/acpi/x86/q35/DSDT.multi-bridge", -"tests/data/acpi/x86/q35/DSDT.noacpihp", -"tests/data/acpi/x86/q35/DSDT.nohpet", -"tests/data/acpi/x86/q35/DSDT.numamem", -"tests/data/acpi/x86/q35/DSDT.pvpanic-isa", -"tests/data/acpi/x86/q35/DSDT.thread-count", -"tests/data/acpi/x86/q35/DSDT.thread-count2", -"tests/data/acpi/x86/q35/DSDT.tis.tpm12", -"tests/data/acpi/x86/q35/DSDT.tis.tpm2", -"tests/data/acpi/x86/q35/DSDT.type4-count", -"tests/data/acpi/x86/q35/DSDT.viot", -"tests/data/acpi/x86/q35/DSDT.xapic", --=20 2.34.1 From nobody Sat Nov 23 20:41:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1730405287; cv=none; d=zohomail.com; s=zohoarc; b=bU+pEoQAftGtdaNAUDYWX20OW9B+8FwMVSm0ON2FRq1DDctAdNCMHxMjKSYqPxLLHDQ8za23SG+AGoTlcd3bXNpDnIMingC2xgCoheTtmyQ4e7jjxGUZt5fYv2+nLGqZeUnk5y+Fpyue8j7Hqwqa+Fv4m5asYaorV4EXT2U5wN8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730405287; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=0XUol1bTlvT5DBMz/IGKlfE01NhDaVIhxkQqDhUCbqM=; b=TOUeGeE/JP1LwGOECf186/mO1TQXcAldqlZycFqH0LBKkkuhgxURCl4wPoRmDqhWH8YPxC/aZfHKjB4MZl8bbbalFvJ+nKKx3WdJoBHKrt0CbvlerpoRK3skvK+b0tpTR1WmPqF2s38hG3i8SodT54N9E17FxZVeqYLXxnNhmxo= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730405287307971.7306743399246; Thu, 31 Oct 2024 13:08:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6bSe-00024A-Ka; Thu, 31 Oct 2024 16:08:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6bSc-0001xH-C0; Thu, 31 Oct 2024 16:08:02 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6bSa-0007bY-H4; Thu, 31 Oct 2024 16:08:02 -0400 Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4XfZfk0L2Mz6L6wx; Fri, 1 Nov 2024 04:02:54 +0800 (CST) Received: from frapeml500007.china.huawei.com (unknown [7.182.85.172]) by mail.maildlp.com (Postfix) with ESMTPS id 12727140A9C; Fri, 1 Nov 2024 04:07:47 +0800 (CST) Received: from 00293818-MRGF.huawei.com (10.48.152.207) by frapeml500007.china.huawei.com (7.182.85.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 31 Oct 2024 21:07:27 +0100 To: , , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH V2 6/6] hw/acpi: Update GED with vCPU Hotplug VMSD for migration Date: Thu, 31 Oct 2024 20:05:02 +0000 Message-ID: <20241031200502.3869-7-salil.mehta@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241031200502.3869-1-salil.mehta@huawei.com> References: <20241031200502.3869-1-salil.mehta@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.48.152.207] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To frapeml500007.china.huawei.com (7.182.85.172) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=185.176.79.56; envelope-from=salil.mehta@huawei.com; helo=frasgout.his.huawei.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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: , Reply-to: Salil Mehta From: Salil Mehta via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1730405289309116600 Content-Type: text/plain; charset="utf-8" The ACPI CPU hotplug state `is_enabled` must be migrated along with other vCPU hotplug states to the destination VM. Update the GED's VM State Description (VMSD) table subsection to include the CPU Hotplug VM State Description (VMSD). Question: How to stop `is_enabled` state being migrated in case of x86? Excerpt of GED VMSD State Dump at Source: "acpi-ged (16)": { "ged_state": { "sel": "0x00000000" }, [...] "acpi-ged/cpuhp": { "cpuhp_state": { "selector": "0x00000005", "command": "0x00", "devs": [ { "is_inserting": false, "is_removing": false, "is_enabled": true, "ost_event": "0x00000000", "ost_status": "0x00000000" }, [...] { "is_inserting": false, "is_removing": false, "is_enabled": false, "ost_event": "0x00000000", "ost_status": "0x00000000" } ] } } }, Signed-off-by: Salil Mehta --- hw/acpi/cpu.c | 1 + hw/acpi/generic_event_device.c | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c index 017b847815..514d671bfb 100644 --- a/hw/acpi/cpu.c +++ b/hw/acpi/cpu.c @@ -308,6 +308,7 @@ static const VMStateDescription vmstate_cpuhp_sts =3D { .fields =3D (const VMStateField[]) { VMSTATE_BOOL(is_inserting, AcpiCpuStatus), VMSTATE_BOOL(is_removing, AcpiCpuStatus), + VMSTATE_BOOL(is_enabled, AcpiCpuStatus), VMSTATE_UINT32(ost_event, AcpiCpuStatus), VMSTATE_UINT32(ost_status, AcpiCpuStatus), VMSTATE_END_OF_LIST() diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c index d00f5a6c1c..663d9cb093 100644 --- a/hw/acpi/generic_event_device.c +++ b/hw/acpi/generic_event_device.c @@ -331,6 +331,24 @@ static const VMStateDescription vmstate_memhp_state = =3D { } }; =20 +static bool cpuhp_needed(void *opaque) +{ + MachineClass *mc =3D MACHINE_GET_CLASS(qdev_get_machine()); + + return mc->has_hotpluggable_cpus; +} + +static const VMStateDescription vmstate_cpuhp_state =3D { + .name =3D "acpi-ged/cpuhp", + .version_id =3D 1, + .minimum_version_id =3D 1, + .needed =3D cpuhp_needed, + .fields =3D (VMStateField[]) { + VMSTATE_CPU_HOTPLUG(cpuhp_state, AcpiGedState), + VMSTATE_END_OF_LIST() + } +}; + static const VMStateDescription vmstate_ged_state =3D { .name =3D "acpi-ged-state", .version_id =3D 1, @@ -379,6 +397,7 @@ static const VMStateDescription vmstate_acpi_ged =3D { }, .subsections =3D (const VMStateDescription * const []) { &vmstate_memhp_state, + &vmstate_cpuhp_state, &vmstate_ghes_state, NULL } --=20 2.34.1