qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Vikram Garhwal <vikram.garhwal@amd.com>,
	Stefano Stabellini <sstabellini@kernel.org>
Cc: qemu-devel@nongnu.org, Juergen Gross <jgross@suse.com>,
	Anthony Perard <anthony.perard@citrix.com>,
	Paul Durrant <paul@xen.org>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Richard Henderson <richard.henderson@linaro.org>,
	 Eduardo Habkost <eduardo@habkost.net>,
	"open list:X86 Xen CPUs" <xen-devel@lists.xenproject.org>
Subject: Re: [QEMU][PATCH v1 1/7] xen: when unplugging emulated devices skip virtio devices
Date: Thu, 19 Oct 2023 10:17:29 +0100	[thread overview]
Message-ID: <bce4c425deccc9529f8515465e10392a93438ec6.camel@infradead.org> (raw)
In-Reply-To: <ZSWy9P4tKvPv0M_d@amd.com>

[-- Attachment #1: Type: text/plain, Size: 1933 bytes --]

On Tue, 2023-10-10 at 13:24 -0700, Vikram Garhwal wrote:
> Hi Stefano,
> On Mon, Oct 09, 2023 at 04:51:53PM -0700, Stefano Stabellini wrote:
> > On Thu, 5 Oct 2023, Vikram Garhwal wrote:
> > > From: Juergen Gross <jgross@suse.com>
> > > 
> > > Virtio devices should never be unplugged at boot time, as they are
> > > similar to pci passthrough devices.
> > > 
> > > Signed-off-by: Juergen Gross <jgross@suse.com>
> > > Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
> > > ---
> > >  hw/i386/xen/xen_platform.c | 8 +++++++-
> > >  1 file changed, 7 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c
> > > index 17457ff3de..3560eaf8c8 100644
> > > --- a/hw/i386/xen/xen_platform.c
> > > +++ b/hw/i386/xen/xen_platform.c
> > > @@ -28,6 +28,7 @@
> > >  #include "hw/ide/pci.h"
> > >  #include "hw/pci/pci.h"
> > >  #include "migration/vmstate.h"
> > > +#include "hw/virtio/virtio-bus.h"
> > >  #include "net/net.h"
> > >  #include "trace.h"
> > >  #include "sysemu/xen.h"
> > > @@ -132,7 +133,8 @@ static void unplug_nic(PCIBus *b, PCIDevice *d, void *o)
> > >      /* We have to ignore passthrough devices */
> > >      if (pci_get_word(d->config + PCI_CLASS_DEVICE) ==
> > >              PCI_CLASS_NETWORK_ETHERNET
> > > -            && !pci_device_is_passthrough(d)) {
> > > +            && !pci_device_is_passthrough(d)
> > > +            && !qdev_get_child_bus(&d->qdev, TYPE_VIRTIO_BUS)) {
> > 
> > Please update the in-code comment above to say "ignore passthrough
> > devices and virtio devices"
>
> Sounds good. Will update in the code comment in v2.

Please could you also remove the note in docs/system/i386/xen.rst which
mentions having to dissuade the guest kernel from unplugging VirtIO
devices by adding 'xen_unplug_emul=never' to its command line?

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

  reply	other threads:[~2023-10-19  9:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-05 18:16 [QEMU][PATCH v1 0/7] Xen: support grant mappings Vikram Garhwal
2023-10-05 18:16 ` [QEMU][PATCH v1 1/7] xen: when unplugging emulated devices skip virtio devices Vikram Garhwal
2023-10-09 23:51   ` Stefano Stabellini
2023-10-10 20:24     ` Vikram Garhwal
2023-10-19  9:17       ` David Woodhouse [this message]
2023-10-05 18:16 ` [QEMU][PATCH v1 2/7] xen: add pseudo RAM region for grant mappings Vikram Garhwal
2023-10-10  0:02   ` Stefano Stabellini
2023-10-10  0:29     ` Stefano Stabellini
2023-10-10 21:25     ` Vikram Garhwal
2023-10-10 22:30       ` Stefano Stabellini
2023-10-05 18:16 ` [QEMU][PATCH v1 3/7] softmmu: let qemu_map_ram_ptr() use qemu_ram_ptr_length() Vikram Garhwal
2023-10-10  0:10   ` Stefano Stabellini
2023-10-10 21:26     ` Vikram Garhwal
2023-10-05 18:16 ` [QEMU][PATCH v1 4/7] xen: let xen_ram_addr_from_mapcache() return -1 in case of not found entry Vikram Garhwal
2023-10-10  0:13   ` Stefano Stabellini
2023-10-05 18:16 ` [QEMU][PATCH v1 5/7] memory: add MemoryRegion map and unmap callbacks Vikram Garhwal
2023-10-10  0:17   ` Stefano Stabellini
2023-10-11  7:01     ` Juergen Gross
2023-10-26  1:41       ` Stefano Stabellini
2023-10-05 18:16 ` [QEMU][PATCH v1 6/7] xen: add map and unmap callbacks for grant region Vikram Garhwal
2023-10-10  0:27   ` Stefano Stabellini
2023-10-05 18:16 ` [QEMU][PATCH v1 7/7] hw: arm: Add grant mapping Vikram Garhwal
2023-10-10  0:28   ` Stefano Stabellini

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=bce4c425deccc9529f8515465e10392a93438ec6.camel@infradead.org \
    --to=dwmw2@infradead.org \
    --cc=anthony.perard@citrix.com \
    --cc=eduardo@habkost.net \
    --cc=jgross@suse.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=paul@xen.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=sstabellini@kernel.org \
    --cc=vikram.garhwal@amd.com \
    --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).