Interface vmm_pci_helper.h
The interface presents a series of helpers for establishing VMM PCI support on x86 platforms.
Brief content:
Functions:
Functions
The interface vmm_pci_helper.h
defines the following functions.
Function vmm_pci_helper_map_bars(vm, cfg, bars)
Given a PCI device config, map the PCI device bars into the VM, effectively passing-through the PCI device. This will map MMIO and IO-based bars.
Parameters:
vm {vm_t *}
: A handle to the VMcfg {libpci_device_iocfg_t *}
: PCI device configbars {vmm_pci_bar_t *}
: Resulting PCI bars mapped into the VM
Returns:
- -1 for error, otherwise the number of bars mapped into the VM (>=0)
Back to interface description.
Function vmm_pci_io_port_in(vcpu, cookie, port_no, size, result)
Emulates IOPort in access on the VMM Virtual PCI device
Parameters:
vcpu {vm_vcpu_t *}
: Faulting vcpu performing ioport accessport_no {unsigned int}
: Port address being accessedsize {unsigned int}
: Size of ioport accessresult {unsigned int *}
: Pointer that will be populated with resulting data of io-in op
Returns:
No return
Back to interface description.
Function vmm_pci_io_port_out(vcpu, cookie, port_no, size, value)
Emulates IOPort out access on the VMM Virtual PCI device
Parameters:
vcpu {vm_vcpu_t *}
: Faulting vcpu performing ioport accessport_no {unsigned int}
: Port address being accessedsize {unsigned int}
: Size of ioport accessvalue {unsigned int}
: Value being written in io-out op
Returns:
No return
Back to interface description.
Back to top.