All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 00/19] Linux user for 5.1 patches
@ 2020-06-05 11:46 Laurent Vivier
  2020-06-05 11:46 ` [PULL 01/19] linux-user, alpha: fix oldumount syscall Laurent Vivier
                   ` (19 more replies)
  0 siblings, 20 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-06-05 11:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: Riku Voipio, Laurent Vivier

The following changes since commit ddc760832fa8cf5e93b9d9e6e854a5114ac63510:

  Merge remote-tracking branch 'remotes/gkurz/tags/9p-next-2020-05-26' into s=
taging (2020-05-26 14:05:53 +0100)

are available in the Git repository at:

  git://github.com/vivier/qemu.git tags/linux-user-for-5.1-pull-request

for you to fetch changes up to aa3d2045d4ca760bd8c22935a2d73ee4f3480bd5:

  stubs: Restrict ui/win32-kbd-hook to system-mode (2020-06-05 11:36:00 +0200)

----------------------------------------------------------------
linux-user pull request 20200605

Implement F_OFD_ fcntl() command, /proc/cpuinfo for hppa
Fix socket(), prnctl() error codes, underflow in target_mremap,
    epoll_create() strace, oldumount for alpha
User-mode build dependencies improvement

----------------------------------------------------------------

Andreas Schwab (1):
  linux-user: implement OFD locks

Helge Deller (2):
  linux-user: return target error codes for socket() and prctl()
  linux-user: Add support for /proc/cpuinfo on hppa platform

Jonathan Marler (1):
  linux-user/mmap.c: fix integer underflow in target_mremap

Laurent Vivier (1):
  linux-user, alpha: fix oldumount syscall

Philippe Mathieu-Daud=C3=A9 (13):
  Makefile: Only build virtiofsd if system-mode is enabled
  configure: Avoid building TCG when not needed
  tests/Makefile: Only display TCG-related tests when TCG is available
  tests/Makefile: Restrict some softmmu-only tests
  util/Makefile: Reduce the user-mode object list
  stubs/Makefile: Reduce the user-mode object list
  target/riscv/cpu: Restrict CPU migration to system-mode
  exec: Assert CPU migration is not used on user-only build
  arch_init: Remove unused 'qapi-commands-misc.h' include
  target/i386: Restrict CpuClass::get_crash_info() to system-mode
  target/s390x: Restrict CpuClass::get_crash_info() to system-mode
  hw/core: Restrict CpuClass::get_crash_info() to system-mode
  stubs: Restrict ui/win32-kbd-hook to system-mode

Sergei Trofimovich (1):
  linux-user/strace.list: fix epoll_create{,1} -strace output

 Makefile                   |  2 +-
 arch_init.c                |  1 -
 configure                  |  4 +++
 exec.c                     |  4 ++-
 hw/core/cpu.c              |  2 ++
 include/hw/core/cpu.h      |  7 ++++-
 linux-user/generic/fcntl.h |  4 +++
 linux-user/mmap.c          |  2 +-
 linux-user/strace.list     |  4 +--
 linux-user/syscall.c       | 31 +++++++++++++++++---
 stubs/Makefile.objs        | 52 +++++++++++++++++++--------------
 target/i386/cpu.c          |  6 +++-
 target/riscv/cpu.c         |  6 ++--
 target/s390x/cpu.c         | 12 ++++----
 tests/Makefile.include     | 18 ++++++------
 util/Makefile.objs         | 59 ++++++++++++++++++++++++--------------
 16 files changed, 142 insertions(+), 72 deletions(-)

--=20
2.26.2



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

* [PULL 01/19] linux-user, alpha: fix oldumount syscall
  2020-06-05 11:46 [PULL 00/19] Linux user for 5.1 patches Laurent Vivier
@ 2020-06-05 11:46 ` Laurent Vivier
  2020-06-05 11:46 ` [PULL 02/19] linux-user: return target error codes for socket() and prctl() Laurent Vivier
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-06-05 11:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: Riku Voipio, Laurent Vivier

When we try to bootstrap debian/lenny for alpha, it fails because
it cannot umount /.root directory:

  ...
  Setting up initscripts (2.86.ds1-61) ...
  umount: /.root: Function not implemented
  dpkg: error processing initscripts (--configure):
   subprocess post-installation script returned error exit status 1
  dpkg: sysvinit: dependency problems, but configuring anyway as you request:
   sysvinit depends on initscripts; however:
    Package initscripts is not configured yet.

This is because, when we switched from syscall_nr.h to syscall.tbl,
the syscall #321 has been renamed from umount to oldumount and
syscall.c has not been updated to manage the new name.

oldumount has been introduced in linux 2.1.116pre1 by:
  7d32756b2 ("Import 2.1.116pre1")
...
 * We now support a flag for forced unmount like the other 'big iron'
 * unixes. Our API is identical to OSF/1 to avoid making a mess of AMD
...

Fixes: 6116aea994 ("linux-user, alpha: add syscall table generation support")
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20200502194642.32823-1-laurent@vivier.eu>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 linux-user/syscall.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 05f03919ff07..e89b815ce983 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -8028,8 +8028,13 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
             }
         }
         return ret;
-#ifdef TARGET_NR_umount
+#if defined(TARGET_NR_umount) || defined(TARGET_NR_oldumount)
+#if defined(TARGET_NR_umount)
     case TARGET_NR_umount:
+#endif
+#if defined(TARGET_NR_oldumount)
+    case TARGET_NR_oldumount:
+#endif
         if (!(p = lock_user_string(arg1)))
             return -TARGET_EFAULT;
         ret = get_errno(umount(p));
-- 
2.26.2



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

* [PULL 02/19] linux-user: return target error codes for socket() and prctl()
  2020-06-05 11:46 [PULL 00/19] Linux user for 5.1 patches Laurent Vivier
  2020-06-05 11:46 ` [PULL 01/19] linux-user, alpha: fix oldumount syscall Laurent Vivier
@ 2020-06-05 11:46 ` Laurent Vivier
  2020-06-05 11:46 ` [PULL 03/19] linux-user: Add support for /proc/cpuinfo on hppa platform Laurent Vivier
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-06-05 11:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: Helge Deller, Riku Voipio, Laurent Vivier

From: Helge Deller <deller@gmx.de>

Return target error codes instead of host error codes.

Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>

Message-Id: <20200424220033.GA28140@ls3530.fritz.box>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 linux-user/syscall.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index e89b815ce983..fd5c4f1d73e6 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -2987,7 +2987,7 @@ static abi_long do_socket(int domain, int type, int protocol)
 #endif
          protocol == NETLINK_KOBJECT_UEVENT ||
          protocol == NETLINK_AUDIT)) {
-        return -EPFNOSUPPORT;
+        return -TARGET_EPFNOSUPPORT;
     }
 
     if (domain == AF_PACKET ||
@@ -5856,7 +5856,7 @@ static abi_long do_get_thread_area(CPUX86State *env, abi_ulong ptr)
 
 abi_long do_arch_prctl(CPUX86State *env, int code, abi_ulong addr)
 {
-    return -ENOSYS;
+    return -TARGET_ENOSYS;
 }
 #else
 abi_long do_arch_prctl(CPUX86State *env, int code, abi_ulong addr)
-- 
2.26.2



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

* [PULL 03/19] linux-user: Add support for /proc/cpuinfo on hppa platform
  2020-06-05 11:46 [PULL 00/19] Linux user for 5.1 patches Laurent Vivier
  2020-06-05 11:46 ` [PULL 01/19] linux-user, alpha: fix oldumount syscall Laurent Vivier
  2020-06-05 11:46 ` [PULL 02/19] linux-user: return target error codes for socket() and prctl() Laurent Vivier
@ 2020-06-05 11:46 ` Laurent Vivier
  2020-06-05 11:46 ` [PULL 04/19] linux-user/strace.list: fix epoll_create{, 1} -strace output Laurent Vivier
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-06-05 11:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: Helge Deller, Riku Voipio, Richard Henderson, Laurent Vivier

From: Helge Deller <deller@gmx.de>

Provide our own /proc/cpuinfo file for the hppa (parisc) platform.

Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20200424210648.GA26715@ls3530.fritz.box>
[lv: s/an/our/]
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 linux-user/syscall.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index fd5c4f1d73e6..63c40c48e31f 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -7438,6 +7438,18 @@ static int open_cpuinfo(void *cpu_env, int fd)
 }
 #endif
 
+#if defined(TARGET_HPPA)
+static int open_cpuinfo(void *cpu_env, int fd)
+{
+    dprintf(fd, "cpu family\t: PA-RISC 1.1e\n");
+    dprintf(fd, "cpu\t\t: PA7300LC (PCX-L2)\n");
+    dprintf(fd, "capabilities\t: os32\n");
+    dprintf(fd, "model\t\t: 9000/778/B160L\n");
+    dprintf(fd, "model name\t: Merlin L2 160 QEMU (9000/778/B160L)\n");
+    return 0;
+}
+#endif
+
 #if defined(TARGET_M68K)
 static int open_hardware(void *cpu_env, int fd)
 {
@@ -7462,7 +7474,7 @@ static int do_openat(void *cpu_env, int dirfd, const char *pathname, int flags,
 #if defined(HOST_WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN)
         { "/proc/net/route", open_net_route, is_proc },
 #endif
-#if defined(TARGET_SPARC)
+#if defined(TARGET_SPARC) || defined(TARGET_HPPA)
         { "/proc/cpuinfo", open_cpuinfo, is_proc },
 #endif
 #if defined(TARGET_M68K)
-- 
2.26.2



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

* [PULL 04/19] linux-user/strace.list: fix epoll_create{, 1} -strace output
  2020-06-05 11:46 [PULL 00/19] Linux user for 5.1 patches Laurent Vivier
                   ` (2 preceding siblings ...)
  2020-06-05 11:46 ` [PULL 03/19] linux-user: Add support for /proc/cpuinfo on hppa platform Laurent Vivier
@ 2020-06-05 11:46 ` Laurent Vivier
  2020-06-05 11:46 ` [PULL 05/19] linux-user/mmap.c: fix integer underflow in target_mremap Laurent Vivier
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-06-05 11:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: Philippe Mathieu-Daudé,
	Riku Voipio, Laurent Vivier, Sergei Trofimovich, qemu-stable

From: Sergei Trofimovich <slyfox@gentoo.org>

Fix syscall name and parameters priinter.

Before the change:

```
$ alpha-linux-user/qemu-alpha -strace -L /usr/alpha-unknown-linux-gnu/ /tmp/a
...
1274697 %s(%d)(2097152,274903156744,274903156760,274905840712,274877908880,274903235616) = 3
1274697 exit_group(0)
```

After the change:

```
$ alpha-linux-user/qemu-alpha -strace -L /usr/alpha-unknown-linux-gnu/ /tmp/a
...
1273719 epoll_create1(2097152) = 3
1273719 exit_group(0)
```

Fixes: 9cbc0578cb6 ("Improve output of various syscalls")
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
CC: Riku Voipio <riku.voipio@iki.fi>
CC: Laurent Vivier <laurent@vivier.eu>
Cc: qemu-stable@nongnu.org
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200416175957.1274882-1-slyfox@gentoo.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 linux-user/strace.list | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/linux-user/strace.list b/linux-user/strace.list
index d49a1e92a80e..9281c0a75828 100644
--- a/linux-user/strace.list
+++ b/linux-user/strace.list
@@ -125,10 +125,10 @@
 { TARGET_NR_dup3, "dup3" , "%s(%d,%d,%d)", NULL, NULL },
 #endif
 #ifdef TARGET_NR_epoll_create
-{ TARGET_NR_epoll_create, "%s(%d)", NULL, NULL, NULL },
+{ TARGET_NR_epoll_create, "epoll_create", "%s(%d)", NULL, NULL },
 #endif
 #ifdef TARGET_NR_epoll_create1
-{ TARGET_NR_epoll_create1, "%s(%d)", NULL, NULL, NULL },
+{ TARGET_NR_epoll_create1, "epoll_create1", "%s(%d)", NULL, NULL },
 #endif
 #ifdef TARGET_NR_epoll_ctl
 { TARGET_NR_epoll_ctl, "epoll_ctl" , NULL, NULL, NULL },
-- 
2.26.2



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

* [PULL 05/19] linux-user/mmap.c: fix integer underflow in target_mremap
  2020-06-05 11:46 [PULL 00/19] Linux user for 5.1 patches Laurent Vivier
                   ` (3 preceding siblings ...)
  2020-06-05 11:46 ` [PULL 04/19] linux-user/strace.list: fix epoll_create{, 1} -strace output Laurent Vivier
@ 2020-06-05 11:46 ` Laurent Vivier
  2020-06-05 11:46 ` [PULL 06/19] linux-user: implement OFD locks Laurent Vivier
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-06-05 11:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: Riku Voipio, Jonathan Marler, Laurent Vivier

From: Jonathan Marler <johnnymarler@gmail.com>

Fixes: https://bugs.launchpad.net/bugs/1876373

This code path in mmap occurs when a page size is decreased with mremap.  When a section of pages is shrunk, qemu calls mmap_reserve on the pages that were released.  However, it has the diff operation reversed, subtracting the larger old_size from the smaller new_size.  Instead, it should be subtracting the smaller new_size from the larger old_size.  You can also see in the previous line of the change that this mmap_reserve call only occurs when old_size > new_size.

Bug: https://bugs.launchpad.net/qemu/+bug/1876373
Signed-off-by: Jonathan Marler <johnnymarler@gmail.com>
Reviewded-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20200502161225.14346-1-johnnymarler@gmail.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 linux-user/mmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index e37803379747..caab62909eb1 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -708,7 +708,7 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
         if (prot == 0) {
             host_addr = mremap(g2h(old_addr), old_size, new_size, flags);
             if (host_addr != MAP_FAILED && reserved_va && old_size > new_size) {
-                mmap_reserve(old_addr + old_size, new_size - old_size);
+                mmap_reserve(old_addr + old_size, old_size - new_size);
             }
         } else {
             errno = ENOMEM;
-- 
2.26.2



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

* [PULL 06/19] linux-user: implement OFD locks
  2020-06-05 11:46 [PULL 00/19] Linux user for 5.1 patches Laurent Vivier
                   ` (4 preceding siblings ...)
  2020-06-05 11:46 ` [PULL 05/19] linux-user/mmap.c: fix integer underflow in target_mremap Laurent Vivier
@ 2020-06-05 11:46 ` Laurent Vivier
  2020-06-05 11:46 ` [PULL 07/19] Makefile: Only build virtiofsd if system-mode is enabled Laurent Vivier
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-06-05 11:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: Andreas Schwab, Riku Voipio, Laurent Vivier

From: Andreas Schwab <schwab@suse.de>

Signed-off-by: Andreas Schwab <schwab@suse.de>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <mvm7dx0cun3.fsf@suse.de>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 linux-user/generic/fcntl.h | 4 ++++
 linux-user/syscall.c       | 6 ++++++
 2 files changed, 10 insertions(+)

diff --git a/linux-user/generic/fcntl.h b/linux-user/generic/fcntl.h
index 9f727d4df2c8..c85c5b9fed65 100644
--- a/linux-user/generic/fcntl.h
+++ b/linux-user/generic/fcntl.h
@@ -99,6 +99,10 @@
 #define TARGET_F_SETLKW64      14
 #endif
 
+#define TARGET_F_OFD_GETLK     36
+#define TARGET_F_OFD_SETLK     37
+#define TARGET_F_OFD_SETLKW    38
+
 #ifndef TARGET_F_SETOWN_EX
 #define TARGET_F_SETOWN_EX     15
 #define TARGET_F_GETOWN_EX     16
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 63c40c48e31f..1cf638208201 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -6098,6 +6098,9 @@ static int target_to_host_fcntl_cmd(int cmd)
     case TARGET_F_SETFD:
     case TARGET_F_GETFL:
     case TARGET_F_SETFL:
+    case TARGET_F_OFD_GETLK:
+    case TARGET_F_OFD_SETLK:
+    case TARGET_F_OFD_SETLKW:
         ret = cmd;
         break;
     case TARGET_F_GETLK:
@@ -6383,6 +6386,7 @@ static abi_long do_fcntl(int fd, int cmd, abi_ulong arg)
         break;
 
     case TARGET_F_GETLK64:
+    case TARGET_F_OFD_GETLK:
         ret = copy_from_user_flock64(&fl64, arg);
         if (ret) {
             return ret;
@@ -6394,6 +6398,8 @@ static abi_long do_fcntl(int fd, int cmd, abi_ulong arg)
         break;
     case TARGET_F_SETLK64:
     case TARGET_F_SETLKW64:
+    case TARGET_F_OFD_SETLK:
+    case TARGET_F_OFD_SETLKW:
         ret = copy_from_user_flock64(&fl64, arg);
         if (ret) {
             return ret;
-- 
2.26.2



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

* [PULL 07/19] Makefile: Only build virtiofsd if system-mode is enabled
  2020-06-05 11:46 [PULL 00/19] Linux user for 5.1 patches Laurent Vivier
                   ` (5 preceding siblings ...)
  2020-06-05 11:46 ` [PULL 06/19] linux-user: implement OFD locks Laurent Vivier
@ 2020-06-05 11:46 ` Laurent Vivier
  2020-06-05 11:46 ` [PULL 08/19] configure: Avoid building TCG when not needed Laurent Vivier
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-06-05 11:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: Richard Henderson, Riku Voipio, Philippe Mathieu-Daudé,
	Laurent Vivier, Dr . David Alan Gilbert

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Do not build the virtiofsd helper when configured with
--disable-system.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Tested-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200522172510.25784-2-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 40e4f7677bde..d1af126ea194 100644
--- a/Makefile
+++ b/Makefile
@@ -345,7 +345,7 @@ HELPERS-y += vhost-user-gpu$(EXESUF)
 vhost-user-json-y += contrib/vhost-user-gpu/50-qemu-gpu.json
 endif
 
-ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyy)
+ifeq ($(CONFIG_SOFTMMU)$(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyyy)
 HELPERS-y += virtiofsd$(EXESUF)
 vhost-user-json-y += tools/virtiofsd/50-qemu-virtiofsd.json
 endif
-- 
2.26.2



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

* [PULL 08/19] configure: Avoid building TCG when not needed
  2020-06-05 11:46 [PULL 00/19] Linux user for 5.1 patches Laurent Vivier
                   ` (6 preceding siblings ...)
  2020-06-05 11:46 ` [PULL 07/19] Makefile: Only build virtiofsd if system-mode is enabled Laurent Vivier
@ 2020-06-05 11:46 ` Laurent Vivier
  2020-06-05 11:46 ` [PULL 09/19] tests/Makefile: Only display TCG-related tests when TCG is available Laurent Vivier
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-06-05 11:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: Richard Henderson, Alistair Francis, Riku Voipio,
	Philippe Mathieu-Daudé,
	Laurent Vivier

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Avoid building TCG when building only tools:

  ./configure --enable-tools --disable-system --disable-user

This saves us from running the soft-float tests enabled since
commit 76170102508.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Tested-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200522172510.25784-3-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 configure | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/configure b/configure
index b969dee675bb..fccc56bd4d1f 100755
--- a/configure
+++ b/configure
@@ -1663,6 +1663,10 @@ if [ "$ARCH" = "unknown" ]; then
   linux_user="no"
 fi
 
+if [ "$bsd_user" = "no" -a "$linux_user" = "no" -a "$softmmu" = "no" ] ; then
+  tcg="no"
+fi
+
 default_target_list=""
 
 mak_wilds=""
-- 
2.26.2



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

* [PULL 09/19] tests/Makefile: Only display TCG-related tests when TCG is available
  2020-06-05 11:46 [PULL 00/19] Linux user for 5.1 patches Laurent Vivier
                   ` (7 preceding siblings ...)
  2020-06-05 11:46 ` [PULL 08/19] configure: Avoid building TCG when not needed Laurent Vivier
@ 2020-06-05 11:46 ` Laurent Vivier
  2020-06-05 11:46 ` [PULL 10/19] tests/Makefile: Restrict some softmmu-only tests Laurent Vivier
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-06-05 11:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alistair Francis, Richard Henderson, Riku Voipio,
	Philippe Mathieu-Daudé,
	Laurent Vivier

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Tested-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200522172510.25784-4-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 tests/Makefile.include | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/Makefile.include b/tests/Makefile.include
index 03a74b60f6b2..6bc3d1096bc9 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -12,8 +12,10 @@ check-help:
 	@echo " $(MAKE) check-speed          Run qobject speed tests"
 	@echo " $(MAKE) check-qapi-schema    Run QAPI schema tests"
 	@echo " $(MAKE) check-block          Run block tests"
+ifeq ($(CONFIG_TCG),y)
 	@echo " $(MAKE) check-tcg            Run TCG tests"
 	@echo " $(MAKE) check-softfloat      Run FPU emulation tests"
+endif
 	@echo " $(MAKE) check-acceptance     Run all acceptance (functional) tests"
 	@echo
 	@echo " $(MAKE) check-report.tap     Generates an aggregated TAP test report"
-- 
2.26.2



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

* [PULL 10/19] tests/Makefile: Restrict some softmmu-only tests
  2020-06-05 11:46 [PULL 00/19] Linux user for 5.1 patches Laurent Vivier
                   ` (8 preceding siblings ...)
  2020-06-05 11:46 ` [PULL 09/19] tests/Makefile: Only display TCG-related tests when TCG is available Laurent Vivier
@ 2020-06-05 11:46 ` Laurent Vivier
  2020-06-05 11:46 ` [PULL 11/19] util/Makefile: Reduce the user-mode object list Laurent Vivier
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-06-05 11:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: Richard Henderson, Riku Voipio, Philippe Mathieu-Daudé,
	Laurent Vivier

From: Philippe Mathieu-Daudé <philmd@redhat.com>

In the next commit we are going to remove some objects from the
util-obj-y variable (objects which are not used by user-mode,
when configured with --disable-system).
Then some system-mode tests are going to fail, due to the missing
objects:

  $ make check-unit -k
    LINK    tests/test-iov
  /usr/bin/ld: tests/test-iov.o: in function `iov_from_buf':
  include/qemu/iov.h:49: undefined reference to `iov_from_buf_full'
  make: *** [rules.mak:124: tests/test-iov] Error 1
    LINK    tests/test-timed-average
  /usr/bin/ld: tests/test-timed-average.o: in function `account':
  tests/test-timed-average.c:27: undefined reference to `timed_average_account'
  make: *** [rules.mak:124: tests/test-timed-average] Error 1
    LINK    tests/test-util-filemonitor
  /usr/bin/ld: tests/test-util-filemonitor.o: in function `qemu_file_monitor_test_event_loop':
  tests/test-util-filemonitor.c:83: undefined reference to `main_loop_wait'
  make: *** [rules.mak:124: tests/test-util-filemonitor] Error 1
    LINK    tests/test-util-sockets
  /usr/bin/ld: tests/test-util-sockets.o: in function `test_socket_fd_pass_name_good':
  tests/test-util-sockets.c:91: undefined reference to `socket_connect'
  make: *** [rules.mak:124: tests/test-util-sockets] Error 1
    LINK    tests/test-base64
  /usr/bin/ld: tests/test-base64.o: in function `test_base64_good':
  tests/test-base64.c:35: undefined reference to `qbase64_decode'
  collect2: error: ld returned 1 exit status
  make: *** [rules.mak:124: tests/test-base64] Error 1
    LINK    tests/test-bufferiszero
  /usr/bin/ld: tests/test-bufferiszero.o: in function `test_1':
  tests/test-bufferiszero.c:31: undefined reference to `buffer_is_zero'
  make: *** [rules.mak:124: tests/test-bufferiszero] Error 1
  make: Target 'check-unit' not remade because of errors.

Instead, restrict these tests to system-mode, by using the
$(CONFIG_SOFTMMU) variable.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Tested-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200522172510.25784-5-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 tests/Makefile.include | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/tests/Makefile.include b/tests/Makefile.include
index 6bc3d1096bc9..0cb58aad2685 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -66,14 +66,14 @@ check-unit-y += tests/check-qlit$(EXESUF)
 check-unit-y += tests/test-qobject-output-visitor$(EXESUF)
 check-unit-y += tests/test-clone-visitor$(EXESUF)
 check-unit-y += tests/test-qobject-input-visitor$(EXESUF)
-check-unit-y += tests/test-qmp-cmds$(EXESUF)
+check-unit-$(CONFIG_SOFTMMU) += tests/test-qmp-cmds$(EXESUF)
 check-unit-y += tests/test-string-input-visitor$(EXESUF)
 check-unit-y += tests/test-string-output-visitor$(EXESUF)
 check-unit-y += tests/test-qmp-event$(EXESUF)
 check-unit-y += tests/test-opts-visitor$(EXESUF)
 check-unit-$(CONFIG_BLOCK) += tests/test-coroutine$(EXESUF)
 check-unit-y += tests/test-visitor-serialization$(EXESUF)
-check-unit-y += tests/test-iov$(EXESUF)
+check-unit-$(CONFIG_SOFTMMU) += tests/test-iov$(EXESUF)
 check-unit-y += tests/test-bitmap$(EXESUF)
 check-unit-$(CONFIG_BLOCK) += tests/test-aio$(EXESUF)
 check-unit-$(CONFIG_BLOCK) += tests/test-aio-multithread$(EXESUF)
@@ -108,7 +108,7 @@ check-unit-y += tests/test-qht$(EXESUF)
 check-unit-y += tests/test-qht-par$(EXESUF)
 check-unit-y += tests/test-bitops$(EXESUF)
 check-unit-y += tests/test-bitcnt$(EXESUF)
-check-unit-y += tests/test-qdev-global-props$(EXESUF)
+check-unit-$(CONFIG_SOFTMMU) += tests/test-qdev-global-props$(EXESUF)
 check-unit-y += tests/check-qom-interface$(EXESUF)
 check-unit-y += tests/check-qom-proplist$(EXESUF)
 check-unit-y += tests/test-qemu-opts$(EXESUF)
@@ -126,9 +126,9 @@ check-unit-$(call land,$(CONFIG_BLOCK),$(CONFIG_GNUTLS)) += tests/test-crypto-tl
 ifneq (,$(findstring qemu-ga,$(TOOLS)))
 check-unit-$(call land,$(CONFIG_LINUX),$(CONFIG_VIRTIO_SERIAL)) += tests/test-qga$(EXESUF)
 endif
-check-unit-y += tests/test-timed-average$(EXESUF)
-check-unit-$(CONFIG_INOTIFY1) += tests/test-util-filemonitor$(EXESUF)
-check-unit-y += tests/test-util-sockets$(EXESUF)
+check-unit-$(CONFIG_SOFTMMU) += tests/test-timed-average$(EXESUF)
+check-unit-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_INOTIFY1)) += tests/test-util-filemonitor$(EXESUF)
+check-unit-$(CONFIG_SOFTMMU) += tests/test-util-sockets$(EXESUF)
 check-unit-$(CONFIG_BLOCK) += tests/test-authz-simple$(EXESUF)
 check-unit-$(CONFIG_BLOCK) += tests/test-authz-list$(EXESUF)
 check-unit-$(CONFIG_BLOCK) += tests/test-authz-listfile$(EXESUF)
@@ -139,7 +139,7 @@ check-unit-$(CONFIG_BLOCK) += tests/test-io-channel-file$(EXESUF)
 check-unit-$(call land,$(CONFIG_BLOCK),$(CONFIG_GNUTLS)) += tests/test-io-channel-tls$(EXESUF)
 check-unit-$(CONFIG_BLOCK) += tests/test-io-channel-command$(EXESUF)
 check-unit-$(CONFIG_BLOCK) += tests/test-io-channel-buffer$(EXESUF)
-check-unit-y += tests/test-base64$(EXESUF)
+check-unit-$(CONFIG_SOFTMMU) += tests/test-base64$(EXESUF)
 check-unit-$(call land,$(CONFIG_BLOCK),$(if $(CONFIG_NETTLE),y,$(CONFIG_GCRYPT))) += tests/test-crypto-pbkdf$(EXESUF)
 check-unit-$(CONFIG_BLOCK) += tests/test-crypto-ivgen$(EXESUF)
 check-unit-$(CONFIG_BLOCK)  += tests/test-crypto-afsplit$(EXESUF)
@@ -147,7 +147,7 @@ check-unit-$(call land,$(CONFIG_BLOCK),$(CONFIG_QEMU_PRIVATE_XTS)) += tests/test
 check-unit-$(CONFIG_BLOCK)  += tests/test-crypto-block$(EXESUF)
 check-unit-y += tests/test-logging$(EXESUF)
 check-unit-$(call land,$(CONFIG_BLOCK),$(CONFIG_REPLICATION)) += tests/test-replication$(EXESUF)
-check-unit-y += tests/test-bufferiszero$(EXESUF)
+check-unit-$(CONFIG_SOFTMMU) += tests/test-bufferiszero$(EXESUF)
 check-unit-y += tests/test-uuid$(EXESUF)
 check-unit-y += tests/ptimer-test$(EXESUF)
 check-unit-y += tests/test-qapi-util$(EXESUF)
-- 
2.26.2



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

* [PULL 11/19] util/Makefile: Reduce the user-mode object list
  2020-06-05 11:46 [PULL 00/19] Linux user for 5.1 patches Laurent Vivier
                   ` (9 preceding siblings ...)
  2020-06-05 11:46 ` [PULL 10/19] tests/Makefile: Restrict some softmmu-only tests Laurent Vivier
@ 2020-06-05 11:46 ` Laurent Vivier
  2020-06-05 11:46 ` [PULL 12/19] stubs/Makefile: " Laurent Vivier
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-06-05 11:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: Richard Henderson, Riku Voipio, Philippe Mathieu-Daudé,
	Laurent Vivier

From: Philippe Mathieu-Daudé <philmd@redhat.com>

These objects are not required when configured with --disable-system.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Tested-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200522172510.25784-6-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 util/Makefile.objs | 59 +++++++++++++++++++++++++++++-----------------
 1 file changed, 38 insertions(+), 21 deletions(-)

diff --git a/util/Makefile.objs b/util/Makefile.objs
index fe339c2636ba..cc5e37177afd 100644
--- a/util/Makefile.objs
+++ b/util/Makefile.objs
@@ -1,8 +1,4 @@
 util-obj-y = osdep.o cutils.o unicode.o qemu-timer-common.o
-util-obj-y += bufferiszero.o
-util-obj-y += lockcnt.o
-util-obj-y += aiocb.o async.o aio-wait.o thread-pool.o qemu-timer.o
-util-obj-y += main-loop.o
 util-obj-$(call lnot,$(CONFIG_ATOMIC64)) += atomic64.o
 util-obj-$(CONFIG_POSIX) += aio-posix.o
 util-obj-$(CONFIG_POSIX) += fdmon-poll.o
@@ -21,31 +17,20 @@ util-obj-$(CONFIG_WIN32) += oslib-win32.o
 util-obj-$(CONFIG_WIN32) += qemu-thread-win32.o
 util-obj-y += envlist.o path.o module.o
 util-obj-y += host-utils.o
-util-obj-y += bitmap.o bitops.o hbitmap.o
+util-obj-y += bitmap.o bitops.o
 util-obj-y += fifo8.o
-util-obj-y += nvdimm-utils.o
 util-obj-y += cacheinfo.o
 util-obj-y += error.o qemu-error.o
 util-obj-y += qemu-print.o
 util-obj-y += id.o
-util-obj-y += iov.o qemu-config.o qemu-sockets.o uri.o notify.o
+util-obj-y += qemu-config.o notify.o
 util-obj-y += qemu-option.o qemu-progress.o
 util-obj-y += keyval.o
-util-obj-y += hexdump.o
 util-obj-y += crc32c.o
 util-obj-y += uuid.o
-util-obj-y += throttle.o
 util-obj-y += getauxval.o
-util-obj-y += readline.o
 util-obj-y += rcu.o
 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 += qemu-co-shared-resource.o
-util-obj-y += coroutine-$(CONFIG_COROUTINE_BACKEND).o
-util-obj-y += buffer.o
-util-obj-y += timed-average.o
-util-obj-y += base64.o
 util-obj-y += log.o
 util-obj-y += pagesize.o
 util-obj-y += qdist.o
@@ -54,13 +39,45 @@ util-obj-y += qsp.o
 util-obj-y += range.o
 util-obj-y += stats64.o
 util-obj-y += systemd.o
-util-obj-y += iova-tree.o
-util-obj-$(CONFIG_INOTIFY1) += filemonitor-inotify.o
-util-obj-$(call lnot,$(CONFIG_INOTIFY1)) += filemonitor-stub.o
-util-obj-$(CONFIG_LINUX) += vfio-helpers.o
 util-obj-$(CONFIG_POSIX) += drm.o
 util-obj-y += guest-random.o
 util-obj-$(CONFIG_GIO) += dbus.o
 dbus.o-cflags = $(GIO_CFLAGS)
 dbus.o-libs = $(GIO_LIBS)
 util-obj-$(CONFIG_USER_ONLY) += selfmap.o
+
+#######################################################################
+# code used by both qemu system emulation and qemu-img
+
+ifeq ($(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS)),y)
+
+util-obj-y += aio-wait.o
+util-obj-y += aiocb.o
+util-obj-y += async.o
+util-obj-y += base64.o
+util-obj-y += buffer.o
+util-obj-y += bufferiszero.o
+util-obj-y += coroutine-$(CONFIG_COROUTINE_BACKEND).o
+util-obj-y += hexdump.o
+util-obj-y += lockcnt.o
+util-obj-y += iov.o
+util-obj-y += iova-tree.o
+util-obj-y += hbitmap.o
+util-obj-y += main-loop.o
+util-obj-y += nvdimm-utils.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 += qemu-co-shared-resource.o
+util-obj-y += qemu-sockets.o
+util-obj-y += qemu-timer.o
+util-obj-y += thread-pool.o
+util-obj-y += throttle.o
+util-obj-y += timed-average.o
+util-obj-y += uri.o
+
+util-obj-$(CONFIG_LINUX) += vfio-helpers.o
+util-obj-$(CONFIG_INOTIFY1) += filemonitor-inotify.o
+util-obj-$(call lnot,$(CONFIG_INOTIFY1)) += filemonitor-stub.o
+util-obj-$(CONFIG_BLOCK) += readline.o
+
+endif # CONFIG_SOFTMMU || CONFIG_TOOLS
-- 
2.26.2



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

* [PULL 12/19] stubs/Makefile: Reduce the user-mode object list
  2020-06-05 11:46 [PULL 00/19] Linux user for 5.1 patches Laurent Vivier
                   ` (10 preceding siblings ...)
  2020-06-05 11:46 ` [PULL 11/19] util/Makefile: Reduce the user-mode object list Laurent Vivier
@ 2020-06-05 11:46 ` Laurent Vivier
  2020-06-05 11:46 ` [PULL 13/19] target/riscv/cpu: Restrict CPU migration to system-mode Laurent Vivier
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-06-05 11:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: Richard Henderson, Riku Voipio, Philippe Mathieu-Daudé,
	Laurent Vivier

From: Philippe Mathieu-Daudé <philmd@redhat.com>

These stubs are not required when configured with --disable-system.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Tested-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200522172510.25784-7-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 stubs/Makefile.objs | 50 ++++++++++++++++++++++++++-------------------
 1 file changed, 29 insertions(+), 21 deletions(-)

diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs
index 6a9e3135e8f9..f54125de317d 100644
--- a/stubs/Makefile.objs
+++ b/stubs/Makefile.objs
@@ -1,47 +1,55 @@
-stub-obj-y += arch_type.o
-stub-obj-y += bdrv-next-monitor-owned.o
 stub-obj-y += blk-commit-all.o
-stub-obj-y += blockdev-close-all-bdrv-states.o
-stub-obj-y += clock-warp.o
 stub-obj-y += cpu-get-clock.o
 stub-obj-y += cpu-get-icount.o
 stub-obj-y += dump.o
 stub-obj-y += error-printf.o
 stub-obj-y += fdset.o
 stub-obj-y += gdbstub.o
-stub-obj-y += get-vm-name.o
-stub-obj-y += iothread.o
 stub-obj-y += iothread-lock.o
 stub-obj-y += is-daemonized.o
 stub-obj-$(CONFIG_LINUX_AIO) += linux-aio.o
 stub-obj-$(CONFIG_LINUX_IO_URING) += io_uring.o
-stub-obj-y += machine-init-done.o
-stub-obj-y += migr-blocker.o
-stub-obj-y += change-state-handler.o
-stub-obj-y += monitor.o
 stub-obj-y += monitor-core.o
 stub-obj-y += notify-event.o
+stub-obj-y += qmp_memory_device.o
 stub-obj-y += qtest.o
+stub-obj-y += ramfb.o
 stub-obj-y += replay.o
-stub-obj-y += replay-user.o
 stub-obj-y += runstate-check.o
+stub-obj-$(CONFIG_SOFTMMU) += semihost.o
 stub-obj-y += set-fd-handler.o
+stub-obj-y += vmgenid.o
 stub-obj-y += sysbus.o
 stub-obj-y += tpm.o
 stub-obj-y += trace-control.o
-stub-obj-y += uuid.o
-stub-obj-y += vm-stop.o
 stub-obj-y += vmstate.o
 stub-obj-y += win32-kbd-hook.o
+
+#######################################################################
+# code used by both qemu system emulation and qemu-img
+
+ifeq ($(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS)),y)
+
+stub-obj-y += arch_type.o
+stub-obj-y += bdrv-next-monitor-owned.o
+stub-obj-y += blockdev-close-all-bdrv-states.o
+stub-obj-y += change-state-handler.o
+stub-obj-y += clock-warp.o
 stub-obj-y += fd-register.o
-stub-obj-y += qmp_memory_device.o
-stub-obj-y += target-monitor-defs.o
+stub-obj-y += fw_cfg.o
+stub-obj-y += get-vm-name.o
+stub-obj-y += iothread.o
+stub-obj-y += machine-init-done.o
+stub-obj-y += migr-blocker.o
+stub-obj-y += monitor.o
+stub-obj-y += pci-host-piix.o
+stub-obj-y += ram-block.o
+stub-obj-y += replay-user.o
 stub-obj-y += target-get-monitor-def.o
-stub-obj-y += vmgenid.o
+stub-obj-y += target-monitor-defs.o
+stub-obj-y += uuid.o
+stub-obj-y += vm-stop.o
 stub-obj-y += xen-common.o
 stub-obj-y += xen-hvm.o
-stub-obj-y += pci-host-piix.o
-stub-obj-y += ram-block.o
-stub-obj-y += ramfb.o
-stub-obj-y += fw_cfg.o
-stub-obj-$(CONFIG_SOFTMMU) += semihost.o
+
+endif # CONFIG_SOFTMMU || CONFIG_TOOLS
-- 
2.26.2



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

* [PULL 13/19] target/riscv/cpu: Restrict CPU migration to system-mode
  2020-06-05 11:46 [PULL 00/19] Linux user for 5.1 patches Laurent Vivier
                   ` (11 preceding siblings ...)
  2020-06-05 11:46 ` [PULL 12/19] stubs/Makefile: " Laurent Vivier
@ 2020-06-05 11:46 ` Laurent Vivier
  2020-06-05 11:46 ` [PULL 14/19] exec: Assert CPU migration is not used on user-only build Laurent Vivier
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-06-05 11:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alistair Francis, Richard Henderson, Riku Voipio,
	Philippe Mathieu-Daudé,
	Laurent Vivier

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Tested-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200522172510.25784-8-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 target/riscv/cpu.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index 059d71f2c715..6c78337858ad 100644
--- a/target/riscv/cpu.c
+++ b/target/riscv/cpu.c
@@ -485,10 +485,12 @@ static void riscv_cpu_init(Object *obj)
     cpu_set_cpustate_pointers(cpu);
 }
 
+#ifndef CONFIG_USER_ONLY
 static const VMStateDescription vmstate_riscv_cpu = {
     .name = "cpu",
     .unmigratable = 1,
 };
+#endif
 
 static Property riscv_cpu_properties[] = {
     DEFINE_PROP_BOOL("i", RISCVCPU, cfg.ext_i, true),
@@ -544,13 +546,13 @@ static void riscv_cpu_class_init(ObjectClass *c, void *data)
     cc->do_transaction_failed = riscv_cpu_do_transaction_failed;
     cc->do_unaligned_access = riscv_cpu_do_unaligned_access;
     cc->get_phys_page_debug = riscv_cpu_get_phys_page_debug;
+    /* For now, mark unmigratable: */
+    cc->vmsd = &vmstate_riscv_cpu;
 #endif
 #ifdef CONFIG_TCG
     cc->tcg_initialize = riscv_translate_init;
     cc->tlb_fill = riscv_cpu_tlb_fill;
 #endif
-    /* For now, mark unmigratable: */
-    cc->vmsd = &vmstate_riscv_cpu;
     device_class_set_props(dc, riscv_cpu_properties);
 }
 
-- 
2.26.2



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

* [PULL 14/19] exec: Assert CPU migration is not used on user-only build
  2020-06-05 11:46 [PULL 00/19] Linux user for 5.1 patches Laurent Vivier
                   ` (12 preceding siblings ...)
  2020-06-05 11:46 ` [PULL 13/19] target/riscv/cpu: Restrict CPU migration to system-mode Laurent Vivier
@ 2020-06-05 11:46 ` Laurent Vivier
  2020-06-05 11:46 ` [PULL 15/19] arch_init: Remove unused 'qapi-commands-misc.h' include Laurent Vivier
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-06-05 11:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: Richard Henderson, Alistair Francis, Riku Voipio,
	Philippe Mathieu-Daudé,
	Laurent Vivier

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Tested-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200522172510.25784-9-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 exec.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/exec.c b/exec.c
index 5162f0d12f99..6dfd314469de 100644
--- a/exec.c
+++ b/exec.c
@@ -946,7 +946,9 @@ void cpu_exec_realizefn(CPUState *cpu, Error **errp)
 
     qemu_plugin_vcpu_init_hook(cpu);
 
-#ifndef CONFIG_USER_ONLY
+#ifdef CONFIG_USER_ONLY
+    assert(cc->vmsd == NULL);
+#else /* !CONFIG_USER_ONLY */
     if (qdev_get_vmsd(DEVICE(cpu)) == NULL) {
         vmstate_register(NULL, cpu->cpu_index, &vmstate_cpu_common, cpu);
     }
-- 
2.26.2



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

* [PULL 15/19] arch_init: Remove unused 'qapi-commands-misc.h' include
  2020-06-05 11:46 [PULL 00/19] Linux user for 5.1 patches Laurent Vivier
                   ` (13 preceding siblings ...)
  2020-06-05 11:46 ` [PULL 14/19] exec: Assert CPU migration is not used on user-only build Laurent Vivier
@ 2020-06-05 11:46 ` Laurent Vivier
  2020-06-05 11:46 ` [PULL 16/19] target/i386: Restrict CpuClass::get_crash_info() to system-mode Laurent Vivier
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-06-05 11:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alistair Francis, Richard Henderson, Riku Voipio,
	Philippe Mathieu-Daudé,
	Laurent Vivier

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Commit ffaee83bcb2 moved qmp_query_target but forgot to remove
this include.

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Tested-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200522172510.25784-10-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 arch_init.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch_init.c b/arch_init.c
index d9eb0ec1dd03..8afea4748bad 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -27,7 +27,6 @@
 #include "sysemu/arch_init.h"
 #include "hw/pci/pci.h"
 #include "hw/audio/soundhw.h"
-#include "qapi/qapi-commands-misc.h"
 #include "qapi/error.h"
 #include "qemu/config-file.h"
 #include "qemu/error-report.h"
-- 
2.26.2



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

* [PULL 16/19] target/i386: Restrict CpuClass::get_crash_info() to system-mode
  2020-06-05 11:46 [PULL 00/19] Linux user for 5.1 patches Laurent Vivier
                   ` (14 preceding siblings ...)
  2020-06-05 11:46 ` [PULL 15/19] arch_init: Remove unused 'qapi-commands-misc.h' include Laurent Vivier
@ 2020-06-05 11:46 ` Laurent Vivier
  2020-06-05 11:46 ` [PULL 17/19] target/s390x: " Laurent Vivier
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-06-05 11:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: Richard Henderson, Riku Voipio, Philippe Mathieu-Daudé,
	Laurent Vivier

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Tested-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200522172510.25784-11-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 target/i386/cpu.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 7a4a8e3847f0..dd31c1de5f2b 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -6843,6 +6843,7 @@ static void x86_cpu_register_feature_bit_props(X86CPU *cpu,
     x86_cpu_register_bit_prop(cpu, name, w, bitnr);
 }
 
+#if !defined(CONFIG_USER_ONLY)
 static GuestPanicInformation *x86_cpu_get_crash_info(CPUState *cs)
 {
     X86CPU *cpu = X86_CPU(cs);
@@ -6886,6 +6887,7 @@ static void x86_cpu_get_crash_info_qom(Object *obj, Visitor *v,
                                      errp);
     qapi_free_GuestPanicInformation(panic_info);
 }
+#endif /* !CONFIG_USER_ONLY */
 
 static void x86_cpu_initfn(Object *obj)
 {
@@ -6932,8 +6934,10 @@ static void x86_cpu_initfn(Object *obj)
                         x86_cpu_get_unavailable_features,
                         NULL, NULL, NULL);
 
+#if !defined(CONFIG_USER_ONLY)
     object_property_add(obj, "crash-information", "GuestPanicInformation",
                         x86_cpu_get_crash_info_qom, NULL, NULL, NULL);
+#endif
 
     for (w = 0; w < FEATURE_WORDS; w++) {
         int bitnr;
@@ -7245,7 +7249,6 @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data)
     cc->cpu_exec_interrupt = x86_cpu_exec_interrupt;
 #endif
     cc->dump_state = x86_cpu_dump_state;
-    cc->get_crash_info = x86_cpu_get_crash_info;
     cc->set_pc = x86_cpu_set_pc;
     cc->synchronize_from_tb = x86_cpu_synchronize_from_tb;
     cc->gdb_read_register = x86_cpu_gdb_read_register;
@@ -7256,6 +7259,7 @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data)
     cc->asidx_from_attrs = x86_asidx_from_attrs;
     cc->get_memory_mapping = x86_cpu_get_memory_mapping;
     cc->get_phys_page_attrs_debug = x86_cpu_get_phys_page_attrs_debug;
+    cc->get_crash_info = x86_cpu_get_crash_info;
     cc->write_elf64_note = x86_cpu_write_elf64_note;
     cc->write_elf64_qemunote = x86_cpu_write_elf64_qemunote;
     cc->write_elf32_note = x86_cpu_write_elf32_note;
-- 
2.26.2



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

* [PULL 17/19] target/s390x: Restrict CpuClass::get_crash_info() to system-mode
  2020-06-05 11:46 [PULL 00/19] Linux user for 5.1 patches Laurent Vivier
                   ` (15 preceding siblings ...)
  2020-06-05 11:46 ` [PULL 16/19] target/i386: Restrict CpuClass::get_crash_info() to system-mode Laurent Vivier
@ 2020-06-05 11:46 ` Laurent Vivier
  2020-06-05 11:46 ` [PULL 18/19] hw/core: " Laurent Vivier
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-06-05 11:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: Richard Henderson, Riku Voipio, Philippe Mathieu-Daudé,
	Laurent Vivier, Cornelia Huck

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Tested-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200522172510.25784-12-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 target/s390x/cpu.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
index ca50b7045198..08eb674d22b4 100644
--- a/target/s390x/cpu.c
+++ b/target/s390x/cpu.c
@@ -247,6 +247,7 @@ out:
     error_propagate(errp, err);
 }
 
+#if !defined(CONFIG_USER_ONLY)
 static GuestPanicInformation *s390_cpu_get_crash_info(CPUState *cs)
 {
     GuestPanicInformation *panic_info;
@@ -256,11 +257,7 @@ static GuestPanicInformation *s390_cpu_get_crash_info(CPUState *cs)
     panic_info = g_malloc0(sizeof(GuestPanicInformation));
 
     panic_info->type = GUEST_PANIC_INFORMATION_TYPE_S390;
-#if !defined(CONFIG_USER_ONLY)
     panic_info->u.s390.core = cpu->env.core_id;
-#else
-    panic_info->u.s390.core = 0; /* sane default for non system emulation */
-#endif
     panic_info->u.s390.psw_mask = cpu->env.psw.mask;
     panic_info->u.s390.psw_addr = cpu->env.psw.addr;
     panic_info->u.s390.reason = cpu->env.crash_reason;
@@ -286,6 +283,7 @@ static void s390_cpu_get_crash_info_qom(Object *obj, Visitor *v,
                                      errp);
     qapi_free_GuestPanicInformation(panic_info);
 }
+#endif
 
 static void s390_cpu_initfn(Object *obj)
 {
@@ -295,16 +293,16 @@ static void s390_cpu_initfn(Object *obj)
     cpu_set_cpustate_pointers(cpu);
     cs->halted = 1;
     cs->exception_index = EXCP_HLT;
+#if !defined(CONFIG_USER_ONLY)
     object_property_add(obj, "crash-information", "GuestPanicInformation",
                         s390_cpu_get_crash_info_qom, NULL, NULL, NULL);
-    s390_cpu_model_register_props(obj);
-#if !defined(CONFIG_USER_ONLY)
     cpu->env.tod_timer =
         timer_new_ns(QEMU_CLOCK_VIRTUAL, s390x_tod_timer, cpu);
     cpu->env.cpu_timer =
         timer_new_ns(QEMU_CLOCK_VIRTUAL, s390x_cpu_timer, cpu);
     s390_cpu_set_state(S390_CPU_STATE_STOPPED, cpu);
 #endif
+    s390_cpu_model_register_props(obj);
 }
 
 static void s390_cpu_finalize(Object *obj)
@@ -488,13 +486,13 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data)
     cc->do_interrupt = s390_cpu_do_interrupt;
 #endif
     cc->dump_state = s390_cpu_dump_state;
-    cc->get_crash_info = s390_cpu_get_crash_info;
     cc->set_pc = s390_cpu_set_pc;
     cc->gdb_read_register = s390_cpu_gdb_read_register;
     cc->gdb_write_register = s390_cpu_gdb_write_register;
 #ifndef CONFIG_USER_ONLY
     cc->get_phys_page_debug = s390_cpu_get_phys_page_debug;
     cc->vmsd = &vmstate_s390_cpu;
+    cc->get_crash_info = s390_cpu_get_crash_info;
     cc->write_elf64_note = s390_cpu_write_elf64_note;
 #ifdef CONFIG_TCG
     cc->cpu_exec_interrupt = s390_cpu_exec_interrupt;
-- 
2.26.2



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

* [PULL 18/19] hw/core: Restrict CpuClass::get_crash_info() to system-mode
  2020-06-05 11:46 [PULL 00/19] Linux user for 5.1 patches Laurent Vivier
                   ` (16 preceding siblings ...)
  2020-06-05 11:46 ` [PULL 17/19] target/s390x: " Laurent Vivier
@ 2020-06-05 11:46 ` Laurent Vivier
  2020-06-05 11:47 ` [PULL 19/19] stubs: Restrict ui/win32-kbd-hook " Laurent Vivier
  2020-06-05 16:45 ` [PULL 00/19] Linux user for 5.1 patches Peter Maydell
  19 siblings, 0 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-06-05 11:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: Richard Henderson, Riku Voipio, Philippe Mathieu-Daudé,
	Laurent Vivier

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Tested-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200522172510.25784-13-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/core/cpu.c         | 2 ++
 include/hw/core/cpu.h | 7 ++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/hw/core/cpu.c b/hw/core/cpu.c
index 5284d384fb6b..f31ec48ee61e 100644
--- a/hw/core/cpu.c
+++ b/hw/core/cpu.c
@@ -209,6 +209,7 @@ static bool cpu_common_exec_interrupt(CPUState *cpu, int int_req)
     return false;
 }
 
+#if !defined(CONFIG_USER_ONLY)
 GuestPanicInformation *cpu_get_crash_info(CPUState *cpu)
 {
     CPUClass *cc = CPU_GET_CLASS(cpu);
@@ -219,6 +220,7 @@ GuestPanicInformation *cpu_get_crash_info(CPUState *cpu)
     }
     return res;
 }
+#endif
 
 void cpu_dump_state(CPUState *cpu, FILE *f, int flags)
 {
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index 07f769815502..497600c49efa 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -490,6 +490,8 @@ bool cpu_paging_enabled(const CPUState *cpu);
 void cpu_get_memory_mapping(CPUState *cpu, MemoryMappingList *list,
                             Error **errp);
 
+#if !defined(CONFIG_USER_ONLY)
+
 /**
  * cpu_write_elf64_note:
  * @f: pointer to a function that writes memory to a file
@@ -539,6 +541,8 @@ int cpu_write_elf32_qemunote(WriteCoreDumpFunction f, CPUState *cpu,
  */
 GuestPanicInformation *cpu_get_crash_info(CPUState *cpu);
 
+#endif /* !CONFIG_USER_ONLY */
+
 /**
  * CPUDumpFlags:
  * @CPU_DUMP_CODE:
@@ -632,7 +636,8 @@ static inline int cpu_asidx_from_attrs(CPUState *cpu, MemTxAttrs attrs)
     }
     return ret;
 }
-#endif
+
+#endif /* CONFIG_USER_ONLY */
 
 /**
  * cpu_list_add:
-- 
2.26.2



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

* [PULL 19/19] stubs: Restrict ui/win32-kbd-hook to system-mode
  2020-06-05 11:46 [PULL 00/19] Linux user for 5.1 patches Laurent Vivier
                   ` (17 preceding siblings ...)
  2020-06-05 11:46 ` [PULL 18/19] hw/core: " Laurent Vivier
@ 2020-06-05 11:47 ` Laurent Vivier
  2020-06-05 16:45 ` [PULL 00/19] Linux user for 5.1 patches Peter Maydell
  19 siblings, 0 replies; 25+ messages in thread
From: Laurent Vivier @ 2020-06-05 11:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: Richard Henderson, Riku Voipio, Philippe Mathieu-Daudé,
	Laurent Vivier

From: Philippe Mathieu-Daudé <philmd@redhat.com>

In Makefile.objs, the ui/ directory is restricted to system-mode:

 43 ifeq ($(CONFIG_SOFTMMU),y)
 ...
 65 common-obj-y += ui/
 66 common-obj-m += ui/
 ...
 82 endif # CONFIG_SOFTMMU

Restrict the ui/ stub added in commit 2df9f5718df to only build
it for system-mode emulation.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200522172510.25784-14-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 stubs/Makefile.objs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs
index f54125de317d..c1e43ac68f87 100644
--- a/stubs/Makefile.objs
+++ b/stubs/Makefile.objs
@@ -23,7 +23,7 @@ stub-obj-y += sysbus.o
 stub-obj-y += tpm.o
 stub-obj-y += trace-control.o
 stub-obj-y += vmstate.o
-stub-obj-y += win32-kbd-hook.o
+stub-obj-$(CONFIG_SOFTMMU) += win32-kbd-hook.o
 
 #######################################################################
 # code used by both qemu system emulation and qemu-img
-- 
2.26.2



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

* Re: [PULL 00/19] Linux user for 5.1 patches
  2020-06-05 11:46 [PULL 00/19] Linux user for 5.1 patches Laurent Vivier
                   ` (18 preceding siblings ...)
  2020-06-05 11:47 ` [PULL 19/19] stubs: Restrict ui/win32-kbd-hook " Laurent Vivier
@ 2020-06-05 16:45 ` Peter Maydell
  2020-06-05 19:20   ` Laurent Vivier
  19 siblings, 1 reply; 25+ messages in thread
From: Peter Maydell @ 2020-06-05 16:45 UTC (permalink / raw)
  To: Laurent Vivier; +Cc: Riku Voipio, QEMU Developers

On Fri, 5 Jun 2020 at 12:48, Laurent Vivier <laurent@vivier.eu> wrote:
>
> The following changes since commit ddc760832fa8cf5e93b9d9e6e854a5114ac63510:
>
>   Merge remote-tracking branch 'remotes/gkurz/tags/9p-next-2020-05-26' into s=
> taging (2020-05-26 14:05:53 +0100)
>
> are available in the Git repository at:
>
>   git://github.com/vivier/qemu.git tags/linux-user-for-5.1-pull-request
>
> for you to fetch changes up to aa3d2045d4ca760bd8c22935a2d73ee4f3480bd5:
>
>   stubs: Restrict ui/win32-kbd-hook to system-mode (2020-06-05 11:36:00 +0200)
>
> ----------------------------------------------------------------
> linux-user pull request 20200605
>
> Implement F_OFD_ fcntl() command, /proc/cpuinfo for hppa
> Fix socket(), prnctl() error codes, underflow in target_mremap,
>     epoll_create() strace, oldumount for alpha
> User-mode build dependencies improvement
>
> ----------------------------------------------------------------

Hi; this failed to compile on s390 and ppc when building hppa-linux-user:

/home/ubuntu/qemu/linux-user/syscall.c: In function ‘do_openat’:
/home/ubuntu/qemu/linux-user/syscall.c:7484:42: error: ‘is_proc’
undeclared (first use in this function); did you mean ‘
is_error’?
         { "/proc/cpuinfo", open_cpuinfo, is_proc },
                                          ^~~~~~~
                                          is_error
/home/ubuntu/qemu/linux-user/syscall.c:7484:42: note: each undeclared
identifier is reported only once for each function
 it appears in
/home/ubuntu/qemu/rules.mak:69: recipe for target 'linux-user/syscall.o' failed

Looks like this is because the #if condition guarding the
is_proc() definition doesn't line up with the uses (missing
a check on TARGET_HPPA).

thanks
-- PMM


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

* Re: [PULL 00/19] Linux user for 5.1 patches
  2020-06-05 16:45 ` [PULL 00/19] Linux user for 5.1 patches Peter Maydell
@ 2020-06-05 19:20   ` Laurent Vivier
  2020-06-05 20:32     ` Peter Maydell
  0 siblings, 1 reply; 25+ messages in thread
From: Laurent Vivier @ 2020-06-05 19:20 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Riku Voipio, QEMU Developers

Le 05/06/2020 à 18:45, Peter Maydell a écrit :
> On Fri, 5 Jun 2020 at 12:48, Laurent Vivier <laurent@vivier.eu> wrote:
>>
>> The following changes since commit ddc760832fa8cf5e93b9d9e6e854a5114ac63510:
>>
>>   Merge remote-tracking branch 'remotes/gkurz/tags/9p-next-2020-05-26' into s=
>> taging (2020-05-26 14:05:53 +0100)
>>
>> are available in the Git repository at:
>>
>>   git://github.com/vivier/qemu.git tags/linux-user-for-5.1-pull-request
>>
>> for you to fetch changes up to aa3d2045d4ca760bd8c22935a2d73ee4f3480bd5:
>>
>>   stubs: Restrict ui/win32-kbd-hook to system-mode (2020-06-05 11:36:00 +0200)
>>
>> ----------------------------------------------------------------
>> linux-user pull request 20200605
>>
>> Implement F_OFD_ fcntl() command, /proc/cpuinfo for hppa
>> Fix socket(), prnctl() error codes, underflow in target_mremap,
>>     epoll_create() strace, oldumount for alpha
>> User-mode build dependencies improvement
>>
>> ----------------------------------------------------------------
> 
> Hi; this failed to compile on s390 and ppc when building hppa-linux-user:
> 
> /home/ubuntu/qemu/linux-user/syscall.c: In function ‘do_openat’:
> /home/ubuntu/qemu/linux-user/syscall.c:7484:42: error: ‘is_proc’
> undeclared (first use in this function); did you mean ‘
> is_error’?
>          { "/proc/cpuinfo", open_cpuinfo, is_proc },
>                                           ^~~~~~~
>                                           is_error
> /home/ubuntu/qemu/linux-user/syscall.c:7484:42: note: each undeclared
> identifier is reported only once for each function
>  it appears in
> /home/ubuntu/qemu/rules.mak:69: recipe for target 'linux-user/syscall.o' failed
> 
> Looks like this is because the #if condition guarding the
> is_proc() definition doesn't line up with the uses (missing
> a check on TARGET_HPPA).

You're right.

I was thinking this kind of problem would be detected by the travis-ci
builds, but in fact ppc64 and s390 builds don't build other architecture
linux-user targets.

I update my PR.

Thanks,
Laurent


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

* Re: [PULL 00/19] Linux user for 5.1 patches
  2020-06-05 19:20   ` Laurent Vivier
@ 2020-06-05 20:32     ` Peter Maydell
  2020-06-05 21:48       ` Richard Henderson
  0 siblings, 1 reply; 25+ messages in thread
From: Peter Maydell @ 2020-06-05 20:32 UTC (permalink / raw)
  To: Laurent Vivier, Alex Bennée; +Cc: Riku Voipio, QEMU Developers

On Fri, 5 Jun 2020 at 20:20, Laurent Vivier <laurent@vivier.eu> wrote:
> I was thinking this kind of problem would be detected by the travis-ci
> builds, but in fact ppc64 and s390 builds don't build other architecture
> linux-user targets.

That's an unfortunate gap in the CI -- we should ideally cover
the whole tree with at least one big-endian platform.

thanks
-- PMM


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

* Re: [PULL 00/19] Linux user for 5.1 patches
  2020-06-05 20:32     ` Peter Maydell
@ 2020-06-05 21:48       ` Richard Henderson
  2020-06-08  5:05         ` Thomas Huth
  0 siblings, 1 reply; 25+ messages in thread
From: Richard Henderson @ 2020-06-05 21:48 UTC (permalink / raw)
  To: Peter Maydell, Laurent Vivier, Alex Bennée
  Cc: Riku Voipio, QEMU Developers

On 6/5/20 1:32 PM, Peter Maydell wrote:
> On Fri, 5 Jun 2020 at 20:20, Laurent Vivier <laurent@vivier.eu> wrote:
>> I was thinking this kind of problem would be detected by the travis-ci
>> builds, but in fact ppc64 and s390 builds don't build other architecture
>> linux-user targets.
> 
> That's an unfortunate gap in the CI -- we should ideally cover
> the whole tree with at least one big-endian platform.

Indeed.  Hopefully we can do this with our pending gitlab setup.

For travis, IIRC we only build this restricted set because we had problems with
timeouts on those machines.


r~


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

* Re: [PULL 00/19] Linux user for 5.1 patches
  2020-06-05 21:48       ` Richard Henderson
@ 2020-06-08  5:05         ` Thomas Huth
  0 siblings, 0 replies; 25+ messages in thread
From: Thomas Huth @ 2020-06-08  5:05 UTC (permalink / raw)
  To: Richard Henderson, Peter Maydell, Laurent Vivier, Alex Bennée
  Cc: Riku Voipio, QEMU Developers

On 05/06/2020 23.48, Richard Henderson wrote:
> On 6/5/20 1:32 PM, Peter Maydell wrote:
>> On Fri, 5 Jun 2020 at 20:20, Laurent Vivier <laurent@vivier.eu> wrote:
>>> I was thinking this kind of problem would be detected by the travis-ci
>>> builds, but in fact ppc64 and s390 builds don't build other architecture
>>> linux-user targets.
>>
>> That's an unfortunate gap in the CI -- we should ideally cover
>> the whole tree with at least one big-endian platform.
> 
> Indeed.  Hopefully we can do this with our pending gitlab setup.
> 
> For travis, IIRC we only build this restricted set because we had problems with
> timeouts on those machines.

Right. But we could add one more tests with
--target-list-exclude=${MAIN_SOFTMMU_TARGETS} --enable-user in Travis
... I'll have a look...

 Thomas



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

end of thread, other threads:[~2020-06-08  5:06 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-05 11:46 [PULL 00/19] Linux user for 5.1 patches Laurent Vivier
2020-06-05 11:46 ` [PULL 01/19] linux-user, alpha: fix oldumount syscall Laurent Vivier
2020-06-05 11:46 ` [PULL 02/19] linux-user: return target error codes for socket() and prctl() Laurent Vivier
2020-06-05 11:46 ` [PULL 03/19] linux-user: Add support for /proc/cpuinfo on hppa platform Laurent Vivier
2020-06-05 11:46 ` [PULL 04/19] linux-user/strace.list: fix epoll_create{, 1} -strace output Laurent Vivier
2020-06-05 11:46 ` [PULL 05/19] linux-user/mmap.c: fix integer underflow in target_mremap Laurent Vivier
2020-06-05 11:46 ` [PULL 06/19] linux-user: implement OFD locks Laurent Vivier
2020-06-05 11:46 ` [PULL 07/19] Makefile: Only build virtiofsd if system-mode is enabled Laurent Vivier
2020-06-05 11:46 ` [PULL 08/19] configure: Avoid building TCG when not needed Laurent Vivier
2020-06-05 11:46 ` [PULL 09/19] tests/Makefile: Only display TCG-related tests when TCG is available Laurent Vivier
2020-06-05 11:46 ` [PULL 10/19] tests/Makefile: Restrict some softmmu-only tests Laurent Vivier
2020-06-05 11:46 ` [PULL 11/19] util/Makefile: Reduce the user-mode object list Laurent Vivier
2020-06-05 11:46 ` [PULL 12/19] stubs/Makefile: " Laurent Vivier
2020-06-05 11:46 ` [PULL 13/19] target/riscv/cpu: Restrict CPU migration to system-mode Laurent Vivier
2020-06-05 11:46 ` [PULL 14/19] exec: Assert CPU migration is not used on user-only build Laurent Vivier
2020-06-05 11:46 ` [PULL 15/19] arch_init: Remove unused 'qapi-commands-misc.h' include Laurent Vivier
2020-06-05 11:46 ` [PULL 16/19] target/i386: Restrict CpuClass::get_crash_info() to system-mode Laurent Vivier
2020-06-05 11:46 ` [PULL 17/19] target/s390x: " Laurent Vivier
2020-06-05 11:46 ` [PULL 18/19] hw/core: " Laurent Vivier
2020-06-05 11:47 ` [PULL 19/19] stubs: Restrict ui/win32-kbd-hook " Laurent Vivier
2020-06-05 16:45 ` [PULL 00/19] Linux user for 5.1 patches Peter Maydell
2020-06-05 19:20   ` Laurent Vivier
2020-06-05 20:32     ` Peter Maydell
2020-06-05 21:48       ` Richard Henderson
2020-06-08  5:05         ` Thomas Huth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.