[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] accel/xen: Fix DM state change notification in dm_restrict mode
- To: David Woodhouse <dwmw2@xxxxxxxxxxxxx>, Jason Andryuk <jandryuk@xxxxxxxxx>
- From: Paul Durrant <xadimgnik@xxxxxxxxx>
- Date: Tue, 14 Mar 2023 09:05:57 +0000
- Cc: Peter Maydell <peter.maydell@xxxxxxxxxx>, qemu-devel@xxxxxxxxxx, Paolo Bonzini <pbonzini@xxxxxxxxxx>, Joao Martins <joao.m.martins@xxxxxxxxxx>, Ankur Arora <ankur.a.arora@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, vikram.garhwal@xxxxxxx, Anthony Perard <anthony.perard@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Juan Quintela <quintela@xxxxxxxxxx>, "Dr . David Alan Gilbert" <dgilbert@xxxxxxxxxx>
- Delivery-date: Tue, 14 Mar 2023 09:06:13 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 14/03/2023 08:35, David Woodhouse wrote:
From: David Woodhouse <dwmw@xxxxxxxxxxxx>
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@xxxxxxxxx>
Co-developed-by: Jason Andryuk <jandryuk@xxxxxxxxx>
Not-Signed-off-by: Jason Andryuk <jandryuk@xxxxxxxxx>
Signed-off-by: David Woodhouse <dwmw@xxxxxxxxxxxx>
Will-be-Tested-by: Jason Andryuk <jandryuk@xxxxxxxxx>
---
accel/xen/xen-all.c | 27 ++++++++++-----------------
1 file changed, 10 insertions(+), 17 deletions(-)
Reviewed-by: Paul Durrant <paul@xxxxxxx>
|