All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org, "Gerd Hoffmann" <kraxel@redhat.com>,
	"Mathieu Poirier" <mathieu.poirier@linaro.org>,
	"Kevin Wolf" <kwolf@redhat.com>,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Jason Wang" <jasowang@redhat.com>,
	"Erik Schilling" <erik.schilling@linaro.org>,
	"Eric Blake" <eblake@redhat.com>, "Fam Zheng" <fam@euphon.net>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	virtio-fs@redhat.com, "Hanna Reitz" <hreitz@redhat.com>,
	"Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	qemu-block@nongnu.org, "Markus Armbruster" <armbru@redhat.com>,
	"Gonglei (Arei)" <arei.gonglei@huawei.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Raphael Norwitz" <raphael.norwitz@nutanix.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Viresh Kumar" <viresh.kumar@linaro.org>,
	"Stefan Hajnoczi" <stefanha@redhat.com>
Subject: Re: [PATCH v9 01/11] virtio: split into vhost-user-base and vhost-user-device
Date: Fri, 05 Jan 2024 11:37:47 +0000	[thread overview]
Message-ID: <87plygf1tg.fsf@draig.linaro.org> (raw)
In-Reply-To: <98246d7d-0e6f-45c3-91c2-2b2e1cd7fe93@linaro.org> ("Philippe Mathieu-Daudé"'s message of "Fri, 5 Jan 2024 10:49:03 +0100")

Philippe Mathieu-Daudé <philmd@linaro.org> writes:

> On 4/1/24 22:09, Alex Bennée wrote:
>> Lets keep a cleaner split between the base class and the derived
>> vhost-user-device which we can use for generic vhost-user stubs. This
>> includes an update to introduce the vq_size property so the number of
>> entries in a virtq can be defined.
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>> v5
>>    - s/parent/parent_obj/
>>    - remove left over vhost-user-device.h
>>    - use DEFINE_TYPES
>> v6
>>    - rebase and set .abstract = true for vhost-user-device
>> v7
>>    - checkpatch line length + MAINTAINERS
>>    - s/abstract = true/dc->user_creatable = false/ for both mmio and pci
>> ---
>>   MAINTAINERS                                   |   6 +
>>   ...{vhost-user-device.h => vhost-user-base.h} |  21 +-
>>   hw/virtio/vhost-user-base.c                   | 346 ++++++++++++++++++
>>   hw/virtio/vhost-user-device-pci.c             |  13 +-
>>   hw/virtio/vhost-user-device.c                 | 338 +----------------
>>   hw/virtio/meson.build                         |   1 +
>>   6 files changed, 383 insertions(+), 342 deletions(-)
>>   rename include/hw/virtio/{vhost-user-device.h => vhost-user-base.h} (71%)
>>   create mode 100644 hw/virtio/vhost-user-base.c
>
>
>> @@ -358,6 +42,9 @@ static void vud_class_init(ObjectClass *klass, void *data)
>>   {
>>       DeviceClass *dc = DEVICE_CLASS(klass);
>>   +    /* Reason: stop inexperienced users confusing themselves */
>> +    dc->user_creatable = false;
>
>
> What about making VHOST_USER_DEVICE_PCI and
> TYPE_VHOST_USER_DEVICE TypeInfos abstract instead?

I had in a previous iteration (v7) but AIUI abstract really means
something different - the device can be instantiated but we just want to
stop the user from creating it arbitrarily.

>
>> +
>>       device_class_set_props(dc, vud_properties);
>>       dc->vmsd = &vud_vmstate;
>>       set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
>> @@ -366,14 +53,11 @@ static void vud_class_init(ObjectClass *klass, void *data)
>>   static const TypeInfo vud_info = {
>>       .name = TYPE_VHOST_USER_DEVICE,
>>       .parent = TYPE_VHOST_USER_BASE,
>> -    .instance_size = sizeof(VHostUserBase),
>>       .class_init = vud_class_init,
>> -    .class_size = sizeof(VHostUserBaseClass),
>>   };

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  reply	other threads:[~2024-01-05 11:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-04 21:09 [PATCH v9 00/11] virtio: cleanup vhost-user-generic and reduce c&p + vhost-user-input Alex Bennée
2024-01-04 21:09 ` [PATCH v9 01/11] virtio: split into vhost-user-base and vhost-user-device Alex Bennée
2024-01-05  9:49   ` Philippe Mathieu-Daudé
2024-01-05 11:37     ` Alex Bennée [this message]
2024-01-04 21:09 ` [PATCH v9 02/11] hw/virtio: convert vhost-user-base to async shutdown Alex Bennée
2024-01-04 21:09 ` [PATCH v9 03/11] hw/virtio: derive vhost-user-rng from vhost-user-base Alex Bennée
2024-01-04 21:09 ` [PATCH v9 04/11] hw/virtio: derive vhost-user-gpio " Alex Bennée
2024-01-04 21:09 ` [PATCH v9 05/11] hw/virtio: derive vhost-user-i2c " Alex Bennée
2024-01-04 21:09 ` [PATCH v9 06/11] hw/virtio: add vhost-user-snd and virtio-snd-pci devices Alex Bennée
2024-01-04 21:09 ` [PATCH v9 07/11] docs/system: add a basic enumeration of vhost-user devices Alex Bennée
2024-01-04 21:09 ` [PATCH v9 08/11] hw/virtio: Support set_config() callback in vhost-user-base Alex Bennée
2024-01-04 21:09 ` [PATCH v9 09/11] docs/system: Add vhost-user-input documentation Alex Bennée
2024-01-04 21:09 ` [PATCH v9 10/11] hw/virtio: Move vhost-user-input into virtio folder Alex Bennée
2024-01-04 21:09 ` [PATCH v9 11/11] hw/virtio: derive vhost-user-input from vhost-user-base Alex Bennée
2024-01-10 10:55 ` [PATCH v9 00/11] virtio: cleanup vhost-user-generic and reduce c&p + vhost-user-input Alex Bennée
2024-01-10 16:12   ` Michael S. Tsirkin

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=87plygf1tg.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=arei.gonglei@huawei.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=eblake@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=erik.schilling@linaro.org \
    --cc=fam@euphon.net \
    --cc=hreitz@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=mathieu.poirier@linaro.org \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=raphael.norwitz@nutanix.com \
    --cc=stefanha@redhat.com \
    --cc=viresh.kumar@linaro.org \
    --cc=virtio-fs@redhat.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 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.