[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx, Jeremy Fitzhardinge <Jeremy.Fitzhardinge@xxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxx>
  • 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
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.