All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: qemu-devel@nongnu.org
Cc: lersek@redhat.com, ankur.a.arora@oracle.com, mst@redhat.com
Subject: [PATCH 7/8] x86: ich9: factor out "guest_cpu_hotplug_features"
Date: Fri,  4 Dec 2020 12:09:38 -0500	[thread overview]
Message-ID: <20201204170939.1815522-8-imammedo@redhat.com> (raw)
In-Reply-To: <20201204170939.1815522-1-imammedo@redhat.com>

it will be reused by next patch to check validity of unplug
feature.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 hw/isa/lpc_ich9.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
index 087a18d04d..da80430144 100644
--- a/hw/isa/lpc_ich9.c
+++ b/hw/isa/lpc_ich9.c
@@ -366,6 +366,7 @@ static void smi_features_ok_callback(void *opaque)
 {
     ICH9LPCState *lpc = opaque;
     uint64_t guest_features;
+    uint64_t guest_cpu_hotplug_features;
 
     if (lpc->smi_features_ok) {
         /* negotiation already complete, features locked */
@@ -378,9 +379,12 @@ static void smi_features_ok_callback(void *opaque)
         /* guest requests invalid features, leave @features_ok at zero */
         return;
     }
+
+    guest_cpu_hotplug_features = guest_features &
+                                 (BIT_ULL(ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT) |
+                                  BIT_ULL(ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT));
     if (!(guest_features & BIT_ULL(ICH9_LPC_SMI_F_BROADCAST_BIT)) &&
-        guest_features & (BIT_ULL(ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT) |
-                          BIT_ULL(ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT))) {
+        guest_cpu_hotplug_features) {
         /*
          * cpu hot-[un]plug with SMI requires SMI broadcast,
          * leave @features_ok at zero
-- 
2.27.0



  parent reply	other threads:[~2020-12-04 20:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04 17:09 [PATCH 0/8] add support for cpu hot-unplug with SMI broadcast enabled Igor Mammedov
2020-12-04 17:09 ` [PATCH 1/8] hw: add compat machines for 6.0 Igor Mammedov
2020-12-04 17:09 ` [PATCH 2/8] acpi: cpuhp: introduce 'firmware performs eject' status/control bits Igor Mammedov
2020-12-07  6:31   ` Ankur Arora
2020-12-07  8:47     ` Ankur Arora
2020-12-07 12:48       ` Igor Mammedov
2020-12-07 19:01         ` Ankur Arora
2020-12-07 12:42     ` Igor Mammedov
2020-12-04 17:09 ` [PATCH 3/8] x86: acpi: introduce AcpiPmInfo::smi_on_cpu_unplug Igor Mammedov
2020-12-04 17:09 ` [PATCH 4/8] tests/acpi: allow expected files change Igor Mammedov
2020-12-04 17:09 ` [PATCH 5/8] x86: acpi: let the firmware handle pending "CPU remove" events in SMM Igor Mammedov
2020-12-07  6:20   ` Ankur Arora
2020-12-07  6:24     ` Ankur Arora
2020-12-07 12:57     ` Igor Mammedov
2020-12-04 17:09 ` [PATCH 6/8] tests/acpi: update expected files Igor Mammedov
2020-12-04 17:09 ` Igor Mammedov [this message]
2020-12-04 17:09 ` [PATCH 8/8] x86: ich9: let firmware negotiate 'CPU hot-unplug with SMI' feature Igor Mammedov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201204170939.1815522-8-imammedo@redhat.com \
    --to=imammedo@redhat.com \
    --cc=ankur.a.arora@oracle.com \
    --cc=lersek@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.