All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: Enable "fast string operations" in MSR_IA32_MISC_ENABLE
@ 2011-09-22 12:03 Avi Kivity
  2011-09-23 14:56 ` Marcelo Tosatti
  0 siblings, 1 reply; 3+ messages in thread
From: Avi Kivity @ 2011-09-22 12:03 UTC (permalink / raw)
  To: Marcelo Tosatti, kvm

Recent (3.0+) Linux guests check for the fast string bit in
MSR_IA32_MISC_ENABLE before enabling rep/movs based memcpy and
related on fam 6/model 13+ processors.

Enable the bit by default, as required by the specification.

Signed-off-by: Avi Kivity <avi@redhat.com>
---
 arch/x86/kvm/x86.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 6b37f18..459f2bf 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -6374,6 +6374,8 @@ void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu)
 
 int kvm_arch_vcpu_reset(struct kvm_vcpu *vcpu)
 {
+	vcpu->arch.ia32_misc_enable_msr = MSR_IA32_MISC_ENABLE_FAST_STRING;
+
 	vcpu->arch.nmi_pending = false;
 	vcpu->arch.nmi_injected = false;
 
-- 
1.7.6.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-04 14:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-22 12:03 [PATCH] KVM: Enable "fast string operations" in MSR_IA32_MISC_ENABLE Avi Kivity
2011-09-23 14:56 ` Marcelo Tosatti
2011-10-04 14:15   ` Avi Kivity

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.