[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 1/6] hw/xen: Set XenBackendInstance in the XenDevice befor
|
From: |
David Woodhouse |
|
Subject: |
Re: [PATCH v2 1/6] hw/xen: Set XenBackendInstance in the XenDevice before realizing it |
|
Date: |
Wed, 22 Nov 2023 23:04:12 +0000 |
|
User-agent: |
Evolution 3.44.4-0ubuntu2 |
On Wed, 2023-11-22 at 22:56 +0000, Volodymyr Babchuk wrote:
>
>
> Paul Durrant <xadimgnik@gmail.com> writes:
>
> > On 21/11/2023 22:10, Volodymyr Babchuk wrote:
> > > From: David Woodhouse <dwmw@amazon.co.uk>
> > > This allows a XenDevice implementation to know whether it was
> > > created
> > > by QEMU, or merely discovered in XenStore after the toolstack created
> > > it. This will allow us to create frontend/backend nodes only when we
> > > should, rather than unconditionally attempting to overwrite them from
> > > a driver domain which doesn't have privileges to do so.
> > > As an added benefit, it also means we no longer have to call the
> > > xen_backend_set_device() function from the device models immediately
> > > after calling qdev_realize_and_unref(). Even though we could make
> > > the argument that it's safe to do so, and the pointer to the unreffed
> > > device *will* actually still be valid, it still made my skin itch to
> > > look at it.
> > > Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
> > > ---
> > > hw/block/xen-block.c | 3 +--
> > > hw/char/xen_console.c | 2 +-
> > > hw/net/xen_nic.c | 2 +-
> > > hw/xen/xen-bus.c | 4 ++++
> > > include/hw/xen/xen-backend.h | 2 --
> > > include/hw/xen/xen-bus.h | 2 ++
> > > 6 files changed, 9 insertions(+), 6 deletions(-)
> > >
> >
> > Actually, I think you should probably update
> > xen_backend_try_device_destroy() in this patch too. It currently uses
> > xen_backend_list_find() to check whether the specified XenDevice has
> > an associated XenBackendInstance.
>
> Sure. Looks like it is the only user of xen_backend_list_find(), so we
> can get rid of it as well.
>
> I'll drop your R-b tag, because of those additional changes in the new
> version.
I think it's fine to keep. He told me to do it :)
smime.p7s
Description: S/MIME cryptographic signature
[PATCH v2 2/6] xen: backends: touch some XenStore nodes only if device..., Volodymyr Babchuk, 2023/11/21
Re: [PATCH v2 2/6] xen: backends: touch some XenStore nodes only if device..., Paul Durrant, 2023/11/22
[PATCH v2 5/6] xen_arm: Set mc->max_cpus to GUEST_MAX_VCPUS in xen_arm_init(), Volodymyr Babchuk, 2023/11/21