#include <interfaces/vmm_host_dev.h>
-#ifndef CONFIG_DEBUG_PCI_FRONT
+#ifndef V3_CONFIG_DEBUG_PCI_FRONT
#undef PrintDebug
#define PrintDebug(fmt, args...)
#endif
static int pull_config(struct pci_front_internal *state, uint8_t *config)
{
- if (v3_host_dev_config_read(state->host_dev, 0, config, 256) != 256) {
+ if (v3_host_dev_read_config(state->host_dev, 0, config, 256) != 256) {
return -1;
} else {
return 0;
}
-static int pci_front_config_update(uint_t reg_num, void * src, uint_t length, void * private_data)
+static int pci_front_config_update(struct pci_device *pci_dev, uint_t reg_num, void * src, uint_t length, void * private_data)
{
int i;
struct vm_device * dev = (struct vm_device *)private_data;
PrintDebug("\n");
- if (v3_host_dev_config_write(state->host_dev,
+ if (v3_host_dev_write_config(state->host_dev,
pci_addr.value,
src,
length) != length) {
bus_num, -1, 0,
state->name, bars,
pci_front_config_update,
+ NULL, // no suport for config reads
NULL, // no support for command updates
NULL, // no support for expansion roms
dev);
return -1;
}
- if (!(state->host_dev=v3_host_dev_open(url,V3_BUS_CLASS_PCI,dev))) {
+ if (!(state->host_dev=v3_host_dev_open(url,V3_BUS_CLASS_PCI,dev,vm))) {
PrintError("pci_front (%s): unable to attach to host device %s\n",state->name, url);
v3_remove_device(dev);
return -1;