Revision 867c47cb hw/i386/kvm/pci-assign.c
b/hw/i386/kvm/pci-assign.c | ||
---|---|---|
568 | 568 |
return get_real_id(devpath, "device", val); |
569 | 569 |
} |
570 | 570 |
|
571 |
static int get_real_device(AssignedDevice *pci_dev, uint16_t r_seg, |
|
572 |
uint8_t r_bus, uint8_t r_dev, uint8_t r_func) |
|
571 |
static int get_real_device(AssignedDevice *pci_dev) |
|
573 | 572 |
{ |
574 | 573 |
char dir[128], name[128]; |
575 | 574 |
int fd, r = 0, v; |
... | ... | |
582 | 581 |
dev->region_number = 0; |
583 | 582 |
|
584 | 583 |
snprintf(dir, sizeof(dir), "/sys/bus/pci/devices/%04x:%02x:%02x.%x/", |
585 |
r_seg, r_bus, r_dev, r_func); |
|
584 |
pci_dev->host.domain, pci_dev->host.bus, |
|
585 |
pci_dev->host.slot, pci_dev->host.function); |
|
586 | 586 |
|
587 | 587 |
snprintf(name, sizeof(name), "%sconfig", dir); |
588 | 588 |
|
... | ... | |
1769 | 1769 |
memcpy(dev->emulate_config_write, dev->emulate_config_read, |
1770 | 1770 |
sizeof(dev->emulate_config_read)); |
1771 | 1771 |
|
1772 |
if (get_real_device(dev, dev->host.domain, dev->host.bus, |
|
1773 |
dev->host.slot, dev->host.function)) { |
|
1772 |
if (get_real_device(dev)) { |
|
1774 | 1773 |
error_report("pci-assign: Error: Couldn't get real device (%s)!", |
1775 | 1774 |
dev->dev.qdev.id); |
1776 | 1775 |
goto out; |
Also available in: Unified diff