qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 064f8e: meson.build: Add comments to clarify


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 064f8e: meson.build: Add comments to clarify code organiza...
Date: Tue, 13 Oct 2020 04:00:41 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 064f8ee7aa6e7734f12cc1f3fbbcf61949006e0f
      
https://github.com/qemu/qemu/commit/064f8ee7aa6e7734f12cc1f3fbbcf61949006e0f
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M meson.build

  Log Message:
  -----------
  meson.build: Add comments to clarify code organization

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201006125602.2311423-2-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 7e2b888f62bbf0def0978448b27c1141e15359d7
      
https://github.com/qemu/qemu/commit/7e2b888f62bbf0def0978448b27c1141e15359d7
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M meson.build

  Log Message:
  -----------
  meson.build: Sort sourcesets alphabetically

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201006125602.2311423-3-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: e28ab096bf897310fc7a37fdc087e66a24e6e977
      
https://github.com/qemu/qemu/commit/e28ab096bf897310fc7a37fdc087e66a24e6e977
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M hw/core/meson.build
    M meson.build

  Log Message:
  -----------
  hw/core: Move the creation of the library to the main meson.build

Be consistent creating all the libraries in the main meson.build file.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201006125602.2311423-4-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: c2306d713e4cfc95c25b395133e00a31d4e022c1
      
https://github.com/qemu/qemu/commit/c2306d713e4cfc95c25b395133e00a31d4e022c1
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M chardev/meson.build
    M meson.build

  Log Message:
  -----------
  chardev: Move the creation of the library to the main meson.build

Be consistent creating all the libraries in the main meson.build file.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201006125602.2311423-5-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 7e6edef3f8cd1176d267c86151c9cf2fc0777781
      
https://github.com/qemu/qemu/commit/7e6edef3f8cd1176d267c86151c9cf2fc0777781
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M meson.build
    M migration/meson.build

  Log Message:
  -----------
  migration: Move the creation of the library to the main meson.build

Be consistent creating all the libraries in the main meson.build file.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201006125602.2311423-6-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: f78536b149b7c4caa7e33e7f6b2871c12b14e9bb
      
https://github.com/qemu/qemu/commit/f78536b149b7c4caa7e33e7f6b2871c12b14e9bb
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M io/meson.build
    M meson.build

  Log Message:
  -----------
  io: Move the creation of the library to the main meson.build

Be consistent creating all the libraries in the main meson.build file.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201006125602.2311423-7-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 2389304a720e8034aee63da3f5adfeab94d9bfcd
      
https://github.com/qemu/qemu/commit/2389304a720e8034aee63da3f5adfeab94d9bfcd
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M crypto/meson.build
    M meson.build

  Log Message:
  -----------
  crypto: Move the creation of the library to the main meson.build

Be consistent creating all the libraries in the main meson.build file.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201006125602.2311423-8-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 555678917697b6bef70e2d07c8a19d199a53b592
      
https://github.com/qemu/qemu/commit/555678917697b6bef70e2d07c8a19d199a53b592
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M authz/meson.build
    M meson.build

  Log Message:
  -----------
  authz: Move the creation of the library to the main meson.build

Be consistent creating all the libraries in the main meson.build file.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201006125602.2311423-9-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: da33fc09873af7ee5f60dbd0b09d30926f9cb851
      
https://github.com/qemu/qemu/commit/da33fc09873af7ee5f60dbd0b09d30926f9cb851
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M meson.build
    M qom/meson.build

  Log Message:
  -----------
  qom: Move the creation of the library to the main meson.build

Be consistent creating all the libraries in the main meson.build file.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201006125602.2311423-10-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 8d0bceba24cc0917d9c6c5252d78db3d9fd5c58d
      
https://github.com/qemu/qemu/commit/8d0bceba24cc0917d9c6c5252d78db3d9fd5c58d
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M MAINTAINERS
    A hw/nvram/fw_cfg-interface.c
    M hw/nvram/fw_cfg.c
    M hw/nvram/meson.build

  Log Message:
  -----------
  hw/nvram: Always register FW_CFG_DATA_GENERATOR_INTERFACE

While the FW_CFG_DATA_GENERATOR_INTERFACE is only consumed
by a device only available using system-mode (fw_cfg), it is
implemented by a crypto component (tls-cipher-suites) which
is always available when crypto is used.

Commit 69699f3055 introduced the following error in the
qemu-storage-daemon binary:

  $ echo -e \
    '{"execute": "qmp_capabilities"}\r\n{"execute": 
"qom-list-types"}\r\n{"execute": "quit"}\r\n' \
    | storage-daemon/qemu-storage-daemon --chardev stdio,id=qmp0  --monitor qmp0
  {"QMP": {"version": {"qemu": {"micro": 50, "minor": 1, "major": 5}, 
"package": ""}, "capabilities": ["oob"]}}
  {"return": {}}
  missing interface 'fw_cfg-data-generator' for object 'tls-creds'
  Aborted (core dumped)

Since QOM dependencies are resolved at runtime, this issue
could not be triggered at linktime, and we don't have test
running the qemu-storage-daemon binary.

Fix by always registering the QOM interface.

Reported-by: Kevin Wolf <kwolf@redhat.com>
Fixes: 69699f3055 ("crypto/tls-cipher-suites: Produce fw_cfg consumable blob")
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201006111909.2302081-2-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 800d4deda04be016a95fbbf397c830a2d14ff9f6
      
https://github.com/qemu/qemu/commit/800d4deda04be016a95fbbf397c830a2d14ff9f6
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M MAINTAINERS
    R bootdevice.c
    R device_tree.c
    R dma-helpers.c
    M meson.build
    R qdev-monitor.c
    R qemu-seccomp.c
    A softmmu/bootdevice.c
    A softmmu/device_tree.c
    A softmmu/dma-helpers.c
    M softmmu/meson.build
    A softmmu/qdev-monitor.c
    A softmmu/qemu-seccomp.c
    A softmmu/tpm.c
    R tpm.c

  Log Message:
  -----------
  softmmu: move more files to softmmu/

Keep most softmmu_ss files into the system-emulation-specific
directory.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: d9f24bf57241453e078dba28d16fe3a430f06da1
      
https://github.com/qemu/qemu/commit/d9f24bf57241453e078dba28d16fe3a430f06da1
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M MAINTAINERS
    A cpu.c
    R exec.c
    M include/exec/cpu-common.h
    M meson.build
    M softmmu/meson.build
    A softmmu/physmem.c

  Log Message:
  -----------
  exec: split out non-softmmu-specific parts

Over the years, most parts of exec.c that were not specific to softmmu
have been moved to accel/tcg; what's left is mostly the low-level part
of the memory API, which includes RAMBlock and AddressSpaceDispatch.
However exec.c also hosts 4-500 lines of code for the target specific
parts of the CPU QOM object, plus a few functions for user-mode
emulation that do not have a better place (they are not TCG-specific so
accel/tcg/user-exec.c is not a good place either).

Move these parts to a new file, so that exec.c can be moved to
softmmu/physmem.c.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 22fb6eb571387172f41878866f4438b6bae21f0e
      
https://github.com/qemu/qemu/commit/22fb6eb571387172f41878866f4438b6bae21f0e
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M MAINTAINERS
    M include/hw/acpi/vmgenid.h
    M include/hw/misc/vmcoreinfo.h
    M include/net/can_host.h
    A scripts/coccinelle/qom-parent-type.cocci

  Log Message:
  -----------
  qom: fix objects with improper parent type

Some objects accidentally inherit ObjectClass instead of Object.
They compile silently but may crash after downcasting.

In this patch, we introduce a coccinelle script to find broken
declarations and fix them manually with proper base type.

Signed-off-by: Sergey Nizovtsev <snizovtsev@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: a738a50e62303f9dfb345790ffd8d01f9e20527a
      
https://github.com/qemu/qemu/commit/a738a50e62303f9dfb345790ffd8d01f9e20527a
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M docs/devel/index.rst
    A docs/devel/qtest.rst
    M docs/devel/testing.rst

  Log Message:
  -----------
  docs: Move QTest documentation to its own document

The qtest and libqtest doc comments will be parsed to generate
API documentation, so move QTest documentation to its own
document where the API and format documentation and will be
included.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Acked-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20201005205228.697463-2-ehabkost@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: f59c6de7f00e664358a9aad49248094ab1b29461
      
https://github.com/qemu/qemu/commit/f59c6de7f00e664358a9aad49248094ab1b29461
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M docs/devel/qtest.rst
    M softmmu/qtest.c

  Log Message:
  -----------
  docs/devel/qtest: Include protocol spec in document

Include the QTest Protocol doc string in docs/devel/qtest.rst,
after converting it to use Sphinx syntax.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Acked-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20201005205228.697463-3-ehabkost@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 51c778edd347452ce22146bd004bc7adab5f3a1a
      
https://github.com/qemu/qemu/commit/51c778edd347452ce22146bd004bc7adab5f3a1a
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M docs/devel/qtest.rst
    M tests/qtest/libqos/libqtest.h

  Log Message:
  -----------
  docs/devel/qtest: Include libqtest API reference

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Acked-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20201005205228.697463-4-ehabkost@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: da00d067eaf24968cc5bf7c8065c7b8b1070e16c
      
https://github.com/qemu/qemu/commit/da00d067eaf24968cc5bf7c8065c7b8b1070e16c
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M tests/qtest/meson.build

  Log Message:
  -----------
  qtest: unify extra_qtest_srcs and extra_qtest_deps

Currently the extra sources and extra dependencies of qtests are held
in two separate dictionaries.  Use the same trick as tests/meson.build
to combine them into one.  This will make it easier to update the
documentation for unit tests and qtests.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: bab88ead6fcbc7097ed75981622cce7850da1cc7
      
https://github.com/qemu/qemu/commit/bab88ead6fcbc7097ed75981622cce7850da1cc7
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M docs/devel/qtest.rst
    M docs/devel/testing.rst

  Log Message:
  -----------
  docs/devel: update instruction on how to add new unit tests

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 242fb750bd3246cd17eea1455eb7c898a4843e77
      
https://github.com/qemu/qemu/commit/242fb750bd3246cd17eea1455eb7c898a4843e77
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M scripts/qemu-version.sh

  Log Message:
  -----------
  build-sys: fix git version from -version

Typo introduced with the script.

Fixes: 2c273f32d3 ("meson: generate qemu-version.h")
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reported-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20200929143654.518157-1-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: fbc5884ce2774232ea5a1a7d9b4e605aefc16a2b
      
https://github.com/qemu/qemu/commit/fbc5884ce2774232ea5a1a7d9b4e605aefc16a2b
  Author: Huacai Chen <zltjiangshi@gmail.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M meson.build

  Log Message:
  -----------
  meson.build: Re-enable KVM support for MIPS

After converting from configure to meson, KVM support is lost for MIPS,
so re-enable it in meson.build.

Fixes: fdb75aeff7c212e1afaaa3a43 ("configure: remove target configuration")
Fixes: 8a19980e3fc42239aae054bc9 ("configure: move accelerator logic to meson")
Cc: aolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Message-Id: <1602059975-10115-3-git-send-email-chenhc@lemote.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 1c3e2a38de4e3094dfaf1e4dd73b1e5a91df8fe9
      
https://github.com/qemu/qemu/commit/1c3e2a38de4e3094dfaf1e4dd73b1e5a91df8fe9
  Author: Maxim Levitsky <mlevitsk@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M tests/qtest/ahci-test.c
    M tests/qtest/device-plug-test.c
    M tests/qtest/drive_del-test.c
    M tests/qtest/libqos/libqtest.h
    M tests/qtest/libqtest.c
    M tests/qtest/pvpanic-test.c
    M tests/qtest/qmp-test.c

  Log Message:
  -----------
  qtest: rename qtest_qmp_receive to qtest_qmp_receive_dict

In the next patch a new version of qtest_qmp_receive will be
reintroduced that will buffer received qmp events for later
consumption in qtest_qmp_eventwait_ref

No functional change intended.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: c22045bfe6d5ceebd414ff53ff23fff7ad5930d1
      
https://github.com/qemu/qemu/commit/c22045bfe6d5ceebd414ff53ff23fff7ad5930d1
  Author: Maxim Levitsky <mlevitsk@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M tests/qtest/libqos/libqtest.h
    M tests/qtest/libqtest.c

  Log Message:
  -----------
  qtest: Reintroduce qtest_qmp_receive with QMP event buffering

The new qtest_qmp_receive buffers all the received qmp events, allowing
qtest_qmp_eventwait_ref to return them.

This is intended to solve the race in regard to ordering of qmp events
vs qmp responses, as soon as the callers start using the new interface.

In addition to that, define qtest_qmp_event_ref a function which only scans
the buffer that qtest_qmp_receive stores the events to.  This is intended
for callers that are only interested in events that were received during
the last call to the qtest_qmp_receive.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20201006123904.610658-3-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 5e34005571af53b73e4a10cb2c6e0712cf6b8d2c
      
https://github.com/qemu/qemu/commit/5e34005571af53b73e4a10cb2c6e0712cf6b8d2c
  Author: Maxim Levitsky <mlevitsk@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M tests/qtest/libqos/libqtest.h
    M tests/qtest/libqtest.c
    M tests/qtest/migration-helpers.c

  Log Message:
  -----------
  qtest: remove qtest_qmp_receive_success

The purpose of qtest_qmp_receive_success was mostly to process events
that arrived between the issueing of a command and the "return"
line from QMP.  This is now handled by the buffering of events
that libqtest performs automatically.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>


  Commit: c45a70d8c271056896a057fbcdc7743a2942d0ec
      
https://github.com/qemu/qemu/commit/c45a70d8c271056896a057fbcdc7743a2942d0ec
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M tests/qtest/device-plug-test.c

  Log Message:
  -----------
  device-plug-test: use qtest_qmp to send the device_del command

Simplify the code now that events are buffered.  There is no need
anymore to separate sending the command and retrieving the response.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: bb1a5b97f75ae209d8707f698da23088d7b9bbb5
      
https://github.com/qemu/qemu/commit/bb1a5b97f75ae209d8707f698da23088d7b9bbb5
  Author: Maxim Levitsky <mlevitsk@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M tests/qtest/ahci-test.c
    M tests/qtest/drive_del-test.c
    M tests/qtest/libqtest.c
    M tests/qtest/pvpanic-test.c
    M tests/qtest/tpm-util.c

  Log Message:
  -----------
  qtest: switch users back to qtest_qmp_receive

Let test use the new functionality for buffering events.
The only remaining users of qtest_qmp_receive_dict are tests
that fuzz the QMP protocol.

Tested with 'make check-qtest'.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20201006123904.610658-4-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 9a613ddccce125e4cc3a4a23c294837c906440d6
      
https://github.com/qemu/qemu/commit/9a613ddccce125e4cc3a4a23c294837c906440d6
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M tests/qtest/drive_del-test.c

  Log Message:
  -----------
  qtest: check that drives are really appearing and disappearing

Do not just trust the HMP commands to create and delete the drive, use
query-block to check that this is actually the case.

Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: d8a18da56df93b7f778fb97ba370031597d19ffd
      
https://github.com/qemu/qemu/commit/d8a18da56df93b7f778fb97ba370031597d19ffd
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M .gitlab-ci.yml
    R tests/qemu-iotests/067
    R tests/qemu-iotests/067.out
    M tests/qemu-iotests/group
    M tests/qtest/drive_del-test.c
    M tests/qtest/meson.build

  Log Message:
  -----------
  qemu-iotests, qtest: rewrite test 067 as a qtest

Test 067 from qemu-iotests is executing QMP commands to hotplug
and hot-unplug disks, devices and blockdevs.  Because the power
of the text-based test harness is limited, it is actually limiting
the checks that it does, for example by skipping DEVICE_DELETED
events.

tests/qtest already has a similar test, drive_del-test.c.
We can merge them, and even reuse some of the existing code in
drive_del-test.c.  This will improve the quality of the test by
covering DEVICE_DELETED events and testing multiple architectures
(therefore covering multiple PCI hotplug mechanisms as well as s390x
virtio-ccw).

The only difference is that the new test will always use null-co:// for
the medium rather than qcow2 or raw, but this should be irrelevant for
what the test is covering.  For example there are no "qemu-img check"
runs in 067 that would check that the file is properly closed.

The new tests requires PCI hot-plug support, so drive_del-test
is moved from qemu-system-ppc to qemu-system-ppc64.

Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: bb755ba47f3747251c0eadf681ee68b9033309b8
      
https://github.com/qemu/qemu/commit/bb755ba47f3747251c0eadf681ee68b9033309b8
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M hw/core/qdev.c
    M hw/net/virtio-net.c
    M hw/sd/core.c
    M include/hw/qdev-core.h

  Log Message:
  -----------
  qdev: add "check if address free" callback for buses

Check if an address is free on the bus before plugging in the
device.  This makes it possible to do the check without any
side effects, and to detect the problem early without having
to do it in the realize callback.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201006123904.610658-5-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 7a8202c521a5d1ac9e289d5c2b5125a9310af178
      
https://github.com/qemu/qemu/commit/7a8202c521a5d1ac9e289d5c2b5125a9310af178
  Author: Maxim Levitsky <mlevitsk@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M hw/scsi/scsi-bus.c

  Log Message:
  -----------
  scsi/scsi_bus: switch search direction in scsi_device_find

This change will allow us to convert the bus children list to RCU,
while not changing the logic of this function

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20200913160259.32145-2-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 7bed89958bfbf40df9ca681cefbdca63abdde39d
      
https://github.com/qemu/qemu/commit/7bed89958bfbf40df9ca681cefbdca63abdde39d
  Author: Maxim Levitsky <mlevitsk@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M softmmu/qdev-monitor.c

  Log Message:
  -----------
  device_core: use drain_call_rcu in in qmp_device_add

Soon, a device removal might only happen on RCU callback execution.
This is okay for device-del which provides a DEVICE_DELETED event,
but not for the failure case of device-add.  To avoid changing
monitor semantics, just drain all pending RCU callbacks on error.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Suggested-by: Stefan Hajnoczi <stefanha@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20200913160259.32145-4-mlevitsk@redhat.com>
[Don't use it in qmp_device_del. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 2d24a64661549732fc77f632928318dd52f5bce5
      
https://github.com/qemu/qemu/commit/2d24a64661549732fc77f632928318dd52f5bce5
  Author: Maxim Levitsky <mlevitsk@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M hw/core/bus.c
    M hw/core/qdev.c
    M hw/scsi/scsi-bus.c
    M hw/scsi/virtio-scsi.c
    M include/hw/qdev-core.h

  Log Message:
  -----------
  device-core: use RCU for list of children of a bus

This fixes the race between device emulation code that tries to find
a child device to dispatch the request to (e.g a scsi disk),
and hotplug of a new device to that bus.

Note that this doesn't convert all the readers of the list
but only these that might go over that list without BQL held.

This is a very small first step to make this code thread safe.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20200913160259.32145-5-mlevitsk@redhat.com>
[Use RCU_READ_LOCK_GUARD in more places, adjust testcase now that
 the delay in DEVICE_DELETED due to RCU is more consistent. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201006123904.610658-9-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 42a90a899e70f5fbef2b5a117535acaa0bc1f5ad
      
https://github.com/qemu/qemu/commit/42a90a899e70f5fbef2b5a117535acaa0bc1f5ad
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M hw/scsi/scsi-bus.c

  Log Message:
  -----------
  scsi: switch to bus->check_address

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201006123904.610658-6-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: a23151e8cc8cc08546252dc9c7671171d9c44615
      
https://github.com/qemu/qemu/commit/a23151e8cc8cc08546252dc9c7671171d9c44615
  Author: Maxim Levitsky <mlevitsk@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M hw/core/qdev.c
    M include/hw/qdev-core.h

  Log Message:
  -----------
  device-core: use atomic_set on .realized property

Some code might race with placement of new devices on a bus.
We currently first place a (unrealized) device on the bus
and then realize it.

As a workaround, users that scan the child device list, can
check the realized property to see if it is safe to access such a device.
Use an atomic write here too to aid with this.

A separate discussion is what to do with devices that are unrealized:
It looks like for this case we only call the hotplug handler's unplug
callback and its up to it to unrealize the device.
An atomic operation doesn't cause harm for this code path though.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20200913160259.32145-6-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201006123904.610658-10-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 8ddf958e8d62ada6395460b91ec5964ef21fed12
      
https://github.com/qemu/qemu/commit/8ddf958e8d62ada6395460b91ec5964ef21fed12
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M hw/scsi/scsi-bus.c

  Log Message:
  -----------
  scsi/scsi-bus: scsi_device_find: don't return unrealized devices

The device core first places a device on the bus and then realizes it.
Make scsi_device_find avoid returing such devices to avoid
races in drivers that use an iothread (currently virtio-scsi)

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1812399

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20200913160259.32145-7-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201006123904.610658-11-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 8ff34495601067d02edb54b4346cace84ec4e1df
      
https://github.com/qemu/qemu/commit/8ff34495601067d02edb54b4346cace84ec4e1df
  Author: Maxim Levitsky <mlevitsk@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M hw/scsi/scsi-bus.c
    M include/hw/scsi/scsi.h

  Log Message:
  -----------
  scsi/scsi_bus: Add scsi_device_get

Add scsi_device_get which finds the scsi device
and takes a reference to it.

Suggested-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20200913160259.32145-8-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201006123904.610658-12-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 07a47d4a1879370009baab44f1f387610d88a299
      
https://github.com/qemu/qemu/commit/07a47d4a1879370009baab44f1f387610d88a299
  Author: Maxim Levitsky <mlevitsk@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M hw/scsi/virtio-scsi.c

  Log Message:
  -----------
  virtio-scsi: use scsi_device_get

This will help us to avoid the scsi device disappearing
after we took a reference to it.

It doesn't by itself forbid case when we try to access
an unrealized device

Suggested-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20200913160259.32145-9-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201006123904.610658-13-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 8cfe8013baec2a6f66240ffd767fad2699d85144
      
https://github.com/qemu/qemu/commit/8cfe8013baec2a6f66240ffd767fad2699d85144
  Author: Maxim Levitsky <mlevitsk@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M hw/scsi/scsi-bus.c

  Log Message:
  -----------
  scsi/scsi_bus: fix races in REPORT LUNS

Currently scsi_target_emulate_report_luns iterates over the child device list
twice, and there is no guarantee that this list is the same in both iterations.

The reason for iterating twice is that the first iteration calculates
how much memory to allocate.  However if we use a dynamic array we can
avoid iterating twice, and therefore we avoid this race.

Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1866707

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20200913160259.32145-10-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201006123904.610658-14-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: a0c9162c8250e121af438aee5ef93e64ec62dae1
      
https://github.com/qemu/qemu/commit/a0c9162c8250e121af438aee5ef93e64ec62dae1
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M meson.build

  Log Message:
  -----------
  meson: identify more sections of meson.build

Add more headers that clarify code organization.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 724c1c8bb350d84c097ab2005aad15e125d06b6c
      
https://github.com/qemu/qemu/commit/724c1c8bb350d84c097ab2005aad15e125d06b6c
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2020-10-12 (Mon, 12 Oct 2020)

  Changed paths:
    M .gitlab-ci.yml
    M MAINTAINERS
    M authz/meson.build
    R bootdevice.c
    M chardev/meson.build
    A cpu.c
    M crypto/meson.build
    R device_tree.c
    R dma-helpers.c
    M docs/devel/index.rst
    A docs/devel/qtest.rst
    M docs/devel/testing.rst
    R exec.c
    M hw/core/bus.c
    M hw/core/meson.build
    M hw/core/qdev.c
    M hw/net/virtio-net.c
    A hw/nvram/fw_cfg-interface.c
    M hw/nvram/fw_cfg.c
    M hw/nvram/meson.build
    M hw/scsi/scsi-bus.c
    M hw/scsi/virtio-scsi.c
    M hw/sd/core.c
    M include/exec/cpu-common.h
    M include/hw/acpi/vmgenid.h
    M include/hw/misc/vmcoreinfo.h
    M include/hw/qdev-core.h
    M include/hw/scsi/scsi.h
    M include/net/can_host.h
    M io/meson.build
    M meson.build
    M migration/meson.build
    R qdev-monitor.c
    R qemu-seccomp.c
    M qom/meson.build
    A scripts/coccinelle/qom-parent-type.cocci
    M scripts/qemu-version.sh
    A softmmu/bootdevice.c
    A softmmu/device_tree.c
    A softmmu/dma-helpers.c
    M softmmu/meson.build
    A softmmu/physmem.c
    A softmmu/qdev-monitor.c
    A softmmu/qemu-seccomp.c
    M softmmu/qtest.c
    A softmmu/tpm.c
    R tests/qemu-iotests/067
    R tests/qemu-iotests/067.out
    M tests/qemu-iotests/group
    M tests/qtest/device-plug-test.c
    M tests/qtest/drive_del-test.c
    M tests/qtest/libqos/libqtest.h
    M tests/qtest/libqtest.c
    M tests/qtest/meson.build
    M tests/qtest/migration-helpers.c
    M tests/qtest/pvpanic-test.c
    M tests/qtest/qmp-test.c
    M tests/qtest/tpm-util.c
    R tpm.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into 
staging

* qtest documentation improvements (Eduardo, myself)
* libqtest event buffering (Maxim)
* use RCU for list of children of a bus (Maxim)
* move more files to softmmu/ (myself)
* meson.build cleanups, qemu-storage-daemon fix (Philippe)

# gpg: Signature made Mon 12 Oct 2020 16:55:19 BST
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* remotes/bonzini-gitlab/tags/for-upstream: (38 commits)
  meson: identify more sections of meson.build
  scsi/scsi_bus: fix races in REPORT LUNS
  virtio-scsi: use scsi_device_get
  scsi/scsi_bus: Add scsi_device_get
  scsi/scsi-bus: scsi_device_find: don't return unrealized devices
  device-core: use atomic_set on .realized property
  scsi: switch to bus->check_address
  device-core: use RCU for list of children of a bus
  device_core: use drain_call_rcu in in qmp_device_add
  scsi/scsi_bus: switch search direction in scsi_device_find
  qdev: add "check if address free" callback for buses
  qemu-iotests, qtest: rewrite test 067 as a qtest
  qtest: check that drives are really appearing and disappearing
  qtest: switch users back to qtest_qmp_receive
  device-plug-test: use qtest_qmp to send the device_del command
  qtest: remove qtest_qmp_receive_success
  qtest: Reintroduce qtest_qmp_receive with QMP event buffering
  qtest: rename qtest_qmp_receive to qtest_qmp_receive_dict
  meson.build: Re-enable KVM support for MIPS
  build-sys: fix git version from -version
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/a0bdf8668734...724c1c8bb350



reply via email to

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