From: Sasha Levin Date: Fri, 14 Oct 2011 07:36:09 +0000 (+0200) Subject: kvm tools: Enable fast string operations X-Git-Tag: next-20111025~3^2~10 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5a00c132e7c1943f7ffcf365f1f44e59479ddc1f;p=karo-tx-linux.git kvm tools: Enable fast string operations 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 Signed-off-by: Pekka Enberg --- diff --git a/tools/kvm/kvm-cpu.c b/tools/kvm/kvm-cpu.c index fc0d6d44d9af..d7ae5ce163e2 100644 --- a/tools/kvm/kvm-cpu.c +++ b/tools/kvm/kvm-cpu.c @@ -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;