All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Alex Williamson <alex.williamson@redhat.com>,
	Tina Zhang <tina.zhang@intel.com>,
	intel-gvt-dev@lists.freedesktop.org,
	Kirti Wankhede <kwankhede@nvidia.com>,
	Markus Armbruster <armbru@redhat.com>,
	Eric Blake <eblake@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PATCH v4 4/7] qdev: add hotpluggable to DeviceState
Date: Thu, 22 Feb 2018 16:37:40 +0100	[thread overview]
Message-ID: <20180222153740.3zkvjen77uwjqhd2@sirius.home.kraxel.org> (raw)
In-Reply-To: <20180219111458.25983-5-kraxel@redhat.com>

On Mon, Feb 19, 2018 at 12:14:55PM +0100, Gerd Hoffmann wrote:
> vfio display support wants disable hotplug for certain devices, because
> qemu doesn't support hotplugging display devices and qemu consoles.
> 
> Add a hotpluggable bool to DeviceState, initialize it from
> DeviceClass->hotpluggable, update device_get_hotpluggable accordingly.
> 
> Devices can flip the new variable from true to false if needed.

Alex wants an ack for this one.  Who maintains it these days?

MAINTAINERS doesn't list qdev.  For QOM which is closest probably
Andreas Färber is listed.  Havn't seen him on the list for a while
though.

Ok, lets try some usual suspects...
Markus? Eric? Paolo? Peter?  Any comments on this one?

thanks,
  Gerd

> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  include/hw/qdev-core.h | 1 +
>  hw/core/qdev.c         | 5 +++--
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
> index fc9d617a76..37d86f26e5 100644
> --- a/include/hw/qdev-core.h
> +++ b/include/hw/qdev-core.h
> @@ -154,6 +154,7 @@ struct DeviceState {
>      const char *id;
>      char *canonical_path;
>      bool realized;
> +    bool hotpluggable;
>      bool pending_deleted_event;
>      QemuOpts *opts;
>      int hotplugged;
> diff --git a/hw/core/qdev.c b/hw/core/qdev.c
> index 7ed1f431f0..89e03c7b47 100644
> --- a/hw/core/qdev.c
> +++ b/hw/core/qdev.c
> @@ -946,8 +946,8 @@ static bool device_get_hotpluggable(Object *obj, Error **errp)
>      DeviceClass *dc = DEVICE_GET_CLASS(obj);
>      DeviceState *dev = DEVICE(obj);
>  
> -    return dc->hotpluggable && (dev->parent_bus == NULL ||
> -                                qbus_is_hotpluggable(dev->parent_bus));
> +    return dc->hotpluggable && dev->hotpluggable &&
> +        (dev->parent_bus == NULL || qbus_is_hotpluggable(dev->parent_bus));
>  }
>  
>  static bool device_get_hotplugged(Object *obj, Error **err)
> @@ -988,6 +988,7 @@ static void device_initfn(Object *obj)
>          class = object_class_get_parent(class);
>      } while (class != object_class_by_name(TYPE_DEVICE));
>  
> +    dev->hotpluggable = DEVICE_CLASS(class)->hotpluggable;
>      object_property_add_link(OBJECT(dev), "parent_bus", TYPE_BUS,
>                               (Object **)&dev->parent_bus, NULL, 0,
>                               &error_abort);
> -- 
> 2.9.3
> 

  reply	other threads:[~2018-02-22 15:37 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-19 11:14 [Qemu-devel] [PATCH v4 0/7] vfio: add display support Gerd Hoffmann
2018-02-19 11:14 ` [Qemu-devel] [PATCH v4 1/7] linux-headers: update to 4.16-rc1 Gerd Hoffmann
2018-02-19 11:14 ` [Qemu-devel] [PATCH v4 2/7] standard-headers: add drm/drm_fourcc.h Gerd Hoffmann
2018-02-19 11:14 ` [Qemu-devel] [PATCH v4 3/7] ui/pixman: add qemu_drm_format_to_pixman() Gerd Hoffmann
2018-02-19 11:14 ` [Qemu-devel] [PATCH v4 4/7] qdev: add hotpluggable to DeviceState Gerd Hoffmann
2018-02-22 15:37   ` Gerd Hoffmann [this message]
2018-02-22 15:46     ` Peter Maydell
2018-02-22 16:59       ` Alex Williamson
2018-02-22 17:21         ` Peter Maydell
2018-02-23  3:14         ` Zhenyu Wang
2018-02-23  8:53         ` Gerd Hoffmann
2018-02-23 15:58           ` Alex Williamson
2018-02-26  8:23             ` Gerd Hoffmann
2018-02-19 11:14 ` [Qemu-devel] [PATCH v4 5/7] vfio/common: cleanup in vfio_region_finalize Gerd Hoffmann
2018-02-19 11:14 ` [Qemu-devel] [PATCH v4 6/7] vfio/display: core & wireup Gerd Hoffmann
2018-02-19 11:14 ` [Qemu-devel] [PATCH v4 7/7] vfio/display: adding region support Gerd Hoffmann
2018-02-19 22:16 ` [Qemu-devel] [PATCH v4 0/7] vfio: add display support Alex Williamson
2018-02-20 10:28   ` Gerd Hoffmann
2018-02-20 17:04     ` Gerd Hoffmann
2018-02-22  6:40       ` Zhenyu Wang
2018-02-22  9:30         ` Gerd Hoffmann
2018-02-23  2:42           ` Zhenyu Wang
2018-02-23  7:06             ` Zhang, Tina
2018-02-22 16:28     ` Alex Williamson
2018-02-23  9:05       ` Gerd Hoffmann
2018-02-26  8:35         ` Gerd Hoffmann
2018-02-26 20:59           ` Alex Williamson

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=20180222153740.3zkvjen77uwjqhd2@sirius.home.kraxel.org \
    --to=kraxel@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    --cc=kwankhede@nvidia.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=tina.zhang@intel.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.