]> xenbits.xensource.com Git - xen.git/commit
amd-vi: fix IVMD memory type checks
authorRoger Pau Monné <roger.pau@citrix.com>
Tue, 27 Feb 2024 12:54:04 +0000 (13:54 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 27 Feb 2024 12:54:04 +0000 (13:54 +0100)
commitfa9950a527a70971bf9279be62d445cf9c83aedf
tree694b2f0d81e8433307f5b7049e9b22344f8fb7b9
parent184d723e7a5d1c021d297e14d19fe5344eac7a56
amd-vi: fix IVMD memory type checks

The current code that parses the IVMD blocks is relaxed with regard to the
restriction that such unity regions should always fall into memory ranges
marked as reserved in the memory map.

However the type checks for the IVMD addresses are inverted, and as a result
IVMD ranges falling into RAM areas are accepted.  Note that having such ranges
in the first place is a firmware bug, as IVMD should always fall into reserved
ranges.

Fixes: ed6c77ebf0c1 ('AMD/IOMMU: check / convert IVMD ranges for being / to be reserved')
Reported-by: Ox <oxjo@proton.me>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Tested-by: oxjo <oxjo@proton.me>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 83afa313583019d9f159c122cecf867735d27ec5
master date: 2024-02-06 11:56:13 +0100
xen/drivers/passthrough/amd/iommu_acpi.c