[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>
This commit is contained in:
parent
5aacf0ca41
commit
0e859cacb0
|
@ -402,11 +402,11 @@ static __init int svm_hardware_setup(void)
|
||||||
set_msr_interception(msrpm_va, MSR_GS_BASE, 1, 1);
|
set_msr_interception(msrpm_va, MSR_GS_BASE, 1, 1);
|
||||||
set_msr_interception(msrpm_va, MSR_FS_BASE, 1, 1);
|
set_msr_interception(msrpm_va, MSR_FS_BASE, 1, 1);
|
||||||
set_msr_interception(msrpm_va, MSR_KERNEL_GS_BASE, 1, 1);
|
set_msr_interception(msrpm_va, MSR_KERNEL_GS_BASE, 1, 1);
|
||||||
set_msr_interception(msrpm_va, MSR_STAR, 1, 1);
|
|
||||||
set_msr_interception(msrpm_va, MSR_LSTAR, 1, 1);
|
set_msr_interception(msrpm_va, MSR_LSTAR, 1, 1);
|
||||||
set_msr_interception(msrpm_va, MSR_CSTAR, 1, 1);
|
set_msr_interception(msrpm_va, MSR_CSTAR, 1, 1);
|
||||||
set_msr_interception(msrpm_va, MSR_SYSCALL_MASK, 1, 1);
|
set_msr_interception(msrpm_va, MSR_SYSCALL_MASK, 1, 1);
|
||||||
#endif
|
#endif
|
||||||
|
set_msr_interception(msrpm_va, MSR_K6_STAR, 1, 1);
|
||||||
set_msr_interception(msrpm_va, MSR_IA32_SYSENTER_CS, 1, 1);
|
set_msr_interception(msrpm_va, MSR_IA32_SYSENTER_CS, 1, 1);
|
||||||
set_msr_interception(msrpm_va, MSR_IA32_SYSENTER_ESP, 1, 1);
|
set_msr_interception(msrpm_va, MSR_IA32_SYSENTER_ESP, 1, 1);
|
||||||
set_msr_interception(msrpm_va, MSR_IA32_SYSENTER_EIP, 1, 1);
|
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)
|
||||||
case MSR_IA32_APICBASE:
|
case MSR_IA32_APICBASE:
|
||||||
*data = vcpu->apic_base;
|
*data = vcpu->apic_base;
|
||||||
break;
|
break;
|
||||||
#ifdef CONFIG_X86_64
|
case MSR_K6_STAR:
|
||||||
case MSR_STAR:
|
|
||||||
*data = vcpu->svm->vmcb->save.star;
|
*data = vcpu->svm->vmcb->save.star;
|
||||||
break;
|
break;
|
||||||
|
#ifdef CONFIG_X86_64
|
||||||
case MSR_LSTAR:
|
case MSR_LSTAR:
|
||||||
*data = vcpu->svm->vmcb->save.lstar;
|
*data = vcpu->svm->vmcb->save.lstar;
|
||||||
break;
|
break;
|
||||||
|
@ -1173,10 +1173,10 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 data)
|
||||||
case MSR_IA32_APICBASE:
|
case MSR_IA32_APICBASE:
|
||||||
vcpu->apic_base = data;
|
vcpu->apic_base = data;
|
||||||
break;
|
break;
|
||||||
#ifdef CONFIG_X86_64_
|
case MSR_K6_STAR:
|
||||||
case MSR_STAR:
|
|
||||||
vcpu->svm->vmcb->save.star = data;
|
vcpu->svm->vmcb->save.star = data;
|
||||||
break;
|
break;
|
||||||
|
#ifdef CONFIG_X86_64_
|
||||||
case MSR_LSTAR:
|
case MSR_LSTAR:
|
||||||
vcpu->svm->vmcb->save.lstar = data;
|
vcpu->svm->vmcb->save.lstar = data;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue