On Sat, May 04, 2019 at 06:05:22AM -0600, Paolo Bonzini wrote:
> diff --git a/configure b/configure
> index c01f57a3ae..26e62a4ab1 100755
> --- a/configure
> +++ b/configure
> @@ -5200,7 +5200,7 @@ fi
> if test "$coroutine" = ""; then
> if test "$mingw32" = "yes"; then
> coroutine=win32
> - elif test "$cpu" = "x86_64"; then
> + elif test "$cpu" = "x86_64" || test "$cpu" = "aarch64"; then
> coroutine=asm
> elif test "$ucontext_works" = "yes"; then
> coroutine=ucontext
> diff --git a/scripts/qemugdb/coroutine_asm.py
> b/scripts/qemugdb/coroutine_asm.py
> index b4ac1291db..181b77287b 100644
> --- a/scripts/qemugdb/coroutine_asm.py
> +++ b/scripts/qemugdb/coroutine_asm.py
> @@ -17,4 +17,8 @@ U64_PTR = gdb.lookup_type('uint64_t').pointer()
> def get_coroutine_regs(addr):
> addr = addr.cast(gdb.lookup_type('CoroutineAsm').pointer())
> rsp = addr['sp'].cast(U64_PTR)
> - return {'sp': rsp, 'pc': rsp.dereference()}
> + arch = gdb.selected_frame().architecture.name().split(':'):
> + if arch[0] == 'i386' and arch[1] == 'x86-64':
> + return {'rsp': rsp, 'pc': rsp.dereference()}
Before: sp
After: rsp
Is this a typo? I thought we were using sp everywhere now.
> + else:
> + return {'sp': rsp, 'pc': addr['scratch'].cast(U64_PTR) }
> diff --git a/util/Makefile.objs b/util/Makefile.objs
> index 41a10539cf..2167ffc862 100644
> --- a/util/Makefile.objs
> +++ b/util/Makefile.objs
> @@ -39,7 +39,9 @@ util-obj-$(CONFIG_MEMBARRIER) += sys_membarrier.o
> util-obj-y += qemu-coroutine.o qemu-coroutine-lock.o qemu-coroutine-io.o
> util-obj-y += qemu-coroutine-sleep.o
> util-obj-y += coroutine-$(CONFIG_COROUTINE_BACKEND).o
> +ifeq ($(ARCH),x86_64)
> coroutine-asm.o-cflags := -mno-red-zone
> +endif
-mno-red-zone was mentioned in the previous patch. Should this hunk be
moved there?
signature.asc
Description: PGP signature
