> diff -r ccb713d46376 linux-2.6-xen-sparse/arch/ia64/xen/hypercall.S

Can a macro be used instead of repeating same assembler
sequence to set vpsr.ic = 0?


On Wed, Mar 29, 2006 at 09:49:38PM +0800, Tian, Kevin wrote:
> This patch merges current interrupt_delivery_enabled on xen/ia64 with
> evtchn_upcall_mask in shared_info_area. Currently when guest clears
> vpsr.i, interrupt_delivery_enabled is cleared correspondingly to prevent
> further interrupt injection. However evtchn_upcall_mask is left
> untouched,
> which makes event_pending(v) check valid and thus may result a window 
> to drop guest into dead loop. For example:
> 
> 1. Guest disable interrupts
>       (interrupt_delivery_enabled:0 evtchn_upcall_mask:0)
> 2. Guest calls a hypercall, like do_console_io with CONSOLEIO_write
> 3. guest_console_write in Xen will check whether any events pending to
> preempt current hypercall. If pending with evtchn_upcall_mask cleared, 
> create a continuation context and resume to guest to re-execute
> hypercall
> 4. Before resuming to guest, xen checks whether any pending interrupts 
> to inject into guest. However because guest interrupt is disabled,
> pending
> events won't be injected into guest and still pends there
> 5. Then guest re-executes hypercall, and back to step 2 and INFINITE 
> loop occurs because events are not handled
> 
> One typical example is timer oops message occurring in guest timer 
> handler, which may halt the machine sometimes if events happen to pend 
> there due to above reason.
> 
> So in this case, we need update evtchn_upcall_mask together with 
> Interrupt delivery enabled flag. However there'll be some race
> conditions 
> to operate two flags non-atomically. Actually since two flags serves for
> 
> same purpose, it's better to merge them as one which also makes 
> xen/ia64 adapting to common code a bit since the latter always assumes 
> upon evtchn_upcall_mask.
> 
> That's why this patch comes, and tested upon tip.
> 
> Signed-off-by Kevin Tian <[EMAIL PROTECTED]>
> 
> Thanks,
> Kevin


> _______________________________________________
> Xen-ia64-devel mailing list
> Xen-ia64-devel@lists.xensource.com
> http://lists.xensource.com/xen-ia64-devel

-- 
yamahata

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@lists.xensource.com
http://lists.xensource.com/xen-ia64-devel

Reply via email to