diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2016-09-21 15:01:35 -0300 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2016-09-27 16:17:17 -0300 |
commit | 0c3d7c0051576d220e6da0a8ac08f2d8482e2f0b (patch) | |
tree | 9b1afea8b3ef45110e1b276d9188d336d10b088e /target-i386/cpu.c | |
parent | c39c0edf9bb3b968ba95484465a50c7b19f4aa3a (diff) |
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 <rth@twiddle.net>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'target-i386/cpu.c')
-rw-r--r-- | target-i386/cpu.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 24893d2d89..7a5da99222 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 */ |