Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1267934
| From | Paolo Bonzini <pbonzini@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] KVM: x86: expose MSR_TSC_AUX to userspace |
| Date | 2015-11-12 14:50 +0100 |
| Message-ID | <qu0qe-16P-13@gated-at.bofh.it> (permalink) |
| References | <qu0qe-16P-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
If we do not do this, it is not properly saved and restored across
migration. Windows notices due to its self-protection mechanisms,
and is very upset about it (blue screen of death).
Cc: Radim Krcmar <rkrcmar@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
arch/x86/kvm/x86.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index aba7f95..377160d 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -950,7 +950,7 @@ static u32 msrs_to_save[] = {
MSR_CSTAR, MSR_KERNEL_GS_BASE, MSR_SYSCALL_MASK, MSR_LSTAR,
#endif
MSR_IA32_TSC, MSR_IA32_CR_PAT, MSR_VM_HSAVE_PA,
- MSR_IA32_FEATURE_CONTROL, MSR_IA32_BNDCFGS
+ MSR_IA32_FEATURE_CONTROL, MSR_IA32_BNDCFGS, MSR_TSC_AUX,
};
static unsigned num_msrs_to_save;
@@ -3979,16 +3979,17 @@ static void kvm_init_msr_list(void)
/*
* Even MSRs that are valid in the host may not be exposed
- * to the guests in some cases. We could work around this
- * in VMX with the generic MSR save/load machinery, but it
- * is not really worthwhile since it will really only
- * happen with nested virtualization.
+ * to the guests in some cases.
*/
switch (msrs_to_save[i]) {
case MSR_IA32_BNDCFGS:
if (!kvm_x86_ops->mpx_supported())
continue;
break;
+ case MSR_TSC_AUX:
+ if (!kvm_x86_ops->rdtscp_supported())
+ continue;
+ break;
default:
break;
}
--
2.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] KVM: svm: add support for RDTSCP Paolo Bonzini <pbonzini@redhat.com> - 2015-11-12 14:50 +0100
[PATCH] KVM: x86: expose MSR_TSC_AUX to userspace Paolo Bonzini <pbonzini@redhat.com> - 2015-11-12 14:50 +0100
Re: [PATCH] KVM: x86: expose MSR_TSC_AUX to userspace Paolo Bonzini <pbonzini@redhat.com> - 2015-11-13 10:50 +0100
Re: [PATCH] KVM: x86: expose MSR_TSC_AUX to userspace Peter Hornyack <peterhornyack@google.com> - 2015-11-13 18:50 +0100
Re: [PATCH] KVM: svm: add support for RDTSCP Joerg Roedel <joro@8bytes.org> - 2015-11-12 15:50 +0100
Re: [PATCH] KVM: svm: add support for RDTSCP Paolo Bonzini <pbonzini@redhat.com> - 2015-11-12 17:20 +0100
csiph-web