diff options
author | Daniel De Graaf <dgdegra@tycho.nsa.gov> | 2012-02-02 15:16:34 +0000 |
---|---|---|
committer | Daniel De Graaf <dgdegra@tycho.nsa.gov> | 2012-02-02 15:16:34 +0000 |
commit | 3beb32854400bf5753265e65a4579f71f60a6546 (patch) | |
tree | 7b1cfb45f71558d4eff5bcf0c171f642561e6086 /xen/common | |
parent | 23ac688cc419351d1652ab330ac06a216c886a8f (diff) | |
download | xen-3beb32854400bf5753265e65a4579f71f60a6546.tar.gz xen-3beb32854400bf5753265e65a4579f71f60a6546.tar.bz2 xen-3beb32854400bf5753265e65a4579f71f60a6546.zip |
xsm: Add security labels to event-channel dump
In FLASK, event channel labels are distinct from the labels of the
domain using them. When debugging policy issues, it is useful to be
able to view the current label of event channels; add this label to
the event channel dump.
This patch also adds the IRQ associated with a PIRQ for event channels
bound to a PIRQ, and moves the xen_consumer flag to the front to
create more consistent alignment in the output.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/common')
-rw-r--r-- | xen/common/event_channel.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index f784254daf..989ebae133 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -1256,6 +1256,7 @@ void evtchn_move_pirqs(struct vcpu *v) static void domain_dump_evtchn_info(struct domain *d) { unsigned int port; + int irq; bitmap_scnlistprintf(keyhandler_scratch, sizeof(keyhandler_scratch), d->poll_mask, d->max_vcpus); @@ -1268,6 +1269,7 @@ static void domain_dump_evtchn_info(struct domain *d) for ( port = 1; port < MAX_EVTCHNS(d); ++port ) { const struct evtchn *chn; + char *ssid; if ( !port_is_valid(d, port) ) continue; @@ -1275,11 +1277,12 @@ static void domain_dump_evtchn_info(struct domain *d) if ( chn->state == ECS_FREE ) continue; - printk(" %4u [%d/%d]: s=%d n=%d", + printk(" %4u [%d/%d]: s=%d n=%d x=%d", port, !!test_bit(port, &shared_info(d, evtchn_pending)), !!test_bit(port, &shared_info(d, evtchn_mask)), - chn->state, chn->notify_vcpu_id); + chn->state, chn->notify_vcpu_id, chn->xen_consumer); + switch ( chn->state ) { case ECS_UNBOUND: @@ -1291,13 +1294,21 @@ static void domain_dump_evtchn_info(struct domain *d) chn->u.interdomain.remote_port); break; case ECS_PIRQ: - printk(" p=%d", chn->u.pirq.irq); + irq = domain_pirq_to_irq(d, chn->u.pirq.irq); + printk(" p=%d i=%d", chn->u.pirq.irq, irq); break; case ECS_VIRQ: printk(" v=%d", chn->u.virq); break; } - printk(" x=%d\n", chn->xen_consumer); + + ssid = xsm_show_security_evtchn(d, chn); + if (ssid) { + printk(" Z=%s\n", ssid); + xfree(ssid); + } else { + printk("\n"); + } } spin_unlock(&d->event_lock); |