Re: [PATCH] tools/xenstore: don't let special watches be children of /

2022-04-27 Thread Raphael Ning
gt; the special watches will receive those special watch events for the > registered "/" watch. > > Fix that by calling the related fire_watches() with the "exact" > parameter set to true, causing a mismatch for the "/" node. > > Reported-by: Raphae

Re: [cxenstored] Potential bug in special watch event firing

2022-04-27 Thread Raphael Ning
Hi Juergen, On 27/04/2022 08:30, Juergen Gross wrote: > [...] >> The xenstore documentation is not clear about whether @ should be >> considered children of /. But I find it counterintuitive that clients may be >> notified about a special event without explicitly subscribing to it. Is it a >>

[cxenstored] Potential bug in special watch event firing

2022-04-26 Thread Raphael Ning
While reading C xenstored code, I noticed that it may send special events like @releaseDomain to (privileged) clients that only watch the root node (/). That's probably not the intended behaviour. For example, when firing @releaseDomain, fire_watches() is called with exact == false:

[PATCH v2] kexec-xen: Allow xen_kexec_exec() to return in case of Live Update

2022-03-23 Thread Raphael Ning
From: Raphael Ning Currently, my_exec() does not expect the Xen KEXEC_CMD_kexec hypercall to return on success, because it assumes that the hypercall always triggers an immediate reboot. However, for Live Update, the hypercall merely schedules the kexec operation and returns; the actual reboot

Re: [PATCH] kexec-xen: Allow xen_kexec_exec() to return in case of Live Update

2022-03-23 Thread Raphael Ning
On 23/03/2022 14:08, Simon Horman wrote: > Hi Raphael, > thanks for your patch. Overall I think this is good. > > Unfortunately I am seeing a build failure with this patch applied. > > ../../kexec/kexec-xen.c:292:6: error: conflicting types for ‘xen_kexec_exec’ > 292 | void

Re: [XEN PATCH] evtchn/fifo: Don't set PENDING bit if guest misbehaves

2022-03-17 Thread Raphael Ning
On 17/03/2022 14:26, Luca Fancellu wrote: > I’ve tested on the ARM side, I’ve started/destroyed few guests from Dom0, > connect to the console, run > some network communications between guest and Dom0, everything works: > > Tested-by: Luca Fancellu Thanks!  I tested on x86 (in a QEMU VM) by

Re: [XEN PATCH] evtchn/fifo: Don't set PENDING bit if guest misbehaves

2022-03-17 Thread Raphael Ning
On 16/03/2022 18:58, Andrew Cooper wrote: > On 16/03/2022 18:38, Raphael Ning wrote: >> From: Raphael Ning >> >> Currently, evtchn_fifo_set_pending() will mark the event as PENDING even >> if it fails to lock the FIFO event queue(s), or if the guest has not >> i

[XEN PATCH] evtchn/fifo: Don't set PENDING bit if guest misbehaves

2022-03-16 Thread Raphael Ning
From: Raphael Ning Currently, evtchn_fifo_set_pending() will mark the event as PENDING even if it fails to lock the FIFO event queue(s), or if the guest has not initialized the FIFO control block for the target vCPU. A well-behaved guest should never trigger either of these cases

[PATCH] kexec-xen: Allow xen_kexec_exec() to return in case of Live Update

2022-03-14 Thread Raphael Ning
From: Raphael Ning Currently, my_exec() does not expect the Xen KEXEC_CMD_kexec hypercall to return on success, because it assumes that the hypercall always triggers an immediate reboot. However, for Live Update, the hypercall merely schedules the kexec operation and returns; the actual reboot

[PATCH] kexec-xen: Use correct image type for Live Update

2021-03-23 Thread Raphael Ning
From: Raphael Ning Unlike xen_kexec_load(), xen_kexec_unload() and xen_kexec_status() fail to distinguish between normal kexec and Xen Live Update image types. Fix that by introducing a new helper function that maps internal flags to KEXEC_TYPE_*, and using it throughout kexec-xen.c. Signed