Commit 85c2c7359bf6fe55b610b2eadc3f79dd5b7edbd1

Authored by Mark McLoughlin
Committed by Anthony Liguori
1 parent caea79a9

Remove the virtio-{blk, console}-pci-0-10 device types

These are now unused.

However, perhaps the idea is that when we add -device, they will be
useful? In that case, we should add virtio-net-pci-0-10 too.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing 1 changed file with 11 additions and 46 deletions
hw/virtio-pci.c
... ... @@ -423,63 +423,37 @@ static void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev,
423 423 virtio_bind_device(vdev, &virtio_pci_bindings, proxy);
424 424 }
425 425  
426   -static void virtio_blk_init_pci_with_class(PCIDevice *pci_dev,
427   - uint16_t class_code)
  426 +static void virtio_blk_init_pci(PCIDevice *pci_dev)
428 427 {
429 428 VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev);
430 429 VirtIODevice *vdev;
431 430  
432   - vdev = virtio_blk_init(&pci_dev->qdev);
433   - virtio_init_pci(proxy, vdev,
434   - PCI_VENDOR_ID_REDHAT_QUMRANET,
435   - PCI_DEVICE_ID_VIRTIO_BLOCK,
436   - class_code, 0x00);
437   -}
438   -
439   -static void virtio_blk_init_pci(PCIDevice *pci_dev)
440   -{
441   - VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev);
442   -
443 431 if (proxy->class_code != PCI_CLASS_STORAGE_SCSI &&
444 432 proxy->class_code != PCI_CLASS_STORAGE_OTHER)
445 433 proxy->class_code = PCI_CLASS_STORAGE_SCSI;
446   -
447   - virtio_blk_init_pci_with_class(pci_dev, proxy->class_code);
448   -}
449   -
450   -static void virtio_blk_init_pci_0_10(PCIDevice *pci_dev)
451   -{
452   - virtio_blk_init_pci_with_class(pci_dev, PCI_CLASS_STORAGE_OTHER);
453   -}
454   -
455   -static void virtio_console_init_pci_with_class(PCIDevice *pci_dev,
456   - uint16_t class_code)
457   -{
458   - VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev);
459   - VirtIODevice *vdev;
460 434  
461   - vdev = virtio_console_init(&pci_dev->qdev);
  435 + vdev = virtio_blk_init(&pci_dev->qdev);
462 436 virtio_init_pci(proxy, vdev,
463 437 PCI_VENDOR_ID_REDHAT_QUMRANET,
464   - PCI_DEVICE_ID_VIRTIO_CONSOLE,
465   - class_code, 0x00);
  438 + PCI_DEVICE_ID_VIRTIO_BLOCK,
  439 + proxy->class_code, 0x00);
466 440 }
467 441  
468 442 static void virtio_console_init_pci(PCIDevice *pci_dev)
469 443 {
470 444 VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev);
471   -
  445 + VirtIODevice *vdev;
  446 +
472 447 if (proxy->class_code != PCI_CLASS_COMMUNICATION_OTHER &&
473 448 proxy->class_code != PCI_CLASS_DISPLAY_OTHER && /* qemu 0.10 */
474 449 proxy->class_code != PCI_CLASS_OTHERS) /* qemu-kvm */
475 450 proxy->class_code = PCI_CLASS_COMMUNICATION_OTHER;
476 451  
477   - virtio_console_init_pci_with_class(pci_dev, proxy->class_code);
478   -}
479   -
480   -static void virtio_console_init_pci_0_10(PCIDevice *pci_dev)
481   -{
482   - virtio_console_init_pci_with_class(pci_dev, PCI_CLASS_DISPLAY_OTHER);
  452 + vdev = virtio_console_init(&pci_dev->qdev);
  453 + virtio_init_pci(proxy, vdev,
  454 + PCI_VENDOR_ID_REDHAT_QUMRANET,
  455 + PCI_DEVICE_ID_VIRTIO_CONSOLE,
  456 + proxy->class_code, 0x00);
483 457 }
484 458  
485 459 static void virtio_net_init_pci(PCIDevice *pci_dev)
... ... @@ -561,15 +535,6 @@ static PCIDeviceInfo virtio_info[] = {
561 535 .qdev.size = sizeof(VirtIOPCIProxy),
562 536 .init = virtio_balloon_init_pci,
563 537 },{
564   - /* For compatibility with 0.10 */
565   - .qdev.name = "virtio-blk-pci-0-10",
566   - .qdev.size = sizeof(VirtIOPCIProxy),
567   - .init = virtio_blk_init_pci_0_10,
568   - },{
569   - .qdev.name = "virtio-console-pci-0-10",
570   - .qdev.size = sizeof(VirtIOPCIProxy),
571   - .init = virtio_console_init_pci_0_10,
572   - },{
573 538 /* end of list */
574 539 }
575 540 };
... ...