WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

Re: [Xen-ia64-devel] [PATCH] Merge vpsr.i with evtchn_upcall_mask to sol

To: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Subject: Re: [Xen-ia64-devel] [PATCH] Merge vpsr.i with evtchn_upcall_mask to solve one trickish bug
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Thu, 30 Mar 2006 10:57:14 +0900
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 30 Mar 2006 01:58:37 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <571ACEFD467F7749BC50E0A98C17CDD8094E7A21@pdsmsx403>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <571ACEFD467F7749BC50E0A98C17CDD8094E7A21@pdsmsx403>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i

> 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 <kevin.tian@xxxxxxxxx>
> 
> Thanks,
> Kevin


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

-- 
yamahata

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

<Prev in Thread] Current Thread [Next in Thread>