On Wed, Jun 3, 2026 at 1:33 PM ConKite <[email protected]> wrote: > diff --git a/hw/virtio/vhost-user-base.c b/hw/virtio/vhost-user-base.c > index 01ab9ca56b..cbc5792ac7 100644 > --- a/hw/virtio/vhost-user-base.c > +++ b/hw/virtio/vhost-user-base.c > @@ -353,9 +353,17 @@ static void vub_device_unrealize(DeviceState *dev) > do_vhost_user_cleanup(vdev, vub); > } > > +//Define common properties > +static const Property vub_properties[] = { > + DEFINE_PROP_BOOL("memory-isolation", VHostUserBase, memoryIsolation, > false),
>From docs/devel/style.rst: - "We use traditional C-style /``*`` ``*``/ comments and avoid // comments." - "Variables are lower_case_with_underscores". memoryIsolation -> memory_isolation. You can run scripts/checkpatch.pl to catch many coding style issues. Here is a git-hook to automatically do that when you commit: https://blog.vmsplice.net/2011/03/how-to-automatically-run-checkpatchpl.html > diff --git a/hw/virtio/vhost-user-gpio.c b/hw/virtio/vhost-user-gpio.c > index d473f87077..33b8752282 100644 > --- a/hw/virtio/vhost-user-gpio.c > +++ b/hw/virtio/vhost-user-gpio.c > @@ -14,9 +14,6 @@ > #include "standard-headers/linux/virtio_ids.h" > #include "standard-headers/linux/virtio_gpio.h" > > -static const Property vgpio_properties[] = { > - DEFINE_PROP_CHR("chardev", VHostUserBase, chardev), > -}; > > static void vgpio_realize(DeviceState *dev, Error **errp) > { > @@ -42,7 +39,6 @@ static void vu_gpio_class_init(ObjectClass *klass, const > void *data) > VHostUserBaseClass *vubc = VHOST_USER_BASE_CLASS(klass); > > dc->vmsd = &vu_gpio_vmstate; > - device_class_set_props(dc, vgpio_properties); > device_class_set_parent_realize(dc, vgpio_realize, > &vubc->parent_realize); > set_bit(DEVICE_CATEGORY_INPUT, dc->categories); Moving chardev into the base class is a nice refactoring in itself and its independent of introducing the memory-isolation property. Separating self-contained changes into their own commits makes it easier for reviewers to understand your patch series and it helps with backporting and bisection (e.g. which change caused the breakage: introducing memory-isolation or moving chardev?). I suggest splitting this commit into two commits: 1. Move chardev into the base class. 2. Add the memory-isolation property.
