diff options
author | Avi Kivity <avi@qumranet.com> | 2006-12-22 04:05:08 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-22 11:55:46 -0500 |
commit | 0e859cacb0b01bdbe34b5200dd2457d4818248fa (patch) | |
tree | 70fbfaef03305aef593362043044e13c10c69145 | |
parent | 5aacf0ca4128fdeadf91c0ac50271841b643d1fd (diff) |
[PATCH] KVM: AMD SVM: handle MSR_STAR in 32-bit mode
This is necessary for linux guests.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/kvm/svm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index 0e6bc8c649ce..3bf25795b3ef 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c | |||
@@ -402,11 +402,11 @@ static __init int svm_hardware_setup(void) | |||
402 | set_msr_interception(msrpm_va, MSR_GS_BASE, 1, 1); | 402 | set_msr_interception(msrpm_va, MSR_GS_BASE, 1, 1); |
403 | set_msr_interception(msrpm_va, MSR_FS_BASE, 1, 1); | 403 | set_msr_interception(msrpm_va, MSR_FS_BASE, 1, 1); |
404 | set_msr_interception(msrpm_va, MSR_KERNEL_GS_BASE, 1, 1); | 404 | set_msr_interception(msrpm_va, MSR_KERNEL_GS_BASE, 1, 1); |
405 | set_msr_interception(msrpm_va, MSR_STAR, 1, 1); | ||
406 | set_msr_interception(msrpm_va, MSR_LSTAR, 1, 1); | 405 | set_msr_interception(msrpm_va, MSR_LSTAR, 1, 1); |
407 | set_msr_interception(msrpm_va, MSR_CSTAR, 1, 1); | 406 | set_msr_interception(msrpm_va, MSR_CSTAR, 1, 1); |
408 | set_msr_interception(msrpm_va, MSR_SYSCALL_MASK, 1, 1); | 407 | set_msr_interception(msrpm_va, MSR_SYSCALL_MASK, 1, 1); |
409 | #endif | 408 | #endif |
409 | set_msr_interception(msrpm_va, MSR_K6_STAR, 1, 1); | ||
410 | set_msr_interception(msrpm_va, MSR_IA32_SYSENTER_CS, 1, 1); | 410 | set_msr_interception(msrpm_va, MSR_IA32_SYSENTER_CS, 1, 1); |
411 | set_msr_interception(msrpm_va, MSR_IA32_SYSENTER_ESP, 1, 1); | 411 | set_msr_interception(msrpm_va, MSR_IA32_SYSENTER_ESP, 1, 1); |
412 | set_msr_interception(msrpm_va, MSR_IA32_SYSENTER_EIP, 1, 1); | 412 | set_msr_interception(msrpm_va, MSR_IA32_SYSENTER_EIP, 1, 1); |
@@ -1098,10 +1098,10 @@ static int svm_get_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 *data) | |||
1098 | case MSR_IA32_APICBASE: | 1098 | case MSR_IA32_APICBASE: |
1099 | *data = vcpu->apic_base; | 1099 | *data = vcpu->apic_base; |
1100 | break; | 1100 | break; |
1101 | #ifdef CONFIG_X86_64 | 1101 | case MSR_K6_STAR: |
1102 | case MSR_STAR: | ||
1103 | *data = vcpu->svm->vmcb->save.star; | 1102 | *data = vcpu->svm->vmcb->save.star; |
1104 | break; | 1103 | break; |
1104 | #ifdef CONFIG_X86_64 | ||
1105 | case MSR_LSTAR: | 1105 | case MSR_LSTAR: |
1106 | *data = vcpu->svm->vmcb->save.lstar; | 1106 | *data = vcpu->svm->vmcb->save.lstar; |
1107 | break; | 1107 | break; |
@@ -1173,10 +1173,10 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 data) | |||
1173 | case MSR_IA32_APICBASE: | 1173 | case MSR_IA32_APICBASE: |
1174 | vcpu->apic_base = data; | 1174 | vcpu->apic_base = data; |
1175 | break; | 1175 | break; |
1176 | #ifdef CONFIG_X86_64_ | 1176 | case MSR_K6_STAR: |
1177 | case MSR_STAR: | ||
1178 | vcpu->svm->vmcb->save.star = data; | 1177 | vcpu->svm->vmcb->save.star = data; |
1179 | break; | 1178 | break; |
1179 | #ifdef CONFIG_X86_64_ | ||
1180 | case MSR_LSTAR: | 1180 | case MSR_LSTAR: |
1181 | vcpu->svm->vmcb->save.lstar = data; | 1181 | vcpu->svm->vmcb->save.lstar = data; |
1182 | break; | 1182 | break; |