]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.31/patches.fixes/kvm-vmx-dont-allow-uninhibited-access-to-EFER-on-i386
Add a patch to fix Intel E100 wake-on-lan problems.
[ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.fixes / kvm-vmx-dont-allow-uninhibited-access-to-EFER-on-i386
CommitLineData
2cb7cef9
BS
1From: Avi Kivity <avi@redhat.com>
2Date: Mon, 23 Mar 2009 22:13:44 +0200
3Subject: KVM: VMX: Don't allow uninhibited access to EFER on i386
4Git-commit: 16175a796d061833aacfbd9672235f2d2725df65
5Patch-mainline: 2.6.30-rc1
6References: bnc#492760
7
8vmx_set_msr() does not allow i386 guests to touch EFER, but they can still
9do so through the default: label in the switch. If they set EFER_LME, they
10can oops the host.
11
12Fix by having EFER access through the normal channel (which will check for
13EFER_LME) even on i386.
14
15Reported-and-tested-by: Benjamin Gilbert <bgilbert@cs.cmu.edu>
16Cc: stable@kernel.org
17Signed-off-by: Avi Kivity <avi@redhat.com>
18Acked-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;