diff mbox series

[04/10] exec/memory-internal: Check CONFIG_SOFTMMU instead of CONFIG_USER_ONLY

Message ID 20200507173958.25894-5-philmd@redhat.com
State New
Headers show
Series exec: Shear 'exec/ram_addr.h' and make NVMe device target-agnostic | expand

Commit Message

Philippe Mathieu-Daudé May 7, 2020, 5:39 p.m. UTC
The CONFIG_SOFTMMU definition is poisoned in "exec/poison.h".
As this header is internal, check for poisoned CONFIG_SOFTMMU
instead of CONFIG_USER_ONLY to make this include harder to use.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 include/exec/memory-internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h
index 9fcc2af25c..b2b7c1e78a 100644
--- a/include/exec/memory-internal.h
+++ b/include/exec/memory-internal.h
@@ -22,7 +22,7 @@ 
 
 #include "cpu.h"
 
-#ifndef CONFIG_USER_ONLY
+#ifdef CONFIG_SOFTMMU
 static inline AddressSpaceDispatch *flatview_to_dispatch(FlatView *fv)
 {
     return fv->dispatch;