qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

coroutine: add a macro for the coroutine stack size

Signed-off-by: Peter Lieven <pl@kamp.de>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>

authored by

Peter Lieven and committed by
Kevin Wolf
8adcd6fb be87a393

+5 -3
+2
include/qemu/coroutine_int.h
··· 28 28 #include "qemu/queue.h" 29 29 #include "qemu/coroutine.h" 30 30 31 + #define COROUTINE_STACK_SIZE (1 << 20) 32 + 31 33 typedef enum { 32 34 COROUTINE_YIELD = 1, 33 35 COROUTINE_TERMINATE = 2,
+1 -1
util/coroutine-sigaltstack.c
··· 143 143 144 144 Coroutine *qemu_coroutine_new(void) 145 145 { 146 - const size_t stack_size = 1 << 20; 146 + const size_t stack_size = COROUTINE_STACK_SIZE; 147 147 CoroutineSigAltStack *co; 148 148 CoroutineThreadState *coTS; 149 149 struct sigaction sa;
+1 -1
util/coroutine-ucontext.c
··· 82 82 83 83 Coroutine *qemu_coroutine_new(void) 84 84 { 85 - const size_t stack_size = 1 << 20; 85 + const size_t stack_size = COROUTINE_STACK_SIZE; 86 86 CoroutineUContext *co; 87 87 ucontext_t old_uc, uc; 88 88 sigjmp_buf old_env;
+1 -1
util/coroutine-win32.c
··· 71 71 72 72 Coroutine *qemu_coroutine_new(void) 73 73 { 74 - const size_t stack_size = 1 << 20; 74 + const size_t stack_size = COROUTINE_STACK_SIZE; 75 75 CoroutineWin32 *co; 76 76 77 77 co = g_malloc0(sizeof(*co));