ia64/xen-unstable

changeset 5700:f3f845297821

Quick hack to make sure that pirqs and interdomain event channels are
all bound to vcpu0, rather vcpu0 99% of the time and an entirely
random otherwise. This make sure things work nicely when you start
taking vcpus offline, since vcpu0 can't go offline; the correct
solution is to allow domains to change evtchn<->vcpu bindings.

Signed-off-by: Steven Smith, sos22@cl.cam.ac.uk
author sos22@douglas.cl.cam.ac.uk
date Thu Jul 07 09:27:25 2005 +0000 (2005-07-07)
parents bd1642e8599e
children 707fcf42a5ae
files xen/common/event_channel.c
line diff
     1.1 --- a/xen/common/event_channel.c	Wed Jul 06 18:34:16 2005 +0000
     1.2 +++ b/xen/common/event_channel.c	Thu Jul 07 09:27:25 2005 +0000
     1.3 @@ -220,10 +220,12 @@ static long evtchn_bind_interdomain(evtc
     1.4  
     1.5      chn1->u.interdomain.remote_dom  = d2;
     1.6      chn1->u.interdomain.remote_port = (u16)port2;
     1.7 +    chn1->notify_vcpu_id            = 0;
     1.8      chn1->state                     = ECS_INTERDOMAIN;
     1.9      
    1.10      chn2->u.interdomain.remote_dom  = d1;
    1.11      chn2->u.interdomain.remote_port = (u16)port1;
    1.12 +    chn2->notify_vcpu_id            = 0;
    1.13      chn2->state                     = ECS_INTERDOMAIN;
    1.14  
    1.15   out:
    1.16 @@ -324,8 +326,10 @@ static long evtchn_bind_pirq(evtchn_bind
    1.17  
    1.18      chn = evtchn_from_port(d, port);
    1.19  
    1.20 +    chn->notify_vcpu_id = 0;
    1.21 +
    1.22      d->pirq_to_evtchn[pirq] = port;
    1.23 -    rc = pirq_guest_bind(d->vcpu[chn->notify_vcpu_id], pirq, 
    1.24 +    rc = pirq_guest_bind(d->vcpu[0], pirq, 
    1.25                           !!(bind->flags & BIND_PIRQ__WILL_SHARE));
    1.26      if ( rc != 0 )
    1.27      {