x86/EPT: ept_set_middle_entry() related adjustments
authorJan Beulich <jbeulich@suse.com>
Tue, 7 Jul 2020 12:36:52 +0000 (14:36 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 7 Jul 2020 12:36:52 +0000 (14:36 +0200)
commit1104288186ee73a7f9bfa41cbaa5bb7611521028
tree5656debf4c06fdd8b41992c4d00bc3773f8be192
parent23a216f99d40fbfbc2318ade89d8213eea6ba1f8
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>
xen/arch/x86/mm/p2m-ept.c