mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-06-21 15:27:49 +00:00
target-i386: Clear KVM CPUID features if KVM is disabled
This will ensure all checks for features[FEAT_KVM] in the code will be correct in case the KVM CPUID leaf is completely disabled. Backports commit aec661de86894e914d2d82431d9cefa9a9a40213 from qemu
This commit is contained in:
parent
f29384c810
commit
49c04d7104
|
@ -3023,6 +3023,11 @@ static int x86_cpu_realizefn(struct uc_struct *uc, DeviceState *dev, Error **err
|
||||||
cpu->env.features[w] &= ~cpu->minus_features[w];
|
cpu->env.features[w] &= ~cpu->minus_features[w];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Unicorn: commented out
|
||||||
|
//if (!kvm_enabled() || !cpu->expose_kvm) {
|
||||||
|
env->features[FEAT_KVM] = 0;
|
||||||
|
//}
|
||||||
|
|
||||||
x86_cpu_enable_xsave_components(cpu);
|
x86_cpu_enable_xsave_components(cpu);
|
||||||
|
|
||||||
/* CPUID[EAX=7,ECX=0].EBX always increased level automatically: */
|
/* CPUID[EAX=7,ECX=0].EBX always increased level automatically: */
|
||||||
|
|
Loading…
Reference in a new issue