qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] dcf7ea: tests/vm: Only use -cpu 'host' if KVM


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] dcf7ea: tests/vm: Only use -cpu 'host' if KVM is available
Date: Wed, 15 Aug 2018 08:29:47 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: dcf7ea4a78b10575dcc032e0356233ab3a95e7d2
      
https://github.com/qemu/qemu/commit/dcf7ea4a78b10575dcc032e0356233ab3a95e7d2
  Author: Philippe Mathieu-Daudé <address@hidden>
  Date:   2018-08-15 (Wed, 15 Aug 2018)

  Changed paths:
    M tests/vm/basevm.py

  Log Message:
  -----------
  tests/vm: Only use -cpu 'host' if KVM is available

If KVM is not available, then use the 'max' cpu.

This fixes:

  ERROR:root:Log:
  ERROR:root:qemu-system-x86_64: CPU model 'host' requires KVM
  Failed to prepare guest environment
  error: [Errno 104] Connection reset by peer
  source/qemu/tests/vm/Makefile.include:25: recipe for target 
'tests/vm/ubuntu.i386.img' failed
  make: *** [tests/vm/ubuntu.i386.img] Error 2

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>


  Commit: a3f9f64bf9182f949af7d7b08f7387c976957eec
      
https://github.com/qemu/qemu/commit/a3f9f64bf9182f949af7d7b08f7387c976957eec
  Author: Philippe Mathieu-Daudé <address@hidden>
  Date:   2018-08-15 (Wed, 15 Aug 2018)

  Changed paths:
    M tests/vm/ubuntu.i386

  Log Message:
  -----------
  tests/vm: Add flex and bison to the vm image

Similar to 79f24568e5e70, this fixes the following warnings:
      CHK version_gen.h
     LEX convert-dtsv0-lexer.lex.c
  make[1]: flex: Command not found
     BISON dtc-parser.tab.c
  make[1]: bison: Command not found
     LEX dtc-lexer.lex.c
  make[1]: flex: Command not found

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>


  Commit: 9582f357bb6f6573c9a452743d8f3ab41ba2e3fa
      
https://github.com/qemu/qemu/commit/9582f357bb6f6573c9a452743d8f3ab41ba2e3fa
  Author: Fam Zheng <address@hidden>
  Date:   2018-08-15 (Wed, 15 Aug 2018)

  Changed paths:
    M block/nvme.c

  Log Message:
  -----------
  nvme: Fix nvme_init error handling

It is wrong to leave this field as 1, as nvme_close() called in the
error handling code in nvme_file_open() will use it and try to free
s->queues again.

Another problem is the cleaning ups are duplicated between the fail*
labels of nvme_init() and nvme_file_open(), which calls nvme_close().

A third problem is nvme_close() misses g_free() and
event_notifier_cleanup().

Fix all of them.

Cc: address@hidden
Signed-off-by: Fam Zheng <address@hidden>

Message-Id: <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>


  Commit: 2f0d8947a664c77624fd3e22ce9449685b0ed808
      
https://github.com/qemu/qemu/commit/2f0d8947a664c77624fd3e22ce9449685b0ed808
  Author: Paolo Bonzini <address@hidden>
  Date:   2018-08-15 (Wed, 15 Aug 2018)

  Changed paths:
    M block/nvme.c

  Log Message:
  -----------
  nvme: simplify plug/unplug

bdrv_io_plug/bdrv_io_unplug take care of keeping a nesting count,
so change s->plugged to just a bool.

Signed-off-by: Paolo Bonzini <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>


  Commit: 70232b5253a3c4e03ed1ac47ef9246a8ac66c6fa
      
https://github.com/qemu/qemu/commit/70232b5253a3c4e03ed1ac47ef9246a8ac66c6fa
  Author: Fam Zheng <address@hidden>
  Date:   2018-08-15 (Wed, 15 Aug 2018)

  Changed paths:
    M util/aio-posix.c

  Log Message:
  -----------
  aio-posix: Don't count ctx->notifier as progress when polling

The same logic exists in fd polling. This change is especially important
to avoid busy loop once we limit aio_notify_accept() to blocking
aio_poll().

Cc: address@hidden
Signed-off-by: Fam Zheng <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>


  Commit: b37548fcd1b8ac2e88e185a395bef851f3fc4e65
      
https://github.com/qemu/qemu/commit/b37548fcd1b8ac2e88e185a395bef851f3fc4e65
  Author: Fam Zheng <address@hidden>
  Date:   2018-08-15 (Wed, 15 Aug 2018)

  Changed paths:
    M util/aio-posix.c
    M util/aio-win32.c

  Log Message:
  -----------
  aio: Do aio_notify_accept only during blocking aio_poll

An aio_notify() pairs with an aio_notify_accept(). The former should
happen in the main thread or a vCPU thread, and the latter should be
done in the IOThread.

There is one rare case that the main thread or vCPU thread may "steal"
the aio_notify() event just raised by itself, in bdrv_set_aio_context()
[1]. The sequence is like this:

    main thread                     IO Thread
    ===============================================================
    bdrv_drained_begin()
      aio_disable_external(ctx)
                              aio_poll(ctx, true)
                                ctx->notify_me += 2
    ...
    bdrv_drained_end()
      ...
  aio_notify()
    ...
    bdrv_set_aio_context()
      aio_poll(ctx, false)
[1]     aio_notify_accept(ctx)
                                ppoll() /* Hang! */

[1] is problematic. It will clear the ctx->notifier event so that
the blocked ppoll() will not return.

(For the curious, this bug was noticed when booting a number of VMs
simultaneously in RHV.  One or two of the VMs will hit this race
condition, making the VIRTIO device unresponsive to I/O commands. When
it hangs, Seabios is busy waiting for a read request to complete (read
MBR), right after initializing the virtio-blk-pci device, using 100%
guest CPU. See also https://bugzilla.redhat.com/show_bug.cgi?id=1562750
for the original bug analysis.)

aio_notify() only injects an event when ctx->notify_me is set,
correspondingly aio_notify_accept() is only useful when ctx->notify_me
_was_ set. Move the call to it into the "blocking" branch. This will
effectively skip [1] and fix the hang.

Furthermore, blocking aio_poll is only allowed on home thread
(in_aio_context_home_thread), because otherwise two blocking
aio_poll()'s can steal each other's ctx->notifier event and cause
hanging just like described above.

Cc: address@hidden
Suggested-by: Paolo Bonzini <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>


  Commit: 8158ed48bb2dd5148b02c0059fe59b40724dd3e3
      
https://github.com/qemu/qemu/commit/8158ed48bb2dd5148b02c0059fe59b40724dd3e3
  Author: Fam Zheng <address@hidden>
  Date:   2018-08-15 (Wed, 15 Aug 2018)

  Changed paths:
    M tests/docker/dockerfiles/centos7.docker

  Log Message:
  -----------
  docker: Install more packages in centos7

This makes test-block work.

Signed-off-by: Fam Zheng <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>


  Commit: 983c2a777beba7b17e057810d94e380e05a74294
      
https://github.com/qemu/qemu/commit/983c2a777beba7b17e057810d94e380e05a74294
  Author: Fam Zheng <address@hidden>
  Date:   2018-08-15 (Wed, 15 Aug 2018)

  Changed paths:
    M tests/vm/basevm.py

  Log Message:
  -----------
  tests: Add an option for snapshot (default: off)

Not using snapshot has the benefit of automatically persisting useful
test harnesses, such as docker images and ccache database. Although it
will lose some cleanness, it is imaginably useful for patchew.

Signed-off-by: Fam Zheng <address@hidden>
Message-Id: <address@hidden>
Tested-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>


  Commit: 73fb4f1de3271c6407d4b110eb136805642498da
      
https://github.com/qemu/qemu/commit/73fb4f1de3271c6407d4b110eb136805642498da
  Author: Fam Zheng <address@hidden>
  Date:   2018-08-15 (Wed, 15 Aug 2018)

  Changed paths:
    M tests/docker/Makefile.include

  Log Message:
  -----------
  tests: Allow overriding archive path with SRC_ARCHIVE

In VM based tests, the source archive is created in host, we don't have
to run archive-source.sh again, as it complicates the Makefile and
scripts.

Signed-off-by: Fam Zheng <address@hidden>
Message-Id: <address@hidden>
Tested-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>


  Commit: 1bd26988087c9fb5db17bb1ab6950a8a1d647e24
      
https://github.com/qemu/qemu/commit/1bd26988087c9fb5db17bb1ab6950a8a1d647e24
  Author: Fam Zheng <address@hidden>
  Date:   2018-08-15 (Wed, 15 Aug 2018)

  Changed paths:
    M tests/vm/Makefile.include
    A tests/vm/centos

  Log Message:
  -----------
  tests: Add centos VM testing

This one does docker testing in the VM. It is intended to replace the
native docker testing on patchew testers.

Signed-off-by: Fam Zheng <address@hidden>
Message-Id: <address@hidden>
Tested-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>


  Commit: ebe95fa09439a8d94d7161e26fab2ed54a0773b9
      
https://github.com/qemu/qemu/commit/ebe95fa09439a8d94d7161e26fab2ed54a0773b9
  Author: Fam Zheng <address@hidden>
  Date:   2018-08-15 (Wed, 15 Aug 2018)

  Changed paths:
    M tests/vm/Makefile.include

  Log Message:
  -----------
  tests: vm: Add vm-clean-all

The images are big. Add a rule to clean up easily.

Suggested-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Tested-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>


  Commit: ebb61f804d6fdc44e3831beada5051263f6182a6
      
https://github.com/qemu/qemu/commit/ebb61f804d6fdc44e3831beada5051263f6182a6
  Author: Peter Maydell <address@hidden>
  Date:   2018-08-15 (Wed, 15 Aug 2018)

  Changed paths:
    M tests/vm/freebsd
    M tests/vm/netbsd
    M tests/vm/openbsd
    M tests/vm/ubuntu.i386

  Log Message:
  -----------
  tests/vm: Pass the jobs parallelism setting to 'make check'

Our test suite works for parallel execution too, and this can
noticeably speed up a test run; pass the 'jobs' setting to
it as well as to the build proper.

Signed-off-by: Peter Maydell <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>


  Commit: 41e3340afed6337907287d674c56d9ec5b6990ad
      
https://github.com/qemu/qemu/commit/41e3340afed6337907287d674c56d9ec5b6990ad
  Author: Peter Maydell <address@hidden>
  Date:   2018-08-15 (Wed, 15 Aug 2018)

  Changed paths:
    M docs/devel/testing.rst
    M tests/vm/Makefile.include
    M tests/vm/basevm.py
    M tests/vm/freebsd
    M tests/vm/netbsd
    M tests/vm/openbsd
    M tests/vm/ubuntu.i386

  Log Message:
  -----------
  tests/vm: Propagate V=1 down into the make inside the VM

Invoking 'make vm-build-freebsd' and friends with V=1 should
propagate that verbosity setting down into the build run
inside the VM. Make sure we do that. This brings it into
line with how the container tests handle V=1.

Signed-off-by: Peter Maydell <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>


  Commit: eb2712f5682c747c64f69e32fdb233839d739db8
      
https://github.com/qemu/qemu/commit/eb2712f5682c747c64f69e32fdb233839d739db8
  Author: Peter Maydell <address@hidden>
  Date:   2018-08-15 (Wed, 15 Aug 2018)

  Changed paths:
    M tests/vm/basevm.py

  Log Message:
  -----------
  tests/vm: Bump guest RAM up from 2G to 4G

Currently we run the guests in a VM which is given only 2G of RAM.
Since the guests are configured without any swap space, builds
can fail because the system runs out of memory and kills the
compiler, especially if the job count is set for a lot of
parallelism. Bump the setting up from 2G to 4G to give us some
more headroom.

Signed-off-by: Peter Maydell <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>


  Commit: f2d4becdc765b0f8d3095283644c6b62fa5d525a
      
https://github.com/qemu/qemu/commit/f2d4becdc765b0f8d3095283644c6b62fa5d525a
  Author: Peter Maydell <address@hidden>
  Date:   2018-08-15 (Wed, 15 Aug 2018)

  Changed paths:
    M tests/vm/freebsd
    M tests/vm/netbsd
    M tests/vm/openbsd
    M tests/vm/ubuntu.i386

  Log Message:
  -----------
  tests/vm: Use make's --output-sync option

Use make's --output-sync option when running tests inside VMs,
so that if we're building with parallelization the output doesn't
get scrambled.

Signed-off-by: Peter Maydell <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>


  Commit: af7e916869fc9aab5ba0511783417f1bc3f6df84
      
https://github.com/qemu/qemu/commit/af7e916869fc9aab5ba0511783417f1bc3f6df84
  Author: Fam Zheng <address@hidden>
  Date:   2018-08-15 (Wed, 15 Aug 2018)

  Changed paths:
    M tests/vm/Makefile.include

  Log Message:
  -----------
  tests/vm: Add vm-build-all/vm-clean-all in help text

Suggested-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>


  Commit: 37a81812f7b8367422a039eb09d915df543983ee
      
https://github.com/qemu/qemu/commit/37a81812f7b8367422a039eb09d915df543983ee
  Author: Fam Zheng <address@hidden>
  Date:   2018-08-15 (Wed, 15 Aug 2018)

  Changed paths:
    M util/aio-posix.c

  Log Message:
  -----------
  aio-posix: Improve comment around marking node deleted

The counter is for qemu_lockcnt_inc/dec sections (read side),
qemu_lockcnt_lock/unlock is for the write side.

Suggested-by: Paolo Bonzini <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>


  Commit: 1d746ee95d4d7deb1460006f8c01c430dcb50b9f
      
https://github.com/qemu/qemu/commit/1d746ee95d4d7deb1460006f8c01c430dcb50b9f
  Author: Peter Maydell <address@hidden>
  Date:   2018-08-15 (Wed, 15 Aug 2018)

  Changed paths:
    M block/nvme.c
    M docs/devel/testing.rst
    M tests/docker/Makefile.include
    M tests/docker/dockerfiles/centos7.docker
    M tests/vm/Makefile.include
    M tests/vm/basevm.py
    A tests/vm/centos
    M tests/vm/freebsd
    M tests/vm/netbsd
    M tests/vm/openbsd
    M tests/vm/ubuntu.i386
    M util/aio-posix.c
    M util/aio-win32.c

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/famz/tags/block-and-testing-pull-request' into staging

Block and testing patches for 3.1

- aio fixes by me
- nvme fixes by Paolo and me
- test improvements by Peter, Phil and me

# gpg: Signature made Wed 15 Aug 2018 04:11:43 BST
# gpg:                using RSA key CA35624C6A9171C6
# gpg: Good signature from "Fam Zheng <address@hidden>"
# Primary key fingerprint: 5003 7CB7 9706 0F76 F021  AD56 CA35 624C 6A91 71C6

* remotes/famz/tags/block-and-testing-pull-request:
  aio-posix: Improve comment around marking node deleted
  tests/vm: Add vm-build-all/vm-clean-all in help text
  tests/vm: Use make's --output-sync option
  tests/vm: Bump guest RAM up from 2G to 4G
  tests/vm: Propagate V=1 down into the make inside the VM
  tests/vm: Pass the jobs parallelism setting to 'make check'
  tests: vm: Add vm-clean-all
  tests: Add centos VM testing
  tests: Allow overriding archive path with SRC_ARCHIVE
  tests: Add an option for snapshot (default: off)
  docker: Install more packages in centos7
  aio: Do aio_notify_accept only during blocking aio_poll
  aio-posix: Don't count ctx->notifier as progress when polling
  nvme: simplify plug/unplug
  nvme: Fix nvme_init error handling
  tests/vm: Add flex and bison to the vm image
  tests/vm: Only use -cpu 'host' if KVM is available

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/48a539df4a25...1d746ee95d4d
      **NOTE:** This service has been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]