From: Jan Kiszka <jan.kiszka@siemens.com>
To: Rusty Russell <rusty@rustcorp.com.au>,
Henning Schild <henning.schild@siemens.com>,
qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org,
kvm@vger.kernel.org
Subject: Re: Using virtio for inter-VM communication
Date: Fri, 13 Jun 2014 08:23:15 +0200 [thread overview]
Message-ID: <539A98D3.3070601@siemens.com> (raw)
In-Reply-To: <87fvj9prdi.fsf@rustcorp.com.au>
On 2014-06-13 02:47, Rusty Russell wrote:
> Jan Kiszka <jan.kiszka@siemens.com> writes:
>> On 2014-06-12 04:27, Rusty Russell wrote:
>>> Henning Schild <henning.schild@siemens.com> writes:
>>> It was also never implemented, and remains a thought experiment.
>>> However, implementing it in lguest should be fairly easy.
>>
>> The reason why a trusted helper, i.e. additional logic in the
>> hypervisor, is not our favorite solution is that we'd like to keep the
>> hypervisor as small as possible. I wouldn't exclude such an approach
>> categorically, but we have to weigh the costs (lines of code, additional
>> hypervisor interface) carefully against the gain (existing
>> specifications and guest driver infrastructure).
>
> Reasonable, but I think you'll find it is about the minimal
> implementation in practice. Unfortunately, I don't have time during the
> next 6 months to implement it myself :(
>
>> Back to VIRTIO_F_RING_SHMEM_ADDR (which you once brought up in an MCA
>> working group discussion): What speaks against introducing an
>> alternative encoding of addresses inside virtio data structures? The
>> idea of this flag was to replace guest-physical addresses with offsets
>> into a shared memory region associated with or part of a virtio
>> device.
>
> We would also need a way of defining the shared memory region. But
> that's not the problem. If such a feature is not accepted by the guest?
> How to you fall back?
Depends on the hypervisor and its scope, but it should be quite
straightforward: full-featured ones like KVM could fall back to slow
copying, specialized ones like Jailhouse would clear FEATURES_OK if the
guest driver does not accept it (because there would be no ring walking
or copying code in Jailhouse), thus refuse the activate the device. That
would be absolutely fine for application domains of specialized
hypervisors (often embedded, customized guests etc.).
The shared memory regions could be exposed as a BARs (PCI) or additional
address ranges (device tree) and addressed in the redefined guest
address fields via some region index and offset.
>
> We don't add features which unmake the standard.
>
>> That would preserve zero-copy capabilities (as long as you can work
>> against the shared mem directly, e.g. doing DMA from a physical NIC or
>> storage device into it) and keep the hypervisor out of the loop.
>
> This seems ill thought out. How will you program a NIC via the virtio
> protocol without a hypervisor? And how will you make it safe? You'll
> need an IOMMU. But if you have an IOMMU you don't need shared memory.
Scenarios behind this are things like driver VMs: You pass through the
physical hardware to a driver guest that talks to the hardware and
relays data via one or more virtual channels to other VMs. This confines
a certain set of security and stability risks to the driver VM.
>
>> Is it
>> too invasive to existing infrastructure or does it have some other pitfalls?
>
> You'll have to convince every vendor to implement your addition to the
> standard. Which is easier than inventing a completely new system, but
> it's not quite virtio.
It would be an optional addition, a feature all three sides (host and
the communicating guests) would have to agree on. I think we would only
have to agree on extending the spec to enable this - after demonstrating
it via an implementation, of course.
Thanks,
Jan
--
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
WARNING: multiple messages have this Message-ID (diff)
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Rusty Russell <rusty@rustcorp.com.au>,
Henning Schild <henning.schild@siemens.com>,
qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org,
kvm@vger.kernel.org
Subject: Re: [Qemu-devel] Using virtio for inter-VM communication
Date: Fri, 13 Jun 2014 08:23:15 +0200 [thread overview]
Message-ID: <539A98D3.3070601@siemens.com> (raw)
In-Reply-To: <87fvj9prdi.fsf@rustcorp.com.au>
On 2014-06-13 02:47, Rusty Russell wrote:
> Jan Kiszka <jan.kiszka@siemens.com> writes:
>> On 2014-06-12 04:27, Rusty Russell wrote:
>>> Henning Schild <henning.schild@siemens.com> writes:
>>> It was also never implemented, and remains a thought experiment.
>>> However, implementing it in lguest should be fairly easy.
>>
>> The reason why a trusted helper, i.e. additional logic in the
>> hypervisor, is not our favorite solution is that we'd like to keep the
>> hypervisor as small as possible. I wouldn't exclude such an approach
>> categorically, but we have to weigh the costs (lines of code, additional
>> hypervisor interface) carefully against the gain (existing
>> specifications and guest driver infrastructure).
>
> Reasonable, but I think you'll find it is about the minimal
> implementation in practice. Unfortunately, I don't have time during the
> next 6 months to implement it myself :(
>
>> Back to VIRTIO_F_RING_SHMEM_ADDR (which you once brought up in an MCA
>> working group discussion): What speaks against introducing an
>> alternative encoding of addresses inside virtio data structures? The
>> idea of this flag was to replace guest-physical addresses with offsets
>> into a shared memory region associated with or part of a virtio
>> device.
>
> We would also need a way of defining the shared memory region. But
> that's not the problem. If such a feature is not accepted by the guest?
> How to you fall back?
Depends on the hypervisor and its scope, but it should be quite
straightforward: full-featured ones like KVM could fall back to slow
copying, specialized ones like Jailhouse would clear FEATURES_OK if the
guest driver does not accept it (because there would be no ring walking
or copying code in Jailhouse), thus refuse the activate the device. That
would be absolutely fine for application domains of specialized
hypervisors (often embedded, customized guests etc.).
The shared memory regions could be exposed as a BARs (PCI) or additional
address ranges (device tree) and addressed in the redefined guest
address fields via some region index and offset.
>
> We don't add features which unmake the standard.
>
>> That would preserve zero-copy capabilities (as long as you can work
>> against the shared mem directly, e.g. doing DMA from a physical NIC or
>> storage device into it) and keep the hypervisor out of the loop.
>
> This seems ill thought out. How will you program a NIC via the virtio
> protocol without a hypervisor? And how will you make it safe? You'll
> need an IOMMU. But if you have an IOMMU you don't need shared memory.
Scenarios behind this are things like driver VMs: You pass through the
physical hardware to a driver guest that talks to the hardware and
relays data via one or more virtual channels to other VMs. This confines
a certain set of security and stability risks to the driver VM.
>
>> Is it
>> too invasive to existing infrastructure or does it have some other pitfalls?
>
> You'll have to convince every vendor to implement your addition to the
> standard. Which is easier than inventing a completely new system, but
> it's not quite virtio.
It would be an optional addition, a feature all three sides (host and
the communicating guests) would have to agree on. I think we would only
have to agree on extending the spec to enable this - after demonstrating
it via an implementation, of course.
Thanks,
Jan
--
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2014-06-13 6:23 UTC|newest]
Thread overview: 92+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-10 16:48 Using virtio for inter-VM communication Henning Schild
2014-06-10 16:48 ` [Qemu-devel] " Henning Schild
2014-06-10 22:15 ` Vincent JARDIN
2014-06-10 22:15 ` [Qemu-devel] " Vincent JARDIN
2014-06-12 6:48 ` Markus Armbruster
2014-06-12 6:48 ` Markus Armbruster
2014-06-12 6:48 ` [Qemu-devel] " Markus Armbruster
2014-06-12 7:44 ` Henning Schild
2014-06-12 7:44 ` [Qemu-devel] " Henning Schild
2014-06-12 9:31 ` Vincent JARDIN
2014-06-12 9:31 ` Vincent JARDIN
2014-06-12 9:31 ` [Qemu-devel] " Vincent JARDIN
2014-06-12 12:55 ` Markus Armbruster
2014-06-12 14:40 ` Why I advise against using ivshmem (was: [Qemu-devel] Using virtio for inter-VM communication) Markus Armbruster
2014-06-12 14:40 ` Markus Armbruster
2014-06-12 14:40 ` [Qemu-devel] Why I advise against using ivshmem (was: " Markus Armbruster
2014-06-12 16:02 ` Why I advise against using ivshmem Vincent JARDIN
2014-06-12 16:02 ` Vincent JARDIN
2014-06-12 16:02 ` [Qemu-devel] " Vincent JARDIN
2014-06-12 16:54 ` Paolo Bonzini
2014-06-12 16:54 ` [Qemu-devel] " Paolo Bonzini
2014-06-13 8:46 ` Markus Armbruster
2014-06-13 9:26 ` Vincent JARDIN
2014-06-13 9:31 ` Jobin Raju George
2014-06-13 9:31 ` Jobin Raju George
2014-06-13 9:31 ` Jobin Raju George
2014-06-13 9:48 ` Olivier MATZ
2014-06-13 9:48 ` Olivier MATZ
2014-06-13 9:48 ` Olivier MATZ
2014-06-13 10:09 ` Paolo Bonzini
2014-06-13 13:41 ` Vincent JARDIN
2014-06-13 13:41 ` Vincent JARDIN
2014-06-13 13:41 ` Vincent JARDIN
2014-06-13 14:10 ` Paolo Bonzini
2014-06-13 14:10 ` Paolo Bonzini
2014-06-14 18:01 ` Vincent JARDIN
2014-06-14 18:01 ` Vincent JARDIN
2014-06-17 2:54 ` Stefan Hajnoczi
2014-06-17 9:03 ` David Marchand
2014-06-17 9:03 ` David Marchand
2014-06-17 9:44 ` Paolo Bonzini
2014-06-18 10:48 ` Stefan Hajnoczi
2014-06-18 10:48 ` Stefan Hajnoczi
2014-06-18 14:57 ` David Marchand
2014-06-18 14:57 ` David Marchand
2014-06-18 15:10 ` Paolo Bonzini
2014-06-21 9:34 ` Stefan Hajnoczi
2014-06-26 20:02 ` Cam Macdonell
2014-06-26 20:02 ` Cam Macdonell
2014-06-18 14:57 ` David Marchand
2014-06-18 15:01 ` Andreas Färber
2014-06-18 15:01 ` Andreas Färber
2014-06-19 8:25 ` David Marchand
2014-06-19 8:25 ` David Marchand
2014-06-19 8:25 ` David Marchand
2014-06-18 15:01 ` Andreas Färber
2014-06-30 11:10 ` Markus Armbruster
2014-06-30 11:10 ` Markus Armbruster
2014-06-30 11:10 ` Markus Armbruster
2014-06-18 10:51 ` Stefan Hajnoczi
2014-06-18 10:51 ` Stefan Hajnoczi
2014-06-18 14:58 ` David Marchand
2014-06-18 14:58 ` David Marchand
2014-06-18 14:58 ` David Marchand
2014-06-18 14:22 ` Claudio Fontana
2014-06-17 9:03 ` David Marchand
2014-06-13 9:29 ` Jobin Raju George
2014-06-13 9:29 ` [Qemu-devel] " Jobin Raju George
2014-06-13 9:29 ` Jobin Raju George
2014-06-10 22:15 ` Using virtio for inter-VM communication Vincent JARDIN
2014-06-12 2:27 ` Rusty Russell
2014-06-12 2:27 ` [Qemu-devel] " Rusty Russell
2014-06-12 2:27 ` Rusty Russell
2014-06-12 5:32 ` Jan Kiszka
2014-06-12 5:32 ` [Qemu-devel] " Jan Kiszka
2014-06-13 0:47 ` Rusty Russell
2014-06-13 0:47 ` [Qemu-devel] " Rusty Russell
2014-06-13 6:23 ` Jan Kiszka [this message]
2014-06-13 6:23 ` Jan Kiszka
2014-06-13 8:45 ` Paolo Bonzini
2014-06-13 8:45 ` [Qemu-devel] " Paolo Bonzini
2014-06-15 6:20 ` Jan Kiszka
2014-06-15 6:20 ` [Qemu-devel] " Jan Kiszka
2014-06-17 5:24 ` Paolo Bonzini
2014-06-17 5:24 ` Paolo Bonzini
2014-06-17 5:24 ` [Qemu-devel] " Paolo Bonzini
2014-06-17 5:57 ` Jan Kiszka
2014-06-17 5:57 ` [Qemu-devel] " Jan Kiszka
2014-06-17 5:57 ` Jan Kiszka
2014-06-15 6:20 ` Jan Kiszka
2014-06-12 5:32 ` Jan Kiszka
-- strict thread matches above, loose matches on Subject: below --
2014-06-10 16:48 Henning Schild
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=539A98D3.3070601@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=henning.schild@siemens.com \
--cc=kvm@vger.kernel.org \
--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 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.