Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1619734

Summary: [RFE] vfio page accounting enhancements for viommu
Product: Red Hat Enterprise Linux 8 Reporter: Alex Williamson <alex.williamson>
Component: kernelAssignee: Alex Williamson <alex.williamson>
kernel sub component: KVM QA Contact: Pei Zhang <pezhang>
Status: CLOSED DEFERRED Docs Contact:
Severity: unspecified    
Priority: medium CC: ailan, alex.williamson, chayang, jhsiao, jinzhao, juzhang, knoel, laine, mst, peterx, yalzhang, yanghliu, yfu
Version: 8.1Keywords: FutureFeature, Triaged
Target Milestone: rcFlags: rule-engine: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-01-06 22:22:44 UTC Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alex Williamson 2018-08-21 15:29:27 UTC
Description of problem:

vfio manages user locked pages on a per container basis.  Containers represent an address space for a device.  When a viommu is not present, all assigned devices in a VM share the same address space and therefore share the same container.  In this mode, the locked memory limits of the QEMU process generally matches the overall RAM configured for the VM.

When a viommu is configured for the VM, whether disabled or in passthrough mode, each assigned device has its own address space and is therefore configured within its own container.  In passthrough mode, the address space for each container is required to map the full VM, therefore the locked memory requirements increase to the full VM address space PER assigned device.

If we intend to make viommu a default configuration, this increase in locked memory needs to be addressed, either by enlightening management tools to multiply the locked memory limit by the number of assigned devices or changing the vfio APIs to be able to associate multiple containers to the same user process and avoid duplicate accounting.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Alex Williamson 2019-07-09 19:10:52 UTC
*** Bug 1718124 has been marked as a duplicate of this bug. ***

Comment 10 Laine Stump 2021-01-26 00:51:23 UTC
*** Bug 1912093 has been marked as a duplicate of this bug. ***

Comment 11 yalzhang@redhat.com 2023-09-11 09:02:37 UTC
This is supported on rhel9.3 with kernel-5.14.0-362.1.1.el9_3.x86_64.
1) Start vm with intel iommu and 2 hostdev interfaces - Pass
2) Start vm with intel iommu and 1 hostdev interface, then hotplug another hostdev interface - Pass