[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 18/20] target-i386: Clear KVM CPUID features if KVM i
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PULL 18/20] target-i386: Clear KVM CPUID features if KVM is disabled |
Date: |
Tue, 27 Sep 2016 17:12:28 -0300 |
This will ensure all checks for features[FEAT_KVM] in the code
will be correct in case the KVM CPUID leaf is completely
disabled.
Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
target-i386/cpu.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index ad09246..333309b 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -3038,6 +3038,10 @@ static void x86_cpu_realizefn(DeviceState *dev, Error
**errp)
cpu->env.features[w] &= ~minus_features[w];
}
+ if (!kvm_enabled() || !cpu->expose_kvm) {
+ env->features[FEAT_KVM] = 0;
+ }
+
x86_cpu_enable_xsave_components(cpu);
/* CPUID[EAX=7,ECX=0].EBX always increased level automatically: */
--
2.7.4
- [Qemu-devel] [PULL 07/20] linux-user: remove #define smp_{cores, threads}, (continued)
- [Qemu-devel] [PULL 07/20] linux-user: remove #define smp_{cores, threads}, Eduardo Habkost, 2016/09/27
- [Qemu-devel] [PULL 11/20] target-i386: xsave: Simplify CPUID[0xD, 0].{EAX, EDX} calculation, Eduardo Habkost, 2016/09/27
- [Qemu-devel] [PULL 08/20] target-i386: Move feature name arrays inside FeatureWordInfo, Eduardo Habkost, 2016/09/27
- [Qemu-devel] [PULL 10/20] target-i386: xsave: Calculate enabled components only once, Eduardo Habkost, 2016/09/27
- [Qemu-devel] [PULL 09/20] target-i386: Don't try to enable PT State xsave component, Eduardo Habkost, 2016/09/27
- [Qemu-devel] [PULL 13/20] target-i386: xsave: Calculate set of xsave components on realize, Eduardo Habkost, 2016/09/27
- [Qemu-devel] [PULL 14/20] target-i386: Move xsave component mask to features array, Eduardo Habkost, 2016/09/27
- [Qemu-devel] [PULL 12/20] target-i386: xsave: Helper function to calculate xsave area size, Eduardo Habkost, 2016/09/27
- [Qemu-devel] [PULL 16/20] target-i386: Remove has_msr_hv_apic global variable, Eduardo Habkost, 2016/09/27
- [Qemu-devel] [PULL 17/20] target-i386: Remove has_msr_hv_tsc global variable, Eduardo Habkost, 2016/09/27
- [Qemu-devel] [PULL 18/20] target-i386: Clear KVM CPUID features if KVM is disabled,
Eduardo Habkost <=
- [Qemu-devel] [PULL 15/20] target-i386: Remove has_msr_mtrr global variable, Eduardo Habkost, 2016/09/27
- [Qemu-devel] [PULL 19/20] target-i386: Remove has_msr_* global vars for KVM features, Eduardo Habkost, 2016/09/27
- [Qemu-devel] [PULL 20/20] sysbus: Remove ignored return value of FindSysbusDeviceFunc, Eduardo Habkost, 2016/09/27
- Re: [Qemu-devel] [PULL 00/20] x86 and machine queue, 2016-09-27, Peter Maydell, 2016/09/27