From 84f1b92f974fbb19967c5f10ac6c3f4a04fb86dd Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Wed, 30 Apr 2014 13:48:41 -0300 Subject: target-i386: Add "migratable" property to "host" CPU model MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Andreas Färber --- target-i386/cpu-qom.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'target-i386/cpu-qom.h') 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; -- cgit v1.2.1