> From: Jan Beulich <jbeul...@suse.com> > Sent: Friday, January 20, 2023 4:44 PM > > First of all the variable is meaningful only when an IOMMU is in use for > a guest. Qualify the check accordingly, like done elsewhere. Furthermore > the controlling command line option is supposed to take effect on VT-d > only. Since command line parsing happens before we know whether we're > going to use VT-d, force the variable back to set when instead running > with AMD IOMMU(s). > > Since it may end up misleading, also remove the clearing of the flag in > iommu_setup() and vtd_setup()'s error path. The variable simply is > meaningless with IOMMU(s) disabled, so there's no point touching it > there. > > Finally also correct a relevant nearby comment. > > Signed-off-by: Jan Beulich <jbeul...@suse.com>
Reviewed-by: Kevin Tian <kevin.t...@intel.com>