All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Schoenebeck <qemu_oss@crudebyte.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>,
	qemu-devel@nongnu.org, "Greg Kurz" <groug@kaod.org>,
	"Igor Mammedov" <imammedo@redhat.com>
Cc: Jia Jia <physicalmtea@gmail.com>
Subject: Re: [PATCH 2/3] hw/9pfs/virtio: disable hotpluggable property of virtio-9p device
Date: Mon, 20 Jul 2026 16:01:33 +0200	[thread overview]
Message-ID: <23179315.EfDdHjke4D@weasel> (raw)
In-Reply-To: <20260720132337.0110bd9e@imammedo>

On Monday, 20 July 2026 13:23:37 CEST Igor Mammedov wrote:
> On Fri, 17 Jul 2026 15:16:14 +0100
> 
> Daniel P. Berrangé <berrange@redhat.com> wrote:
> > On Fri, Jul 17, 2026 at 04:05:42PM +0200, Christian Schoenebeck wrote:
> > > On Monday, 13 July 2026 09:49:35 CEST Igor Mammedov wrote:
[...]
> > > > the patch would break unplug flow by effectively removing 'eject' knob
> > > > from guest side, which is part of unplug flow.
> > > 
> > > These are two different things: device_del would not be affected by
> > > this.
> > > 
> > > 1. Ejecting the device from host side e.g. via QMP would still work.
> > > 
> > > vs.
> > > 
> > > 2. Ejecting from guest side OTOH would be disabled.
> > > 
> > > It is also different from regular block devices where you have
> > > convenient ways to eject a block device on guest OSes. For a virtio-9p
> > > device it is not that easy.
> > 
> > Igor can correct me if I'm wrong, but IIUC there's no distinction
> > to those 2 scenarios from the guest POV.
> > 
> > A "device_del" in QMP does not actually delete a device from the
> > QEMU POV.  Rather it triggers an ACPI notification to the geust
> > OS, that the operator wants to unplug the device.  The guest OS
> > then honours (or not) that by initiating a guest side "eject".
> > IOW disabling guest initiated eject would break device_del too
> > AFAIK.
> 
> That's how it works.
> Sorry if I wasn't able to convey the message in my previous replies.

OK, I just realized I was wrong. The QMP device_del path also checks for
dc->hotpluggable early via qdev_hotplug_unplug_allowed_common() and would 
already abort there. And I can also see the flow that it just triggers ACPI 
and guest eventually completing device eject.
 
So yes, it would disable both guest *and* host side eject.

I already dropped this patch from v2 anyway.

Thanks!

/Christian





  reply	other threads:[~2026-07-20 14:02 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1783604079.git.qemu_oss@crudebyte.com>
2026-07-09 13:50 ` [PATCH 1/3] hw/9pfs/virtio: drain in-flight PDUs before virtio-9p unrealize Christian Schoenebeck
2026-07-09 14:20   ` Christian Schoenebeck
2026-07-10  1:39     ` m'te'a physical
2026-07-09 13:50 ` [PATCH 2/3] hw/9pfs/virtio: disable hotpluggable property of virtio-9p device Christian Schoenebeck
2026-07-10  7:37   ` Igor Mammedov
2026-07-10  8:06     ` Christian Schoenebeck
2026-07-10 10:23       ` Igor Mammedov
2026-07-10 10:49         ` Christian Schoenebeck
2026-07-10 12:51           ` Igor Mammedov
2026-07-10 14:31             ` Christian Schoenebeck
2026-07-10 14:40               ` Daniel P. Berrangé
2026-07-13  7:49                 ` Igor Mammedov
2026-07-17 14:05                   ` Christian Schoenebeck
2026-07-17 14:16                     ` Daniel P. Berrangé
2026-07-20 11:23                       ` Igor Mammedov
2026-07-20 14:01                         ` Christian Schoenebeck [this message]
2026-07-09 13:50 ` [PATCH 3/3] hw/9pfs/xen: drain in-flight PDUs before xen-9p disconnect Christian Schoenebeck
2026-07-16 12:32   ` Christian Schoenebeck
2026-07-18  0:46     ` Stefano Stabellini
2026-07-18 15:42       ` Christian Schoenebeck

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=23179315.EfDdHjke4D@weasel \
    --to=qemu_oss@crudebyte.com \
    --cc=berrange@redhat.com \
    --cc=groug@kaod.org \
    --cc=imammedo@redhat.com \
    --cc=physicalmtea@gmail.com \
    --cc=qemu-devel@nongnu.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 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.