meson: Make DEBUG_REMAP a meson option

Currently DEBUG_REMAP is a macro that needs to be manually #defined to
be activated, which makes it hard to have separate build directories
dedicated to testing the code with it. Promote it to a meson option.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20240312002402.14344-1-iii@linux.ibm.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Ilya Leoshkevich 2024-03-12 01:23:30 +01:00 committed by Richard Henderson
parent 85b597413d
commit 1f2355f53c
6 changed files with 14 additions and 9 deletions

View file

@ -14,7 +14,7 @@ void *lock_user(int type, abi_ulong guest_addr, ssize_t len, bool copy)
return NULL;
}
host_addr = g2h_untagged(guest_addr);
#ifdef DEBUG_REMAP
#ifdef CONFIG_DEBUG_REMAP
if (copy) {
host_addr = g_memdup(host_addr, len);
} else {
@ -24,7 +24,7 @@ void *lock_user(int type, abi_ulong guest_addr, ssize_t len, bool copy)
return host_addr;
}
#ifdef DEBUG_REMAP
#ifdef CONFIG_DEBUG_REMAP
void unlock_user(void *host_ptr, abi_ulong guest_addr, ssize_t len)
{
void *host_ptr_conv;