All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Aleksandar Markovic <amarkovic@wavecomp.com>,
	Aurelien Jarno <aurelien@aurel32.net>,
	Aleksandar Rikalo <arikalo@wavecomp.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PULL 1/5] virtio: add class_size to VirtioPCIDeviceTypeInfo
Date: Mon, 11 Mar 2019 09:50:20 +0100	[thread overview]
Message-ID: <20190311085024.13780-2-kraxel@redhat.com> (raw)
In-Reply-To: <20190311085024.13780-1-kraxel@redhat.com>

Needed when VirtioPCIClass subclasses have their own
class struct with some extra fields.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-id: 20190307080244.9011-2-kraxel@redhat.com
---
 hw/virtio/virtio-pci.h | 1 +
 hw/virtio/virtio-pci.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/hw/virtio/virtio-pci.h b/hw/virtio/virtio-pci.h
index bd223a6e3b0b..18581854cae1 100644
--- a/hw/virtio/virtio-pci.h
+++ b/hw/virtio/virtio-pci.h
@@ -230,6 +230,7 @@ typedef struct VirtioPCIDeviceTypeInfo {
 
     /* Same as TypeInfo fields: */
     size_t instance_size;
+    size_t class_size;
     void (*instance_init)(Object *obj);
     void (*class_init)(ObjectClass *klass, void *data);
 } VirtioPCIDeviceTypeInfo;
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index e978bfe76048..cb44e19b6789 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1935,6 +1935,7 @@ void virtio_pci_types_register(const VirtioPCIDeviceTypeInfo *t)
         .parent        = t->parent ? t->parent : TYPE_VIRTIO_PCI,
         .instance_size = t->instance_size,
         .instance_init = t->instance_init,
+        .class_size    = t->class_size,
         .class_init    = virtio_pci_base_class_init,
         .class_data    = (void *)t,
         .abstract      = true,
-- 
2.18.1

  reply	other threads:[~2019-03-11  8:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-11  8:50 [Qemu-devel] [PULL 0/5] Vga 20190311 v2 patches Gerd Hoffmann
2019-03-11  8:50 ` Gerd Hoffmann [this message]
2019-03-11  8:50 ` [Qemu-devel] [PULL 2/5] virtio-vga: fix reset Gerd Hoffmann
2019-03-11  8:50 ` [Qemu-devel] [PULL 3/5] virtio-gpu: make virtio_gpu_reset static Gerd Hoffmann
2019-03-11  8:50 ` [Qemu-devel] [PULL 4/5] hw/display: Add basic ATI VGA emulation Gerd Hoffmann
2019-03-11 17:53   ` Markus Armbruster
2019-03-11 19:51     ` BALATON Zoltan
2019-03-11 19:55       ` Mark Cave-Ayland
2019-03-11 21:14         ` Markus Armbruster
2019-03-11 21:36           ` BALATON Zoltan
2019-03-12  6:42       ` David Abdurachmanov
2019-03-11  8:50 ` [Qemu-devel] [PULL 5/5] mips_fulong2e: Add on-board graphics chip Gerd Hoffmann
2019-03-11 16:27 ` [Qemu-devel] [PULL 0/5] Vga 20190311 v2 patches Peter Maydell

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=20190311085024.13780-2-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=amarkovic@wavecomp.com \
    --cc=arikalo@wavecomp.com \
    --cc=aurelien@aurel32.net \
    --cc=mst@redhat.com \
    --cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.