From: Frank Pan <frankpzh@gmail.com>
To: xen-devel@lists.xensource.com,
Jeremy Fitzhardinge <Jeremy.Fitzhardinge@citrix.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Ian Campbell <Ian.Campbell@citrix.com>
Subject: [PATCH] pvops: Avoid re-alloc_intr_gate of hvm evtchn callback
Date: Sat, 5 Mar 2011 18:11:32 +0800 [thread overview]
Message-ID: <AANLkTinL2nYgcA3eL46JriZnNBog-qQEAaA_qQS6wfxk@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1199 bytes --]
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 #2: 0001-Avoid-re-alloc_intr_gate-of-hvm-evtchn-callback.patch --]
[-- Type: text/x-patch, Size: 1295 bytes --]
From dc04b1fbddbc428bb1453187a69be88a036a5d1e Mon Sep 17 00:00:00 2001
From: Frank Pan <frankpzh@gmail.com>
Date: Sat, 5 Mar 2011 16:16:45 +0800
Subject: [PATCH] Avoid re-alloc_intr_gate of hvm evtchn callback
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
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next reply other threads:[~2011-03-05 10:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-05 10:11 Frank Pan [this message]
2011-03-05 10:54 ` [PATCH] pvops: Avoid re-alloc_intr_gate of hvm evtchn callback Ian Campbell
2011-03-05 11:45 ` Frank Pan
2011-03-05 11:59 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTinL2nYgcA3eL46JriZnNBog-qQEAaA_qQS6wfxk@mail.gmail.com \
--to=frankpzh@gmail.com \
--cc=Ian.Campbell@citrix.com \
--cc=Jeremy.Fitzhardinge@citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).