diff options
author | jhb <jhb@FreeBSD.org> | 2014-07-22 03:14:37 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2014-07-22 03:14:37 +0000 |
commit | c1fe945ebd0d209b238eb98b47c40c115576f2e4 (patch) | |
tree | 60ebdda4ab095737aad1e22d1f84da4708e9a68c /lib/libvmmapi/vmmapi.c | |
parent | 87624b14336f152a9daf40db972abf2f70cf951d (diff) | |
download | FreeBSD-src-c1fe945ebd0d209b238eb98b47c40c115576f2e4.zip FreeBSD-src-c1fe945ebd0d209b238eb98b47c40c115576f2e4.tar.gz |
MFC 266125:
Implement a PCI interrupt router to route PCI legacy INTx interrupts to
the legacy 8259A PICs.
Diffstat (limited to 'lib/libvmmapi/vmmapi.c')
-rw-r--r-- | lib/libvmmapi/vmmapi.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/libvmmapi/vmmapi.c b/lib/libvmmapi/vmmapi.c index b853ae7..5e630f8 100644 --- a/lib/libvmmapi/vmmapi.c +++ b/lib/libvmmapi/vmmapi.c @@ -507,6 +507,7 @@ int vm_isa_pulse_irq(struct vmctx *ctx, int atpic_irq, int ioapic_irq) { struct vm_isa_irq isa_irq; + bzero(&isa_irq, sizeof(struct vm_isa_irq)); isa_irq.atpic_irq = atpic_irq; isa_irq.ioapic_irq = ioapic_irq; @@ -515,6 +516,19 @@ vm_isa_pulse_irq(struct vmctx *ctx, int atpic_irq, int ioapic_irq) } int +vm_isa_set_irq_trigger(struct vmctx *ctx, int atpic_irq, + enum vm_intr_trigger trigger) +{ + struct vm_isa_irq_trigger isa_irq_trigger; + + bzero(&isa_irq_trigger, sizeof(struct vm_isa_irq_trigger)); + isa_irq_trigger.atpic_irq = atpic_irq; + isa_irq_trigger.trigger = trigger; + + return (ioctl(ctx->fd, VM_ISA_SET_IRQ_TRIGGER, &isa_irq_trigger)); +} + +int vm_inject_nmi(struct vmctx *ctx, int vcpu) { struct vm_nmi vmnmi; |