[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] Add SCHEDOP_block_on
On 10 Mar 2006, at 15:34, John Levon wrote: This patch adds a facility to block on a particular event channel, for when a domain needs to block, but cannot enable interrupts. I really don't much like the change this adds to evtchn_set_pending(), particularly since this patch probably doesn't have general applicability beyond debuggers. I wonder if you could get the functionality you need with the existing SCHEDOP_block interface if you do the following: HYPERVISOR_set_callbacks(<dummy irq handler>); clear_evtchn_mask(evtchn); while (1) {/* Important to clear the master flag /then/ selector /then/ evtchn pending. */ vcpu_info->evtchn_upcall_pending = 0; clear_bit(evtchn, &vcpu_info->evtchn_pending_sel); clear_evtchn_pending(evtchn); if (check_for_data(evtchn)) break; HYPERVISOR_block(); }Where dummy_irq_handler is a no-op return (which should probably return leaving event delivery disabled, to prevent event-delivery storm, thus it probably really is just IRET). Certainly the above should work fine for a post-mortem debugger. Even if you need to be able to exit the debugger and continue executing normal kernel code, we can come up with some suitable code to restore normal event delivery without Xen interface changes. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |