summary refs log tree commit diff stats
path: root/hw/core/sysbus.c
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2019-05-13 10:42:36 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2019-05-29 11:39:46 +1000
commit9b88cd7673dddf9336f50540e5735eb6f190200a (patch)
tree7c23f89a184cb230aa46e480f2d6fc39f40a92bc /hw/core/sysbus.c
parent7bfc759c02b8d19fd76d70d138deea0025f6f461 (diff)
downloadfocaccia-qemu-9b88cd7673dddf9336f50540e5735eb6f190200a.tar.gz
focaccia-qemu-9b88cd7673dddf9336f50540e5735eb6f190200a.zip
spapr/xive: introduce a VM state change handler
This handler is in charge of stabilizing the flow of event notifications
in the XIVE controller before migrating a guest. This is a requirement
before transferring the guest EQ pages to a destination.

When the VM is stopped, the handler sets the source PQs to PENDING to
stop the flow of events and to possibly catch a triggered interrupt
occuring while the VM is stopped. Their previous state is saved. The
XIVE controller is then synced through KVM to flush any in-flight
event notification and to stabilize the EQs. At this stage, the EQ
pages are marked dirty to make sure the EQ pages are transferred if a
migration sequence is in progress.

The previous configuration of the sources is restored when the VM
resumes, after a migration or a stop. If an interrupt was queued while
the VM was stopped, the handler simply generates the missing trigger.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Message-Id: <20190513084245.25755-6-clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/core/sysbus.c')
0 files changed, 0 insertions, 0 deletions