Merge remote-tracking branch 'mst/for_anthony' into staging
This commit is contained in:
commit
6734529435
@ -110,4 +110,5 @@
|
|||||||
#define PCI_DEVICE_ID_INTEL_82371AB_2 0x7112
|
#define PCI_DEVICE_ID_INTEL_82371AB_2 0x7112
|
||||||
#define PCI_DEVICE_ID_INTEL_82371AB_3 0x7113
|
#define PCI_DEVICE_ID_INTEL_82371AB_3 0x7113
|
||||||
|
|
||||||
#define PCI_VENDOR_ID_XENSOURCE 0x5853
|
#define PCI_VENDOR_ID_XEN 0x5853
|
||||||
|
#define PCI_DEVICE_ID_XEN_PLATFORM 0x0001
|
||||||
|
@ -478,6 +478,9 @@ static PCIDeviceInfo i440fx_info[] = {
|
|||||||
.no_hotplug = 1,
|
.no_hotplug = 1,
|
||||||
.init = piix3_initfn,
|
.init = piix3_initfn,
|
||||||
.config_write = piix3_write_config_xen,
|
.config_write = piix3_write_config_xen,
|
||||||
|
.vendor_id = PCI_VENDOR_ID_INTEL,
|
||||||
|
.device_id = PCI_DEVICE_ID_INTEL_82371SB_0, // 82371SB PIIX3 PCI-to-ISA bridge (Step A1)
|
||||||
|
.class_id = PCI_CLASS_BRIDGE_ISA,
|
||||||
},{
|
},{
|
||||||
/* end of list */
|
/* end of list */
|
||||||
}
|
}
|
||||||
|
@ -784,5 +784,6 @@ void vhost_dev_stop(struct vhost_dev *hdev, VirtIODevice *vdev)
|
|||||||
|
|
||||||
hdev->started = false;
|
hdev->started = false;
|
||||||
qemu_free(hdev->log);
|
qemu_free(hdev->log);
|
||||||
|
hdev->log = NULL;
|
||||||
hdev->log_size = 0;
|
hdev->log_size = 0;
|
||||||
}
|
}
|
||||||
|
@ -449,9 +449,17 @@ int virtqueue_pop(VirtQueue *vq, VirtQueueElement *elem)
|
|||||||
struct iovec *sg;
|
struct iovec *sg;
|
||||||
|
|
||||||
if (vring_desc_flags(desc_pa, i) & VRING_DESC_F_WRITE) {
|
if (vring_desc_flags(desc_pa, i) & VRING_DESC_F_WRITE) {
|
||||||
|
if (elem->in_num >= ARRAY_SIZE(elem->in_sg)) {
|
||||||
|
error_report("Too many write descriptors in indirect table");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
elem->in_addr[elem->in_num] = vring_desc_addr(desc_pa, i);
|
elem->in_addr[elem->in_num] = vring_desc_addr(desc_pa, i);
|
||||||
sg = &elem->in_sg[elem->in_num++];
|
sg = &elem->in_sg[elem->in_num++];
|
||||||
} else {
|
} else {
|
||||||
|
if (elem->out_num >= ARRAY_SIZE(elem->out_sg)) {
|
||||||
|
error_report("Too many read descriptors in indirect table");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
elem->out_addr[elem->out_num] = vring_desc_addr(desc_pa, i);
|
elem->out_addr[elem->out_num] = vring_desc_addr(desc_pa, i);
|
||||||
sg = &elem->out_sg[elem->out_num++];
|
sg = &elem->out_sg[elem->out_num++];
|
||||||
}
|
}
|
||||||
|
@ -290,18 +290,10 @@ static int xen_platform_initfn(PCIDevice *dev)
|
|||||||
|
|
||||||
pci_conf = d->pci_dev.config;
|
pci_conf = d->pci_dev.config;
|
||||||
|
|
||||||
pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_XENSOURCE);
|
|
||||||
pci_config_set_device_id(pci_conf, 0x0001);
|
|
||||||
pci_set_word(pci_conf + PCI_SUBSYSTEM_VENDOR_ID, PCI_VENDOR_ID_XENSOURCE);
|
|
||||||
pci_set_word(pci_conf + PCI_SUBSYSTEM_ID, 0x0001);
|
|
||||||
|
|
||||||
pci_set_word(pci_conf + PCI_COMMAND, PCI_COMMAND_IO | PCI_COMMAND_MEMORY);
|
pci_set_word(pci_conf + PCI_COMMAND, PCI_COMMAND_IO | PCI_COMMAND_MEMORY);
|
||||||
|
|
||||||
pci_config_set_revision(pci_conf, 1);
|
|
||||||
pci_config_set_prog_interface(pci_conf, 0);
|
pci_config_set_prog_interface(pci_conf, 0);
|
||||||
|
|
||||||
pci_config_set_class(pci_conf, PCI_CLASS_OTHERS << 8 | 0x80);
|
|
||||||
|
|
||||||
pci_conf[PCI_INTERRUPT_PIN] = 1;
|
pci_conf[PCI_INTERRUPT_PIN] = 1;
|
||||||
|
|
||||||
pci_register_bar(&d->pci_dev, 0, 0x100,
|
pci_register_bar(&d->pci_dev, 0, 0x100,
|
||||||
@ -330,6 +322,13 @@ static PCIDeviceInfo xen_platform_info = {
|
|||||||
.qdev.size = sizeof(PCIXenPlatformState),
|
.qdev.size = sizeof(PCIXenPlatformState),
|
||||||
.qdev.vmsd = &vmstate_xen_platform,
|
.qdev.vmsd = &vmstate_xen_platform,
|
||||||
.qdev.reset = platform_reset,
|
.qdev.reset = platform_reset,
|
||||||
|
|
||||||
|
.vendor_id = PCI_VENDOR_ID_XEN,
|
||||||
|
.device_id = PCI_DEVICE_ID_XEN_PLATFORM,
|
||||||
|
.class_id = PCI_CLASS_OTHERS << 8 | 0x80,
|
||||||
|
.subsystem_vendor_id = PCI_VENDOR_ID_XEN,
|
||||||
|
.subsystem_id = PCI_DEVICE_ID_XEN_PLATFORM,
|
||||||
|
.revision = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void xen_platform_register(void)
|
static void xen_platform_register(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user