Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
xen.5015
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.5015
# 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 @@ -1833,7 +1833,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; } @@ -1872,7 +1872,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; @@ -1882,8 +1881,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); @@ -1891,8 +1890,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)); @@ -1902,11 +1901,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 @@ -1914,7 +1908,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; @@ -1924,8 +1917,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); @@ -1933,18 +1926,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