* [Qemu-devel] [PATCH v4 0/2] Enable CPU hotplug when running under Xen
@ 2013-09-10 17:26 Anthony PERARD
2013-09-10 17:26 ` [Qemu-devel] [PATCH v4 1/2] xen: Fix vcpu initialization Anthony PERARD
2013-09-10 17:26 ` [Qemu-devel] [PATCH v4 2/2] xen: Enable cpu-hotplug on xenfv machine Anthony PERARD
0 siblings, 2 replies; 3+ messages in thread
From: Anthony PERARD @ 2013-09-10 17:26 UTC (permalink / raw)
To: QEMU-devel; +Cc: Anthony PERARD, Stefano Stabellini
First patch fix a bug that would be otherwise trigger when we'll hotplug a CPU.
Second patch does enable CPU hotplug on the xenfv qemu machine so a default
installation of Xen 4.3+ can use the cpu-hotplug capability of QEMU.
Anthony PERARD (2):
xen: Fix vcpu initialization.
xen: Enable cpu-hotplug on xenfv machine.
hw/i386/pc_piix.c | 1 +
xen-all.c | 8 ++++----
2 files changed, 5 insertions(+), 4 deletions(-)
--
Anthony PERARD
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] [PATCH v4 1/2] xen: Fix vcpu initialization.
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
2013-09-10 17:26 ` [Qemu-devel] [PATCH v4 2/2] xen: Enable cpu-hotplug on xenfv machine Anthony PERARD
1 sibling, 0 replies; 3+ messages in thread
From: Anthony PERARD @ 2013-09-10 17:26 UTC (permalink / raw)
To: QEMU-devel; +Cc: Anthony PERARD, Stefano Stabellini
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Qemu-devel] [PATCH v4 2/2] xen: Enable cpu-hotplug on xenfv machine.
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 ` [Qemu-devel] [PATCH v4 1/2] xen: Fix vcpu initialization Anthony PERARD
@ 2013-09-10 17:26 ` Anthony PERARD
1 sibling, 0 replies; 3+ messages in thread
From: Anthony PERARD @ 2013-09-10 17:26 UTC (permalink / raw)
To: QEMU-devel; +Cc: Anthony PERARD, Stefano Stabellini
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
hw/i386/pc_piix.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 275e395..5d43663 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -730,6 +730,7 @@ static QEMUMachine xenfv_machine = {
.init = pc_xen_hvm_init,
.max_cpus = HVM_MAX_VCPUS,
.default_machine_opts = "accel=xen",
+ .hot_add_cpu = pc_hot_add_cpu,
};
#endif
--
Anthony PERARD
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-09-10 17:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [Qemu-devel] [PATCH v4 1/2] xen: Fix vcpu initialization Anthony PERARD
2013-09-10 17:26 ` [Qemu-devel] [PATCH v4 2/2] xen: Enable cpu-hotplug on xenfv machine Anthony PERARD
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).