Bug 1955710

Summary: Virtualization documentations incorrectly prescribe amd_iommu=pt when pt is not a parsed setting for amd_iommu
Product: Red Hat Enterprise Linux 7 Reporter: Curtis Taylor <cutaylor>
Component: doc-Virtualization_Deployment_and_Administration_GuideAssignee: Jiri Herrmann <jherrman>
Status: CLOSED CURRENTRELEASE QA Contact: haoliu <haoliu>
Severity: medium Docs Contact:
Priority: high    
Version: 7.9CC: jherrman, rhel-docs
Target Milestone: rcKeywords: Documentation
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-05-19 07:30:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Curtis Taylor 2021-04-30 17:12:03 UTC
Document URL: 
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/chap-guest_virtual_machine_device_configuration

Note:  The same mention of "amd_iommu=pt" occurs in several other places, found by google search using:  "amd_iommu=pt" site:access.redhat.com

e.g. RHEV 4.* has the same issue in "Note" mentioning "amd_iommu=pt" in appendix C at https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.4/html/installing_red_hat_virtualization_as_a_self-hosted_engine_using_the_command_line/configuring_a_host_for_pci_passthrough_she_cli_deploy

Section Number and Name: 
Procedure 16.2. Preparing an AMD system for PCI device assignment
(RHEV 4.* amd_iommu=pt is found in Appendix C's "Note")

Describe the issue: 
16.2 step 2 says:

> Enable IOMMU kernel support
> Append amd_iommu=pt to the end of the GRUB_CMDLINX_LINUX line, 
> within the quotes, in /etc/sysconfig/grub so that AMD IOMMU 
> specifications are enabled at boot. 

However, amd_iommu=pt is not parsed by the kernel.

Suggestions for improvement: 

pt, even for amd_iommu happens when iommu=pt is specified on the kernel commandline.  In RHEL8 kernels (RHEV4.*), iommuv2 devices do pass-thru by default.

Additional information: 

From drivers/iommu/amd_iommu_init.c 
*** This shows that actually amd_iommu=pt is not parsed

  static int __init parse_amd_iommu_options(char *str)
  {
        for (; *str; ++str) {
                if (strncmp(str, "fullflush", 9) == 0)
                        amd_iommu_unmap_flush = true;
                if (strncmp(str, "off", 3) == 0)
                        amd_iommu_disabled = true;
                if (strncmp(str, "force_isolation", 15) == 0)
                        amd_iommu_force_isolation = true;
        }

        return 1;
  }