diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2013-07-26 17:09:36 -0300 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-07-29 15:29:16 +0200 |
commit | 9337e3b6e1d779215423d9b419d42200506deaab (patch) | |
tree | d5238219ae8b6a15a0f43ed26d2b613aae21f8b6 /target-i386/cpu-qom.h | |
parent | c139911261c5acc9dae56b1180db320ba25636bd (diff) |
target-i386: Disable PMU CPUID leaf by default
Bug description: QEMU currently gets all bits from GET_SUPPORTED_CPUID
for CPUID leaf 0xA and passes them directly to the guest. This makes
the guest ABI depend on host kernel and host CPU capabilities, and
breaks live migration if we migrate between hosts with different
capabilities (e.g., different number of PMU counters).
Add a "pmu" property to X86CPU, and set it to true only on "-cpu host",
or on pc-*-1.5 and older machine-types.
For now, setting pmu=on will enable the current passthrough mode that
doesn't have any ABI stability guarantees, but in the future we may
implement a mode where the PMU CPUID bits are stable and configurable.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Cc: Paolo Bonzini <pbonzini@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.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/target-i386/cpu-qom.h b/target-i386/cpu-qom.h index 60d2b5d772..53b4c3439b 100644 --- a/target-i386/cpu-qom.h +++ b/target-i386/cpu-qom.h @@ -68,6 +68,13 @@ typedef struct X86CPU { /* Features that were filtered out because of missing host capabilities */ uint32_t filtered_features[FEATURE_WORDS]; + + /* Enable PMU CPUID bits. This can't be enabled by default yet because + * it doesn't have ABI stability guarantees, as it passes all PMU CPUID + * bits returned by GET_SUPPORTED_CPUID (that depend on host CPU and kernel + * capabilities) directly to the guest. + */ + bool enable_pmu; } X86CPU; static inline X86CPU *x86_env_get_cpu(CPUX86State *env) |