i386/hyperv: add hv-frequencies cpu property
commit9445597b6a323c5afee7ed33ca2c1913f78a92dc
authorRoman Kagan <rkagan@virtuozzo.com>
Fri, 30 Mar 2018 17:02:08 +0000 (30 20:02 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 9 Apr 2018 14:36:38 +0000 (9 16:36 +0200)
tree6a1ad5cd12102a76662cc613794c4b8ea9717b1f
parent7becac84fb352c01ad8b914aa956688f03079739
i386/hyperv: add hv-frequencies cpu property

In order to guarantee compatibility on migration, QEMU should have
complete control over the features it announces to the guest via CPUID.

However, the availability of Hyper-V frequency MSRs
(HV_X64_MSR_TSC_FREQUENCY and HV_X64_MSR_APIC_FREQUENCY) depends solely
on the support for them in the underlying KVM.

Introduce "hv-frequencies" cpu property (off by default) which gives
QEMU full control over whether these MSRs are announced.

While at this, drop the redundant check of the cpu tsc frequency, and
decouple this feature from hv-time.

Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20180330170209.20627-2-rkagan@virtuozzo.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/cpu.c
target/i386/cpu.h
target/i386/kvm.c