WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [XEN] [ACM] Simplify the event channel sc

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN] [ACM] Simplify the event channel scanning
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 28 Feb 2007 12:20:19 -0800
Delivery-date: Wed, 28 Feb 2007 12:20:45 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1172607756 0
# Node ID d4cd2c70cdea8fac11817b46f68c07514754da00
# Parent  69dec539c19f31c81e27cb16bad0a91e19eca39f
[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@xxxxxxxxxx>
---
 xen/acm/acm_simple_type_enforcement_hooks.c |   18 ++----------------
 1 files changed, 2 insertions(+), 16 deletions(-)

diff -r 69dec539c19f -r d4cd2c70cdea xen/acm/acm_simple_type_enforcement_hooks.c
--- a/xen/acm/acm_simple_type_enforcement_hooks.c       Tue Feb 27 16:13:08 
2007 +0000
+++ b/xen/acm/acm_simple_type_enforcement_hooks.c       Tue Feb 27 20:22:36 
2007 +0000
@@ -193,28 +193,14 @@ ste_init_state(struct acm_ste_policy_buf
         /* a) check for event channel conflicts */
         for (port=0; port < NR_EVTCHN_BUCKETS; port++) {
             spin_lock(&d->evtchn_lock);
-            if (d->evtchn[port] == NULL) {
+            if (d->evtchn[port] == NULL ||
+                d->evtchn[port]->state == ECS_UNBOUND) {
                 spin_unlock(&d->evtchn_lock);
                 continue;
             }
             if (d->evtchn[port]->state == ECS_INTERDOMAIN) {
                 rdom = d->evtchn[port]->u.interdomain.remote_dom;
                 rdomid = rdom->domain_id;
-                /* rdom now has remote domain */
-                ste_rssid = GET_SSIDP(ACM_SIMPLE_TYPE_ENFORCEMENT_POLICY, 
-                                      (struct acm_ssid_domain *)(rdom->ssid));
-                ste_rssidref = ste_rssid->ste_ssidref;
-            } else if (d->evtchn[port]->state == ECS_UNBOUND) {
-                rdomid = d->evtchn[port]->u.unbound.remote_domid;
-                if ((rdom = get_domain_by_id(rdomid)) == NULL) {
-                    printk("%s: Error finding domain to id %x!\n", __func__, 
rdomid);
-                    goto out;
-                }
-                /* rdom now has remote domain */
-                ste_rssid = GET_SSIDP(ACM_SIMPLE_TYPE_ENFORCEMENT_POLICY, 
-                                      (struct acm_ssid_domain *)(rdom->ssid));
-                ste_rssidref = ste_rssid->ste_ssidref;
-                put_domain(rdom);
             } else {
                 spin_unlock(&d->evtchn_lock);
                 continue; /* port unused */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEN] [ACM] Simplify the event channel scanning, Xen patchbot-unstable <=