qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tests/tcg: use CONFIG_LINUX_USER, not CONFIG_LINUX
@ 2021-12-10  8:48 Paolo Bonzini
  2021-12-10 10:47 ` Peter Maydell
  2021-12-10 11:48 ` Alex Bennée
  0 siblings, 2 replies; 3+ messages in thread
From: Paolo Bonzini @ 2021-12-10  8:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: alex.bennee

The two more or less overlap, because CONFIG_LINUX is a requirement for Linux
user-mode emulation.  However, CONFIG_LINUX is technically a host symbol
that applies even to system emulation.  Defining CONFIG_LINUX_USER, and
CONFIG_BSD_USER for eventual future use, is cleaner.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 tests/tcg/configure.sh              | 8 +++++++-
 tests/tcg/multiarch/Makefile.target | 2 +-
 tests/tcg/x86_64/Makefile.target    | 2 +-
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
index 9ef913df5b..f859b61d90 100755
--- a/tests/tcg/configure.sh
+++ b/tests/tcg/configure.sh
@@ -225,8 +225,14 @@ for target in $target_list; do
   echo "TARGET_NAME=$arch" >> $config_target_mak
   echo "target=$target" >> $config_target_mak
   case $target in
-    *-linux-user | *-bsd-user)
+    *-linux-user)
       echo "CONFIG_USER_ONLY=y" >> $config_target_mak
+      echo "CONFIG_LINUX_USER=y" >> $config_target_mak
+      echo "QEMU=$PWD/qemu-$arch" >> $config_target_mak
+      ;;
+    *-bsd-user)
+      echo "CONFIG_USER_ONLY=y" >> $config_target_mak
+      echo "CONFIG_BSD_USER=y" >> $config_target_mak
       echo "QEMU=$PWD/qemu-$arch" >> $config_target_mak
       ;;
     *-softmmu)
diff --git a/tests/tcg/multiarch/Makefile.target b/tests/tcg/multiarch/Makefile.target
index a83efb4a9d..dec401e67f 100644
--- a/tests/tcg/multiarch/Makefile.target
+++ b/tests/tcg/multiarch/Makefile.target
@@ -10,7 +10,7 @@ MULTIARCH_SRC=$(SRC_PATH)/tests/tcg/multiarch
 # Set search path for all sources
 VPATH 	       += $(MULTIARCH_SRC)
 MULTIARCH_SRCS =  $(notdir $(wildcard $(MULTIARCH_SRC)/*.c))
-ifneq ($(CONFIG_LINUX),)
+ifneq ($(CONFIG_LINUX_USER),)
 VPATH 	       += $(MULTIARCH_SRC)/linux
 MULTIARCH_SRCS += $(notdir $(wildcard $(MULTIARCH_SRC)/linux/*.c))
 endif
diff --git a/tests/tcg/x86_64/Makefile.target b/tests/tcg/x86_64/Makefile.target
index d7a7385583..4a8a464c57 100644
--- a/tests/tcg/x86_64/Makefile.target
+++ b/tests/tcg/x86_64/Makefile.target
@@ -8,7 +8,7 @@
 
 include $(SRC_PATH)/tests/tcg/i386/Makefile.target
 
-ifneq ($(CONFIG_LINUX),)
+ifneq ($(CONFIG_LINUX_USER),)
 X86_64_TESTS += vsyscall
 TESTS=$(MULTIARCH_TESTS) $(X86_64_TESTS) test-x86_64
 else
-- 
2.33.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] tests/tcg: use CONFIG_LINUX_USER, not CONFIG_LINUX
  2021-12-10  8:48 [PATCH] tests/tcg: use CONFIG_LINUX_USER, not CONFIG_LINUX Paolo Bonzini
@ 2021-12-10 10:47 ` Peter Maydell
  2021-12-10 11:48 ` Alex Bennée
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2021-12-10 10:47 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: alex.bennee, qemu-devel

On Fri, 10 Dec 2021 at 09:41, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> The two more or less overlap, because CONFIG_LINUX is a requirement for Linux
> user-mode emulation.  However, CONFIG_LINUX is technically a host symbol
> that applies even to system emulation.  Defining CONFIG_LINUX_USER, and
> CONFIG_BSD_USER for eventual future use, is cleaner.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  tests/tcg/configure.sh              | 8 +++++++-
>  tests/tcg/multiarch/Makefile.target | 2 +-
>  tests/tcg/x86_64/Makefile.target    | 2 +-
>  3 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
> index 9ef913df5b..f859b61d90 100755
> --- a/tests/tcg/configure.sh
> +++ b/tests/tcg/configure.sh
> @@ -225,8 +225,14 @@ for target in $target_list; do
>    echo "TARGET_NAME=$arch" >> $config_target_mak
>    echo "target=$target" >> $config_target_mak
>    case $target in
> -    *-linux-user | *-bsd-user)
> +    *-linux-user)
>        echo "CONFIG_USER_ONLY=y" >> $config_target_mak
> +      echo "CONFIG_LINUX_USER=y" >> $config_target_mak
> +      echo "QEMU=$PWD/qemu-$arch" >> $config_target_mak
> +      ;;
> +    *-bsd-user)
> +      echo "CONFIG_USER_ONLY=y" >> $config_target_mak
> +      echo "CONFIG_BSD_USER=y" >> $config_target_mak
>        echo "QEMU=$PWD/qemu-$arch" >> $config_target_mak

I note that this is very subtly different from the logic
used in meson.build for setting CONFIG_LINUX_USER,
which uses "target.endswith('linux-user')" without the
leading hyphen...

Vaguely relatedly, gdbstub.c has some ifdefs:
 #if defined(CONFIG_USER_ONLY) && defined(CONFIG_LINUX_USER)

Is it possible for CONFIG_LINUX_USER to be defined when
CONFIG_USER_ONLY is not, or is the first clause in the #if
redundant?

thanks
-- PMM


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] tests/tcg: use CONFIG_LINUX_USER, not CONFIG_LINUX
  2021-12-10  8:48 [PATCH] tests/tcg: use CONFIG_LINUX_USER, not CONFIG_LINUX Paolo Bonzini
  2021-12-10 10:47 ` Peter Maydell
@ 2021-12-10 11:48 ` Alex Bennée
  1 sibling, 0 replies; 3+ messages in thread
From: Alex Bennée @ 2021-12-10 11:48 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel


Paolo Bonzini <pbonzini@redhat.com> writes:

> The two more or less overlap, because CONFIG_LINUX is a requirement for Linux
> user-mode emulation.  However, CONFIG_LINUX is technically a host symbol
> that applies even to system emulation.  Defining CONFIG_LINUX_USER, and
> CONFIG_BSD_USER for eventual future use, is cleaner.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Queued to testing/next, thanks.

-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-10 11:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-10  8:48 [PATCH] tests/tcg: use CONFIG_LINUX_USER, not CONFIG_LINUX Paolo Bonzini
2021-12-10 10:47 ` Peter Maydell
2021-12-10 11:48 ` Alex Bennée

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).