emulator_cmpxchr_emulated() uses struct kvm_vcpu instead of x86_emulate_ctxt to be consistency with other memops.
Signed-off-by: Laurent Vivier <[EMAIL PROTECTED]>
--
------------- [EMAIL PROTECTED] --------------
"Software is hard" - Donald Knuth
Index: kvm/drivers/kvm/kvm_main.c
===================================================================
--- kvm.orig/drivers/kvm/kvm_main.c 2007-07-30 10:50:51.000000000 +0200
+++ kvm/drivers/kvm/kvm_main.c 2007-07-30 10:50:59.000000000 +0200
@@ -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)
Index: kvm/drivers/kvm/x86_emulate.c
===================================================================
--- kvm.orig/drivers/kvm/x86_emulate.c 2007-07-30 10:50:51.000000000 +0200
+++ kvm/drivers/kvm/x86_emulate.c 2007-07-30 10:50:59.000000000 +0200
@@ -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;
}
Index: kvm/drivers/kvm/x86_emulate.h
===================================================================
--- kvm.orig/drivers/kvm/x86_emulate.h 2007-07-30 10:50:51.000000000 +0200
+++ kvm/drivers/kvm/x86_emulate.h 2007-07-30 10:50:59.000000000 +0200
@@ -108,7 +108,7 @@
const void *old,
const void *new,
unsigned int bytes,
- struct x86_emulate_ctxt * ctxt);
+ struct kvm_vcpu *vcpu);
};
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------- 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
