]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.fixes/kvm-vmx-dont-allow-uninhibited-access-to-EFER-on-i386
Updated xen patches taken from suse.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.fixes / kvm-vmx-dont-allow-uninhibited-access-to-EFER-on-i386
1 From: Avi Kivity <avi@redhat.com>
2 Date: Mon, 23 Mar 2009 22:13:44 +0200
3 Subject: KVM: VMX: Don't allow uninhibited access to EFER on i386
4 Git-commit: 16175a796d061833aacfbd9672235f2d2725df65
5 Patch-mainline: 2.6.30-rc1
6 References: bnc#492760
7
8 vmx_set_msr() does not allow i386 guests to touch EFER, but they can still
9 do so through the default: label in the switch. If they set EFER_LME, they
10 can oops the host.
11
12 Fix by having EFER access through the normal channel (which will check for
13 EFER_LME) even on i386.
14
15 Reported-and-tested-by: Benjamin Gilbert <bgilbert@cs.cmu.edu>
16 Cc: stable@kernel.org
17 Signed-off-by: Avi Kivity <avi@redhat.com>
18 Acked-by: Jeff Mahoney <jeffm@suse.com>
19 ---
20
21 arch/x86/kvm/vmx.c | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24 --- a/arch/x86/kvm/vmx.c
25 +++ b/arch/x86/kvm/vmx.c
26 @@ -898,11 +898,11 @@ static int vmx_set_msr(struct kvm_vcpu *
27 int ret = 0;
28
29 switch (msr_index) {
30 -#ifdef CONFIG_X86_64
31 case MSR_EFER:
32 vmx_load_host_state(vmx);
33 ret = kvm_set_msr_common(vcpu, msr_index, data);
34 break;
35 +#ifdef CONFIG_X86_64
36 case MSR_FS_BASE:
37 vmcs_writel(GUEST_FS_BASE, data);
38 break;