Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:Update
xen.7653
5837fa68-x86-SVM-don-t-deliver-GP-without-error...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 5837fa68-x86-SVM-don-t-deliver-GP-without-error-code.patch of Package xen.7653
# Commit 647c7bd4453c224d9ccdfdb37491544f797fdc48 # Date 2016-11-25 09:46:32 +0100 # Author Jan Beulich <jbeulich@suse.com> # Committer Jan Beulich <jbeulich@suse.com> x86/SVM: don't deliver #GP without error code Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -2010,7 +2010,7 @@ svm_vmexit_do_vmrun(struct cpu_user_regs if ( !nestedsvm_vmcb_map(v, vmcbaddr) ) { gdprintk(XENLOG_ERR, "VMRUN: mapping vmcb failed, injecting #GP\n"); - hvm_inject_hw_exception(TRAP_gp_fault, HVM_DELIVER_NO_ERROR_CODE); + hvm_inject_hw_exception(TRAP_gp_fault, 0); return; } @@ -2049,7 +2049,6 @@ svm_vmexit_do_vmload(struct vmcb_struct struct cpu_user_regs *regs, struct vcpu *v, uint64_t vmcbaddr) { - int ret; unsigned int inst_len; struct page_info *page; @@ -2059,8 +2058,8 @@ svm_vmexit_do_vmload(struct vmcb_struct if ( !nsvm_efer_svm_enabled(v) ) { gdprintk(XENLOG_ERR, "VMLOAD: nestedhvm disabled, injecting #UD\n"); - ret = TRAP_invalid_op; - goto inject; + hvm_inject_hw_exception(TRAP_invalid_op, HVM_DELIVER_NO_ERROR_CODE); + return; } page = nsvm_get_nvmcb_page(v, vmcbaddr); @@ -2068,8 +2067,8 @@ svm_vmexit_do_vmload(struct vmcb_struct { gdprintk(XENLOG_ERR, "VMLOAD: mapping failed, injecting #GP\n"); - ret = TRAP_gp_fault; - goto inject; + hvm_inject_hw_exception(TRAP_gp_fault, 0); + return; } svm_vmload_pa(page_to_maddr(page)); @@ -2079,11 +2078,6 @@ svm_vmexit_do_vmload(struct vmcb_struct v->arch.hvm_svm.vmcb_in_sync = 0; __update_guest_eip(regs, inst_len); - return; - - inject: - hvm_inject_hw_exception(ret, HVM_DELIVER_NO_ERROR_CODE); - return; } static void @@ -2091,7 +2085,6 @@ svm_vmexit_do_vmsave(struct vmcb_struct struct cpu_user_regs *regs, struct vcpu *v, uint64_t vmcbaddr) { - int ret; unsigned int inst_len; struct page_info *page; @@ -2101,8 +2094,8 @@ svm_vmexit_do_vmsave(struct vmcb_struct if ( !nsvm_efer_svm_enabled(v) ) { gdprintk(XENLOG_ERR, "VMSAVE: nestedhvm disabled, injecting #UD\n"); - ret = TRAP_invalid_op; - goto inject; + hvm_inject_hw_exception(TRAP_invalid_op, HVM_DELIVER_NO_ERROR_CODE); + return; } page = nsvm_get_nvmcb_page(v, vmcbaddr); @@ -2110,18 +2103,13 @@ svm_vmexit_do_vmsave(struct vmcb_struct { gdprintk(XENLOG_ERR, "VMSAVE: mapping vmcb failed, injecting #GP\n"); - ret = TRAP_gp_fault; - goto inject; + hvm_inject_hw_exception(TRAP_gp_fault, 0); + return; } svm_vmsave_pa(page_to_maddr(page)); put_page(page); __update_guest_eip(regs, inst_len); - return; - - inject: - hvm_inject_hw_exception(ret, HVM_DELIVER_NO_ERROR_CODE); - return; } static void svm_vmexit_ud_intercept(struct cpu_user_regs *regs)
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