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

Dov Murik posted 26 patches 4 years, 11 months ago
Maintainers: "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Eric Blake <eblake@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, Cornelia Huck <cohuck@redhat.com>, Markus Armbruster <armbru@redhat.com>, Juan Quintela <quintela@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
[RFC PATCH 07/26] cpu: Add boolean aux field to CPUState
Posted by Dov Murik 4 years, 11 months ago
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 --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(),
 };
 
-- 
2.20.1