* [PATCH 6/6] Consolidate the various functions that read and write guest memory
@ 2007-07-30 9:38 Laurent Vivier
0 siblings, 0 replies; only message in thread
From: Laurent Vivier @ 2007-07-30 9:38 UTC (permalink / raw)
To: kvm-devel
[-- Attachment #1.1.1: Type: text/plain, Size: 320 bytes --]
emulator_cmpxchr_emulated() uses struct kvm_vcpu instead of x86_emulate_ctxt to
be consistency with other memops.
Signed-off-by: Laurent Vivier <Laurent.Vivier-6ktuUTfB/bM@public.gmane.org>
--
------------- Laurent.Vivier-6ktuUTfB/bM@public.gmane.org --------------
"Software is hard" - Donald Knuth
[-- Attachment #1.1.2: cmpxchg_emulated-vcpu --]
[-- Type: text/plain, Size: 2019 bytes --]
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);
};
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 315 bytes --]
-------------------------------------------------------------------------
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/
[-- Attachment #3: Type: text/plain, Size: 186 bytes --]
_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-07-30 9:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-30 9:38 [PATCH 6/6] Consolidate the various functions that read and write guest memory Laurent Vivier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox