History

kvm: x86: hyperv: add KVM_CAP_HYPERV_SYNIC2

There is a flaw in the Hyper-V SynIC implementation in KVM: when message page or event flags page is enabled by setting the corresponding msr, KVM zeroes it out. This is problematic because on migration the corresponding MSRs are loaded on the destination, so the content of those pages is lost. This went unnoticed so far because the only user of those pages was in-KVM hyperv synic timers, which could continue working despite that zeroing. Newer QEMU uses those pages for Hyper-V VMBus implementation, and zeroing them breaks the migration. Besides, in newer QEMU the content of those pages is fully managed by QEMU, so zeroing them is undesirable even when writing the MSRs from the guest side. To support this new scheme, introduce a new capability, KVM_CAP_HYPERV_SYNIC2, which, when enabled, makes sure that the synic pages aren't zeroed out in KVM.

Roman Kagan committed 9 years ago

Commit efc479e1 parent a826faf6 files · +27 −6Browse files

Showing the changes to include/uapi/linux (1 of 6 files). Show all

Unified · Split

include/uapi/linux/kvm.h+1−0
@@ -927,6 +927,7 @@ struct kvm_ppc_resize_hpt { · 926 unmodified lines
927927 #define KVM_CAP_S390_CMMA_MIGRATION 145
928928 #define KVM_CAP_PPC_FWNMI 146
929929 #define KVM_CAP_PPC_SMT_POSSIBLE 147
930+#define KVM_CAP_HYPERV_SYNIC2 148
930931
931932 #ifdef KVM_CAP_IRQ_ROUTING
932933