[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xen: Introduce cmpxchg64() and guest_cmpxchg64()




On 15.08.20 20:21, Julien Grall wrote:

Hi Julien

From: Julien Grall <jgrall@xxxxxxxxxx>

The IOREQ code is using cmpxchg() with 64-bit value. At the moment, this
is x86 code, but there is plan to make it common.

To cater 32-bit arch, introduce two new helpers to deal with 64-bit
cmpxchg.

The Arm 32-bit implementation of cmpxchg64() is based on the __cmpxchg64
in Linux v5.8 (arch/arm/include/asm/cmpxchg.h).

Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
Cc: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
---
  xen/include/asm-arm/arm32/cmpxchg.h | 68 +++++++++++++++++++++++++++++
  xen/include/asm-arm/arm64/cmpxchg.h |  5 +++
  xen/include/asm-arm/guest_atomics.h | 22 ++++++++++
  xen/include/asm-x86/guest_atomics.h |  2 +
  xen/include/asm-x86/x86_64/system.h |  2 +
  5 files changed, 99 insertions(+)

Thank you for doing this. I have successfully build-tested your patch with IOREQ series on Arm32/Arm64 (of course before that I had changed cmpxchg to guest_cmpxchg64 in hvm_send_buffered_ioreq()).


--
Regards,

Oleksandr Tyshchenko




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.