qemu-e2k/include/hw/ppc
Greg Kurz dcb556fc6a xics/kvm: synchonize state before 'info pic'
When using the emulated XICS, the 'info pic' monitor command shows:

CPU 0 XIRR=ff000000 ((nil)) PP=ff MFRR=ff
ICS 1000..13ff 0x10040060340
  1000 MSI 05 00
  1001 MSI 05 00
  1002 MSI 05 00
  1003 MSI ff 00
  1004 LSI ff 00
  1005 LSI ff 00
  1006 LSI ff 00
  1007 LSI ff 00
  1008 MSI 05 00
  1009 MSI 05 00
  100a MSI 05 00
  100b MSI 05 00
  100c MSI 05 00

but when using the in-kernel XICS with the very same guest, we get:

CPU 0 XIRR=00000000 ((nil)) PP=ff MFRR=ff
ICS 1000..13ff 0x10032e00340
  1000 MSI ff 00
  1001 MSI ff 00
  1002 MSI ff 00
  1003 MSI ff 00
  1004 LSI ff 00
  1005 LSI ff 00
  1006 LSI ff 00
  1007 LSI ff 00
  1008 MSI ff 00
  1009 MSI ff 00
  100a MSI ff 00
  100b MSI ff 00
  100c MSI ff 00

ie, all irqs are masked and XIRR is null, while we should get the
same output as with the emulated XICS.

If the guest is then migrated, 'info pic' shows the expected values
on both source and destination.

The problem is that QEMU doesn't synchronize with KVM before printing
the XICS state. Migration happens to fix the output because it enforces
synchronization with KVM.

To fix the invalid output of 'info pic', this patch introduces a new
synchronize_state operation for both ICPStateClass and ICSStateClass.
The ICP operation relies on run_on_cpu() in order to kick the vCPU
and avoid sleeping on KVM_GET_ONE_REG.

Signed-off-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-11-14 11:12:42 +11:00
..
fdt.h Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
mac_dbdma.h mac_dbdma: remove DBDMA_init() function 2017-09-27 13:05:41 +10:00
openpic.h ppc: Fix OpenPIC model 2017-09-27 13:05:41 +10:00
pnv.h ppc: pnv: drop PnvChipClass::cpu_model field 2017-10-17 10:34:01 +11:00
pnv_core.h ppc: pnv: drop PnvChipClass::cpu_model field 2017-10-17 10:34:01 +11:00
pnv_lpc.h pnv: Fix build failures on some host platforms 2017-05-11 09:45:15 +10:00
pnv_occ.h pnv: Fix build failures on some host platforms 2017-05-11 09:45:15 +10:00
pnv_psi.h ppc/pnv: Remove unused XICSState reference 2017-07-17 15:07:05 +10:00
pnv_xscom.h ppc/pnv: Improve macro parenthesization 2017-09-27 13:05:41 +10:00
ppc.h ppc: spapr: replace ppc_cpu_parse_features() with cpu_parse_cpu_model() 2017-10-17 10:34:00 +11:00
ppc4xx.h ppc4xx: Make MAL emulation more generic 2017-09-08 09:30:55 +10:00
ppc_e500.h intc/openpic: Build openpic only once 2013-07-09 21:33:02 +02:00
spapr.h ppc: spapr: use generic cpu_model parsing 2017-10-17 10:34:01 +11:00
spapr_cpu_core.h ppc: spapr: use generic cpu_model parsing 2017-10-17 10:34:01 +11:00
spapr_drc.h hw/ppc: CAS reset on early device hotplug 2017-09-08 09:30:54 +10:00
spapr_ovec.h ppc/xive: fix OV5_XIVE_EXPLOIT bits 2017-09-15 10:29:48 +10:00
spapr_rtas.h tests: add RTAS command in the protocol 2016-09-23 10:29:40 +10:00
spapr_vio.h ppc/xics: use the QOM interface to get irqs 2017-03-01 11:23:39 +11:00
xics.h xics/kvm: synchonize state before 'info pic' 2017-11-14 11:12:42 +11:00