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-devel

Re: [Xen-devel] [PATCH] hvm/vpt: Check that an irq is not blocked befor

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] hvm/vpt: Check that an irq is not blocked before waking the vcpu
From: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Date: Mon, 9 Mar 2009 12:22:19 +0000
Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Yang, Xiaowei" <xiaowei.yang@xxxxxxxxx>
Delivery-date: Mon, 09 Mar 2009 05:22:46 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=7jTmA9Q6OXwQQ0p79VVDDY+KeX5VVGDskgwkF8X1+SI=; b=hxDPutVEuGOjPuBOqY65jSXVAROXtlEfAmekdnYoPZfD0N/9/9cRUvZy+Y949n2laS 7Khy3MxVQtC910WI+Hn1A8K7nS9v/78QR56GuDoE8+v41F04LZXfw+i/RTKnl+Ebr7QH CklwRAzdeWwLk74VHB/MxDEenWvMnSdCW2ZbM=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=m1iNXI7K7gejNfDgZtwXFUfNAkAVh83go3yJkTxAJO/FDg7qdJcLXUmu2mTZYuD1lT m7xIpg7Gi1ewr+onfSL+ZIKb1Zq1qdEeGGFfvOFgwEoSBT4MgNj1JRAy0jYlakr+IJcl FsA3Bcd4ywUuXE7p8iRAuxOBfnejw/e/gRfok=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C5DAB5B6.489E%keir.fraser@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <de76405a0903090445m8a62000p9c6b8b18bcbbc718@xxxxxxxxxxxxxx> <C5DAB5B6.489E%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
I can't think of a way this race could be a problem.  Even if the vcpu
in question were to unmask right after the check, it would still call
pt_update_irq() on the way out to the vmexit (just for good measure),
which would catch the IRQ just as it should.

Conversely, if the vcpu were to mask right after the check, there
should be enough delay between the mask and executing a HLT that the
kick() wouldn't have any significant effect.  Even if it did, this
patch would reduce the false wake-ups from "every time the timer fires
when masked" to "only when a very specific race happens".

But the timer code is complicated enough that I'd like some
corroboration with someone who knows it better...

 -George

On Mon, Mar 9, 2009 at 12:01 PM, Keir Fraser <keir.fraser@xxxxxxxxxxxxx> wrote:
> On 09/03/2009 11:45, "George Dunlap" <George.Dunlap@xxxxxxxxxxxxx> wrote:
>
>> Currently, when a timer fires for a vpt interrupt, the interrupt
>> handler calls vcpu_kick() without checking to see if the IRQ is
>> blocked.  This causes the vcpu to wake up out of a halt when it
>> shouldn't.
>>
>> Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
>
> Only one question: could this race an unmask operation? Before this patch,
> pt_irq_masked() is only executed for the local vcpu, so such races may not
> have been considered.
>
>  -- Keir
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
>

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

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