From 0c3d7c0051576d220e6da0a8ac08f2d8482e2f0b Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Wed, 21 Sep 2016 15:01:35 -0300 Subject: target-i386: Enable CPUID[0x8000000A] if SVM is enabled SVM needs CPUID[0x8000000A] to be available. So if SVM is enabled in a CPU model or explicitly in the command-line, adjust CPUID xlevel to expose the CPUID[0x8000000A] leaf. Reviewed-by: Richard Henderson Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'target-i386') diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 24893d2..7a5da99 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -3047,6 +3047,10 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp) x86_cpu_adjust_feat_level(cpu, FEAT_C000_0001_EDX); x86_cpu_adjust_feat_level(cpu, FEAT_SVM); x86_cpu_adjust_feat_level(cpu, FEAT_XSAVE); + /* SVM requires CPUID[0x8000000A] */ + if (env->features[FEAT_8000_0001_ECX] & CPUID_EXT3_SVM) { + x86_cpu_adjust_level(cpu, &env->cpuid_min_xlevel, 0x8000000A); + } } /* Set cpuid_*level* based on cpuid_min_*level, if not explicitly set */ -- cgit v1.1