Classes | Functions | Variables

vancouver/model/pcidirect.cc File Reference

#include "nul/motherboard.h"
#include "host/hostpci.h"
#include "host/hostvf.h"
#include "model/pci.h"

Classes

class  DirectPciDevice
 Directly-assigned PCI device. More...
struct  DirectPciDevice::MsiXTableEntry

Functions

 PARAM (dpci,{HostPci pci(mb.bus_hwpcicfg, mb.bus_hostop);unsigned hostbdf=pci.search_device(argv[0], argv[1], argv[2]);Logging::printf("search_device(%lx,%lx,%lx) bdf %x \n", argv[0], argv[1], argv[2], hostbdf);check0(!hostbdf,"dpci device not found");new DirectPciDevice(mb, hostbdf, argv[3], argv[4], argv[5]);},"dpci:class,subclass,instance,bdf,assign=1,irqs=1 - makes the specified hostdevice directly accessible to the guest.","Example: Use 'dpci:2,,0,0x21' to attach the first network controller to 00:04.1.","If class or subclass is ommited it is not compared. If the instance is ommited the last instance is used.","If bdf is zero the very same bdf as in the host is used, if it is ommited a free bdf is used.","If assign is zero, the BDF is not assigned via the IOMMU and can not do DMA.","If irq is zero, IRQs are disabled.") PARAM(vfpci
HostVfPci pci (mb.bus_hwpcicfg, mb.bus_hostop)
 for (unsigned bdf, num=0;(bdf=pci.search_device(0x2, 0x0, num++));)
 check0 (!vf_bdf,"XXX VF%d does not exist in parent %x.", vf_no, parent_bdf)
new DirectPciDevice (mb, 0, argv[3], true, true, parent_bdf, vf_no, true)

Variables

unsigned vf_no = argv[2]
uint16 parent_bdf = 0
unsigned found = 0
unsigned vf_bdf = pci.vf_bdf(parent_bdf, vf_no)
vfpci __pad0__
vfpci parent_no
vfpci guest_bdf directly
assign a virtual given
function to the 
guest
vfpci guest_bdf directly
assign a virtual given
function to the If no
guest_bdf is 
given

Function Documentation

check0 ( vf_bdf,
"XXX VF%d does not exist in parent %x."  ,
vf_no  ,
parent_bdf   
)
new DirectPciDevice ( mb  ,
,
argv  [3],
true  ,
true  ,
parent_bdf  ,
vf_no  ,
true   
)
for ( unsigned  bdf,
num  = 0; (bdf = pci.search_device(0x2, 0x0, num++)); 
)
PARAM ( dpci   ) 
HostVfPci pci ( mb.  bus_hwpcicfg,
mb.  bus_hostop 
)

Variable Documentation

vfpci __pad0__
unsigned found = 0
vfpci guest_bdf directly assign a virtual given function to the If no guest_bdf is given
vfpci guest_bdf directly assign a virtual given function to the guest
vfpci parent_no
vfpci vf_no = argv[2]
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines