*** SUBJECT HERE ***
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest9 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | xen/dom0: handle acpi lapic parsing in Xen dom0arch/ | +10 | 0 replies | |
| 2/9 | xen: hook io_apic read/write operationsarch/ arch/ arch/ +3 more | +102 | 4 replies | |
| 3/9 | xen: create dummy ioapic mappingarch/ | +10 | 0 replies | |
| 4/9 | xen: implement pirq type event channelsdrivers/ include/ | +256 | 0 replies | |
| 5/9 | x86/io_apic: add get_nr_irqs_gsi()arch/ arch/ | +6 | 0 replies | |
| 6/9 | xen/apic: identity map gsi->irqsdrivers/ | +17 | 0 replies | |
| 7/9 | xen: direct irq registration to pirq event channelsarch/ arch/ arch/ +4 more | +92 | 0 replies | |
| 8/9 | xen: bind pirq to vector and event channelarch/ arch/ | +32 | 0 replies | |
| 9/9 | xen: pre-initialize legacy irqs earlyarch/ | +5 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/9] *** SUBJECT HERE ***
From: Jeremy Fitzhardinge <[email protected]>
This series adds a some hooks into the APIC code to allow Xen's dom0 support to hook in.
A dom0 kernel's interactions with the hypervisor and the platform interrupt hardware are... interesting.
The overview is:
Xen itself owns the local APICs, and the kernel is not allowed to touch them directly. Instead, interrupts from hardware are delivered like all other interrupts in Xen: as events coming over an event channel. This means that Xen is also responsible for vector allocation.
The dom0 kernel does, however, own the IO APICs, and is responsible for programming them appropriately. It uses ACPI to do the interrupt routing to find the GSI for a given device, and then asks Xen to allocate a vector for it, which gets mapped to an event channel. It then programs that vector into the IO APICs so that hardware interrupts are deliverered on that event channel. When an event is raised, it feeds it into the kernel's normal interrupt handling path to be distributed among the interested device drivers as normal.
Details:
1. We change acpi_register_lapic and acpi_register_lapic_address to prevent the lapics from actually being registered under Xen. We still want them to be discovered by ACPI, just not used.
2. Despite controlled the IO APICs, the dom0 kernel can't map them directly as usual, but must program their registers via hypercalls, so we need to hook into the io_apic accessors accordingly. This is done with an explicit test and call for Xen, rather than being abstracted via an _ops layer, on the grounds that this is something that's unlikely for anyone else to want to do (and we can always add an _ops layer if there's a second user).
3. Hook acpi_register_gsi(). This sets up all the pirq event channel state for the gsi, including allocating an event channel bound to a vector and setting up the routing. It returns the irq, which is always equal to the gsi.
Thanks,
J
Ian Campbell (1):
xen: pre-initialize legacy irqs early
Jeremy Fitzhardinge (8):
xen/dom0: handle acpi lapic parsing in Xen dom0
xen: hook io_apic read/write operations
xen: create dummy ioapic mapping
xen: implement pirq type event channels x86/io_apic: add get_nr_irqs_gsi() xen/apic: identity map gsi->irqs
xen: direct irq registration to pirq event channels
xen: bind pirq to vector and event channel
arch/x86/include/asm/io_apic.h | 7 + arch/x86/include/asm/xen/pci.h | 13 ++ arch/x86/kernel/acpi/boot.c | 18 +++- arch/x86/kernel/io_apic.c | 37 +++++- arch/x86/xen/Kconfig | 11 ++ arch/x86/xen/Makefile | 4 +- arch/x86/xen/apic.c | 57 +++++++++ arch/x86/xen/enlighten.c | 2 + arch/x86/xen/mmu.c | 10 ++ arch/x86/xen/pci.c | 81 +++++++++++++ arch/x86/xen/xen-ops.h | 6 + drivers/xen/events.c | 260 +++++++++++++++++++++++++++++++++++++++- include/xen/events.h | 22 ++++ 13 files changed, 520 insertions(+), 8 deletions(-) create mode 100644 arch/x86/include/asm/xen/pci.h create mode 100644 arch/x86/xen/apic.c create mode 100644 arch/x86/xen/pci.c