x86/EPT: ept_set_middle_entry() related adjustments
authorJan Beulich <jbeulich@suse.com>
Tue, 7 Jul 2020 13:20:10 +0000 (15:20 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 7 Jul 2020 13:20:10 +0000 (15:20 +0200)
commit18be3aabd83fa9f683e8ddb0bca2066dd302c20e
tree443e06d5b2300774457cbc243b72de24d958db29
parenta3a392ef21ee562cead19d6fe34ac260aa9c0788
x86/EPT: ept_set_middle_entry() related adjustments

ept_split_super_page() wants to further modify the newly allocated
table, so have ept_set_middle_entry() return the mapped pointer rather
than tearing it down and then getting re-established right again.

Similarly ept_next_level() wants to hand back a mapped pointer of
the next level page, so re-use the one established by
ept_set_middle_entry() in case that path was taken.

Pull the setting of suppress_ve ahead of insertion into the higher level
table, and don't have ept_split_super_page() set the field a 2nd time.

This is part of XSA-328.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
master commit: 1104288186ee73a7f9bfa41cbaa5bb7611521028
master date: 2020-07-07 14:36:52 +0200
xen/arch/x86/mm/p2m-ept.c