From: Anthony PERARD Date: Wed, 2 Oct 2013 16:16:29 +0000 (+0100) Subject: Revert "xen: Fix vcpus initialisation." X-Git-Tag: qemu-xen-4.4.0-rc1~10 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=4e310e13c93c48a0f5fc8558d56830d58713202a;p=qemu-upstream-4.6-testing.git Revert "xen: Fix vcpus initialisation." This reverts commit f573cdfa7afa92ebb66b2ba066b4f08bd22fc84b. --- diff --git a/xen-all.c b/xen-all.c index 15be8edc8..daf43b99d 100644 --- a/xen-all.c +++ b/xen-all.c @@ -632,13 +632,13 @@ static ioreq_t *cpu_get_ioreq(XenIOState *state) } if (port != -1) { - for (i = 0; i < max_cpus; i++) { + for (i = 0; i < smp_cpus; i++) { if (state->ioreq_local_port[i] == port) { break; } } - if (i == max_cpus) { + if (i == smp_cpus) { hw_error("Fatal error while trying to get io event!\n"); } @@ -1123,10 +1123,10 @@ int xen_hvm_init(void) hw_error("map buffered IO page returned error %d", errno); } - state->ioreq_local_port = g_malloc0(max_cpus * sizeof (evtchn_port_t)); + state->ioreq_local_port = g_malloc0(smp_cpus * sizeof (evtchn_port_t)); /* FIXME: how about if we overflow the page here? */ - for (i = 0; i < max_cpus; i++) { + for (i = 0; i < smp_cpus; i++) { rc = xc_evtchn_bind_interdomain(state->xce_handle, xen_domid, xen_vcpu_eport(state->shared_page, i)); if (rc == -1) {