From: Mark McLoughlin <markmc@redhat.com>
To: qemu-devel@nongnu.org
Cc: Mark McLoughlin <markmc@redhat.com>
Subject: [Qemu-devel] [PATCH 2/2] Remove the virtio-{blk, console}-pci-0-10 device types
Date: Thu, 30 Jul 2009 11:29:13 +0100 [thread overview]
Message-ID: <1248949753-13269-3-git-send-email-markmc@redhat.com> (raw)
In-Reply-To: <1248949753-13269-1-git-send-email-markmc@redhat.com>
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>
---
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
next prev parent reply other threads:[~2009-07-30 10:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-30 10:29 [Qemu-devel] [PATCH 0/2] Compat cleanups Mark McLoughlin
2009-07-30 10:29 ` [Qemu-devel] [PATCH 1/2] Remove the pc-0-10 machine type Mark McLoughlin
2009-07-30 12:13 ` Gerd Hoffmann
2009-07-30 10:29 ` Mark McLoughlin [this message]
2009-07-30 12:22 ` [Qemu-devel] [PATCH 2/2] Remove the virtio-{blk, console}-pci-0-10 device types Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1248949753-13269-3-git-send-email-markmc@redhat.com \
--to=markmc@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).