summaryrefslogtreecommitdiffstats
path: root/include/hw/i386
diff options
context:
space:
mode:
authorVitaly Kuznetsov2020-09-22 17:19:34 +0200
committerPaolo Bonzini2020-09-30 19:11:36 +0200
commit8700a984436e561e29903731d7db11a4b61acd76 (patch)
treea9b4fdc36bed5166aab397b6420a21d1b54fe577 /include/hw/i386
parenttarget/i386: Fix VM migration when interrupt based APF is enabled (diff)
downloadqemu-8700a984436e561e29903731d7db11a4b61acd76.tar.gz
qemu-8700a984436e561e29903731d7db11a4b61acd76.tar.xz
qemu-8700a984436e561e29903731d7db11a4b61acd76.zip
target/i386: always create kvmclock device
QEMU's kvmclock device is only created when KVM PV feature bits for kvmclock (KVM_FEATURE_CLOCKSOURCE/KVM_FEATURE_CLOCKSOURCE2) are exposed to the guest. With 'kvm=off' cpu flag the device is not created and we don't call KVM_GET_CLOCK/KVM_SET_CLOCK upon migration. It was reported that without these call at least Hyper-V TSC page clocksouce (which can be enabled independently) gets broken after migration. Switch to creating kvmclock QEMU device unconditionally, it seems to always make sense to call KVM_GET_CLOCK/KVM_SET_CLOCK on migration. Use KVM_CAP_ADJUST_CLOCK check instead of CPUID feature bits. Reported-by: Antoine Damhet <antoine.damhet@blade-group.com> Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Message-Id: <20200922151934.899555-1-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/hw/i386')
-rw-r--r--include/hw/i386/pc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 8699029053..84639d0ebc 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -118,6 +118,9 @@ struct PCMachineClass {
/* use PVH to load kernels that support this feature */
bool pvh_enabled;
+
+ /* create kvmclock device even when KVM PV features are not exposed */
+ bool kvmclock_create_always;
};
#define TYPE_PC_MACHINE "generic-pc-machine"