mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
which gets rid of the -1 -> # hack and works for cpus > 9. I ran into some issues with stale vcpu_to_cpu lists when running the hotplug subprogram. I would take a vcpu offline, and then issue the command to bring it back and the vcpu_to_cpu list would not have changed to indicate the the vcpu actually went down. If I injected a xm list -v (which always showed the correct mapping) then subsequent hotplug commands would see the state change and fire off the hotplug request. I don't know that not sending the event when not changing state saves that much work so I took the state check out and now just send the hotplug event directly. > Also the whole hotplug stuff is still missing interrupt re-routing > when a vcpu is taken down. To do this, we need an evtchn operation to > change the vcpu affinity of a port by changing notify_vcpu_id. I don't fully understand all of the mappings that are happening, so this part of the patch might be way off. In any case, I've added a new evtchn op to set the notify_vcpu_id field of a channel. I updated the HOTPLUG_CPU code to use the new routines when bringing cpus up and down. When taking down a cpu, I route the IPI irq channels to CPU 0, and when the cpu comes up, it re-routes the channels back to the awakened CPU. From: Ryan Harper <ryanh@us.ibm.com> Signed-off-by: ian@xensource.com