|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] evtchn/Flask: pre-allocate node on send path
On 25.09.20 14:21, Jan Beulich wrote: On 25.09.2020 12:34, Julien Grall wrote:On 24/09/2020 11:53, Jan Beulich wrote:xmalloc() & Co may not be called with IRQs off, or else check_lock() will have its assertion trigger about locks getting acquired inconsistently. Re-arranging the locking in evtchn_send() doesn't seem very reasonable, especially since the per-channel lock was introduced to avoid acquiring the per-domain event lock on the send paths. Issue a second call to xsm_evtchn_send() instead, before acquiring the lock, to give XSM / Flask a chance to pre-allocate whatever it may need. Is it really so hard to avoid calling send_guest_vcpu_virq() in NMI context? Today it is called only if the NMI happened inside the guest, so the main Xen stack is unused at this time. It should be rather straight forward to mimic a stack frame on the main stack and iret to a special handler from NMI context. This handler would then call send_guest_vcpu_virq() and return to the guest. This would basically be similar to the Linux kernel's __run_on_irqstack(). Juergen
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |