From: Greg Kurz <groug@kaod.org>
To: "sochin.jiang" <sochin.jiang@huawei.com>
Cc: ego@in.ibm.com, aliguori@us.ibm.com,
aneesh.kumar@linux.vnet.ibm.com,
Jiangyiwen <jiangyiwen@huawei.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] virtio-9p: hot-plug/unplug about virtio-9p device
Date: Mon, 8 Jan 2018 11:10:39 +0100 [thread overview]
Message-ID: <20180108111039.2ec3cefd@bahia.lan> (raw)
In-Reply-To: <b74a4929-26ed-711a-6d90-c6c06b492fd8@huawei.com>
On Tue, 19 Dec 2017 13:41:12 +0800
sochin.jiang <sochin.jiang@huawei.com> wrote:
> Hi, guys.
>
> I'm looking for the hot-plug/unplug features of virtio-9p device recently, and found there's a lack of support.
>
> I am wondering why ? Is there a reason. Actually, I write a qmp command to support fsdev_add, then a device_add qmp will
>
> successfully add a virtio-9p device(just like virtio-blk).
>
> Whether there is some concerns that we haven't support this ? hope for a reply, thanks.
>
>
> sochin.
>
Hi Sochin,
I've just discovered this mail by chance. Please note I'm the only active
maintainer for virtio-9p. You really should check the content of MAINTAINERS
and Cc the appropriate people. :)
Now, back to your question. Yes, there's only some partial support for
hot-plug/unplug. Mostly because nobody cared to work on it I guess.
So, indeed, we don't have fsdev_add/fsdev_del, ie, we can only rely on
shared directories specified on the QEMU command line.
On the virtio-9p device side, hotplug is supported, ie, device_add virtio-9p
works as expected.
Hot-unplug is different as it requires some coordination with the guest. The
current status is that it requires the 9p shared directory to be unmounted
in the guest: if you do device_del while the directory is mounted in a linux
guest, you'll get these messages in the guest syslog:
kernel:9pnet_virtio virtio2: p9_virtio_remove: waiting for device in use.
If the 9p directory is unmounted at some point, then the hot unplug
sequence will eventually succeed.
But this shouldn't be done like this: the guest should cancel inflight
requests and cause any new I/O requests in the guest to fail right away.
I have a tentative patch for the linux driver I can share if you want.
Cheers,
--
Greg
next prev parent reply other threads:[~2018-01-08 10:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-19 5:41 [Qemu-devel] virtio-9p: hot-plug/unplug about virtio-9p device sochin.jiang
2018-01-08 10:10 ` Greg Kurz [this message]
2018-01-11 2:23 ` sochin.jiang
2018-01-12 10:48 ` Greg Kurz
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=20180108111039.2ec3cefd@bahia.lan \
--to=groug@kaod.org \
--cc=aliguori@us.ibm.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=ego@in.ibm.com \
--cc=jiangyiwen@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=sochin.jiang@huawei.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 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).