[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180730194059.5781-1-tedheadster@gmail.com>
Date: Mon, 30 Jul 2018 15:40:59 -0400
From: Matthew Whitehead <tedheadster@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Matthew Whitehead <tedheadster@...il.com>,
Paolo Bonzini <pbonzini@...hat.com>
Subject: [PATCH] x86: kvm: Restrict X86_FEATURE_VMMCALL to x86_64 platform
early_init_amd() is called on all AMD processors, both 64 and 32 bit.
Presently 32 bit processors get the X86_FEATURE_VMMCALL feature set, which
they do not support. Add conditionals to restrict it to 64 bit processors.
Cc: Paolo Bonzini <pbonzini@...hat.com>
Signed-off-by: Matthew Whitehead <tedheadster@...il.com>
---
arch/x86/kernel/cpu/amd.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 38915fbfae73..df06919324cd 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -662,12 +662,14 @@ static void early_init_amd(struct cpuinfo_x86 *c)
}
#endif
+#ifdef CONFIG_X86_64
/*
* This is only needed to tell the kernel whether to use VMCALL
* and VMMCALL. VMMCALL is never executed except under virt, so
* we can set it unconditionally.
*/
set_cpu_cap(c, X86_FEATURE_VMMCALL);
+#endif
/* F16h erratum 793, CVE-2013-6885 */
if (c->x86 == 0x16 && c->x86_model <= 0xf)
--
2.16.1
Powered by blists - more mailing lists