aboutsummaryrefslogtreecommitdiff
path: root/target-i386/cpu-qom.h
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2014-04-30 13:48:41 -0300
committerAndreas Färber <afaerber@suse.de>2014-06-25 23:54:57 +0200
commit84f1b92f974fbb19967c5f10ac6c3f4a04fb86dd (patch)
treeca1c3421f747c4c6b6af2c3d5a9bd4b7ff87cfac /target-i386/cpu-qom.h
parentfefb41bf3485a1c9a44c15e382d28035c6fb5f4b (diff)
target-i386: Add "migratable" property to "host" CPU model
This flag will allow the user to choose between two modes: * All flags that can be enabled on the host, even if unmigratable (migratable=no); * All flags that can be enabled on the host, are known to QEMU and migratable (migratable=yes). The default is still migratable=false, to keep current behavior, but this will be changed to migratable=true by another patch. My plan was to support the "migratable" flag on all CPU classes, but have the default to "false" on all CPU models except "host". However, DeviceClass has no mechanism to allow a child class to have a different property default from the parent class yet, so by now only the "host" CPU model will support the "migratable" flag. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-i386/cpu-qom.h')
-rw-r--r--target-i386/cpu-qom.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/target-i386/cpu-qom.h b/target-i386/cpu-qom.h
index 0808cfc67d..ff3a5de1df 100644
--- a/target-i386/cpu-qom.h
+++ b/target-i386/cpu-qom.h
@@ -71,6 +71,9 @@ typedef struct X86CPUClass {
/**
* X86CPU:
* @env: #CPUX86State
+ * @migratable: If set, only migratable flags will be accepted when "enforce"
+ * mode is used, and only migratable flags will be included in the "host"
+ * CPU model.
*
* An x86 CPU.
*/
@@ -88,6 +91,7 @@ typedef struct X86CPU {
bool check_cpuid;
bool enforce_cpuid;
bool expose_kvm;
+ bool migratable;
/* if true the CPUID code directly forward host cache leaves to the guest */
bool cache_info_passthrough;