[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/4] Remove the virtio-{blk, console}-pci-0-10 devic
From: |
Mark McLoughlin |
Subject: |
[Qemu-devel] [PATCH 2/4] Remove the virtio-{blk, console}-pci-0-10 device types |
Date: |
Tue, 21 Jul 2009 15:21:57 +0100 |
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 <address@hidden>
---
hw/virtio-pci.c | 57 ++++++++++--------------------------------------------
1 files changed, 11 insertions(+), 46 deletions(-)
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index 1f922c2..703f4fe 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -423,63 +423,37 @@ static void virtio_init_pci(VirtIOPCIProxy *proxy,
VirtIODevice *vdev,
virtio_bind_device(vdev, &virtio_pci_bindings, proxy);
}
-static void virtio_blk_init_pci_with_class(PCIDevice *pci_dev,
- uint16_t class_code)
+static void virtio_blk_init_pci(PCIDevice *pci_dev)
{
VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev);
VirtIODevice *vdev;
- vdev = virtio_blk_init(&pci_dev->qdev);
- virtio_init_pci(proxy, vdev,
- PCI_VENDOR_ID_REDHAT_QUMRANET,
- PCI_DEVICE_ID_VIRTIO_BLOCK,
- class_code, 0x00);
-}
-
-static void virtio_blk_init_pci(PCIDevice *pci_dev)
-{
- VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev);
-
if (proxy->class_code != PCI_CLASS_STORAGE_SCSI &&
proxy->class_code != PCI_CLASS_STORAGE_OTHER)
proxy->class_code = PCI_CLASS_STORAGE_SCSI;
-
- virtio_blk_init_pci_with_class(pci_dev, proxy->class_code);
-}
-
-static void virtio_blk_init_pci_0_10(PCIDevice *pci_dev)
-{
- virtio_blk_init_pci_with_class(pci_dev, PCI_CLASS_STORAGE_OTHER);
-}
-
-static void virtio_console_init_pci_with_class(PCIDevice *pci_dev,
- uint16_t class_code)
-{
- VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev);
- VirtIODevice *vdev;
- vdev = virtio_console_init(&pci_dev->qdev);
+ vdev = virtio_blk_init(&pci_dev->qdev);
virtio_init_pci(proxy, vdev,
PCI_VENDOR_ID_REDHAT_QUMRANET,
- PCI_DEVICE_ID_VIRTIO_CONSOLE,
- class_code, 0x00);
+ PCI_DEVICE_ID_VIRTIO_BLOCK,
+ proxy->class_code, 0x00);
}
static void virtio_console_init_pci(PCIDevice *pci_dev)
{
VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev);
-
+ VirtIODevice *vdev;
+
if (proxy->class_code != PCI_CLASS_COMMUNICATION_OTHER &&
proxy->class_code != PCI_CLASS_DISPLAY_OTHER && /* qemu 0.10 */
proxy->class_code != PCI_CLASS_OTHERS) /* qemu-kvm */
proxy->class_code = PCI_CLASS_COMMUNICATION_OTHER;
- virtio_console_init_pci_with_class(pci_dev, proxy->class_code);
-}
-
-static void virtio_console_init_pci_0_10(PCIDevice *pci_dev)
-{
- virtio_console_init_pci_with_class(pci_dev, PCI_CLASS_DISPLAY_OTHER);
+ vdev = virtio_console_init(&pci_dev->qdev);
+ virtio_init_pci(proxy, vdev,
+ PCI_VENDOR_ID_REDHAT_QUMRANET,
+ PCI_DEVICE_ID_VIRTIO_CONSOLE,
+ proxy->class_code, 0x00);
}
static void virtio_net_init_pci(PCIDevice *pci_dev)
@@ -561,15 +535,6 @@ static PCIDeviceInfo virtio_info[] = {
.qdev.size = sizeof(VirtIOPCIProxy),
.init = virtio_balloon_init_pci,
},{
- /* For compatibility with 0.10 */
- .qdev.name = "virtio-blk-pci-0-10",
- .qdev.size = sizeof(VirtIOPCIProxy),
- .init = virtio_blk_init_pci_0_10,
- },{
- .qdev.name = "virtio-console-pci-0-10",
- .qdev.size = sizeof(VirtIOPCIProxy),
- .init = virtio_console_init_pci_0_10,
- },{
/* end of list */
}
};
--
1.6.2.5
- Re: [Qemu-devel] [PATCH 3/3 v2] Add a pc-0-10 machine type for compatibility with 0.10.x, (continued)
- Re: [Qemu-devel] [PATCH 3/3 v2] Add a pc-0-10 machine type for compatibility with 0.10.x, Anthony Liguori, 2009/07/09
- Re: [Qemu-devel] [PATCH 3/3 v2] Add a pc-0-10 machine type for compatibility with 0.10.x, Gerd Hoffmann, 2009/07/09
- Re: [Qemu-devel] [PATCH 3/3 v2] Add a pc-0-10 machine type for compatibility with 0.10.x, Paul Brook, 2009/07/09
- Re: [Qemu-devel] [PATCH 3/3 v2] Add a pc-0-10 machine type for compatibility with 0.10.x, Avi Kivity, 2009/07/09
- Re: [Qemu-devel] [PATCH 3/3 v2] Add a pc-0-10 machine type for compatibility with 0.10.x, Anthony Liguori, 2009/07/09
- Re: [Qemu-devel] [PATCH 3/3 v2] Add a pc-0-10 machine type for compatibility with 0.10.x, Avi Kivity, 2009/07/09
- Re: [Qemu-devel] [PATCH 3/3 v2] Add a pc-0-10 machine type for compatibility with 0.10.x, Anthony Liguori, 2009/07/09
- [Qemu-devel] [PATCH 2/4] Remove the virtio-{blk, console}-pci-0-10 device types,
Mark McLoughlin <=
- [Qemu-devel] [PATCH 3/4] Add machine type aliases, Mark McLoughlin, 2009/07/21
- [Qemu-devel] [PATCH 1/4] Remove the pc-0-10 machine type, Mark McLoughlin, 2009/07/21
- Re: [Qemu-devel] [PATCH 1/4] Remove the pc-0-10 machine type, Mark McLoughlin, 2009/07/21
- Re: [Qemu-devel] [PATCH 1/4] Remove the pc-0-10 machine type, Anthony Liguori, 2009/07/21
- Re: [Qemu-devel] [PATCH 1/4] Remove the pc-0-10 machine type, Gerd Hoffmann, 2009/07/22
- Re: [Qemu-devel] [PATCH 1/4] Remove the pc-0-10 machine type, Mark McLoughlin, 2009/07/22
- Re: [Qemu-devel] [PATCH 1/4] Remove the pc-0-10 machine type, Mark McLoughlin, 2009/07/22
- [Qemu-devel] [PATCH 2/2] Add a pc-0.11 machine type and make the pc type an alias, Mark McLoughlin, 2009/07/22
- Re: [Qemu-devel] [PATCH 2/2] Add a pc-0.11 machine type and make the pc type an alias, Mark McLoughlin, 2009/07/23
- [Qemu-devel] [PATCH 1/2] Add machine type aliases, Mark McLoughlin, 2009/07/22