]> xenbits.xensource.com Git - people/aperard/xen-unstable.git/commit
AMD/IOMMU: without XT, x2APIC needs to be forced into physical mode
authorJan Beulich <jbeulich@suse.com>
Tue, 10 Mar 2020 14:25:58 +0000 (15:25 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 10 Mar 2020 14:25:58 +0000 (15:25 +0100)
commit1ba66a870eba43d52d3e5e7af1a055bf5b16b30d
tree0be32819f6a866435789598f47bdf871d00f635e
parent99f1c935190986068a36fb5e78a00e6b71b08f25
AMD/IOMMU: without XT, x2APIC needs to be forced into physical mode

The wider cluster mode APIC IDs aren't generally representable. Convert
the iommu_intremap variable into a tristate, allowing the AMD IOMMU
driver to signal this special restriction to the apic_x2apic_probe().
(Note: assignments to the variable get adjusted, while existing
consumers - all assuming a boolean property - are left alone.)

While we are not aware of any hardware/firmware with this as a
restriction, it is a situation which could be created on fully x2apic-
capable systems via firmware settings.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/genapic/x2apic.c
xen/drivers/passthrough/amd/iommu_init.c
xen/drivers/passthrough/amd/pci_amd_iommu.c
xen/drivers/passthrough/iommu.c
xen/drivers/passthrough/vtd/iommu.c
xen/include/xen/iommu.h