diff options
| author | Alejandro Jimenez <alejandro.j.jimenez@oracle.com> | 2025-09-19 21:35:04 +0000 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2025-10-05 16:13:01 -0400 |
| commit | fe0a58f770330165c885d323632541c4d9f2983d (patch) | |
| tree | c03486b695950f3892ea3a06f412b7dbbdaba019 /scripts/lib/kdoc/kdoc_parser.py | |
| parent | a1c97c395729164747f2f30e9b8ec5d497af95c9 (diff) | |
| download | qemu-fe0a58f770330165c885d323632541c4d9f2983d.zip qemu-fe0a58f770330165c885d323632541c4d9f2983d.tar.gz qemu-fe0a58f770330165c885d323632541c4d9f2983d.tar.bz2 | |
amd_iommu: Use iova_tree records to determine large page size on UNMAP
Keep a record of mapped IOVA ranges per address space, using the iova_tree
implementation. Besides enabling optimizations like avoiding unnecessary
notifications, a record of existing <IOVA, size> mappings makes it possible
to determine if a specific IOVA is mapped by the guest using a large page,
and adjust the size when notifying UNMAP events.
When unmapping a large page, the information in the guest PTE encoding the
page size is lost, since the guest clears the PTE before issuing the
invalidation command to the IOMMU. In such case, the size of the original
mapping can be retrieved from the iova_tree and used to issue the UNMAP
notification. Using the correct size is essential since the VFIO IOMMU
Type1v2 driver in the host kernel will reject unmap requests that do not
fully cover previous mappings.
Signed-off-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <20250919213515.917111-12-alejandro.j.jimenez@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
0 files changed, 0 insertions, 0 deletions
