From: Eric Auger <eauger@redhat.com>
To: Markus Frank <m.frank@proxmox.com>, qemu-devel@nongnu.org
Subject: Re: vIOMMU - PCI pass through to Layer 2 VMs (Nested Virtualization)
Date: Mon, 9 Oct 2023 11:29:36 +0200 [thread overview]
Message-ID: <278fd0fd-a81d-6da5-e903-71f002e17ab5@redhat.com> (raw)
In-Reply-To: <d969606d-79bf-4ba1-849a-f2e819aaf274@proxmox.com>
Hi Markus,
On 10/9/23 09:06, Markus Frank wrote:
> Hello,
>
> I have already sent this email to qemu-discuss but I did not get a reply.
> https://lists.nongnu.org/archive/html/qemu-discuss/2023-09/msg00034.html
> Maybe someone here could help me and reply to this email or the one on
> qemu-discuss?
>
> I would like to pass through PCI devices to Layer-2 VMs via Nested
> Virtualization.
>
> Is there current documentation for this topic somewhere?
>
> I used these parameters:
> -machine ...,kernel-irqchip=split
> -device intel-iommu
>
> With these parameters PCI pass through to L2-VMs worked fine.
>
>
> Now I come to the part where I get confused.
>
> https://wiki.qemu.org/Features/VT-d#With_Virtio_Devices
> Is this documentation relevant for PCI pass through? Do I need DMAR for
> virtio devices?
If you just want the host assigned devices to be protected by the
viommu, you don't need to add iommu_platform=on along with the
virtio-pci devices.
>
> And there is also the virtio-iommu device where I also could use the
> i440fx chipset.
> https://michael2012z.medium.com/virtio-iommu-789369049443
you can use virtio-iommu with q35 machine.
>
> When adding "-device virtio-iommu-pci" pci pass through also works
> but I get "kvm: virtio_iommu_translate no mapping for 0x1002030f000 for
> sid=240"
> when starting qemu. What could that mean?
Normally you shouldn't get any such error. This means there is no
mapping programmed by the iommu-driver for this requester id (0x240) and
this iova=0x1002030f000. But if I understand correctly this does not
prevent your device from working, correct?
>
> What do these parameters
> "disable-legacy=on,disable-modern=off,iommu_platform=on,ats=on"
> actually do? When do I need them and on which virtio devices?
you need them if you want your virtio devices to be protected by the
viommu. Otherwise the viommu is bypassed.
>
> And which device should I rather use: virtio-iommu or intel-iommu?
Both should be working. virtio-iommu is more recent and less used in
production than intel-iommu though.
Thanks
Eric
>
> Thanks in advance,
> Markus
>
>
next prev parent reply other threads:[~2023-10-09 9:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-09 7:06 vIOMMU - PCI pass through to Layer 2 VMs (Nested Virtualization) Markus Frank
2023-10-09 9:29 ` Eric Auger [this message]
2023-10-09 10:25 ` Markus Frank
2023-10-09 12:02 ` Eric Auger
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=278fd0fd-a81d-6da5-e903-71f002e17ab5@redhat.com \
--to=eauger@redhat.com \
--cc=m.frank@proxmox.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.