Il 18/06/2014 18:59, Valentine Sinitsyn ha scritto:

I also noticed that setting PAT MSR from the nested hypervisor leaves
high word unassigned, i.e. the code like this:

  mov $0x70106, %rax
  mov %rax, %rdx
  mov $0x0277, %rcx
  wrmsr
  rdmsr

yields %rax = 0, %rdx = 0x70106.

This should be the trivial fix:

diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 0b140dc65bee..8a1cdc0f8fe7 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -461,7 +461,7 @@ struct kvm_vcpu_arch {
        bool nmi_injected;    /* Trying to inject an NMI this entry */

        struct mtrr_state_type mtrr_state;
-       u32 pat;
+       u64 pat;

        unsigned switch_db_regs;
        unsigned long db[KVM_NR_DB_REGS];

Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to