Consolidate the various functions that read and write guest memory
PATCH 6/6 Consolidate the various functions that read and write guest memory
emulator_cmpxchr_emulated() uses struct kvm_vcpu instead of x86_emulate_ctxt to be consistency with other memops.
Signature · 2 lines
------------- Laurent.Vivier-6ktuUTfB/[email protected] -------------- "Software is hard" - Donald Knuth
drivers/kvm/kvm_main.c +2 -2
@@ -1082,7 +1082,7 @@const void *old, const void *new, unsigned int bytes, - struct x86_emulate_ctxt *ctxt) + struct kvm_vcpu *vcpu) { static int reported;
@@ -1090,7 +1090,7 @@ reported =1 ;printk (KERN_WARNING "kvm: emulating exchange as write\n" ); } -return emulator_write_emulated (addr, new, bytes, ctxt->vcpu); +return emulator_write_emulated (addr, new, bytes, vcpu); }static unsigned long get_segment_base (struct kvm_vcpu *vcpu,int seg)
drivers/kvm/x86_emulate.c +2 -2
@@ -1093,7 +1093,7 @@ rc = ops->cmpxchg_emulated ((unsigned long )dst. ptr, &dst.orig_val, &dst.val, dst.bytes, - ctxt); + ctxt->vcpu); else rc = ops->write_emulated((unsigned long)dst.ptr, &dst.val, dst.bytes,
@@ -1392,7 +1392,7 @@ new = ((u64 )_regs[VCPU_REGS_RCX ] <<32 ) | (u32 ) _regs[VCPU_REGS_RBX ];if ((rc = ops->cmpxchg_emulated (cr2, &old, - &new,8 , ctxt)) !=0 ) + &new,8 , ctxt->vcpu)) !=0 ) goto done; _eflags |=EFLG_ZF ; }
drivers/kvm/x86_emulate.h +1 -1
@@ -108,7 +108,7 @@const void *old, const void *new, unsigned int bytes, - struct x86_emulate_ctxt * ctxt); + struct kvm_vcpu *vcpu); };
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel