aboutsummaryrefslogtreecommitdiff
path: root/target-i386/kvm.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2011-03-15 12:26:23 +0100
committerMarcelo Tosatti <mtosatti@redhat.com>2011-03-16 17:11:05 -0300
commit0c03266a965a8e5353bb0e8d1b2d3a3ac04aa686 (patch)
tree55c15dc0357b2766ff7243d16735be70ce9e91f9 /target-i386/kvm.c
parentc995b495b9d6e60ab1e390bd398a22425d0b3c8c (diff)
downloadqemu-0c03266a965a8e5353bb0e8d1b2d3a3ac04aa686.zip
qemu-0c03266a965a8e5353bb0e8d1b2d3a3ac04aa686.tar.gz
qemu-0c03266a965a8e5353bb0e8d1b2d3a3ac04aa686.tar.bz2
kvm: x86: Synchronize PAT MSR with the kernel
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'target-i386/kvm.c')
-rw-r--r--target-i386/kvm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 3a07fce..032bc3e 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -861,6 +861,7 @@ static int kvm_put_msrs(CPUState *env, int level)
kvm_msr_entry_set(&msrs[n++], MSR_IA32_SYSENTER_CS, env->sysenter_cs);
kvm_msr_entry_set(&msrs[n++], MSR_IA32_SYSENTER_ESP, env->sysenter_esp);
kvm_msr_entry_set(&msrs[n++], MSR_IA32_SYSENTER_EIP, env->sysenter_eip);
+ kvm_msr_entry_set(&msrs[n++], MSR_PAT, env->pat);
if (has_msr_star) {
kvm_msr_entry_set(&msrs[n++], MSR_STAR, env->star);
}
@@ -1113,6 +1114,7 @@ static int kvm_get_msrs(CPUState *env)
msrs[n++].index = MSR_IA32_SYSENTER_CS;
msrs[n++].index = MSR_IA32_SYSENTER_ESP;
msrs[n++].index = MSR_IA32_SYSENTER_EIP;
+ msrs[n++].index = MSR_PAT;
if (has_msr_star) {
msrs[n++].index = MSR_STAR;
}
@@ -1168,6 +1170,9 @@ static int kvm_get_msrs(CPUState *env)
case MSR_IA32_SYSENTER_EIP:
env->sysenter_eip = msrs[i].data;
break;
+ case MSR_PAT:
+ env->pat = msrs[i].data;
+ break;
case MSR_STAR:
env->star = msrs[i].data;
break;