aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2008-02-13 10:30:28 -0500
committerAvi Kivity <avi@qumranet.com>2008-03-04 08:19:45 -0500
commita2938c807024ba30191e3bd593430c0659d75717 (patch)
tree10c1776fc6e2fc49b2d9b5f8ffa5078f0f34cca9 /arch
parent72dc67a69690288538142df73a7e3ac66fea68dc (diff)
KVM: SVM: fix Windows XP 64 bit installation crash
While installing Windows XP 64 bit wants to access the DEBUGCTL and the last branch record (LBR) MSRs. Don't allowing this in KVM causes the installation to crash. This patch allow the access to these MSRs and fixes the issue. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Markus Rechberger <markus.rechberger@amd.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/svm.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index d71daabbb51b..1a582f1090e8 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -1100,6 +1100,24 @@ static int svm_get_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 *data)
1100 case MSR_IA32_SYSENTER_ESP: 1100 case MSR_IA32_SYSENTER_ESP:
1101 *data = svm->vmcb->save.sysenter_esp; 1101 *data = svm->vmcb->save.sysenter_esp;
1102 break; 1102 break;
1103 /* Nobody will change the following 5 values in the VMCB so
1104 we can safely return them on rdmsr. They will always be 0
1105 until LBRV is implemented. */
1106 case MSR_IA32_DEBUGCTLMSR:
1107 *data = svm->vmcb->save.dbgctl;
1108 break;
1109 case MSR_IA32_LASTBRANCHFROMIP:
1110 *data = svm->vmcb->save.br_from;
1111 break;
1112 case MSR_IA32_LASTBRANCHTOIP:
1113 *data = svm->vmcb->save.br_to;
1114 break;
1115 case MSR_IA32_LASTINTFROMIP:
1116 *data = svm->vmcb->save.last_excp_from;
1117 break;
1118 case MSR_IA32_LASTINTTOIP:
1119 *data = svm->vmcb->save.last_excp_to;
1120 break;
1103 default: 1121 default:
1104 return kvm_get_msr_common(vcpu, ecx, data); 1122 return kvm_get_msr_common(vcpu, ecx, data);
1105 } 1123 }
@@ -1160,6 +1178,10 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 data)
1160 case MSR_IA32_SYSENTER_ESP: 1178 case MSR_IA32_SYSENTER_ESP:
1161 svm->vmcb->save.sysenter_esp = data; 1179 svm->vmcb->save.sysenter_esp = data;
1162 break; 1180 break;
1181 case MSR_IA32_DEBUGCTLMSR:
1182 pr_unimpl(vcpu, "%s: MSR_IA32_DEBUGCTLMSR 0x%llx, nop\n",
1183 __FUNCTION__, data);
1184 break;
1163 case MSR_K7_EVNTSEL0: 1185 case MSR_K7_EVNTSEL0:
1164 case MSR_K7_EVNTSEL1: 1186 case MSR_K7_EVNTSEL1:
1165 case MSR_K7_EVNTSEL2: 1187 case MSR_K7_EVNTSEL2: