diff mbox series

[RFC,07/26] cpu: Add boolean aux field to CPUState

Message ID 20210302204822.81901-8-dovmurik@linux.vnet.ibm.com (mailing list archive)
State New, archived
Headers show
Series Confidential guest live migration | expand

Commit Message

Dov Murik March 2, 2021, 8:48 p.m. UTC
The aux field indicates auxiliary CPUs.  This will allow QEMU to act
differently on auxilirary CPUs, for example pausing the VM while keeping
the auxiliary CPUs running.

Signed-off-by: Dov Murik <dovmurik@linux.vnet.ibm.com>
---
 include/hw/core/cpu.h | 2 ++
 hw/core/cpu.c         | 1 +
 2 files changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index c005d3dc2d..cdbb6462a3 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -430,6 +430,8 @@  struct CPUState {
 
     int hvf_fd;
 
+    bool aux;
+
     /* track IOMMUs whose translations we've cached in the TCG TLB */
     GArray *iommu_notifiers;
 };
diff --git a/hw/core/cpu.c b/hw/core/cpu.c
index 00330ba07d..2100cb7f1a 100644
--- a/hw/core/cpu.c
+++ b/hw/core/cpu.c
@@ -387,6 +387,7 @@  static Property cpu_common_props[] = {
                      MemoryRegion *),
 #endif
     DEFINE_PROP_BOOL("start-powered-off", CPUState, start_powered_off, false),
+    DEFINE_PROP_BOOL("aux", CPUState, aux, false),
     DEFINE_PROP_END_OF_LIST(),
 };