ia64/xen-unstable

changeset 14167:d4cd2c70cdea

[XEN] [ACM] Simplify the event channel scanning

This patch simplifies the scanning of a domain's event channels
considering that an 'ECS_UNBOUND' event channel is not connected and
can be skipped.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
author kfraser@localhost.localdomain
date Tue Feb 27 20:22:36 2007 +0000 (2007-02-27)
parents 69dec539c19f
children 5217185f7588
files xen/acm/acm_simple_type_enforcement_hooks.c
line diff
     1.1 --- a/xen/acm/acm_simple_type_enforcement_hooks.c	Tue Feb 27 16:13:08 2007 +0000
     1.2 +++ b/xen/acm/acm_simple_type_enforcement_hooks.c	Tue Feb 27 20:22:36 2007 +0000
     1.3 @@ -193,28 +193,14 @@ ste_init_state(struct acm_ste_policy_buf
     1.4          /* a) check for event channel conflicts */
     1.5          for (port=0; port < NR_EVTCHN_BUCKETS; port++) {
     1.6              spin_lock(&d->evtchn_lock);
     1.7 -            if (d->evtchn[port] == NULL) {
     1.8 +            if (d->evtchn[port] == NULL ||
     1.9 +                d->evtchn[port]->state == ECS_UNBOUND) {
    1.10                  spin_unlock(&d->evtchn_lock);
    1.11                  continue;
    1.12              }
    1.13              if (d->evtchn[port]->state == ECS_INTERDOMAIN) {
    1.14                  rdom = d->evtchn[port]->u.interdomain.remote_dom;
    1.15                  rdomid = rdom->domain_id;
    1.16 -                /* rdom now has remote domain */
    1.17 -                ste_rssid = GET_SSIDP(ACM_SIMPLE_TYPE_ENFORCEMENT_POLICY, 
    1.18 -                                      (struct acm_ssid_domain *)(rdom->ssid));
    1.19 -                ste_rssidref = ste_rssid->ste_ssidref;
    1.20 -            } else if (d->evtchn[port]->state == ECS_UNBOUND) {
    1.21 -                rdomid = d->evtchn[port]->u.unbound.remote_domid;
    1.22 -                if ((rdom = get_domain_by_id(rdomid)) == NULL) {
    1.23 -                    printk("%s: Error finding domain to id %x!\n", __func__, rdomid);
    1.24 -                    goto out;
    1.25 -                }
    1.26 -                /* rdom now has remote domain */
    1.27 -                ste_rssid = GET_SSIDP(ACM_SIMPLE_TYPE_ENFORCEMENT_POLICY, 
    1.28 -                                      (struct acm_ssid_domain *)(rdom->ssid));
    1.29 -                ste_rssidref = ste_rssid->ste_ssidref;
    1.30 -                put_domain(rdom);
    1.31              } else {
    1.32                  spin_unlock(&d->evtchn_lock);
    1.33                  continue; /* port unused */