mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
virtio-blk-pci: switch to new API.
Here the virtio-blk-pci is modified for the new API. The device virtio-blk-pci extends virtio-pci. It creates and connects a virtio-blk during the init. The properties are not changed. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1363624648-16906-7-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
1c028ddfb0
commit
653ced071b
2 changed files with 71 additions and 65 deletions
|
@ -25,6 +25,7 @@
|
|||
#include "hw/9pfs/virtio-9p-device.h"
|
||||
|
||||
typedef struct VirtIOPCIProxy VirtIOPCIProxy;
|
||||
typedef struct VirtIOBlkPCI VirtIOBlkPCI;
|
||||
|
||||
/* virtio-pci-bus */
|
||||
|
||||
|
@ -73,7 +74,6 @@ struct VirtIOPCIProxy {
|
|||
uint32_t flags;
|
||||
uint32_t class_code;
|
||||
uint32_t nvectors;
|
||||
VirtIOBlkConf blk;
|
||||
NICConf nic;
|
||||
uint32_t host_features;
|
||||
#ifdef CONFIG_VIRTFS
|
||||
|
@ -90,6 +90,19 @@ struct VirtIOPCIProxy {
|
|||
VirtioBusState bus;
|
||||
};
|
||||
|
||||
/*
|
||||
* virtio-blk-pci: This extends VirtioPCIProxy.
|
||||
*/
|
||||
#define TYPE_VIRTIO_BLK_PCI "virtio-blk-pci"
|
||||
#define VIRTIO_BLK_PCI(obj) \
|
||||
OBJECT_CHECK(VirtIOBlkPCI, (obj), TYPE_VIRTIO_BLK_PCI)
|
||||
|
||||
struct VirtIOBlkPCI {
|
||||
VirtIOPCIProxy parent_obj;
|
||||
VirtIOBlock vdev;
|
||||
VirtIOBlkConf blk;
|
||||
};
|
||||
|
||||
void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev);
|
||||
void virtio_pci_bus_new(VirtioBusState *bus, VirtIOPCIProxy *dev);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue