x86/APIC: avoid iommu_supports_x2apic() on error path
authorJan Beulich <jbeulich@suse.com>
Fri, 19 Nov 2021 08:41:41 +0000 (09:41 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 19 Nov 2021 08:41:41 +0000 (09:41 +0100)
commit006897dd720fb723cda0926aaccd12cee91fba86
treec07a52a1f7edae6a5c710d9059fc6f20d2a6b7c4
parentcdcdc28b2ad4a53131f8843bc95fb9aa50a81191
x86/APIC: avoid iommu_supports_x2apic() on error path

The value it returns may change from true to false in case
iommu_enable_x2apic() fails and, as a side effect, clears iommu_intremap
(as can happen at least on AMD). Latch the return value from the first
invocation to replace the second one.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
master commit: 0f50d1696b3c13cbf0b18fec817fc291d5a30a31
master date: 2021-11-04 14:44:43 +0100
xen/arch/x86/apic.c