From: Anthony Liguori <anthony@codemonkey.ws>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: rusty@rustcorp.com.au, qemu-devel@nongnu.org,
virtualization@lists.linux-foundation.org
Subject: Re: [Qemu-devel] Re: [PATCH] qemu/virtio: move features to an inline function
Date: Tue, 11 Aug 2009 11:08:32 -0500 [thread overview]
Message-ID: <4A819780.4040002@codemonkey.ws> (raw)
In-Reply-To: <20090811134331.GA22661@redhat.com>
Michael S. Tsirkin wrote:
>> Let's say we supported virtio-vbus along with virtio-pci. What does
>> virtio_blk_get_features() do to mask out sg_indirect? For all
>> virtio-blk knows, it could be on top of virtio-vbus.
>>
>
> So? VIRTIO_RING_F_INDIRECT_DESC applies to all transports.
> Just clear this bit.
>
You can have many layers with virtio. device + transport + ring
virtio-vbus would have a different transport and a different ring
implementation. So no, VIRTIO_RING_F_INDIRECT_DESC wouldn't apply to
virtio-vbus.
>>> This would break things like
>>> migrating between userspace and kernel virtio (something that I
>>> support).
>>>
>> The PIT uses a common state structure and common code for save/restore.
>> This makes migration compatible.
>>
>
> Isn't device name put in the machine config, which presumably is
> send along as well?
>
Good question. I don't know the best way to resolve this.
Maybe migration between devices isn't such a good idea. It's
conceivable that vhost will require some state that isn't present in the
userspace virtio-net. I think this requires some thought.
>> In this case, it's two separate implementations of the same device. I
>> think it makes sense for them to be separate devices.
>>
>> Regards,
>>
>> Anthony Liguori
>>
>
> Hmm, I see what you mean. But kernel virtio is harder. Unlike
> PIT/APIC, it is not a separate codepath. It still needs
> all of userspace virtio to support live migration and non-MSI guests.
> Really, it's the same device that switches between kernel and userspace
> modes on the fly.
>
> This will become clearer from code when I implement migration for vhost,
> but basically you switch to userspace when you start migration, and
> back to kernel if migration fails. You also switch to kernel when MSI
> is enabled and back to userspace when it is disabled.
>
Why bother switching to userspace for migration? Can't you just have
get/set ioctls for the state?
Regards,
Anthony Liguori
next prev parent reply other threads:[~2009-08-11 16:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-10 19:28 [Qemu-devel] [PATCH] qemu/virtio: move features to an inline function Michael S. Tsirkin
2009-08-10 19:37 ` [Qemu-devel] " Anthony Liguori
2009-08-10 19:47 ` Michael S. Tsirkin
2009-08-10 20:33 ` Anthony Liguori
2009-08-10 22:19 ` Michael S. Tsirkin
2009-08-10 22:35 ` Anthony Liguori
2009-08-11 8:48 ` Michael S. Tsirkin
2009-08-11 13:15 ` Anthony Liguori
2009-08-11 13:43 ` Michael S. Tsirkin
2009-08-11 16:08 ` Anthony Liguori [this message]
2009-08-11 16:25 ` Michael S. Tsirkin
2009-08-12 19:18 ` Anthony Liguori
2009-08-13 6:15 ` Michael S. Tsirkin
2009-08-13 9:28 ` Avi Kivity
2009-08-13 9:51 ` Michael S. Tsirkin
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=4A819780.4040002@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.linux-foundation.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).