From nobody Fri Dec 27 07:11:19 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1732715917; cv=none; d=zohomail.com; s=zohoarc; b=nWuMEIjaIXNmwiufZElJckdnYqTPKBdhZGZ5RYRejcwpDxo1OR3utiWr3HValPGhwnwl9C+7yfIDwVM+Hk3Azz3j74UsRUCgFl2pjEJ35VmCd3/y1VaPwcR3GhYO2kf5DrdjeBZqd/IGzCebKcLd060k7ZRxiyl3rMP+rQc9vGA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732715917; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=wJrhS8Qk1ShMNFRxlemP9veo4SdCGzL5pa49imArvN0=; b=ld7fCbF1k5HMm47+BFhJsQ+BU2ZzcRoAQwaRM2LKwnFxMdGkQxVcQVDji8MwIJ0NM18HHWTIoI1MR9Xt2vBIrNZaylImTBsfvI/xfNKcD+CnJLNDg9Fq9y+29OTNTafaKJSkZsPuQ4PycQeGMqMeLwqgoEuzAJ/5qRthI8ACfFk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1732715917391194.96662192640304; Wed, 27 Nov 2024 05:58:37 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tGIY8-0003fw-VL; Wed, 27 Nov 2024 08:57:48 -0500 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 1tGIY5-0003fE-IE for qemu-devel@nongnu.org; Wed, 27 Nov 2024 08:57:45 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tGIY4-0007iV-3o for qemu-devel@nongnu.org; Wed, 27 Nov 2024 08:57:45 -0500 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-689-vZWrfruuPDC5hnc2ekfLjA-1; Wed, 27 Nov 2024 08:57:42 -0500 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-434a4ad4798so17092855e9.0 for ; Wed, 27 Nov 2024 05:57:42 -0800 (PST) Received: from redhat.com ([2a02:14f:1ec:7d4b:8b11:bed7:9e00:8df7]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434aa7804fbsm22358165e9.21.2024.11.27.05.57.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Nov 2024 05:57:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732715863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wJrhS8Qk1ShMNFRxlemP9veo4SdCGzL5pa49imArvN0=; b=WVJ+u7rbltc+0OLz3iKlnblrk1vYbDj90j0yGXN7XEU+NW35b62NUVu2CagcTRzN3GVzsF suMmhbef0IeaoX63qFHbaJFRhLtJkU1gOshPfdQPlLHTzHTRD7/hH1F51lU1RsNKtwdsZs t27V5V53JvD03wg7F/W71XuX7PHMH4s= X-MC-Unique: vZWrfruuPDC5hnc2ekfLjA-1 X-Mimecast-MFC-AGG-ID: vZWrfruuPDC5hnc2ekfLjA X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732715861; x=1733320661; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=wJrhS8Qk1ShMNFRxlemP9veo4SdCGzL5pa49imArvN0=; b=sCzsXQXxy1y2FGglvTdDg+MyLK7zUmpELpDft/1ARRJTnt3D1cY+/IJO+zoP+S5Oio KDT4fICids+locIZytm8CQ36pktN8cIyxwhBM+qvThevKthrVjWYVvfbatEi8RRdrzAL ea6LeCgf+2oVbPpYxT0odhzE4w7sB9cTeEW0Mi7z1MUbhI6E+aX97qyK75GeF0qlpn/Q HiTVekYkUsi5s3z+jKKqZfQvTVAhts8skmr4N30+lFtLZkRf0cl/EViWmBMuCYW8SJpc 9HDUQwYJFySfPAjA2lNp8QGNRGmsa0TdkQTu18ia5PFWkh0z6gpAUzLOWSHWxk7D7XPy x0MQ== X-Gm-Message-State: AOJu0YwTCye3+gCSfa9hnPrC8Q4TmDm0dRZLUMYeLuRSmH37Rzl5Io0u UBP+zPixpHn70OriAOGB7/pj2IJHAQSFEJ3c0UgVye4jrFL+LWOSJ76kg7o+UO6RZVJmKi7uoXz HWu11H8BOKbSyHfeIhILpOEQrfIDOxcI/soxEppciZKZqHR2Y67KX2sCzdXjJ0lTdPCzRvqpu5g J/yNryIVBXIKAnHQCm6j4P9eGavnyeNGer X-Gm-Gg: ASbGncvVEZEcxTpZgF0gEWPeIh8ydirInbJTNWH7loArvTZWBwld94BsY44xkNOr10v FHx/wVGTa3m61w8JtCfsKPC+jzkV0nbu2hf6EDytO1n9JaZN+eHCX1NrVqwK+MyB0Lv1exdRXzi 7sQ2vw5zIoW1jfui4YlextwFWdpfdLBGAgfaqbNHqQA/aWcg5zc1qZh95RLuJzD6s9kVc5XoV5P pEXzE47Bi/3HPAOGs+glDXhZv044EPbhIR3ngjWyup3 X-Received: by 2002:a05:600c:56d7:b0:434:a468:4a57 with SMTP id 5b1f17b1804b1-434a9de8d3amr24432445e9.26.1732715860897; Wed, 27 Nov 2024 05:57:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IELN1x1hmuo8yUsYGRVwB9aTk0Dg6sfAIxKvvrxbnP0P6rjOTRz9ZyWqqhd/yqJjLk/8dIptg== X-Received: by 2002:a05:600c:56d7:b0:434:a468:4a57 with SMTP id 5b1f17b1804b1-434a9de8d3amr24432225e9.26.1732715860541; Wed, 27 Nov 2024 05:57:40 -0800 (PST) Date: Wed, 27 Nov 2024 08:57:37 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Igor Mammedov , Ani Sinha , Eduardo Habkost , Marcel Apfelbaum , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , Yanan Wang , Zhao Liu Subject: [PULL 04/13] Revert "hw/acpi: Make CPUs ACPI `presence` conditional during vCPU hot-unplug" Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.931, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1732715918195019100 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Igor Mammedov This reverts commit 2d6cfbaf174b91dfa9a50065f7494634afb39c23. The patch is supposed to be part of ARM CPU hotplug series and has not value on its own without it. The series however is still in RFC stage and outside of scope 9.2 release. On top of that it introduces not needed callback that pokes directly into CPU state without any need for that. Instead properties and AML generator option should be used to configure static platform depended vCPU presence state. Drop the patch so that corrected version could be posted along with ARM CPU hotplug series and properly reviewed in relevant context. That also helps us to keep history cleaner with new patch being against original code vs a string of fixups on top of current mess. Signed-off-by: Igor Mammedov Message-Id: <20241112170258.2996640-4-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/core/cpu.h | 1 - hw/acpi/cpu.c | 15 +-------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index e7de77dc6d..c3ca0babcb 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -158,7 +158,6 @@ struct CPUClass { void (*dump_state)(CPUState *cpu, FILE *, int flags); void (*query_cpu_fast)(CPUState *cpu, CpuInfoFast *value); int64_t (*get_arch_id)(CPUState *cpu); - bool (*cpu_persistent_status)(CPUState *cpu); void (*set_pc)(CPUState *cpu, vaddr value); vaddr (*get_pc)(CPUState *cpu); int (*gdb_read_register)(CPUState *cpu, GByteArray *buf, int reg); diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c index 9b03b4292e..5cb60ca8bc 100644 --- a/hw/acpi/cpu.c +++ b/hw/acpi/cpu.c @@ -233,17 +233,6 @@ void cpu_hotplug_hw_init(MemoryRegion *as, Object *own= er, memory_region_add_subregion(as, base_addr, &state->ctrl_reg); } =20 -static bool should_remain_acpi_present(DeviceState *dev) -{ - CPUClass *k =3D CPU_GET_CLASS(dev); - /* - * A system may contain CPUs that are always present on one die, NUMA = node, - * or socket, yet may be non-present on another simultaneously. Check = from - * architecture specific code. - */ - return k->cpu_persistent_status && k->cpu_persistent_status(CPU(dev)); -} - static AcpiCpuStatus *get_cpu_status(CPUHotplugState *cpu_st, DeviceState = *dev) { CPUClass *k =3D CPU_GET_CLASS(dev); @@ -300,9 +289,7 @@ void acpi_cpu_unplug_cb(CPUHotplugState *cpu_st, return; } =20 - if (!should_remain_acpi_present(dev)) { - cdev->cpu =3D NULL; - } + cdev->cpu =3D NULL; } =20 static const VMStateDescription vmstate_cpuhp_sts =3D { --=20 MST