qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Woodhouse, David" via <qemu-devel@nongnu.org>
To: "Volodymyr_Babchuk@epam.com" <Volodymyr_Babchuk@epam.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"paul@xen.org" <paul@xen.org>
Cc: "julien@xen.org" <julien@xen.org>,
	"hreitz@redhat.com" <hreitz@redhat.com>,
	"anthony.perard@citrix.com" <anthony.perard@citrix.com>,
	 "marcandre.lureau@redhat.com" <marcandre.lureau@redhat.com>,
	"sstabellini@kernel.org" <sstabellini@kernel.org>,
	"qemu-block@nongnu.org" <qemu-block@nongnu.org>,
	"kwolf@redhat.com" <kwolf@redhat.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"jasowang@redhat.com" <jasowang@redhat.com>
Subject: Re: [PATCH v2 1/6] hw/xen: Set XenBackendInstance in the XenDevice before realizing it
Date: Wed, 22 Nov 2023 22:44:23 +0000	[thread overview]
Message-ID: <c715df296cef35bd67ede0cfdec8f5cd294f0db2.camel@amazon.co.uk> (raw)
In-Reply-To: <e1663064-247d-41e3-9a36-16f81303fb94@xen.org>


[-- Attachment #1.1: Type: text/plain, Size: 1750 bytes --]

On Wed, 2023-11-22 at 17:05 +0000, Paul Durrant wrote:
> 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.

I think I did that in
https://git.infradead.org/users/dwmw2/qemu.git/commitdiff/94f1b474478ce0ede
but didn't get round to sending it out again because of travel.

[-- Attachment #1.2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5957 bytes --]

[-- Attachment #2.1: Type: text/plain, Size: 215 bytes --]




Amazon Development Centre (London) Ltd. Registered in England and Wales with registration number 04543232 with its registered office at 1 Principal Place, Worship Street, London EC2A 2FA, United Kingdom.



[-- Attachment #2.2: Type: text/html, Size: 228 bytes --]

  reply	other threads:[~2023-11-22 22:45 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-21 22:10 [PATCH v2 0/6] xen-arm: add support for virtio-pci Volodymyr Babchuk
2023-11-21 22:10 ` [PATCH v2 1/6] hw/xen: Set XenBackendInstance in the XenDevice before realizing it Volodymyr Babchuk
2023-11-22 15:54   ` Paul Durrant
2023-11-22 17:05   ` Paul Durrant
2023-11-22 22:44     ` Woodhouse, David via [this message]
2023-11-22 23:49       ` Volodymyr Babchuk
2023-11-22 23:55         ` Woodhouse, David via
2023-11-22 22:56     ` Volodymyr Babchuk
2023-11-22 23:04       ` David Woodhouse
2023-11-23  9:29         ` Paul Durrant
2023-11-21 22:10 ` [PATCH v2 3/6] xen: xenstore: add possibility to preserve owner Volodymyr Babchuk
2023-11-22 17:07   ` Paul Durrant
2023-11-22 22:28     ` Stefano Stabellini
2023-11-22 23:01   ` David Woodhouse
2023-11-22 23:03     ` Volodymyr Babchuk
2023-11-23  1:19     ` Volodymyr Babchuk
2023-11-21 22:10 ` [PATCH v2 2/6] xen: backends: touch some XenStore nodes only if device Volodymyr Babchuk
2023-11-22 11:07   ` Philippe Mathieu-Daudé
2023-11-22 22:49     ` Volodymyr Babchuk
2023-11-22 23:19       ` David Woodhouse
2023-11-22 17:03   ` Paul Durrant
2023-11-22 22:46     ` Woodhouse, David via
2023-11-22 22:50     ` Volodymyr Babchuk
2023-11-21 22:10 ` [PATCH v2 5/6] xen_arm: Set mc->max_cpus to GUEST_MAX_VCPUS in xen_arm_init() Volodymyr Babchuk
2023-11-22 11:10   ` Philippe Mathieu-Daudé
2023-11-24 12:04   ` Igor Mammedov
2023-11-21 22:10 ` [PATCH v2 6/6] xen_arm: Add virtual PCIe host bridge support Volodymyr Babchuk
2023-11-22 22:39   ` Stefano Stabellini
2023-11-22 23:44     ` Vikram Garhwal
2023-11-23  0:11       ` Volodymyr Babchuk
2023-11-24 12:30   ` Igor Mammedov
2023-11-24 15:47     ` Volodymyr Babchuk
2023-11-21 22:10 ` [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory Volodymyr Babchuk
2023-11-22 17:11   ` Paul Durrant
2023-11-22 22:29     ` Stefano Stabellini
2023-11-22 23:03       ` David Woodhouse
2023-11-22 23:09         ` Stefano Stabellini
2023-11-22 23:11           ` David Woodhouse
2023-11-22 23:20             ` Stefano Stabellini
2023-11-22 23:46               ` Volodymyr Babchuk
2023-11-23  0:07                 ` Volodymyr Babchuk
2023-11-23  9:28                   ` Paul Durrant
2023-11-23 10:45                     ` David Woodhouse
2023-11-23 11:43                       ` Volodymyr Babchuk
2023-11-23 11:51                         ` David Woodhouse
2023-11-23 11:54                     ` Volodymyr Babchuk
2023-11-23 11:57                       ` David Woodhouse
2023-11-23 12:17                         ` Volodymyr Babchuk
2023-11-23 12:27                           ` David Woodhouse
2023-11-23 12:54                             ` Paul Durrant
2023-11-24  0:24                             ` Volodymyr Babchuk
2023-11-24 12:56                   ` Alex Bennée

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=c715df296cef35bd67ede0cfdec8f5cd294f0db2.camel@amazon.co.uk \
    --to=qemu-devel@nongnu.org \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=anthony.perard@citrix.com \
    --cc=dwmw@amazon.co.uk \
    --cc=hreitz@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=julien@xen.org \
    --cc=kwolf@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=paul@xen.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).