On 26/10/23 23:19, Dongli Zhang wrote:
While the default "info lapic" always synchronizes cpu state ...

mon_get_cpu()
-> mon_get_cpu_sync(mon, true)
    -> cpu_synchronize_state(cpu)
       -> ioctl KVM_GET_LAPIC (taking KVM as example)

... the cpu state is not synchronized when the apic-id is available as
argument.

The cpu state should be synchronized when apic-id is available. Otherwise
the "info lapic <apic-id>" always returns stale data.

Reference:
https://lore.kernel.org/all/20211028155457.967291-19-berra...@redhat.com/

Cc: Joe Jin <joe....@oracle.com>
Signed-off-by: Dongli Zhang <dongli.zh...@oracle.com>
Reviewed-by: Daniel P. Berrangé <berra...@redhat.com>
Reviewed-by: David Woodhouse <d...@amazon.co.uk>
---
Changed since v1:
   - I sent out wrong patch version in v1
Changed since v2:
   - Add the Reviewed-by from Daniel and David

  target/i386/monitor.c | 5 +++++
  1 file changed, 5 insertions(+)

Patch queued via my cpu/misc tree, thanks!

Reply via email to