On 02/03/2023 15:34, David Woodhouse wrote:
From: David Woodhouse <d...@amazon.co.uk>
Now that we have an internal implementation of XenStore, we can populate
the xenstore_backend_ops to allow PV backends to talk to it.
Watches can't be processed with immediate callbacks because that would
call back into XenBus code recursively. Defer them to a QEMUBH to be run
as appropriate from the main loop. We use a QEMUBH per XS handle, and it
walks all the watches (there shouldn't be many per handle) to fire any
which have pending events. We *could* have done it differently but this
allows us to use the same struct watch_event as we have for the guest
side, and keeps things relatively simple.
Yes, it's more consistent with watch events on real Xen this way.
Signed-off-by: David Woodhouse <d...@amazon.co.uk>
---
hw/i386/kvm/xen_xenstore.c | 273 ++++++++++++++++++++++++++++++++++++-
1 file changed, 269 insertions(+), 4 deletions(-)
Reviewed-by: Paul Durrant <p...@xen.org>