x86/pvh: fix population of the low 1MB for dom0
authorRoger Pau Monné <roger.pau@citrix.com>
Wed, 26 Jan 2022 11:18:07 +0000 (12:18 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 26 Jan 2022 11:18:07 +0000 (12:18 +0100)
commit8abb345e6b5c11b79d1a032533130ea6c5519435
tree0bb189bd77d257f46480582c927c3aac04acda18
parentfc87b55a3429961eeece0e6f4a103a23700b1ff4
x86/pvh: fix population of the low 1MB for dom0

RMRRs are setup ahead of populating the p2m and hence the ASSERT when
populating the low 1MB needs to be relaxed when it finds an existing
entry: it's either RAM or a RMRR resulting from the IOMMU setup.

Rework the logic a bit and introduce a local mfn variable in order to
assert that if the gfn is populated and not RAM it is an identity map.

Fixes: 6b4f6a31ac ('x86/PVH: de-duplicate mappings for first Mb of Dom0 memory')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 2d5fc9120d556ec3c4b1acf0ab5660a6d3f7ebeb
master date: 2022-01-25 10:52:24 +0000
xen/arch/x86/hvm/dom0_build.c