Misc patches for 2019-01-21
The following changes since commit 8b7a3e1e5434b55d7710071b00af97c7086cab7a:
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2019-01-24 15:04:47 +0000)
are available in the git repository at:
git://github.com/bonzini/qemu.git tags/for-upstream
for you to fetch changes up to 357c846440e9423b11f815cbf32441651e4f4835:
docker: adjust Xen repository for CentOS 7 (2019-01-25 14:38:08 +0100)
----------------------------------------------------------------
* cpu-exec fixes (Emilio, Laurent)
* high address load for linuxboot (Zhijian)
* PVH support (Liam, Stefano)
* Linux header update (Paolo)
* enable vhost-net for all targets that have virtio-net (Paolo)
* vhost-user-test cleanups (Paolo)
* misc i386 changes (Paolo, Robert)
* hexloader-test change to avoid O_NONBLOCK on stdin (Peter)
* configure tweak for openpty (Thomas)
* elf2dmp port to Windows (Viktor)
----------------------------------------------------------------
Shooting a bit in the dark, but this should hopefully fix the macOS failure.
Emilio G. Cota (2):
cpu-exec: add assert_no_pages_locked() after longjmp
cpu-exec: reset BQL after longjmp in cpu_exec_step_atomic
Laurent Vivier (1):
cpus: ignore ESRCH in qemu_cpu_kick_thread()
Li Zhijian (4):
unify len and addr type for memory/address APIs hw/core/loader.c: Read as long as possible in load_image_size()
i386: import & use bootparam.h
i386: allow to load initrd below 4 GB for recent linux
Liam Merwick (4):
elf: Add optional function ptr to load_elf() to parse ELF notes elf-ops.h: Add get_elf_note_type()
pvh: Add x86/HVM direct boot ABI header file
pvh: Boot uncompressed kernel using direct boot ABI
Paolo Bonzini (23):
scripts/update-linux-headers.sh: adjust for Linux 4.21-rc1 (or 5.0-rc1)
include: update Linux headers to 4.21-rc1/5.0-rc1
vhost-net: move stubs to a separate file
vhost-net-user: add stubs for when no virtio-net device is present
vhost: restrict Linux dependency to kernel vhost
vhost-net: compile it on all targets that have virtio-net.
vhost-net: revamp configure logic
vhost-user-test: use g_cond_broadcast
vhost-user-test: signal data_cond when s->rings changes
vhost-user: support cross-endian vnet headers
vhost-user-test: support VHOST_USER_PROTOCOL_F_CROSS_ENDIAN
vhost-user-test: skip if there is no memory at address 0
vhost-user-test: reduce usage of global_qtest
vhost-user-test: create a main loop per TestServer
vhost-user-test: small changes to init_hugepagefs
vhost-user-test: create a temporary directory per TestServer
tap: flush STDOUT on newline
i386: remove the 'INTEL_PT' CPUID bit from named CPU models
target-i386: hvf: remove MPX support
monitor: do not use QTAILQ_FOREACH_SAFE across critical sections
crypto: finish removing TABs
ui: vnc: finish removing TABs
docker: adjust Xen repository for CentOS 7
Robert Hoo (2):
i386: remove the new CPUID 'PCONFIG' from Icelake-Server CPU model Revert "i386: Add CPUID bit for PCONFIG"
Stefano Garzarella (7):
pvh: load initrd and expose it through fw_cfg
linuxboot_dma: remove duplicate definitions of FW_CFG
linuxboot_dma: move common functions in a new header
optionrom: add new PVH option rom hw/i386/pc: use PVH option rom optionrom/pvh: load initrd from fw_cfg hw/i386/pc: enable PVH only for machine type >= 4.0
Thomas Huth (1):
configure: Add a proper check for openpty() in libutil
Viktor Prutyanov (6):
contrib/elf2dmp: fix elf.h including contrib/elf2dmp: use GLib in ELF processing contrib/elf2dmp: use GLib in PDB processing contrib/elf2dmp: fix structures definitions contrib/elf2dmp: fix printf format
configure: enable elf2dmp build for Windows hosts
.gitignore | 4 + Makefile | 6 +- accel/tcg/cpu-exec.c | 4 + backends/Makefile.objs | 5 +- configure | 118 ++- contrib/elf2dmp/kdbg.h | 12 +- contrib/elf2dmp/main.c | 27 +- contrib/elf2dmp/pdb.c | 33 +- contrib/elf2dmp/pdb.h | 4 +- contrib/elf2dmp/pe.h | 6 +- contrib/elf2dmp/qemu_elf.c | 27 +- contrib/elf2dmp/qemu_elf.h | 10 +- cpus.c | 2 +- crypto/aes.c | 414 ++++---- crypto/desrfb.c | 594 +++++------ default-configs/virtio.mak | 4 +- exec.c | 47 +- hw/alpha/dp264.c | 4 +- hw/arm/armv7m.c | 3 +- hw/arm/boot.c | 2 +- hw/core/generic-loader.c | 2 +- hw/core/loader.c | 35 +- hw/cris/boot.c | 3 +- hw/hppa/machine.c | 6 +- hw/i386/multiboot.c | 2 +- hw/i386/pc.c | 191 +++- hw/i386/pc_piix.c | 3 + hw/i386/pc_q35.c | 3 + hw/lm32/lm32_boards.c | 6 +- hw/lm32/milkymist.c | 3 +- hw/m68k/an5206.c | 2 +- hw/m68k/mcf5208.c | 2 +- hw/microblaze/boot.c | 7 +- hw/mips/mips_fulong2e.c | 5 +- hw/mips/mips_malta.c | 5 +- hw/mips/mips_mipssim.c | 5 +- hw/mips/mips_r4k.c | 5 +- hw/moxie/moxiesim.c | 2 +- hw/net/Makefile.objs | 4 +- hw/net/vhost_net-stub.c | 92 ++ hw/net/vhost_net.c | 85 +- hw/nios2/boot.c | 7 +- hw/openrisc/openrisc_sim.c | 2 +- hw/pci-host/prep.c | 2 +- hw/ppc/e500.c | 3 +- hw/ppc/mac_newworld.c | 5 +- hw/ppc/mac_oldworld.c | 5 +- hw/ppc/ppc440_bamboo.c | 2 +- hw/ppc/sam460ex.c | 3 +- hw/ppc/spapr.c | 7 +- hw/ppc/virtex_ml507.c | 2 +- hw/riscv/sifive_e.c | 2 +- hw/riscv/sifive_u.c | 2 +- hw/riscv/spike.c | 2 +- hw/riscv/virt.c | 2 +- hw/s390x/ipl.c | 9 +- hw/sparc/leon3.c | 3 +- hw/sparc/sun4m.c | 6 +- hw/sparc64/sun4u.c | 4 +- hw/tricore/tricore_testboard.c | 2 +- hw/virtio/Makefile.objs | 8 +- hw/virtio/vhost-backend.c | 12 +- hw/virtio/vhost-user.c | 13 +- hw/virtio/vhost.c | 2 +- hw/xtensa/sim.c | 12 +- hw/xtensa/xtfpga.c | 2 +- include/elf.h | 10 + include/exec/cpu-all.h | 2 +- include/exec/cpu-common.h | 8 +- include/exec/memory.h | 22 +- include/exec/poison.h | 1 - include/hw/elf_ops.h | 77 ++ include/hw/i386/pc.h | 3 + include/hw/loader.h | 9 +- include/hw/xen/start_info.h | 146 +++ include/standard-headers/asm-x86/bootparam.h | 34 + include/standard-headers/drm/drm_fourcc.h | 63 ++ include/standard-headers/linux/ethtool.h | 19 +- include/standard-headers/linux/input-event-codes.h | 17 + include/standard-headers/linux/pci_regs.h | 1 + include/standard-headers/linux/vhost_types.h | 128 +++ include/standard-headers/linux/virtio_balloon.h | 8 + include/standard-headers/linux/virtio_blk.h | 54 + include/standard-headers/linux/virtio_config.h | 3 + include/standard-headers/linux/virtio_gpu.h | 18 + include/standard-headers/linux/virtio_ring.h | 52 + linux-headers/asm-arm/unistd-common.h | 1 + linux-headers/asm-arm64/unistd.h | 1 + linux-headers/asm-generic/unistd.h | 10 +- linux-headers/asm-mips/sgidefs.h | 8 - linux-headers/asm-mips/unistd.h | 1074 +------------------- linux-headers/asm-mips/unistd_n32.h | 338 ++++++ linux-headers/asm-mips/unistd_n64.h | 334 ++++++ linux-headers/asm-mips/unistd_o32.h | 374 +++++++ linux-headers/asm-powerpc/unistd.h | 389 +------ linux-headers/asm-powerpc/unistd_32.h | 381 +++++++ linux-headers/asm-powerpc/unistd_64.h | 372 +++++++ linux-headers/linux/kvm.h | 29 + linux-headers/linux/vfio.h | 92 ++ linux-headers/linux/vhost.h | 113 +- linux-headers/linux/vhost_types.h | 1 + monitor.c | 5 +- net/Makefile.objs | 4 +- net/net.c | 2 +- net/vhost-user-stub.c | 23 + net/vhost-user.c | 13 + pc-bios/optionrom/Makefile | 5 +- pc-bios/optionrom/linuxboot_dma.c | 114 +-- pc-bios/optionrom/optrom.h | 110 ++ pc-bios/optionrom/optrom_fw_cfg.h | 92 ++ pc-bios/optionrom/pvh.S | 200 ++++ pc-bios/optionrom/pvh_main.c | 133 +++ pc-bios/pvh.bin | Bin 0 -> 1536 bytes scripts/tap-driver.pl | 1 + scripts/tap-merge.pl | 1 + scripts/update-linux-headers.sh | 17 + target/i386/cpu.c | 13 +- target/i386/cpu.h | 1 - target/i386/hvf/x86_cpuid.c | 18 +- tests/Makefile.include | 9 +- tests/docker/dockerfiles/centos7.docker | 5 +- tests/vhost-user-test.c | 251 +++-- ui/vnc-enc-hextile-template.h | 268 ++--- ui/vnc-enc-zywrle.h | 394 +++---- 124 files changed, 4784 insertions(+), 3000 deletions(-) create mode 100644 hw/net/vhost_net-stub.c create mode 100644 include/hw/xen/start_info.h create mode 100644 include/standard-headers/asm-x86/bootparam.h create mode 100644 include/standard-headers/linux/vhost_types.h create mode 100644 linux-headers/asm-mips/unistd_n32.h create mode 100644 linux-headers/asm-mips/unistd_n64.h create mode 100644 linux-headers/asm-mips/unistd_o32.h create mode 100644 linux-headers/asm-powerpc/unistd_32.h create mode 100644 linux-headers/asm-powerpc/unistd_64.h create mode 100644 linux-headers/linux/vhost_types.h create mode 100644 net/vhost-user-stub.c create mode 100644 pc-bios/optionrom/optrom.h create mode 100644 pc-bios/optionrom/optrom_fw_cfg.h create mode 100644 pc-bios/optionrom/pvh.S create mode 100644 pc-bios/optionrom/pvh_main.c create mode 100644 pc-bios/pvh.bin
Signature · 1 line
1.8.3.1
[Qemu-devel] [PULL 14/50] vhost-user-test: create a main loop per TestServer
This makes the tests more independent and removes the need to defer test_server_free via an idle event source.
Message-Id: <[email protected]>
--- tests/vhost-user-test.c | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-)
tests/vhost-user-test.c +18 -22
@@ -146,6 +146,8 @@ typedef struct TestServer {int fds_num;int fds[VHOST_MEMORY_MAX_NREGIONS ];VhostUserMemory memory; +GMainLoop *loop; +GThread *thread;GMutex data_mutex;GCond data_cond;int log_fd;
@@ -494,6 +496,13 @@ static const char *init_hugepagefs(const char *path)static TestServer *test_server_new (const gchar *name) {TestServer *server =g_new0 (TestServer,1 ); +GMainContext *context =g_main_context_new (); + + server->loop =g_main_loop_new (context, FALSE); +g_main_context_unref (context); + +/* run the main loop thread so the chardev may operate */ + server->thread =g_thread_new (NULL , thread_function, server->loop); server->socket_path =g_strdup_printf ("%s/%s.sock" , tmpfs, name); server->mig_path =g_strdup_printf ("%s/%s.mig" , tmpfs, name);
@@ -538,10 +547,18 @@ static void test_server_listen(TestServer *server)test_server_create_chr (server,",server,nowait" ); } -static gboolean _test_server_free (TestServer *server) +static void test_server_free (TestServer *server) {int i; +/* finish the helper thread and dispatch pending sources */ +g_main_loop_quit (server->loop); +g_thread_join (server->thread); +while (g_main_context_pending (NULL )) { +g_main_context_iteration (NULL , TRUE); + } +g_main_loop_unref (server->loop); +qemu_chr_fe_deinit (&server->chr, true);for (i =0 ; i < server->fds_num; i++) {
@@ -563,13 +580,6 @@ static gboolean _test_server_free(TestServer *server)qpci_free_pc (server->bus);g_free (server); - -return FALSE; -} - -static void test_server_free (TestServer *server) -{ -g_idle_add ((GSourceFunc )_test_server_free, server); }static void wait_for_log_fd (TestServer *s)
@@ -974,8 +984,6 @@ int main(int argc, char **argv)const char *hugefs;int ret;char template[] ="/tmp/vhost-test-XXXXXX" ; -GMainLoop *loop; -GThread *thread;g_test_init (&argc, &argv,NULL );
@@ -997,10 +1005,6 @@ int main(int argc, char **argv) }#endif - loop =g_main_loop_new (NULL , FALSE); -/* run the main loop thread so the chardev may operate */ - thread =g_thread_new (NULL , thread_function, loop); -if (qemu_memfd_check (0 )) { qtest_add_data_func("/vhost-user/read-guest-mem/memfd", GINT_TO_POINTER(TEST_MEMFD_YES),
@@ -1028,14 +1032,6 @@ int main(int argc, char **argv)/* cleanup */ -/* finish the helper thread and dispatch pending sources */ -g_main_loop_quit (loop); -g_thread_join (thread); -while (g_main_context_pending (NULL )) { -g_main_context_iteration (NULL , TRUE); - } -g_main_loop_unref (loop); - ret =rmdir (tmpfs);if (ret !=0 ) { g_test_message("unable to rmdir: path (%s): %s\n",
Signature · 1 line
1.8.3.1
[Qemu-devel] [PULL 16/50] vhost-user-test: create a temporary directory per TestServer
In reply to Paolo BonziniThis makes the tests more independent, and also the source and destination TestServers in the migration test.
Message-Id: <[email protected]>
--- tests/vhost-user-test.c | 77 ++++++++++++++++++++++--------------------------- 1 file changed, 35 insertions(+), 42 deletions(-)
tests/vhost-user-test.c +35 -42
@@ -142,6 +142,8 @@ typedef struct TestServer {gchar *socket_path;gchar *mig_path;gchar *chr_name; +const gchar *mem_path; +gchar *tmpfs;CharBackend chr;int fds_num;int fds[VHOST_MEMORY_MAX_NREGIONS ];
@@ -162,9 +164,6 @@ static TestServer *test_server_new(const gchar *name);static void test_server_free (TestServer *server);static void test_server_listen (TestServer *server); -static const char *tmpfs; -static const char *root; -enum test_memfd {TEST_MEMFD_AUTO ,TEST_MEMFD_YES ,
@@ -172,7 +171,7 @@ enum test_memfd { };static char *get_qemu_cmd (TestServer *s, -int mem,enum test_memfd memfd,const char *mem_path, +int mem,enum test_memfd memfd,const char *chr_opts,const char *extra) {if (memfd ==TEST_MEMFD_AUTO &&qemu_memfd_check (0 )) {
@@ -187,7 +186,7 @@ static char *get_qemu_cmd(TestServer *s, }else { return g_strdup_printf(QEMU_CMD_MEM QEMU_CMD_CHR QEMU_CMD_NETDEV QEMU_CMD_NET "%s", mem, mem, - mem_path, s->chr_name, s->socket_path, + s->mem_path, s->chr_name, s->socket_path, chr_opts, s->chr_name, extra); } }
@@ -506,6 +505,8 @@ static const char *init_hugepagefs(void)static TestServer *test_server_new (const gchar *name) {TestServer *server =g_new0 (TestServer,1 ); +char template[] ="/tmp/vhost-test-XXXXXX" ; +const char *tmpfs;GMainContext *context =g_main_context_new (); server->loop =g_main_loop_new (context, FALSE);
@@ -514,6 +515,14 @@ static TestServer *test_server_new(const gchar *name)/* run the main loop thread so the chardev may operate */ server->thread =g_thread_new (NULL , thread_function, server->loop); + tmpfs =mkdtemp (template); +if (!tmpfs) { +g_test_message ("mkdtemp on path (%s): %s" , template,strerror (errno)); + } +g_assert (tmpfs); + + server->tmpfs =g_strdup (tmpfs); + server->mem_path =init_hugepagefs () ? : server->tmpfs; server->socket_path =g_strdup_printf ("%s/%s.sock" , tmpfs, name); server->mig_path =g_strdup_printf ("%s/%s.mig" , tmpfs, name); server->chr_name =g_strdup_printf ("chr-%s" , name);
@@ -559,7 +568,7 @@ static void test_server_listen(TestServer *server)static void test_server_free (TestServer *server) { -int i; +int i, ret;/* finish the helper thread and dispatch pending sources */ g_main_loop_quit (server->loop);
@@ -569,6 +578,18 @@ static void test_server_free(TestServer *server) }g_main_loop_unref (server->loop); +unlink (server->socket_path); +g_free (server->socket_path); + +unlink (server->mig_path); +g_free (server->mig_path); + + ret =rmdir (server->tmpfs); +if (ret !=0 ) { +g_test_message ("unable to rmdir: path (%s): %s" , + server->tmpfs,strerror (errno)); + } +qemu_chr_fe_deinit (&server->chr, true);for (i =0 ; i < server->fds_num; i++) {
@@ -579,12 +600,6 @@ static void test_server_free(TestServer *server)close (server->log_fd); } -unlink (server->socket_path); -g_free (server->socket_path); - -unlink (server->mig_path); -g_free (server->mig_path); -g_free (server->chr_name);g_assert (server->bus);qpci_free_pc (server->bus);
@@ -690,7 +705,7 @@ static void test_read_guest_mem(const void *arg) "read-guest-memfd" : "read-guest-mem"); test_server_listen(server); - qemu_cmd =get_qemu_cmd (server,512 , memfd, root,"" ,"" ); + qemu_cmd =get_qemu_cmd (server,512 , memfd,"" ,"" ); s =qtest_start (qemu_cmd);g_free (qemu_cmd);
@@ -725,7 +740,7 @@ static void test_migrate(void)test_server_listen (s);test_server_listen (dest); - cmd =get_qemu_cmd (s,2 ,TEST_MEMFD_AUTO , root,"" ,"" ); + cmd =get_qemu_cmd (s,2 ,TEST_MEMFD_AUTO ,"" ,"" ); from =qtest_start (cmd);g_free (cmd);
@@ -738,7 +753,7 @@ static void test_migrate(void) g_assert_cmpint(size, ==, (2 * 1024 * 1024) / (VHOST_LOG_PAGE * 8)); tmp =g_strdup_printf (" -incoming %s" , uri); - cmd =get_qemu_cmd (dest,2 ,TEST_MEMFD_AUTO , root,"" , tmp); + cmd =get_qemu_cmd (dest,2 ,TEST_MEMFD_AUTO ,"" , tmp);g_free (tmp); to =qtest_init (cmd);g_free (cmd);
@@ -848,7 +863,7 @@ static void test_reconnect_subprocess(void)char *cmd;g_thread_new ("connect" , connect_thread, s); - cmd =get_qemu_cmd (s,2 ,TEST_MEMFD_AUTO , root,",server" ,"" ); + cmd =get_qemu_cmd (s,2 ,TEST_MEMFD_AUTO ,",server" ,"" );qtest_start (cmd);g_free (cmd);
@@ -890,7 +905,7 @@ static void test_connect_fail_subprocess(void) s->test_fail = true;g_thread_new ("connect" , connect_thread, s); - cmd =get_qemu_cmd (s,2 ,TEST_MEMFD_AUTO , root,",server" ,"" ); + cmd =get_qemu_cmd (s,2 ,TEST_MEMFD_AUTO ,",server" ,"" );qtest_start (cmd);g_free (cmd);
@@ -923,7 +938,7 @@ static void test_flags_mismatch_subprocess(void) s->test_flags =TEST_FLAGS_DISCONNECT ;g_thread_new ("connect" , connect_thread, s); - cmd =get_qemu_cmd (s,2 ,TEST_MEMFD_AUTO , root,",server" ,"" ); + cmd =get_qemu_cmd (s,2 ,TEST_MEMFD_AUTO ,",server" ,"" );qtest_start (cmd);g_free (cmd);
@@ -971,7 +986,7 @@ static void test_multiqueue(void) cmd =g_strdup_printf ( QEMU_CMD_MEM QEMU_CMD_CHR QEMU_CMD_NETDEV ",queues=%d ""-device virtio-net-pci,netdev=net0,mq=on,vectors=%d" , -512 ,512 , root, s->chr_name, +512 ,512 , s->mem_path, s->chr_name, s->socket_path,"" , s->chr_name, s->queues, s->queues *2 +2 ); }
@@ -991,22 +1006,11 @@ static void test_multiqueue(void)int main (int argc,char **argv) { -int ret; -char template[] ="/tmp/vhost-test-XXXXXX" ; -g_test_init (&argc, &argv,NULL );module_call_init (MODULE_INIT_QOM );qemu_add_opts (&qemu_chardev_opts); - tmpfs =mkdtemp (template); -if (!tmpfs) { -g_test_message ("mkdtemp on path (%s): %s\n" , template,strerror (errno)); - } -g_assert (tmpfs); - - root =init_hugepagefs () ? : tmpfs; -if (qemu_memfd_check (0 )) { qtest_add_data_func("/vhost-user/read-guest-mem/memfd", GINT_TO_POINTER(TEST_MEMFD_YES),
@@ -1030,16 +1034,5 @@ int main(int argc, char **argv)qtest_add_func ("/vhost-user/flags-mismatch" , test_flags_mismatch); } - ret =g_test_run (); - -/* cleanup */ - - ret =rmdir (tmpfs); -if (ret !=0 ) { -g_test_message ("unable to rmdir: path (%s): %s\n" , - tmpfs,strerror (errno)); - } - g_assert_cmpint(ret, ==, 0); - -return ret; +return g_test_run (); }
Signature · 1 line
1.8.3.1
Quoted 14 lines · Paolo Bonzini
The following changes since commit
8b7a3e1e5434b55d7710071b00af97c7086cab7a:Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2019-01-24 15:04:47 +0000)
are available in the git repository at:
git://github.com/bonzini/qemu.gittags/for-upstreamfor you to fetch changes up to
357c846440e9423b11f815cbf32441651e4f4835:docker: adjust Xen repository for CentOS 7 (2019-01-25 14:38:08 +0100)
Quoted 11 lines
----------------------------------------------------------------
* cpu-exec fixes (Emilio, Laurent)
* high address load for linuxboot (Zhijian)
* PVH support (Liam, Stefano)
* Linux header update (Paolo)
* enable vhost-net for all targets that have virtio-net (Paolo)
* vhost-user-test cleanups (Paolo)
* misc i386 changes (Paolo, Robert)
* hexloader-test change to avoidO_NONBLOCKon stdin (Peter)
* configure tweak for openpty (Thomas)
* elf2dmp port to Windows (Viktor)
"make check" seems to hang for me on all my build platforms. The culprit seems to be vhost-user-test.
Backtrace of all the threads in the QEMU binary:
Thread 2 (Thread 0x7f38cdfea700 (LWP 8638)):
#0 0x00007f38e6aba839 in syscall ()
at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1 0x0000563e422f36ae in qemu_futex_wait (f=0x563e42d087d8 <rcu_call_ready_event>, val=4294967295)
at /home/petmay01/linaro/qemu-for-merges/include/qemu/futex.h:29
#2 0x0000563e422f3875 in qemu_event_wait (ev=0x563e42d087d8 <rcu_call_ready_event>) at /home/petmay01/linaro/qemu-for-merges/util/qemu-thread-posix.c:442 #3 0x0000563e4230caa8 in call_rcu_thread (opaque=0x0)
at /home/petmay01/linaro/qemu-for-merges/util/rcu.c:261
#4 0x0000563e422f3a28 in qemu_thread_start (args=0x563e42f59db0)
at /home/petmay01/linaro/qemu-for-merges/util/qemu-thread-posix.c:502
#5 0x00007f38e6d976db in start_thread (arg=0x7f38cdfea700)
at pthread_create.c:463
#6 0x00007f38e6ac088f in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95Thread 1 (Thread 0x7f38ef3f0440 (LWP 8636)):
#0 0x00007f38e6da2567 in __libc_recvmsg (fd=10, msg=0x7ffc1b311ff0, flags=1073741824) at ../sysdeps/unix/sysv/linux/recvmsg.c:28 #1 0x0000563e42271b30 in qio_channel_socket_readv (ioc=0x563e42f57e40, iov=0x7ffc1b312140, niov=1, fds=0x7ffc1b312120, nfds=0x7ffc1b312128, errp=0x0)
at /home/petmay01/linaro/qemu-for-merges/io/channel-socket.c:484
#2 0x0000563e4226ce13 in qio_channel_readv_full (ioc=0x563e42f57e40, iov=0x7ffc1b312140, niov=1, fds=0x7ffc1b312120, nfds=0x7ffc1b312128, errp=0x0)
at /home/petmay01/linaro/qemu-for-merges/io/channel.c:65
#3 0x0000563e42258c0c in tcp_chr_recv (chr=0x563e43016000, buf=0x7ffc1b312250 "\001", len=12)
at /home/petmay01/linaro/qemu-for-merges/chardev/char-socket.c:306
#4 0x0000563e42259540 in tcp_chr_sync_read (chr=0x563e43016000, buf=0x7ffc1b312250 "\001", len=12)
at /home/petmay01/linaro/qemu-for-merges/chardev/char-socket.c:516
#5 0x0000563e42253742 in qemu_chr_fe_read_all (be=0x563e430e5b50, buf=0x7ffc1b312250 "\001", len=12)
at /home/petmay01/linaro/qemu-for-merges/chardev/char-fe.c:72
#6 0x0000563e41deba0d in vhost_user_read (dev=0x563e430e5bc0, msg=0x7ffc1b312250) at /home/petmay01/linaro/qemu-for-merges/hw/virtio/vhost-user.c:224 #7 0x0000563e41ded2fe in vhost_user_get_u64 (dev=0x563e430e5bc0, request=1, u64=0x7ffc1b312530)
at /home/petmay01/linaro/qemu-for-merges/hw/virtio/vhost-user.c:817
#8 0x0000563e41ded3b3 in vhost_user_get_features (dev=0x563e430e5bc0,
features=0x7ffc1b312530)
at /home/petmay01/linaro/qemu-for-merges/hw/virtio/vhost-user.c:839
#9 0x0000563e41dee954 in vhost_user_backend_init (dev=0x563e430e5bc0,
opaque=0x563e430a59c0)
at /home/petmay01/linaro/qemu-for-merges/hw/virtio/vhost-user.c:1352
#10 0x0000563e41de928b in vhost_dev_init (hdev=0x563e430e5bc0,
opaque=0x563e430a59c0, backend_type=VHOST_BACKEND_TYPE_USER,
busyloop_timeout=0)
at /home/petmay01/linaro/qemu-for-merges/hw/virtio/vhost.c:1193
#11 0x0000563e4202bcfe in vhost_net_init (options=0x7ffc1b312650)
at /home/petmay01/linaro/qemu-for-merges/hw/net/vhost_net.c:174#12 0x0000563e42132e7e in vhost_user_start (queues=1, ncs=0x7ffc1b3126e0, be=0x563e430a59c0) at /home/petmay01/linaro/qemu-for-merges/net/vhost-user.c:88
#13 0x0000563e421334b4 in net_vhost_user_event (opaque=0x563e430a3f70, event=1)
at /home/petmay01/linaro/qemu-for-merges/net/vhost-user.c:268
#14 0x0000563e4225034d in chr_be_event (s=0x563e43016000, event=1)
at /home/petmay01/linaro/qemu-for-merges/chardev/char.c:57
#15 0x0000563e422503cc in qemu_chr_be_event (s=0x563e43016000, event=1)
at /home/petmay01/linaro/qemu-for-merges/chardev/char.c:72
#16 0x0000563e42254060 in qemu_chr_fe_set_handlers (b=0x563e430e5b50, fd_can_read=0x0, fd_read=0x0, fd_event=0x563e42133392 <net_vhost_user_event>, be_change=0x0, opaque=0x563e430a3f70, context=0x0, set_open=true)
at /home/petmay01/linaro/qemu-for-merges/chardev/char-fe.c:289
#17 0x0000563e42133840 in net_vhost_user_init (peer=0x0,
device=0x563e424c3735 "vhost_user", name=0x563e430a4000 "net0",
chr=0x563e43016000, queues=1)
at /home/petmay01/linaro/qemu-for-merges/net/vhost-user.c:344
#18 0x0000563e42133c00 in net_init_vhost_user (netdev=0x563e430a57e0,
name=0x563e430a4000 "net0", peer=0x0, errp=0x7ffc1b314a90)
at /home/petmay01/linaro/qemu-for-merges/net/vhost-user.c:442#19 0x0000563e4212a754 in net_client_init1 (object=0x563e430a57e0, is_netdev=true, errp=0x7ffc1b314a90) at /home/petmay01/linaro/qemu-for-merges/net/net.c:1060
#20 0x0000563e4212ab53 in net_client_init (opts=0x563e42fe2080, is_netdev=true, errp=0x7ffc1b314c38) at /home/petmay01/linaro/qemu-for-merges/net/net.c:1154
#21 0x0000563e4212b793 in net_init_netdev (dummy=0x0, opts=0x563e42fe2080, errp=0x7ffc1b314c38) at /home/petmay01/linaro/qemu-for-merges/net/net.c:1491
#22 0x0000563e42307d2d in qemu_opts_foreach (list=0x563e42c9b4e0 <qemu_netdev_opts>, func=0x563e4212b76a <net_init_netdev>, opaque=0x0, errp=0x7ffc1b314c38)
at /home/petmay01/linaro/qemu-for-merges/util/qemu-option.c:1171
#23 0x0000563e4212ba91 in net_init_clients (errp=0x7ffc1b314c38)
at /home/petmay01/linaro/qemu-for-merges/net/net.c:1564#24 0x0000563e41ec5089 in main (argc=25, argv=0x7ffc1b314ea8, envp=0x7ffc1b314f78) at /home/petmay01/linaro/qemu-for-merges/vl.c:4423
Ditto, in the vhost-user-test binary:
Thread 4 (Thread 0x7f4510899700 (LWP 8635)):
#0 0x00007f45131ddbf9 in __GI___poll (fds=0x7f4508000b20, nfds=1, timeout=-1)
at ../sysdeps/unix/sysv/linux/poll.c:29
#1 0x00007f4514681539 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 #2 0x00007f45146818d2 in g_main_loop_run ()
from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00005651cb943629 in thread_function (data=0x5651cd1788c0)
at /home/petmay01/linaro/qemu-for-merges/tests/vhost-user-test.c:315
#4 0x00007f45146a9105 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 #5 0x00007f45134c16db in start_thread (arg=0x7f4510899700)
at pthread_create.c:463
#6 0x00007f45131ea88f in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95Thread 3 (Thread 0x7f451109a700 (LWP 8634)):
#0 0x00007f45131ddbf9 in __GI___poll (fds=0x7f4504000b40, nfds=1, timeout=-1)
at ../sysdeps/unix/sysv/linux/poll.c:29
#1 0x00007f4514681539 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 #2 0x00007f45146818d2 in g_main_loop_run ()
from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00005651cb943629 in thread_function (data=0x5651cd1785c0)
at /home/petmay01/linaro/qemu-for-merges/tests/vhost-user-test.c:315
#4 0x00007f45146a9105 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 #5 0x00007f45134c16db in start_thread (arg=0x7f451109a700)
at pthread_create.c:463
#6 0x00007f45131ea88f in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95Thread 2 (Thread 0x7f451189b700 (LWP 8633)):
#0 syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38 #1 0x00005651cb9a73a0 in qemu_futex_wait (
f=0x5651cbc16138 <rcu_call_ready_event>, val=4294967295)
at /home/petmay01/linaro/qemu-for-merges/include/qemu/futex.h:29
#2 0x00005651cb9a7567 in qemu_event_wait (
ev=0x5651cbc16138 <rcu_call_ready_event>)
at /home/petmay01/linaro/qemu-for-merges/util/qemu-thread-posix.c:442
#3 0x00005651cb9cbdc8 in call_rcu_thread (opaque=0x0)
at /home/petmay01/linaro/qemu-for-merges/util/rcu.c:261
#4 0x00005651cb9a771a in qemu_thread_start (args=0x5651cd18d860)
at /home/petmay01/linaro/qemu-for-merges/util/qemu-thread-posix.c:502
#5 0x00007f45134c16db in start_thread (arg=0x7f451189b700)
at pthread_create.c:463
#6 0x00007f45131ea88f in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95Thread 1 (Thread 0x7f4514d39900 (LWP 8631)):
#0 0x00007f45134cb384 in __libc_read (fd=10, buf=0x7fff4cbfce40, nbytes=1024)
at ../sysdeps/unix/sysv/linux/read.c:27
#1 0x00005651cb982957 in qtest_recv_line (s=0x5651cd1a6180)
at /home/petmay01/linaro/qemu-for-merges/tests/libqtest.c:379
#2 0x00005651cb982ac8 in qtest_rsp (s=0x5651cd1a6180, expected_args=1)
at /home/petmay01/linaro/qemu-for-merges/tests/libqtest.c:406
#3 0x00005651cb982e3c in qtest_query_target_endianness (s=0x5651cd1a6180)
at /home/petmay01/linaro/qemu-for-merges/tests/libqtest.c:452
#4 0x00005651cb9824ad in qtest_init_without_qmp_handshake (
extra_args=0x5651cd1a6040 " -m 2 -object
memory-backend-memfd,id=mem,size=2M, -numa node,memdev=mem -chardev socket,id=chr-src,path=/tmp/vhost-test-8YSOZx/src.sock -netdev vhost-user,id=net0,chardev=chr-src,vhostforce -device v"...)
at /home/petmay01/linaro/qemu-for-merges/tests/libqtest.c:279
#5 0x00005651cb9824dc in qtest_init (
extra_args=0x5651cd1a6040 " -m 2 -object
memory-backend-memfd,id=mem,size=2M, -numa node,memdev=mem -chardev socket,id=chr-src,path=/tmp/vhost-test-8YSOZx/src.sock -netdev vhost-user,id=net0,chardev=chr-src,vhostforce -device v"...)
at /home/petmay01/linaro/qemu-for-merges/tests/libqtest.c:286
#6 0x00005651cb942d42 in qtest_start (
args=0x5651cd1a6040 " -m 2 -object
memory-backend-memfd,id=mem,size=2M, -numa node,memdev=mem -chardev socket,id=chr-src,path=/tmp/vhost-test-8YSOZx/src.sock -netdev vhost-user,id=net0,chardev=chr-src,vhostforce -device v"...)
at /home/petmay01/linaro/qemu-for-merges/tests/libqtest.h:579
#7 0x00005651cb94491c in test_migrate ()
at /home/petmay01/linaro/qemu-for-merges/tests/vhost-user-test.c:744
#8 0x00007f45146a7eba in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 #9 0x00007f45146a7deb in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 #10 0x00007f45146a7deb in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 #11 0x00007f45146a8092 in g_test_run_suite ()
from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#12 0x00007f45146a80b1 in g_test_run ()
from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x00005651cb94567c in main (argc=1, argv=0x7fff4cbfd838)
at /home/petmay01/linaro/qemu-for-merges/tests/vhost-user-test.c:1037
thanks
-- PMM