diff options
author | iap10@freefall.cl.cam.ac.uk <iap10@freefall.cl.cam.ac.uk> | 2005-07-06 22:23:18 +0000 |
---|---|---|
committer | iap10@freefall.cl.cam.ac.uk <iap10@freefall.cl.cam.ac.uk> | 2005-07-06 22:23:18 +0000 |
commit | 8e1bda2932fad85e413ed300cba46274eb680988 (patch) | |
tree | 247196925a44db04f1e3d13477e47542b83d9fef /xen/include/public/event_channel.h | |
parent | 108420db45e5f65ddd8a0d226e9f913d7c3ed590 (diff) | |
download | xen-8e1bda2932fad85e413ed300cba46274eb680988.tar.gz xen-8e1bda2932fad85e413ed300cba46274eb680988.tar.bz2 xen-8e1bda2932fad85e413ed300cba46274eb680988.zip |
I updated the vcpu_to_cpu string creation to include a field separator,
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
Diffstat (limited to 'xen/include/public/event_channel.h')
-rw-r--r-- | xen/include/public/event_channel.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xen/include/public/event_channel.h b/xen/include/public/event_channel.h index 3110657b77..ceacf3fc34 100644 --- a/xen/include/public/event_channel.h +++ b/xen/include/public/event_channel.h @@ -158,6 +158,13 @@ typedef struct evtchn_status { } u; } evtchn_status_t; +#define EVTCHNOP_rebind 8 +typedef struct { + /* IN parameters. */ + u32 port; /* 0 */ + u32 vcpu; /* 4 */ +} evtchn_rebind_t; /* 8 bytes */ + typedef struct evtchn_op { u32 cmd; /* EVTCHNOP_* */ union { @@ -169,6 +176,7 @@ typedef struct evtchn_op { evtchn_close_t close; evtchn_send_t send; evtchn_status_t status; + evtchn_rebind_t rebind; } u; } evtchn_op_t; |