From: "Cédric Le Goater" <clg@redhat.com>
To: Daniel Kral <d.kral@proxmox.com>, qemu-devel@nongnu.org
Cc: Alex Williamson <alex.williamson@redhat.com>,
qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org
Subject: Re: [PATCH v2 8/9] vfio: Check compatibility of CPU and IOMMU address space width
Date: Mon, 8 Sep 2025 10:35:43 +0200 [thread overview]
Message-ID: <59816b95-28dd-45c9-82d4-f72ba2ec88d7@redhat.com> (raw)
In-Reply-To: <DCKVZLRURSRN.2J420LH4UWMIS@proxmox.com>
On 9/5/25 15:04, Daniel Kral wrote:
> On Thu Jan 30, 2025 at 2:43 PM CET, Cédric Le Goater wrote:
>> Print a warning if IOMMU address space width is smaller than the
>> physical address width. In this case, PCI peer-to-peer transactions on
>> BARs are not supported and failures of device MMIO regions are to be
>> expected.
>>
>> This can occur with the 39-bit IOMMU address space width as found on
>> consumer grade processors or when using a vIOMMU device with default
>> settings.
>>
>> Signed-off-by: Cédric Le Goater <clg@redhat.com>
>
> Hi Cédric!
>
> Some of our users are running into this with Proxmox VE, where they get
> vfio_container_dma_map(...) = -22 errors, which are likely caused by
> this issue of the mismatch mentioned above. Setting the guest-phys-bits
> in accordance to the iommu aw-bits seems to fix that for users, e.g.
> [0].
>
> Before applying this downstream for pve-qemu, I saw that this patch was
> dropped in the v3 [1], but you mentioned that this is addressed in a
> later series. I couldn't find a direct follow-up in the archive, are
> there any updates on this?
Hello Daniel,
There have been several changes in VFIO since this patch was
submitted. The code will need to be reworked, as it is no longer
possible to check the IOMMU address space width before attaching
the device. At that stage, the IOVA ranges are still unknown.
Since this affects older Intel consumer-grade CPUs (~ 12th gen),
the priority is low. Please open an issue if this support is
important for your users.
That said, vfio_device_get_aw_bits() needs to be improved to be
more robust. I will work on that.
Thanks,
C.
next prev parent reply other threads:[~2025-09-08 8:37 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-30 13:43 [PATCH v2 0/9]vfio: Improve error reporting when MMIO region mapping fails Cédric Le Goater
2025-01-30 13:43 ` [PATCH v2 1/9] util/error: Introduce warn_report_once_err() Cédric Le Goater
2025-01-30 14:25 ` Markus Armbruster
2025-01-30 16:03 ` Cédric Le Goater
2025-01-30 16:28 ` Cédric Le Goater
2025-01-30 17:55 ` Alex Williamson
2025-01-30 21:26 ` Cédric Le Goater
2025-01-31 8:30 ` Markus Armbruster
2025-01-30 13:43 ` [PATCH v2 2/9] vfio/pci: Replace "iommu_device" by "vIOMMU" Cédric Le Goater
2025-02-10 14:28 ` Philippe Mathieu-Daudé
2025-01-30 13:43 ` [PATCH v2 3/9] vfio: Rephrase comment in vfio_listener_region_add() error path Cédric Le Goater
2025-01-30 13:43 ` [PATCH v2 4/9] vfio: Introduce vfio_get_vfio_device() Cédric Le Goater
2025-02-10 14:32 ` Philippe Mathieu-Daudé
2025-02-10 16:19 ` Cédric Le Goater
2025-01-30 13:43 ` [PATCH v2 5/9] vfio: Improve error reporting when MMIO region mapping fails Cédric Le Goater
2025-02-10 14:36 ` Philippe Mathieu-Daudé
2025-02-10 16:17 ` Cédric Le Goater
2025-01-30 13:43 ` [PATCH v2 6/9] vfio: Remove reports of DMA mapping errors in backends Cédric Le Goater
2025-01-30 13:43 ` [PATCH v2 7/9] cpu: Introduce cpu_get_phys_bits() Cédric Le Goater
2025-02-10 14:40 ` Philippe Mathieu-Daudé
2025-03-06 10:37 ` Philippe Mathieu-Daudé
2025-03-06 14:41 ` Cédric Le Goater
2025-01-30 13:43 ` [PATCH v2 8/9] vfio: Check compatibility of CPU and IOMMU address space width Cédric Le Goater
2025-01-30 18:58 ` Alex Williamson
2025-01-31 12:42 ` Cédric Le Goater
2025-01-31 13:23 ` Gerd Hoffmann
2025-01-31 17:03 ` Cédric Le Goater
2025-02-06 7:54 ` Gerd Hoffmann
2025-02-06 17:05 ` Cédric Le Goater
2025-01-31 22:18 ` Alex Williamson
2025-02-06 8:22 ` Gerd Hoffmann
2025-03-06 10:33 ` Philippe Mathieu-Daudé
2025-09-05 13:04 ` Daniel Kral
2025-09-08 8:35 ` Cédric Le Goater [this message]
2025-01-30 13:43 ` [PATCH v2 9/9] vfio: Remove superfluous error report in vfio_listener_region_add() Cédric Le Goater
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=59816b95-28dd-45c9-82d4-f72ba2ec88d7@redhat.com \
--to=clg@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=d.kral@proxmox.com \
--cc=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org \
--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 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).