Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP3:GA
xen.8425
5b34b8fe-VMX-defer-vmx_vmcs_exit-as-long-as-pos...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 5b34b8fe-VMX-defer-vmx_vmcs_exit-as-long-as-possible.patch of Package xen.8425
# Commit f30e3cf34042846e391e3f8361fc6a76d181a7ee # Date 2018-06-28 11:31:26 +0100 # Author Andrew Cooper <andrew.cooper3@citrix.com> # Committer Andrew Cooper <andrew.cooper3@citrix.com> 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> --- a/xen/arch/x86/hvm/vmx/vmcs.c +++ b/xen/arch/x86/hvm/vmx/vmcs.c @@ -875,6 +875,7 @@ static int construct_vmcs(struct vcpu *v unsigned long sysenter_eip; u32 vmexit_ctl = vmx_vmexit_control; u32 vmentry_ctl = vmx_vmentry_control; + int rc = 0; vmx_vmcs_enter(v); @@ -961,8 +962,8 @@ static int construct_vmcs(struct vcpu *v if ( msr_bitmap == NULL ) { - vmx_vmcs_exit(v); - return -ENOMEM; + rc = -ENOMEM; + goto out; } memset(msr_bitmap, ~0, PAGE_SIZE); @@ -1150,8 +1151,6 @@ static int construct_vmcs(struct vcpu *v __vmwrite(GUEST_PAT, guest_pat); } - vmx_vmcs_exit(v); - /* PVH: paging mode is updated by arch_set_info_guest(). */ if ( is_hvm_vcpu(v) ) { @@ -1161,7 +1160,10 @@ static int construct_vmcs(struct vcpu *v vmx_vlapic_msr_changed(v); } - return 0; + out: + vmx_vmcs_exit(v); + + return rc; } int vmx_read_guest_msr(u32 msr, u64 *val)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor