[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 39/88] virtio-9p: use aliases instead of duplicate q
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 39/88] virtio-9p: use aliases instead of duplicate qdev properties |
Date: |
Thu, 8 Jan 2015 11:33:43 -0600 |
From: Gonglei <address@hidden>
virtio-9p-pci all duplicate the qdev properties of their
V9fsState child. This approach does not work well with
string or pointer properties since we must be careful
about leaking or double-freeing them.
Use the QOM alias property to forward property accesses to the
V9fsState child. This way no duplication is necessary.
Signed-off-by: Gonglei <address@hidden>
Cc: address@hidden
Signed-off-by: Paolo Bonzini <address@hidden>
(cherry picked from commit 48833071d955406ebeddc365a8df8b5cb12b035f)
Signed-off-by: Michael Roth <address@hidden>
---
hw/virtio/virtio-pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 6a355e7..50ef68c 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -924,7 +924,6 @@ static Property virtio_9p_pci_properties[] = {
DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
- DEFINE_VIRTIO_9P_PROPERTIES(V9fsPCIState, vdev.fsconf),
DEFINE_PROP_END_OF_LIST(),
};
@@ -948,6 +947,7 @@ static void virtio_9p_pci_instance_init(Object *obj)
V9fsPCIState *dev = VIRTIO_9P_PCI(obj);
object_initialize(&dev->vdev, sizeof(dev->vdev), TYPE_VIRTIO_9P);
object_property_add_child(obj, "virtio-backend", OBJECT(&dev->vdev), NULL);
+ qdev_alias_all_properties(DEVICE(&dev->vdev), obj);
}
static const TypeInfo virtio_9p_pci_info = {
--
1.9.1
- [Qemu-devel] [PATCH 26/88] tests: avoid running duplicate qom-tests, (continued)
- [Qemu-devel] [PATCH 26/88] tests: avoid running duplicate qom-tests, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 33/88] virtio/vhost-scsi: fix virtio-scsi/vhost-scsi child refcount in transports, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 28/88] smbios: Fix assertion on socket count calculation, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 38/88] virtio-balloon: fix virtio-balloon child refcount in transports, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 27/88] snapshot: fix referencing wrong variable in while loop in do_delvm, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 32/88] virtio/vhost-scsi: use aliases instead of duplicate qdev properties, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 34/88] virtio-serial: use aliases instead of duplicate qdev properties, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 31/88] virtio-net: fix virtio-net child refcount in transports, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 36/88] virtio-rng: use aliases instead of duplicate qdev properties, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 35/88] virtio-serial: fix virtio-serial child refcount in transports, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 39/88] virtio-9p: use aliases instead of duplicate qdev properties,
Michael Roth <=
- [Qemu-devel] [PATCH 42/88] vmware-vga: CVE-2014-3689: turn off hw accel, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 30/88] virtio-net: use aliases instead of duplicate qdev properties, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 29/88] vhost-scsi: use virtio_ldl_p, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 44/88] vmware-vga: use vmsvga_verify_rect in vmsvga_update_rect, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 43/88] vmware-vga: add vmsvga_verify_rect, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 37/88] virtio-rng: fix virtio-rng child refcount in transports, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 41/88] pc: Fix disabling of vapic for compat PC models, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 48/88] libcacard: don't free sign buffer while sign op is pending, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 46/88] vmware-vga: use vmsvga_verify_rect in vmsvga_fill_rect, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 50/88] vnc: sanitize bits_per_pixel from the client, Michael Roth, 2015/01/08