VT-d: fix and extend RMRR reservation check
authorJan Beulich <jbeulich@suse.com>
Mon, 9 Mar 2020 09:00:26 +0000 (10:00 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 9 Mar 2020 09:00:26 +0000 (10:00 +0100)
commit5657d6765717ee309d758fe573f832c28b67cbc7
tree9e3671ca7363e9fcc225eb2d16ed884c416d2941
parent6052921da02dd2180b80eb77c7aa115c6834067a
VT-d: fix and extend RMRR reservation check

First of all in commit d6573bc6e6b7 ("VT-d: check all of an RMRR for
being E820-reserved") along with changing the function used, the enum-
like value passed should have been changed too (to E820_*). Do so now.
(Luckily the actual values of RAM_TYPE_RESERVED and E820_RESERVED
match, so the breakage introduced was "only" latent.)

Furthermore one of my systems surfaces RMRR in an ACPI NVS E820 range.
The purpose of the check is just to make sure there won't be "ordinary"
mappings of these ranges, and domains (including Dom0) won't want to
use the region to e.g. put PCI device BARs there. The two ACPI related
E820 types are good enough for this purpose, so allow them as well.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
xen/drivers/passthrough/vtd/dmar.c