x86: kvm: use alternatives for VMCALL vs. VMMCALL if kernel text is read-only
[platform/adaptation/renesas_rcar/renesas_kernel.git] / arch / x86 / kernel / cpu / amd.c
index c67ffa6..c005fdd 100644 (file)
@@ -508,6 +508,13 @@ static void early_init_amd(struct cpuinfo_x86 *c)
        }
 #endif
 
+       /*
+        * 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);
+
        /* F16h erratum 793, CVE-2013-6885 */
        if (c->x86 == 0x16 && c->x86_model <= 0xf) {
                u64 val;