]> git.proxmox.com Git - mirror_qemu.git/commit - target/i386/cpu.c
target-i386: Disable PMU CPUID leaf by default
authorEduardo Habkost <ehabkost@redhat.com>
Fri, 26 Jul 2013 20:09:36 +0000 (17:09 -0300)
committerAndreas Färber <afaerber@suse.de>
Mon, 29 Jul 2013 13:29:16 +0000 (15:29 +0200)
commit9337e3b6e1d779215423d9b419d42200506deaab
treed5238219ae8b6a15a0f43ed26d2b613aae21f8b6
parentc139911261c5acc9dae56b1180db320ba25636bd
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>
include/hw/i386/pc.h
target-i386/cpu-qom.h
target-i386/cpu.c