diff options
author | John Baldwin <jhb@FreeBSD.org> | 2014-01-29 14:56:48 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2014-01-29 14:56:48 +0000 |
commit | 3cbf3585cbab66fad22dbdc3fe5f983ee86f02d3 (patch) | |
tree | 09685dd2341b1fb3a81952684f6e4b12e50ee984 /lib/libvmmapi | |
parent | 819c6bfc81b20fb71c21876abefbc0b7ca527ba4 (diff) | |
download | src-3cbf3585cbab66fad22dbdc3fe5f983ee86f02d3.tar.gz src-3cbf3585cbab66fad22dbdc3fe5f983ee86f02d3.zip |
Enhance the support for PCI legacy INTx interrupts and enable them in
the virtio backends.
- Add a new ioctl to export the count of pins on the I/O APIC from vmm
to the hypervisor.
- Use pins on the I/O APIC >= 16 for PCI interrupts leaving 0-15 for
ISA interrupts.
- Populate the MP Table with I/O interrupt entries for any PCI INTx
interrupts.
- Create a _PRT table under the PCI root bridge in ACPI to route any
PCI INTx interrupts appropriately.
- Track which INTx interrupts are in use per-slot so that functions
that share a slot attempt to distribute their INTx interrupts across
the four available pins.
- Implicitly mask INTx interrupts if either MSI or MSI-X is enabled
and when the INTx DIS bit is set in a function's PCI command register.
Either assert or deassert the associated I/O APIC pin when the
state of one of those conditions changes.
- Add INTx support to the virtio backends.
- Always advertise the MSI capability in the virtio backends.
Submitted by: neel (7)
Reviewed by: neel
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=261268
Diffstat (limited to 'lib/libvmmapi')
-rw-r--r-- | lib/libvmmapi/vmmapi.c | 7 | ||||
-rw-r--r-- | lib/libvmmapi/vmmapi.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/libvmmapi/vmmapi.c b/lib/libvmmapi/vmmapi.c index 6fec469ac92f..eba33672f07c 100644 --- a/lib/libvmmapi/vmmapi.c +++ b/lib/libvmmapi/vmmapi.c @@ -454,6 +454,13 @@ vm_ioapic_pulse_irq(struct vmctx *ctx, int irq) } int +vm_ioapic_pincount(struct vmctx *ctx, int *pincount) +{ + + return (ioctl(ctx->fd, VM_IOAPIC_PINCOUNT, pincount)); +} + +int vm_inject_nmi(struct vmctx *ctx, int vcpu) { struct vm_nmi vmnmi; diff --git a/lib/libvmmapi/vmmapi.h b/lib/libvmmapi/vmmapi.h index 69762c7cf995..84289872e664 100644 --- a/lib/libvmmapi/vmmapi.h +++ b/lib/libvmmapi/vmmapi.h @@ -72,6 +72,7 @@ int vm_lapic_msi(struct vmctx *ctx, uint64_t addr, uint64_t msg); int vm_ioapic_assert_irq(struct vmctx *ctx, int irq); int vm_ioapic_deassert_irq(struct vmctx *ctx, int irq); int vm_ioapic_pulse_irq(struct vmctx *ctx, int irq); +int vm_ioapic_pincount(struct vmctx *ctx, int *pincount); int vm_inject_nmi(struct vmctx *ctx, int vcpu); int vm_capability_name2type(const char *capname); const char *vm_capability_type2name(int type); |