From: Anthony PERARD <anthony.perard@citrix.com>
To: QEMU-devel <qemu-devel@nongnu.org>
Cc: Anthony PERARD <anthony.perard@citrix.com>,
Stefano Stabellini <stefano.stabellini@citrix.com>
Subject: [Qemu-devel] [PATCH v4 1/2] xen: Fix vcpu initialization.
Date: Tue, 10 Sep 2013 18:26:28 +0100 [thread overview]
Message-ID: <1378833989-6313-2-git-send-email-anthony.perard@citrix.com> (raw)
In-Reply-To: <1378833989-6313-1-git-send-email-anthony.perard@citrix.com>
Each vcpu need a evtchn binded in qemu, even those that are
offline at QEMU initialisation.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
xen-all.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/xen-all.c b/xen-all.c
index eb13111..f4c3ffa 100644
--- a/xen-all.c
+++ b/xen-all.c
@@ -612,13 +612,13 @@ static ioreq_t *cpu_get_ioreq(XenIOState *state)
}
if (port != -1) {
- for (i = 0; i < smp_cpus; i++) {
+ for (i = 0; i < max_cpus; i++) {
if (state->ioreq_local_port[i] == port) {
break;
}
}
- if (i == smp_cpus) {
+ if (i == max_cpus) {
hw_error("Fatal error while trying to get io event!\n");
}
@@ -1105,10 +1105,10 @@ int xen_hvm_init(void)
hw_error("map buffered IO page returned error %d", errno);
}
- state->ioreq_local_port = g_malloc0(smp_cpus * sizeof (evtchn_port_t));
+ state->ioreq_local_port = g_malloc0(max_cpus * sizeof (evtchn_port_t));
/* FIXME: how about if we overflow the page here? */
- for (i = 0; i < smp_cpus; i++) {
+ for (i = 0; i < max_cpus; i++) {
rc = xc_evtchn_bind_interdomain(state->xce_handle, xen_domid,
xen_vcpu_eport(state->shared_page, i));
if (rc == -1) {
--
Anthony PERARD
next prev parent reply other threads:[~2013-09-10 17:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-10 17:26 [Qemu-devel] [PATCH v4 0/2] Enable CPU hotplug when running under Xen Anthony PERARD
2013-09-10 17:26 ` Anthony PERARD [this message]
2013-09-10 17:26 ` [Qemu-devel] [PATCH v4 2/2] xen: Enable cpu-hotplug on xenfv machine Anthony PERARD
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=1378833989-6313-2-git-send-email-anthony.perard@citrix.com \
--to=anthony.perard@citrix.com \
--cc=qemu-devel@nongnu.org \
--cc=stefano.stabellini@citrix.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).