aboutsummaryrefslogtreecommitdiff
path: root/hw/xenpv
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw@amazon.co.uk>2023-03-14 08:35:03 +0000
committerAnthony PERARD <anthony.perard@citrix.com>2023-03-23 09:56:54 +0000
commitf75e4f2234e7339c16c1dba048bf131a2a948f84 (patch)
treeb90a142e6d0a801c97a0ba080d768e9e3b13d771 /hw/xenpv
parent60ca584b8af0de525656f959991a440f8c191f12 (diff)
downloadqemu-f75e4f2234e7339c16c1dba048bf131a2a948f84.zip
qemu-f75e4f2234e7339c16c1dba048bf131a2a948f84.tar.gz
qemu-f75e4f2234e7339c16c1dba048bf131a2a948f84.tar.bz2
accel/xen: Fix DM state change notification in dm_restrict mode
When dm_restrict is set, QEMU isn't permitted to update the XenStore node to indicate its running status. Previously, the xs_write() call would fail but the failure was ignored. However, in refactoring to allow for emulated XenStore operations, a new call to xs_open() was added. That one didn't fail gracefully, causing a fatal error when running in dm_restrict mode. Partially revert the offending patch, removing the additional call to xs_open() because the global 'xenstore' variable is still available; it just needs to be used with qemu_xen_xs_write() now instead of directly with the xs_write() libxenstore function. Also make the whole thing conditional on !xen_domid_restrict. There's no point even registering the state change handler to attempt to update the XenStore node when we know it's destined to fail. Fixes: ba2a92db1ff6 ("hw/xen: Add xenstore operations to allow redirection to internal emulation") Reported-by: Jason Andryuk <jandryuk@gmail.com> Co-developed-by: Jason Andryuk <jandryuk@gmail.com> Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Reviewed-by: Paul Durrant <paul@xen.org> Tested-by: Jason Andryuk <jandryuk@gmail.com> Message-Id: <1f141995bb61af32c2867ef5559e253f39b0949c.camel@infradead.org> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Diffstat (limited to 'hw/xenpv')
0 files changed, 0 insertions, 0 deletions