From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: "Stefan Hajnoczi" <stefanha@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
virtio-dev@lists.oasis-open.org,
"David Hildenbrand" <david@redhat.com>,
"Srivatsa Vaddagiri" <vatsa@codeaurora.org>,
"Azzedine Touzni" <atouzni@qti.qualcomm.com>,
"François Ozog" <francois.ozog@linaro.org>,
"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
"Soni, Trilok" <tsoni@quicinc.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
"Jean-Philippe Brucker" <jean-philippe@linaro.org>
Subject: Re: [virtio-dev] Re: Constraining where a guest may allocate virtio accessible resources
Date: Thu, 18 Jun 2020 11:29:07 -0400 [thread overview]
Message-ID: <20200618112833-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <91f501fc-b31c-f0e4-3f4d-b6f6d0181780@siemens.com>
On Thu, Jun 18, 2020 at 05:22:40PM +0200, Jan Kiszka wrote:
> On 18.06.20 17:05, Michael S. Tsirkin wrote:
> > On Thu, Jun 18, 2020 at 04:58:40PM +0200, Jan Kiszka wrote:
> >>>>>>> Option 5 - Additional Device
> >>>>>>> ============================
> >>>>>>>
> >>>>>>> The final approach would be to tie the allocation of virtqueues to
> >>>>>>> memory regions as defined by additional devices. For example the
> >>>>>>> proposed IVSHMEMv2 spec offers the ability for the hypervisor to present
> >>>>>>> a fixed non-mappable region of the address space. Other proposals like
> >>>>>>> virtio-mem allow for hot plugging of "physical" memory into the guest
> >>>>>>> (conveniently treatable as separate shareable memory objects for QEMU
> >>>>>>> ;-).
> >>>>>>>
> >>>>>>
> >>>>>> I think you forgot one approach: virtual IOMMU. That is the advanced
> >>>>>> form of the grant table approach. The backend still "sees" the full
> >>>>>> address space of the frontend, but it will not be able to access all of
> >>>>>> it and there might even be a translation going on. Well, like IOMMUs work.
> >>>>>>
> >>>>>> However, this implies dynamics that are under guest control, namely of
> >>>>>> the frontend guest. And such dynamics can be counterproductive for
> >>>>>> certain scenarios. That's where this static windows of shared memory
> >>>>>> came up.
> >>>>>
> >>>>> Yes, I think IOMMU interfaces are worth investigating more too. IOMMUs
> >>>>> are now widely implemented in Linux and virtualization software. That
> >>>>> means guest modifications aren't necessary and unmodified guest
> >>>>> applications will run.
> >>>>>
> >>>>> Applications that need the best performance can use a static mapping
> >>>>> while applications that want the strongest isolation can map/unmap DMA
> >>>>> buffers dynamically.
> >>>>
> >>>> I do not see yet that you can model with an IOMMU a static, not guest
> >>>> controlled window.
> >>>
> >>> Well basically the IOMMU will have as part of the
> >>> topology description and range of addresses devices behind it
> >>> are allowed to access. What's the problem with that?
> >>>
> >>
> >> I didn't look at the detail of the vIOMMU from that perspective, but our
> >> requirement would be that it would just statically communicate to the
> >> guest where DMA windows are, rather than allowing the guest to configure
> >> that (which is the normal usage of an IOMMU).
> >
> > Right, I got that - IOMMUs aren't necessarily fully configurable though.
> > E.g. some IOMMUs are restricted in the # of bits they can address.
> >
> >
> >> In addition, it would only address the memory transfer topic. We would
> >> still be left with the current issue of virtio that the hypervisor's
> >> device model needs to understand all supported device types.
> >>
> >> Jan
> >
> > I'd expect the DMA API would try to paper over that likely using
> > bounce buffering. If you want to avoid copies, that's a harder
> > problem generally.
> >
>
> Here I was referring to the permutations of the control path in a device
> model when switching from, say, a storage to a network virtio device.
> With PCI and MMIO (didn't check Channel I/O, but that's not portable
> anyway), you need to patch the "first-level" hypervisor when you want to
> add a brand-new virtio-sound device and the hypervisor is not yet aware
> of it. For minimized setups, I would prefer to only reconfigure it and
> just add a new backend service app or VM. Naturally, that model also
> shrinks the logic the core hypervisor needs to provide for virtio.
>
> Jan
Hmm that went woosh over my head a bit, sorry.
If it's important for this discussion, a diagram might help.
--
MST
---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
next prev parent reply other threads:[~2020-06-18 15:29 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-17 17:31 [virtio-dev] Constraining where a guest may allocate virtio accessible resources Alex Bennée
2020-06-17 18:01 ` [virtio-dev] " Jan Kiszka
2020-06-18 13:29 ` Stefan Hajnoczi
2020-06-18 13:59 ` Jan Kiszka
2020-06-18 14:52 ` Michael S. Tsirkin
2020-06-18 14:58 ` Jan Kiszka
2020-06-18 15:05 ` Michael S. Tsirkin
2020-06-18 15:22 ` Jan Kiszka
2020-06-18 15:29 ` Michael S. Tsirkin [this message]
2020-07-03 12:22 ` Stefan Hajnoczi
2020-06-18 13:53 ` Laszlo Ersek
2020-06-19 15:16 ` Alex Bennée
2020-06-18 7:30 ` Michael S. Tsirkin
2020-06-19 18:20 ` Alex Bennée
2020-06-18 13:25 ` Stefan Hajnoczi
2020-06-19 17:35 ` Alex Bennée
2020-07-03 13:14 ` Stefan Hajnoczi
2020-06-19 8:02 ` Jean-Philippe Brucker
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=20200618112833-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=atouzni@qti.qualcomm.com \
--cc=david@redhat.com \
--cc=dgilbert@redhat.com \
--cc=francois.ozog@linaro.org \
--cc=ilias.apalodimas@linaro.org \
--cc=jan.kiszka@siemens.com \
--cc=jean-philippe@linaro.org \
--cc=stefanha@redhat.com \
--cc=tsoni@quicinc.com \
--cc=vatsa@codeaurora.org \
--cc=virtio-dev@lists.oasis-open.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