summaryrefslogtreecommitdiffstats
path: root/target/i386/kvm/kvm-cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/i386/kvm/kvm-cpu.c')
-rw-r--r--target/i386/kvm/kvm-cpu.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/target/i386/kvm/kvm-cpu.c b/target/i386/kvm/kvm-cpu.c
index 5235bce8dc..00369c2000 100644
--- a/target/i386/kvm/kvm-cpu.c
+++ b/target/i386/kvm/kvm-cpu.c
@@ -26,10 +26,18 @@ static bool kvm_cpu_realizefn(CPUState *cs, Error **errp)
/*
* The realize order is important, since x86_cpu_realize() checks if
* nothing else has been set by the user (or by accelerators) in
- * cpu->ucode_rev and cpu->phys_bits.
+ * cpu->ucode_rev and cpu->phys_bits, and updates the CPUID results in
+ * mwait.ecx.
+ * This accel realization code also assumes cpu features are already expanded.
*
* realize order:
- * kvm_cpu -> host_cpu -> x86_cpu
+ *
+ * x86_cpu_realize():
+ * -> x86_cpu_expand_features()
+ * -> cpu_exec_realizefn():
+ * -> accel_cpu_realizefn()
+ * kvm_cpu_realizefn() -> host_cpu_realizefn()
+ * -> check/update ucode_rev, phys_bits, mwait
*/
if (cpu->max_features) {
if (enable_cpu_pm && kvm_has_waitpkg()) {