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

[Xen-devel] [PATCH] pvops: Avoid re-alloc_intr_gate of hvm evtchn callba

To: xen-devel@xxxxxxxxxxxxxxxxxxx, Jeremy Fitzhardinge <Jeremy.Fitzhardinge@xxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Subject: [Xen-devel] [PATCH] pvops: Avoid re-alloc_intr_gate of hvm evtchn callback
From: Frank Pan <frankpzh@xxxxxxxxx>
Date: Sat, 5 Mar 2011 18:11:32 +0800
Cc:
Delivery-date: Sat, 05 Mar 2011 02:12:38 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type; bh=+Q075ObfOovj/xamSSMGkgvR1h4uR3gbXXsxOaCR1HA=; b=miJJ9AmV5h2RVCL1uRmEIaj197tq2tkyH9Y+btCbwllPPTgoI8HANd+RWeYr38Yl9d sLEemyKer6ZBVNHMAzcV5H6I2ruGCGvWF+vQtsE4bzwTmj9lGRb+HBrrITzBn7lu0NUr fRvyDM74uZ2bXYNzShPCzLPIlXBtsShx6zasA=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=PN1jst/G3k06/Dtf0Ry5V8trxtQYG9J9zmC+szd9xLcscZRAs7xzavutlBaocMYXs6 fytgwMgE+pxVn73UQmarcV66aYsRnXKd0MZyHY3PQZHynN6GaDWy1zf8T6XV/bdBylnV AmQG4FDYMOkJmt9LjI+HjkSpN6WDqlZCLvO2M=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
I've met a issue that a PV-on-HVM domain become stucked after migration.
The alloc_intr_gate(HVM_XEN_EVTCHN_CALLBACK) is called the second time
after the migration and leads to BUG(). (The first time is at system
initialization)

The following patch fixes this by check whether this callback is
registered or not before calling alloc_intr_gate.
---
 linux-2.6-xen/drivers/xen/events.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/linux-2.6-xen/drivers/xen/events.c
b/linux-2.6-xen/drivers/xen/events.c
index ac7b42f..77ffceb 100644
--- a/linux-2.6-xen/drivers/xen/events.c
+++ b/linux-2.6-xen/drivers/xen/events.c
@@ -1500,7 +1500,9 @@ void xen_callback_vector(void)
                }
                printk(KERN_INFO "Xen HVM callback vector for event delivery is 
"
                                "enabled\n");
-               alloc_intr_gate(XEN_HVM_EVTCHN_CALLBACK, 
xen_hvm_callback_vector);
+               /* xen_callback_vector will be called after every domU resume */
+               if (!test_bit(XEN_HVM_EVTCHN_CALLBACK, used_vectors))
+                       alloc_intr_gate(XEN_HVM_EVTCHN_CALLBACK, 
xen_hvm_callback_vector);
        }
 }
 #else
-- 
1.7.0.4


-- 
潘震皓, Frank Pan

Computer Science and Technology
Tsinghua University

Attachment: 0001-Avoid-re-alloc_intr_gate-of-hvm-evtchn-callback.patch
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>