Displaying 2 results from an estimated 2 matches for "old_hi".
2008 Apr 21
1
[PATCH] x86-64: emulation support for cmpxchg16b
...35,7 @@ static int ptwr_emulated_cmpxchg(
container_of(ctxt, struct ptwr_emulate_ctxt, ctxt));
}
+#ifdef __i386__
static int ptwr_emulated_cmpxchg8b(
enum x86_segment seg,
unsigned long offset,
@@ -3650,13 +3651,16 @@ static int ptwr_emulated_cmpxchg8b(
offset, ((u64)old_hi << 32) | old, ((u64)new_hi << 32) | new, 8, 1,
container_of(ctxt, struct ptwr_emulate_ctxt, ctxt));
}
+#else
+#define ptwr_emulated_cmpxchg8b NULL
+#endif
static struct x86_emulate_ops ptwr_emulate_ops = {
.read = ptwr_emulated_read,
.insn_fetch = ptwr_emula...
2009 Aug 06
2
[PATCH] hvm emul: fix cmpxchg emulation to use an atomic operation
...~old;
+ }
+
+ if ( prev != old )
+ rc = X86EMUL_CMPXCHG_FAILED;
+
+ emulate_unmap_dest(v, addr, bytes, vaddr);
+
+ return rc;
+}
+
+#ifdef __i386__
+static int hvm_x86_emulate_cmpxchg8b(
+ struct vcpu *v,
+ unsigned long vaddr,
+ unsigned long old_lo,
+ unsigned long old_hi,
+ unsigned long new_lo,
+ unsigned long new_hi)
+{
+ void *addr;
+ u64 old, new, prev;
+ int rc = X86EMUL_OKAY;
+
+ addr = emulate_map_dest(v, vaddr, 8);
+ if ( emulate_map_dest_failed(addr) )
+ return (long)addr;
+
+ old = (((u64) old_hi) << 32) | (u64) old_lo...