ia64/xen-unstable

changeset 2719:bd93b9d866a5

bitkeeper revision 1.1159.130.6 (41793773TFex2kvneKZIR5JlCHOzQQ)

Bugfixes.
author kaf24@freefall.cl.cam.ac.uk
date Fri Oct 22 16:38:11 2004 +0000 (2004-10-22)
parents db83b3aaf89f
children cf913b2c5774
files xen/arch/x86/memory.c xen/common/event_channel.c
line diff
     1.1 --- a/xen/arch/x86/memory.c	Fri Oct 22 16:27:57 2004 +0000
     1.2 +++ b/xen/arch/x86/memory.c	Fri Oct 22 16:38:11 2004 +0000
     1.3 @@ -403,7 +403,7 @@ get_page_from_l1e(
     1.4  
     1.5      return ((l1v & _PAGE_RW) ?
     1.6              get_page_and_type(page, d, PGT_writable_page) :
     1.7 -            get_page(d));
     1.8 +            get_page(page, d));
     1.9  }
    1.10  
    1.11  
     2.1 --- a/xen/common/event_channel.c	Fri Oct 22 16:27:57 2004 +0000
     2.2 +++ b/xen/common/event_channel.c	Fri Oct 22 16:38:11 2004 +0000
     2.3 @@ -167,9 +167,12 @@ static long evtchn_bind_interdomain(evtc
     2.4          break;
     2.5  
     2.6      case ECS_INTERDOMAIN:
     2.7 -        rc = ((d1->event_channel[port1].u.interdomain.remote_dom != d2) ||
     2.8 -              (d1->event_channel[port1].u.interdomain.remote_port != port2)) ?
     2.9 -            -EINVAL : 0;
    2.10 +        if ( d1->event_channel[port1].u.interdomain.remote_dom != d2 )
    2.11 +            ERROR_EXIT(-EINVAL);
    2.12 +        if ( (d1->event_channel[port1].u.interdomain.remote_port != port2) &&
    2.13 +             (bind->port2 != 0) )
    2.14 +            ERROR_EXIT(-EINVAL);
    2.15 +        port2 = d1->event_channel[port1].u.interdomain.remote_port;
    2.16          goto out;
    2.17  
    2.18      default:
    2.19 @@ -189,6 +192,15 @@ static long evtchn_bind_interdomain(evtc
    2.20              ERROR_EXIT(-EINVAL);
    2.21          break;
    2.22  
    2.23 +    case ECS_INTERDOMAIN:
    2.24 +        if ( d2->event_channel[port2].u.interdomain.remote_dom != d1 )
    2.25 +            ERROR_EXIT(-EINVAL);
    2.26 +        if ( (d2->event_channel[port2].u.interdomain.remote_port != port1) &&
    2.27 +             (bind->port1 != 0) )
    2.28 +            ERROR_EXIT(-EINVAL);
    2.29 +        port1 = d2->event_channel[port2].u.interdomain.remote_port;
    2.30 +        goto out;
    2.31 +
    2.32      default:
    2.33          ERROR_EXIT(-EINVAL);
    2.34      }