diff options
author | neel <neel@FreeBSD.org> | 2015-03-14 00:30:41 +0000 |
---|---|---|
committer | neel <neel@FreeBSD.org> | 2015-03-14 00:30:41 +0000 |
commit | 771dc2cc82487fde44a71d30533ccde7bf753a8a (patch) | |
tree | b7bd2d7ea1bcdd0788cff1e68a21b7910126728c /sys/x86/xen | |
parent | 43c1b0e92f334dc7dd539cbebd72ecc170cbbf22 (diff) | |
download | FreeBSD-src-771dc2cc82487fde44a71d30533ccde7bf753a8a.zip FreeBSD-src-771dc2cc82487fde44a71d30533ccde7bf753a8a.tar.gz |
Add x86 specific APIs 'lapic_ipi_alloc()' and 'lapic_ipi_free()' to allow IPI
vectors to be dynamically allocated. This allows kernel modules like vmm.ko
to allocate unique IPI slots when loaded (as opposed to hard allocating one
or more vectors).
Also, reorganize the fixed IPI vectors to create a contiguous space for
dynamic IPI allocation.
Reviewed by: kib, jhb
Differential Revision: https://reviews.freebsd.org/D2042
Diffstat (limited to 'sys/x86/xen')
-rw-r--r-- | sys/x86/xen/xen_apic.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/x86/xen/xen_apic.c b/sys/x86/xen/xen_apic.c index ed86734..8e83184 100644 --- a/sys/x86/xen/xen_apic.c +++ b/sys/x86/xen/xen_apic.c @@ -311,7 +311,22 @@ xen_pv_lapic_ipi_wait(int delay) XEN_APIC_UNSUPPORTED; return (0); } -#endif + +static int +xen_pv_lapic_ipi_alloc(inthand_t *ipifunc) +{ + + XEN_APIC_UNSUPPORTED; + return (-1); +} + +static void +xen_pv_lapic_ipi_free(int vector) +{ + + XEN_APIC_UNSUPPORTED; +} +#endif /* SMP */ static int xen_pv_lapic_set_lvt_mask(u_int apic_id, u_int lvt, u_char masked) @@ -372,6 +387,8 @@ struct apic_ops xen_apic_ops = { .ipi_raw = xen_pv_lapic_ipi_raw, .ipi_vectored = xen_pv_lapic_ipi_vectored, .ipi_wait = xen_pv_lapic_ipi_wait, + .ipi_alloc = xen_pv_lapic_ipi_alloc, + .ipi_free = xen_pv_lapic_ipi_free, #endif .set_lvt_mask = xen_pv_lapic_set_lvt_mask, .set_lvt_mode = xen_pv_lapic_set_lvt_mode, |