]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: Enable fast string operations
authorSasha Levin <levinsasha928@gmail.com>
Fri, 14 Oct 2011 07:36:09 +0000 (09:36 +0200)
committerPekka Enberg <penberg@kernel.org>
Fri, 14 Oct 2011 12:49:25 +0000 (15:49 +0300)
Recent kernels check for MSR_IA32_MISC_ENABLE_FAST_STRING in the
MSR_IA32_MISC_ENABLE MSR before enabling reps/movs memcpy.

So far we didn't set it, and got a slower memcpy and a warning:

[    0.000000] Disabled fast string operations

This patch enables fast string operations.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/kvm-cpu.c

index fc0d6d44d9af84a620b91de0729bf9bd81ba96f0..d7ae5ce163e2b25619210ae0608c88804da9abfb 100644 (file)
@@ -142,6 +142,8 @@ static void kvm_cpu__setup_msrs(struct kvm_cpu *vcpu)
        vcpu->msrs->entries[ndx++] = KVM_MSR_ENTRY(MSR_LSTAR,                   0x0);
 #endif
        vcpu->msrs->entries[ndx++] = KVM_MSR_ENTRY(MSR_IA32_TSC,                0x0);
+       vcpu->msrs->entries[ndx++] = KVM_MSR_ENTRY(MSR_IA32_MISC_ENABLE,
+                                               MSR_IA32_MISC_ENABLE_FAST_STRING);
 
        vcpu->msrs->nmsrs       = ndx;