aboutsummaryrefslogtreecommitdiff
path: root/dma-helpers.c
diff options
context:
space:
mode:
authorPaul Durrant <paul.durrant@citrix.com>2019-01-22 15:53:46 +0000
committerAnthony PERARD <anthony.perard@citrix.com>2019-02-04 11:04:49 +0000
commit67bc8e00f7c44b7ac35ee75e1716ad18baa77126 (patch)
tree8c05654c4e84dd6d665db090f93430e946b1b30d /dma-helpers.c
parent17d8825d088309980a6bba7261685a937ce1e486 (diff)
downloadqemu-67bc8e00f7c44b7ac35ee75e1716ad18baa77126.zip
qemu-67bc8e00f7c44b7ac35ee75e1716ad18baa77126.tar.gz
qemu-67bc8e00f7c44b7ac35ee75e1716ad18baa77126.tar.bz2
xen: fix xen-bus state model to allow frontend re-connection
There is a flaw in the xen-bus state model. To allow a frontend to re- connect the backend state of an online XenDevice is transitioned from Closed to InitWait, but this is currently done unilaterally which is incorrect. The backend state should remain Closed until the frontend state transitions to Initialising. This patch removes the automatic backend state transition from xen_device_backend_state_changed() and, instead, adds an extra check in xen_device_frontend_state_changed() to determine whether a frontend is trying to re-connect to a previously Closed XenDevice. Only if this is found to be the case is the backend state transitioned from Closed to InitWait. Note that this transition will be common amongst all XenDevice classes and hence xen_device_frontend_state_changed() returns immediately afterwards without calling into the XenDeviceClass frontend_changed() method. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Acked-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Diffstat (limited to 'dma-helpers.c')
0 files changed, 0 insertions, 0 deletions