x86/vmx: Defer vmx_vmcs_exit() as long as possible in construct_vmcs()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 28 May 2018 14:02:34 +0000 (15:02 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 14 Aug 2018 15:59:23 +0000 (16:59 +0100)
commit61cc8769a917c646b9bc99ee8adbea602f8d50d2
tree7b4e1e77e56779008c942f0c7ffa88c5280c8326
parent4254e9874006cc2641b67d0531a3a65374f34c35
x86/vmx: Defer vmx_vmcs_exit() as long as possible in construct_vmcs()

paging_update_paging_modes() and vmx_vlapic_msr_changed() both operate on the
VMCS being constructed.  Avoid dropping and re-acquiring the reference
multiple times.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
(cherry picked from commit f30e3cf34042846e391e3f8361fc6a76d181a7ee)
xen/arch/x86/hvm/vmx/vmcs.c