aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/domain.h
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2011-05-09 09:27:42 +0100
committerJan Beulich <jbeulich@novell.com>2011-05-09 09:27:42 +0100
commit30d61f33084210362ac1efb2b72af547da70b1cc (patch)
tree8e175fa49fb18613a6c252bfad90e87f4c2b139d /xen/include/asm-x86/domain.h
parent8dc6738dbb3c6117fb7e30617609f6d41e19d3b4 (diff)
downloadxen-30d61f33084210362ac1efb2b72af547da70b1cc.tar.gz
xen-30d61f33084210362ac1efb2b72af547da70b1cc.tar.bz2
xen-30d61f33084210362ac1efb2b72af547da70b1cc.zip
x86: replace nr_irqs sized per-domain arrays with radix trees
It would seem possible to fold the two trees into one (making e.g. the emuirq bits stored in the upper half of the pointer), but I'm not certain that's worth it as it would make deletion of entries more cumbersome. Unless pirq-s and emuirq-s were mutually exclusive... v2: Split setup/teardown into two stages - (de-)allocation (tree node (de-)population) is done with just d->event_lock held (and hence interrupts enabled), while actual insertion/removal of translation data gets done with irq_desc's lock held (and interrupts disabled). Signed-off-by: Jan Beulich <jbeulich@novell.com> Fix up for new radix-tree implementation. In particular, we should never insert NULL into a radix tree, as that means empty slot (which can be reclaimed during a deletion). Make use of radix_tree_int_to_ptr() (and its inverse) to hide some of these details. Signed-off-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/asm-x86/domain.h')
-rw-r--r--xen/include/asm-x86/domain.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/xen/include/asm-x86/domain.h b/xen/include/asm-x86/domain.h
index 244338ac6b..095735ed85 100644
--- a/xen/include/asm-x86/domain.h
+++ b/xen/include/asm-x86/domain.h
@@ -3,6 +3,7 @@
#include <xen/config.h>
#include <xen/mm.h>
+#include <xen/radix-tree.h>
#include <asm/hvm/vcpu.h>
#include <asm/hvm/domain.h>
#include <asm/e820.h>
@@ -284,10 +285,9 @@ struct arch_domain
const char *nested_p2m_function;
/* NB. protected by d->event_lock and by irq_desc[irq].lock */
- int *irq_pirq;
+ struct radix_tree_root irq_pirq;
int *pirq_irq;
- /* pirq to emulated irq and vice versa */
- int *emuirq_pirq;
+ /* pirq to emulated irq */
int *pirq_emuirq;
/* Maximum physical-address bitwidth supported by this guest. */