mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
Virtio-net qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
This commit is contained in:
parent
9d07d7579b
commit
cf21e106cd
8 changed files with 40 additions and 32 deletions
|
@ -126,14 +126,20 @@ static int virtio_console_load(QEMUFile *f, void *opaque, int version_id)
|
|||
void *virtio_console_init(PCIBus *bus, CharDriverState *chr)
|
||||
{
|
||||
VirtIOConsole *s;
|
||||
PCIDevice *d;
|
||||
|
||||
s = (VirtIOConsole *)virtio_init_pci(bus, "virtio-console",
|
||||
d = pci_register_device(bus, "virtio-console", sizeof(VirtIOConsole),
|
||||
-1, NULL, NULL);
|
||||
if (!d)
|
||||
return NULL;
|
||||
|
||||
s = (VirtIOConsole *)virtio_init_pci(d, "virtio-console",
|
||||
PCI_VENDOR_ID_REDHAT_QUMRANET,
|
||||
PCI_DEVICE_ID_VIRTIO_CONSOLE,
|
||||
PCI_VENDOR_ID_REDHAT_QUMRANET,
|
||||
VIRTIO_ID_CONSOLE,
|
||||
PCI_CLASS_DISPLAY_OTHER, 0x00,
|
||||
0, sizeof(VirtIOConsole));
|
||||
0);
|
||||
if (s == NULL)
|
||||
return NULL;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue