qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Dr . David Alan Gilbert" <dgilbert@redhat.com>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>,
	Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Richard Henderson <rth@twiddle.net>,
	Eduardo Habkost <ehabkost@redhat.com>,
	David Gibson <david@gibson.dropbear.id.au>,
	Cornelia Huck <cohuck@redhat.com>,
	Halil Pasic <pasic@linux.ibm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	David Hildenbrand <david@redhat.com>,
	Collin Walling <walling@linux.ibm.com>,
	Eric Blake <eblake@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	Murilo Opsfelder Araujo <muriloo@linux.ibm.com>,
	qemu-ppc@nongnu.org, qemu-s390x@nongnu.org
Subject: [Qemu-devel] [PATCH RFCv2 5/9] virtio-pci: Allow to specify additional interfaces for the base type
Date: Wed, 23 Jan 2019 20:55:23 +0100	[thread overview]
Message-ID: <20190123195527.29575-6-david@redhat.com> (raw)
In-Reply-To: <20190123195527.29575-1-david@redhat.com>

Let's allow to specify additional interfaces for the base type (e.g.
later TYPE_MEMORY_DEVICE), something that was possible before the
rework of virtio PCI device instantiation.

Signed-off-by: David Hildenbrand <david@redhat.com>
---
 hw/virtio/virtio-pci.c | 1 +
 hw/virtio/virtio-pci.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index b282109343..8f53192f4f 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1938,6 +1938,7 @@ void virtio_pci_types_register(const VirtioPCIDeviceTypeInfo *t)
         .class_init    = virtio_pci_base_class_init,
         .class_data    = (void *)t,
         .abstract      = true,
+        .interfaces    = t->interfaces,
     };
     TypeInfo generic_type_info = {
         .name = t->generic_name,
diff --git a/hw/virtio/virtio-pci.h b/hw/virtio/virtio-pci.h
index bd223a6e3b..5d303b1641 100644
--- a/hw/virtio/virtio-pci.h
+++ b/hw/virtio/virtio-pci.h
@@ -232,6 +232,7 @@ typedef struct VirtioPCIDeviceTypeInfo {
     size_t instance_size;
     void (*instance_init)(Object *obj);
     void (*class_init)(ObjectClass *klass, void *data);
+    InterfaceInfo *interfaces;
 } VirtioPCIDeviceTypeInfo;
 
 /* Register virtio-pci type(s).  @t must be static. */
-- 
2.17.2

  parent reply	other threads:[~2019-01-23 20:03 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-23 19:55 [Qemu-devel] [PATCH RFCv2 0/9] qdev: Hotplug handler chaining + virtio-pmem David Hildenbrand
2019-01-23 19:55 ` [Qemu-devel] [PATCH RFCv2 1/9] qdev: Let the hotplug_handler_unplug() caller delete the device David Hildenbrand
2019-01-28 14:07   ` Cornelia Huck
2019-01-23 19:55 ` [Qemu-devel] [PATCH RFCv2 2/9] qdev: Let machine hotplug handler to override bus hotplug handler David Hildenbrand
2019-01-23 19:55 ` [Qemu-devel] [PATCH RFCv2 3/9] qdev: Provide qdev_get_bus_hotplug_handler() David Hildenbrand
2019-01-28 14:01   ` Igor Mammedov
2019-01-28 14:02     ` David Hildenbrand
2019-01-23 19:55 ` [Qemu-devel] [PATCH RFCv2 4/9] virtio-pmem: Prototype David Hildenbrand
2019-01-31 18:19   ` Markus Armbruster
2019-01-31 18:54     ` David Hildenbrand
2019-02-01  7:08       ` Markus Armbruster
2019-01-23 19:55 ` David Hildenbrand [this message]
2019-01-28 14:09   ` [Qemu-devel] [PATCH RFCv2 5/9] virtio-pci: Allow to specify additional interfaces for the base type Cornelia Huck
2019-01-23 19:55 ` [Qemu-devel] [PATCH RFCv2 6/9] virtio-pci: Proxy for virtio-pmem David Hildenbrand
2019-01-23 19:55 ` [Qemu-devel] [PATCH RFCv2 7/9] hmp: Handle virtio-pmem when printing memory device infos David Hildenbrand
2019-01-25 17:58   ` Dr. David Alan Gilbert
2019-01-31 18:23     ` Markus Armbruster
2019-02-01 10:49       ` Dr. David Alan Gilbert
2019-02-01 14:11         ` Markus Armbruster
2019-02-01 15:15           ` Dr. David Alan Gilbert
2019-01-23 19:55 ` [Qemu-devel] [PATCH RFCv2 8/9] numa: Handle virtio-pmem in NUMA stats David Hildenbrand
2019-01-23 19:55 ` [Qemu-devel] [PATCH RFCv2 9/9] pc: Support for virtio-pmem-pci David Hildenbrand
2019-02-06 13:01   ` Igor Mammedov
2019-02-06 13:10     ` David Hildenbrand
2019-01-28 14:18 ` [Qemu-devel] [PATCH RFCv2 0/9] qdev: Hotplug handler chaining + virtio-pmem Igor Mammedov
2019-01-28 14:22   ` David Hildenbrand
2019-01-31 14:52   ` David Hildenbrand
2019-02-06 13:18     ` Igor Mammedov
2019-02-06 13:26       ` David Hildenbrand

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=20190123195527.29575-6-david@redhat.com \
    --to=david@redhat.com \
    --cc=armbru@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=muriloo@linux.ibm.com \
    --cc=pasic@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=walling@linux.ibm.com \
    /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).