X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fdevices%2Fpci.h;fp=palacios%2Finclude%2Fdevices%2Fpci.h;h=68ac2dcafb9dd69ad165a7f7304ffa315e293e97;hb=8a441df14ef65bb559ce090249343ec1dac1a7fc;hp=31e09ad4d42893b16a4390b76771cc018d9fa3e8;hpb=e8c6db81c1ad76fab0f6a783c03654145e41599d;p=palacios.git diff --git a/palacios/include/devices/pci.h b/palacios/include/devices/pci.h index 31e09ad..68ac2dc 100644 --- a/palacios/include/devices/pci.h +++ b/palacios/include/devices/pci.h @@ -63,10 +63,12 @@ struct v3_pci_bar { struct { int num_ports; uint16_t default_base_port; - int (*io_read)(ushort_t port, void * dst, uint_t length, struct vm_device * dev); - int (*io_write)(ushort_t port, void * src, uint_t length, struct vm_device * dev); + int (*io_read)(ushort_t port, void * dst, uint_t length, void * private_data); + int (*io_write)(ushort_t port, void * src, uint_t length, void * private_data); }; }; + + void * private_data; // Internal PCI data uint32_t val; @@ -75,8 +77,11 @@ struct v3_pci_bar { }; -#define PCI_IO_BASE(bar_val) (bar_val & 0xfffffffc) -#define PCI_MEM32_BASE(bar_val) (bar_val & 0xfffffff0) +#define PCI_IO_MASK 0xfffffffc +#define PCI_MEM32_MASK 0xfffffff0 + +#define PCI_IO_BASE(bar_val) (bar_val & PCI_IO_MASK) +#define PCI_MEM32_BASE(bar_val) (bar_val & PCI_MEM32_MASK) struct pci_device {