diff options
author | tychon <tychon@FreeBSD.org> | 2014-03-11 16:56:00 +0000 |
---|---|---|
committer | tychon <tychon@FreeBSD.org> | 2014-03-11 16:56:00 +0000 |
commit | 25c8b61cfd6f390fd191d8f7016a3d6fb37fbdc5 (patch) | |
tree | 88da83839b43667193b4f76775f5154fa48167aa /sys/amd64/vmm/intel | |
parent | 537be6292992897fefd4922dc1fe5859d47d0df8 (diff) | |
download | FreeBSD-src-25c8b61cfd6f390fd191d8f7016a3d6fb37fbdc5.zip FreeBSD-src-25c8b61cfd6f390fd191d8f7016a3d6fb37fbdc5.tar.gz |
Replace the userspace atpic stub with a more functional vmm.ko model.
New ioctls VM_ISA_ASSERT_IRQ, VM_ISA_DEASSERT_IRQ and VM_ISA_PULSE_IRQ
can be used to manipulate the pic, and optionally the ioapic, pin state.
Reviewed by: jhb, neel
Approved by: neel (co-mentor)
Diffstat (limited to 'sys/amd64/vmm/intel')
-rw-r--r-- | sys/amd64/vmm/intel/vmx.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/amd64/vmm/intel/vmx.c b/sys/amd64/vmm/intel/vmx.c index ddbaf6e..1489a31 100644 --- a/sys/amd64/vmm/intel/vmx.c +++ b/sys/amd64/vmm/intel/vmx.c @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include <machine/vmm.h> #include <machine/vmm_dev.h> #include "vmm_host.h" +#include "vmm_ioport.h" #include "vmm_ipi.h" #include "vmm_msr.h" #include "vmm_ktr.h" @@ -1861,6 +1862,11 @@ vmx_exit_process(struct vmx *vmx, int vcpu, struct vm_exit *vmexit) vmexit->u.inout.rep = (qual & 0x20) ? 1 : 0; vmexit->u.inout.port = (uint16_t)(qual >> 16); vmexit->u.inout.eax = (uint32_t)(vmxctx->guest_rax); + error = emulate_ioport(vmx->vm, vcpu, vmexit); + if (error == 0) { + handled = 1; + vmxctx->guest_rax = vmexit->u.inout.eax; + } break; case EXIT_REASON_CPUID: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_CPUID, 1); |