Does anybody know why the APIC state loaded by the first call to
kvm_arch_get_registers() is wrong, in the first place? What exactly is
different in the APIC state in the second kvm_arch_get_registers() call,
and when/why does it change?

If cpu_synchronize_state() does the wrong thing if it is called at the
wrong moment, then we may have other hidden bugs, because the user can
trigger cpu_synchronize_all_states() calls arbitrarily using monitor
commands.

My guess is, it's not wrong, it's just outdated when second call occures. Maybe it's an ordering issue - could kvmclock state change handler be called before other activity is suspended (?)

I didn't pursue it further, cause I don't know too much (anything really) about QEMU/APIC internals and how to track its changes.

--
mg

Reply via email to