[PULL v2 18/30] block/export: convert vhost-user-blk server to block export API

2020-10-12 Thread Stefan Hajnoczi
Use the new QAPI block exports API instead of defining our own QOM objects. This is a large change because the lifecycle of VuBlockDev needs to follow BlockExportDriver. QOM properties are replaced by QAPI options objects. VuBlockDev is renamed VuBlkExport and contains a BlockExport field. Severa

[PULL v2 12/30] block/export: consolidate request structs into VuBlockReq

2020-10-12 Thread Stefan Hajnoczi
Only one struct is needed per request. Drop req_data and the separate VuBlockReq instance. Instead let vu_queue_pop() allocate everything at once. This fixes the req_data memory leak in vu_block_virtio_process_req(). Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-6-stefa...@red

[PULL v2 14/30] util/vhost-user-server: fix memory leak in vu_message_read()

2020-10-12 Thread Stefan Hajnoczi
fds[] is leaked when qio_channel_readv_full() fails. Use vmsg->fds[] instead of keeping a local fds[] array. Then we can reuse goto fail to clean up fds. vmsg->fd_num must be zeroed before the loop to make this safe. Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-8-stefa...@red

[PULL v2 07/30] test: new qTest case to test the vhost-user-blk-server

2020-10-12 Thread Stefan Hajnoczi
From: Coiby Xu This test case has the same tests as tests/virtio-blk-test.c except for tests have block_resize. Since vhost-user server can only server one client one time, two instances of vhost-user-blk-server are started by qemu-storage-daemon for the hotplug test. In order to not block scrip

[PULL v2 22/30] block: move block exports to libblockdev

2020-10-12 Thread Stefan Hajnoczi
Block exports are used by softmmu, qemu-storage-daemon, and qemu-nbd. They are not used by other programs and are not otherwise needed in libblock. Undo the recent move of blockdev-nbd.c from blockdev_ss into block_ss. Since bdrv_close_all() (libblock) calls blk_exp_close_all() (libblockdev) a stu

[PULL v2 13/30] util/vhost-user-server: drop unused DevicePanicNotifier

2020-10-12 Thread Stefan Hajnoczi
The device panic notifier callback is not used. Drop it. Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-7-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- util/vhost-user-server.h | 3 --- block/export/vhost-user-blk-server.c | 3 +-- util/vhost-user-server.c

[PULL v2 15/30] util/vhost-user-server: check EOF when reading payload

2020-10-12 Thread Stefan Hajnoczi
Unexpected EOF is an error that must be reported. Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-9-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- util/vhost-user-server.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util/vhost-user-server.c

[PULL v2 11/30] util/vhost-user-server: drop unnecessary watch deletion

2020-10-12 Thread Stefan Hajnoczi
Explicitly deleting watches is not necessary since libvhost-user calls remove_watch() during vu_deinit(). Add an assertion to check this though. Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-5-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- util/vhost-user-server.c | 1

[PULL v2 16/30] util/vhost-user-server: rework vu_client_trip() coroutine lifecycle

2020-10-12 Thread Stefan Hajnoczi
The vu_client_trip() coroutine is leaked during AioContext switching. It is also unsafe to destroy the vu_dev in panic_cb() since its callers still access it in some cases. Rework the lifecycle to solve these safety issues. Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-10-stef

[PULL v2 23/30] block/export: add iothread and fixed-iothread options

2020-10-12 Thread Stefan Hajnoczi
Make it possible to specify the iothread where the export will run. By default the block node can be moved to other AioContexts later and the export will follow. The fixed-iothread option forces strict behavior that prevents changing AioContext while the export is active. See the QAPI docs for deta

[PULL v2 20/30] util/vhost-user-server: use static library in meson.build

2020-10-12 Thread Stefan Hajnoczi
Don't compile contrib/libvhost-user/libvhost-user.c again. Instead build the static library once and then reuse it throughout QEMU. Also switch from CONFIG_LINUX to CONFIG_VHOST_USER, which is what the vhost-user tools (vhost-user-gpu, etc) do. Signed-off-by: Stefan Hajnoczi Message-id: 20200924

[PULL v2 17/30] block/export: report flush errors

2020-10-12 Thread Stefan Hajnoczi
Propagate the flush return value since errors are possible. Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-11-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- block/export/vhost-user-blk-server.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --g

[PULL v2 26/30] block/io: fix bdrv_co_block_status_above

2020-10-12 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy bdrv_co_block_status_above has several design problems with handling short backing files: 1. With want_zeros=true, it may return ret with BDRV_BLOCK_ZERO but without BDRV_BLOCK_ALLOCATED flag, when actually short backing file which produces these after-EOF zero

Re: [RFC PATCH 2/2] contrib/gitdm: Add more academic domains

2020-10-12 Thread César Belley
Acked-by: César Belley On 10/4/20 10:40 PM, Philippe Mathieu-Daudé wrote: > There is a number of contributions from these academic domains. > Add the entries to the gitdm 'academic' domain map. > > Cc: Akkarit Sangpetch > Cc: Alexander Bulekov > Cc: Alexander Oleinik > Cc: Alex Barcelo > Cc:

[PULL v2 24/30] block/export: add vhost-user-blk multi-queue support

2020-10-12 Thread Stefan Hajnoczi
Allow the number of queues to be configured using --export vhost-user-blk,num-queues=N. This setting should match the QEMU --device vhost-user-blk-pci,num-queues=N setting but QEMU vhost-user-blk.c lowers its own value if the vhost-user-blk backend offers fewer queues than QEMU. The vhost-user-blk

[PULL v2 19/30] util/vhost-user-server: move header to include/

2020-10-12 Thread Stefan Hajnoczi
Headers used by other subsystems are located in include/. Also add the vhost-user-server and vhost-user-blk-server headers to MAINTAINERS. Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-13-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- MAINTAINERS

[PULL v2 27/30] block/io: bdrv_common_block_status_above: support include_base

2020-10-12 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy In order to reuse bdrv_common_block_status_above in bdrv_is_allocated_above, let's support include_base parameter. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Eric Blake Message-id: 20200924194003.22080-3-vsement...@v

[PULL v2 29/30] block/io: fix bdrv_is_allocated_above

2020-10-12 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy bdrv_is_allocated_above wrongly handles short backing files: it reports after-EOF space as UNALLOCATED which is wrong, as on read the data is generated on the level of short backing file (if all overlays have unallocated areas at that place). Reusing bdrv_commo

[PULL v2 21/30] qemu-storage-daemon: avoid compiling blockdev_ss twice

2020-10-12 Thread Stefan Hajnoczi
Introduce libblkdev.fa to avoid recompiling blockdev_ss twice. Suggested-by: Paolo Bonzini Reviewed-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi Message-id: 20200929125516.186715-3-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- meson.build| 12 ++-- storage

[PULL v2 28/30] block/io: bdrv_common_block_status_above: support bs == base

2020-10-12 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy We are going to reuse bdrv_common_block_status_above in bdrv_is_allocated_above. bdrv_is_allocated_above may be called with include_base == false and still bs == base (for ex. from img_rebase()). So, support this corner case. Signed-off-by: Vladimir Sementsov-

[PULL v2 30/30] iotests: add commit top->base cases to 274

2020-10-12 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy These cases are fixed by previous patches around block_status and is_allocated. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia Message-id: 20200924194003.22080-6-vsement...@virtuozzo.com Signed-off-by: Stefan

[PULL v2 25/30] tests/qtest: add multi-queue test case to vhost-user-blk-test

2020-10-12 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi Message-id: 20201001144604.559733-3-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- tests/qtest/vhost-user-blk-test.c | 81 +-- 1 file changed, 76 insertions(+), 5 deletions(-) diff --git a/tests/qtest/vhost-user-blk-test.c b/te

Re: [PULL 09/14] qmp: Move dispatcher to a coroutine

2020-10-12 Thread Ben Widawsky
On 20-10-12 16:02:34, Alex Bennée wrote: > > Kevin Wolf writes: > > > Am 12.10.2020 um 13:53 hat Philippe Mathieu-Daudé geschrieben: > >> On 10/12/20 1:25 PM, Kevin Wolf wrote: > >> > Am 12.10.2020 um 12:47 hat Alex Bennée geschrieben: > >> > > > >> > > Markus Armbruster writes: > >> > > > >>

[Bug 1775702] Re: High host CPU load and slower guest after upgrade guest OS Windows 10 to ver 1803

2020-10-12 Thread Gannet
I found that C:\Program Files (x86)\SPICE Guest Tools\drivers\Balloon\w10\amd64/blnsvr.exe intensively requesting something in WMI-provider-host. And there are a lot of errors in event logs about it also. -- You received this bug notification because you are a member of qemu- devel-ml, which is s

Re: [PULL v2 00/30] Block patches

2020-10-12 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20201012182800.157697-1-stefa...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20201012182800.157697-1-stefa...@redhat.com Subject: [PULL v2 00/30] Block patches ===

Re: [PATCH] meson.build: drop duplicate 'sparc64' entry

2020-10-12 Thread Laurent Vivier
Le 12/10/2020 à 19:57, Sergei Trofimovich a écrit : > CC: Laurent Vivier > CC: qemu-triv...@nongnu.org > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Sergei Trofimovich > --- > meson.build | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/meson.build b/meson.buil

Re: [PATCH 07/10] target/arm: Implement v8.1M low-overhead-loop instructions

2020-10-12 Thread Peter Maydell
On Mon, 12 Oct 2020 at 16:37, Peter Maydell wrote: > > v8.1M's "low-overhead-loop" extension has three instructions > for looping: > * DLS (start of a do-loop) > * WLS (start of a while-loop) > * LE (end of a loop) > > +static bool trans_WLS(DisasContext *s, arg_WLS *a) > +{ > +/* M-profile

[PATCH 0/2] Add Xen CpusAccel

2020-10-12 Thread Jason Andryuk
Xen was left behind when CpusAccel became mandatory and fails the assert in qemu_init_vcpu(). It relied on the same dummy cpu threads as qtest. Move the qtest cpu functions to a common location and reuse them for Xen. Jason Andryuk (2): accel: move qtest CpusAccel functions to a common location

[PATCH 1/2] accel: move qtest CpusAccel functions to a common location

2020-10-12 Thread Jason Andryuk
Move and rename accel/qtest/qtest-cpu.* files to accel/dummy/ so they can be re-used by Xen. Signed-off-by: Jason Andryuk --- .../qtest-cpus.c => dummy/dummy-cpus.c} | 22 +-- .../qtest-cpus.h => dummy/dummy-cpus.h} | 10 - accel/dummy/meson.build

[PATCH 2/2] accel: Add xen CpusAccel using dummy-cpu

2020-10-12 Thread Jason Andryuk
Xen was broken by commit 1583a3898853 ("cpus: extract out qtest-specific code to accel/qtest"). Xen relied on qemu_init_vcpu() calling qemu_dummy_start_vcpu() in the default case, but that was replaced by g_assert_not_reached(). Add a minimal "CpusAccel" for xen using the dummy-cpu implementation

Using virtio-vhost-user or vhost-pci

2020-10-12 Thread Cosmin Chenaru
Hi, Could you please tell me if there has been any more work on virtio-vhost-user or vhost-pci? The last messages that I could find were from January 2018, from this thread [1], and from what I see the latest Qemu code does not have that included. I am currently running multiple VMs, connected in

Re: [PATCH 0/2] Add Xen CpusAccel

2020-10-12 Thread Claudio Fontana
On 10/12/20 10:07 PM, Jason Andryuk wrote: > Xen was left behind when CpusAccel became mandatory and fails the assert > in qemu_init_vcpu(). It relied on the same dummy cpu threads as qtest. > Move the qtest cpu functions to a common location and reuse them for > Xen. > > Jason Andryuk (2): > a

Re: [PATCH 1/2] accel: move qtest CpusAccel functions to a common location

2020-10-12 Thread Claudio Fontana
On 10/12/20 10:07 PM, Jason Andryuk wrote: > Move and rename accel/qtest/qtest-cpu.* files to accel/dummy/ so they > can be re-used by Xen. > > Signed-off-by: Jason Andryuk > --- > .../qtest-cpus.c => dummy/dummy-cpus.c} | 22 +-- > .../qtest-cpus.h => dummy/dummy-cpus.h}

Re: [PATCH 2/2] accel: Add xen CpusAccel using dummy-cpu

2020-10-12 Thread Claudio Fontana
On 10/12/20 10:07 PM, Jason Andryuk wrote: > Xen was broken by commit 1583a3898853 ("cpus: extract out qtest-specific > code to accel/qtest"). Xen relied on qemu_init_vcpu() calling > qemu_dummy_start_vcpu() in the default case, but that was replaced by > g_assert_not_reached(). > > Add a minimal

Re: [PATCH 4/4] spapr: Make spapr_cpu_core_unrealize() idempotent

2020-10-12 Thread Greg Kurz
On Mon, 12 Oct 2020 17:20:07 +0200 Greg Kurz wrote: > spapr_cpu_core_realize() has an err_unrealize label which partially > duplicates the code of spapr_cpu_core_realize(). > > Let's make spapr_cpu_core_unrealize() idempotent and call it instead. > The registration and unregistration of the rese

Re: [PATCH 1/2] accel: move qtest CpusAccel functions to a common location

2020-10-12 Thread Paolo Bonzini
On 12/10/20 22:23, Claudio Fontana wrote: > On 10/12/20 10:07 PM, Jason Andryuk wrote: >> Move and rename accel/qtest/qtest-cpu.* files to accel/dummy/ so they >> can be re-used by Xen. >> >> Signed-off-by: Jason Andryuk >> --- >> .../qtest-cpus.c => dummy/dummy-cpus.c} | 22 +--

[PULL 01/38] meson.build: Add comments to clarify code organization

2020-10-12 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201006125602.2311423-2-phi...@redhat.com> Signed-off-by: Paolo Bonzini --- meson.build | 8 1 file changed, 8 insertions(+) diff --git a/meson.build b/meson.build index 17c89c87c6..68eaf8ce2f 100644 ---

[PULL v2 00/38] SCSI, qdev, qtest, meson patches for 2020-10-10

2020-10-12 Thread Paolo Bonzini
The following changes since commit a0bdf866873467271eff9a92f179ab0f77d735cb: Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20201012a' into staging (2020-10-12 13:12:04 +0100) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream

[PULL 07/38] crypto: Move the creation of the library to the main meson.build

2020-10-12 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Be consistent creating all the libraries in the main meson.build file. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201006125602.2311423-8-phi...@redhat.com> Signed-off-by: Paolo Bonzini --- crypto/meson.build | 10 --

[PULL 03/38] hw/core: Move the creation of the library to the main meson.build

2020-10-12 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Be consistent creating all the libraries in the main meson.build file. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201006125602.2311423-4-phi...@redhat.com> Signed-off-by: Paolo Bonzini --- hw/core/meson.build | 6 -- meso

[PULL 05/38] migration: Move the creation of the library to the main meson.build

2020-10-12 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Be consistent creating all the libraries in the main meson.build file. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201006125602.2311423-6-phi...@redhat.com> Signed-off-by: Paolo Bonzini --- meson.build | 7 +++ m

[PULL 02/38] meson.build: Sort sourcesets alphabetically

2020-10-12 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201006125602.2311423-3-phi...@redhat.com> Signed-off-by: Paolo Bonzini --- meson.build | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/meson.build b/meson.build index 68eaf8

[PULL 11/38] softmmu: move more files to softmmu/

2020-10-12 Thread Paolo Bonzini
Keep most softmmu_ss files into the system-emulation-specific directory. Signed-off-by: Paolo Bonzini --- MAINTAINERS | 9 + meson.build | 10 -- bootdevice.c => softmmu/bootdevice.c | 0 device_tree.c => softmmu/dev

[PULL 15/38] docs/devel/qtest: Include protocol spec in document

2020-10-12 Thread Paolo Bonzini
From: Eduardo Habkost Include the QTest Protocol doc string in docs/devel/qtest.rst, after converting it to use Sphinx syntax. Signed-off-by: Eduardo Habkost Acked-by: Thomas Huth Message-Id: <20201005205228.697463-3-ehabk...@redhat.com> Signed-off-by: Paolo Bonzini --- docs/devel/qtest.rst

[PULL 13/38] qom: fix objects with improper parent type

2020-10-12 Thread Paolo Bonzini
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 Signed-off-by: Paolo Bo

[PULL 06/38] io: Move the creation of the library to the main meson.build

2020-10-12 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Be consistent creating all the libraries in the main meson.build file. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201006125602.2311423-7-phi...@redhat.com> Signed-off-by: Paolo Bonzini --- io/meson.build | 10 -- meso

[PULL 04/38] chardev: Move the creation of the library to the main meson.build

2020-10-12 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Be consistent creating all the libraries in the main meson.build file. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201006125602.2311423-5-phi...@redhat.com> Signed-off-by: Paolo Bonzini --- chardev/meson.build | 6 -- meso

[PULL 19/38] build-sys: fix git version from -version

2020-10-12 Thread Paolo Bonzini
From: Marc-André Lureau Typo introduced with the script. Fixes: 2c273f32d3 ("meson: generate qemu-version.h") Signed-off-by: Marc-André Lureau Reported-by: Laszlo Ersek Reviewed-by: Eric Blake Tested-by: Laszlo Ersek Message-Id: <20200929143654.518157-1-marcandre.lur...@redhat.com> Signed-of

[PULL 08/38] authz: Move the creation of the library to the main meson.build

2020-10-12 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Be consistent creating all the libraries in the main meson.build file. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201006125602.2311423-9-phi...@redhat.com> Signed-off-by: Paolo Bonzini --- authz/meson.build | 10 -- m

[PULL 09/38] qom: Move the creation of the library to the main meson.build

2020-10-12 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Be consistent creating all the libraries in the main meson.build file. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201006125602.2311423-10-phi...@redhat.com> Signed-off-by: Paolo Bonzini --- meson.build | 8 qom/m

[PULL 14/38] docs: Move QTest documentation to its own document

2020-10-12 Thread Paolo Bonzini
From: Eduardo Habkost 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 Acked-by: Thomas Huth Message-Id: <20201005205228.

[PULL 10/38] hw/nvram: Always register FW_CFG_DATA_GENERATOR_INTERFACE

2020-10-12 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé 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 err

[PULL 21/38] qtest: rename qtest_qmp_receive to qtest_qmp_receive_dict

2020-10-12 Thread Paolo Bonzini
From: Maxim Levitsky 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 Signed-off-by: Maxim Levitsky Signed-off-by: Paolo Bo

[PULL 22/38] qtest: Reintroduce qtest_qmp_receive with QMP event buffering

2020-10-12 Thread Paolo Bonzini
From: Maxim Levitsky 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

[PULL 17/38] qtest: unify extra_qtest_srcs and extra_qtest_deps

2020-10-12 Thread Paolo Bonzini
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 --- tests/qtest/mes

[PULL 28/38] qdev: add "check if address free" callback for buses

2020-10-12 Thread Paolo Bonzini
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 Message-Id: <20201006123904.610658-5-mlevi...@redha

[PULL 12/38] exec: split out non-softmmu-specific parts

2020-10-12 Thread Paolo Bonzini
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 Q

[PULL 18/38] docs/devel: update instruction on how to add new unit tests

2020-10-12 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- docs/devel/qtest.rst | 30 +- docs/devel/testing.rst | 19 ++- 2 files changed, 31 insertions(+), 18 deletions(-) diff --git a/docs/devel/qtest.rst b/docs/devel/qtest.rst index 075fe5f7d5..97c5a75626 100644 --- a/docs

[PULL 31/38] device-core: use RCU for list of children of a bus

2020-10-12 Thread Paolo Bonzini
From: Maxim Levitsky 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 w

[PULL 26/38] qtest: check that drives are really appearing and disappearing

2020-10-12 Thread Paolo Bonzini
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 Signed-off-by: Paolo Bonzini --- tests/qtest/drive_del-test.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-

[PULL 24/38] device-plug-test: use qtest_qmp to send the device_del command

2020-10-12 Thread Paolo Bonzini
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 --- tests/qtest/device-plug-test.c | 32 +--- 1 file changed, 9 insertions(+), 23 deletions(-) diff --g

[PULL 36/38] virtio-scsi: use scsi_device_get

2020-10-12 Thread Paolo Bonzini
From: Maxim Levitsky 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 Signed-off-by: Maxim Levitsky Reviewed-by: Stefan Hajnoczi Message-Id: <2020

[PULL 25/38] qtest: switch users back to qtest_qmp_receive

2020-10-12 Thread Paolo Bonzini
From: Maxim Levitsky 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 Message-Id: <20201006123904.610658-4-mlevi...@redhat.com> Signed-

[PULL 38/38] meson: identify more sections of meson.build

2020-10-12 Thread Paolo Bonzini
Add more headers that clarify code organization. Signed-off-by: Paolo Bonzini --- meson.build | 36 +--- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/meson.build b/meson.build index 0c676af194..652c37cceb 100644 --- a/meson.build +++ b/meson.bui

[PULL 20/38] meson.build: Re-enable KVM support for MIPS

2020-10-12 Thread Paolo Bonzini
From: Huacai Chen 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

[PULL 33/38] device-core: use atomic_set on .realized property

2020-10-12 Thread Paolo Bonzini
From: Maxim Levitsky 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. U

[PULL 16/38] docs/devel/qtest: Include libqtest API reference

2020-10-12 Thread Paolo Bonzini
From: Eduardo Habkost Signed-off-by: Eduardo Habkost Acked-by: Thomas Huth Message-Id: <20201005205228.697463-4-ehabk...@redhat.com> Signed-off-by: Paolo Bonzini --- docs/devel/qtest.rst | 6 ++ tests/qtest/libqos/libqtest.h | 20 ++-- 2 files changed, 16 inserti

[PULL 32/38] scsi: switch to bus->check_address

2020-10-12 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini Message-Id: <20201006123904.610658-6-mlevi...@redhat.com> Signed-off-by: Paolo Bonzini --- hw/scsi/scsi-bus.c | 122 - 1 file changed, 75 insertions(+), 47 deletions(-) diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c

[PULL 29/38] scsi/scsi_bus: switch search direction in scsi_device_find

2020-10-12 Thread Paolo Bonzini
From: Maxim Levitsky 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 Reviewed-by: Stefan Hajnoczi Message-Id: <20200913160259.32145-2-mlevi...@redhat.com> Signed-off-by: Paolo Bonzini --- hw/scsi/s

Re: [PATCH 1/2] accel: move qtest CpusAccel functions to a common location

2020-10-12 Thread Jason Andryuk
On Mon, Oct 12, 2020 at 4:30 PM Paolo Bonzini wrote: > > On 12/10/20 22:23, Claudio Fontana wrote: > > On 10/12/20 10:07 PM, Jason Andryuk wrote: > >> Move and rename accel/qtest/qtest-cpu.* files to accel/dummy/ so they > >> can be re-used by Xen. > >> > >> Signed-off-by: Jason Andryuk > >> ---

[PULL 27/38] qemu-iotests, qtest: rewrite test 067 as a qtest

2020-10-12 Thread Paolo Bonzini
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 simil

[PATCH 0/1] mips: add 34Kf-64tlb fictitious cpu type like 34Kf but with 64 TLBs

2020-10-12 Thread Victor Kamensky
Hi Qenu MIPS guys, Could you please review and, if possible, accept a simple patch, following this cover letter, that introduces new fictitious 34Kf-64tlb MIPS cpu model. It is exact copy of 34Kf MIPS cpu model only the number of TLBs is bumped up from 16 to 64. This change and use of 34Kf-64tlb

Re: [PATCH 1/2] accel: move qtest CpusAccel functions to a common location

2020-10-12 Thread Paolo Bonzini
On 12/10/20 22:40, Jason Andryuk wrote: >>> +specific_ss.add_all(when: ['CONFIG_SOFTMMU', 'CONFIG_POSIX'], if_true: >>> dummy_ss) > ... I don't really know meson, but this file is guarded by > CONFIG_POSIX? If that's true, then this ifdef can just go away. Yes, it's redundant since cpus.c was s

[PULL 30/38] device_core: use drain_call_rcu in in qmp_device_add

2020-10-12 Thread Paolo Bonzini
From: Maxim Levitsky 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-

Re: [PATCH 1/2] accel: move qtest CpusAccel functions to a common location

2020-10-12 Thread Jason Andryuk
On Mon, Oct 12, 2020 at 4:23 PM Claudio Fontana wrote: > > On 10/12/20 10:07 PM, Jason Andryuk wrote: > > Move and rename accel/qtest/qtest-cpu.* files to accel/dummy/ so they > > can be re-used by Xen. > > > > Signed-off-by: Jason Andryuk > > --- > > .../qtest-cpus.c => dummy/dummy-cpus.c}

[PULL 23/38] qtest: remove qtest_qmp_receive_success

2020-10-12 Thread Paolo Bonzini
From: Maxim Levitsky 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 Signed-off

[PULL 37/38] scsi/scsi_bus: fix races in REPORT LUNS

2020-10-12 Thread Paolo Bonzini
From: Maxim Levitsky 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

[PULL 34/38] scsi/scsi-bus: scsi_device_find: don't return unrealized devices

2020-10-12 Thread Paolo Bonzini
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 Signed-off-by:

[PULL 35/38] scsi/scsi_bus: Add scsi_device_get

2020-10-12 Thread Paolo Bonzini
From: Maxim Levitsky Add scsi_device_get which finds the scsi device and takes a reference to it. Suggested-by: Stefan Hajnoczi Signed-off-by: Maxim Levitsky Message-Id: <20200913160259.32145-8-mlevi...@redhat.com> Signed-off-by: Paolo Bonzini Message-Id: <20201006123904.610658-12-mlevi...@re

Re: [PATCH] hw/usb/hcd-dwc2: fix divide-by-zero in dwc2_handle_packet()

2020-10-12 Thread Paul Zimmerman
On Mon, Oct 12, 2020 at 8:05 AM Mauro Matteo Cascella wrote: > > Check the value of mps before it is used as divisor. Since HCCHAR_MPS is guest > controllable, this prevents a malicious/buggy guest from crashing the QEMU > process on the host. > > Signed-off-by: Mauro Matteo Cascella > Reported-b

[PATCH 1/1] mips: add 34Kf-64tlb fictitious cpu type like 34Kf but with 64 TLBs

2020-10-12 Thread Victor Kamensky
In Yocto Project CI runs it was observed that test run of 32 bit mips image takes almost twice longer than 64 bit mips image with the same logical load and CI execution hits timeout. See https://bugzilla.yoctoproject.org/show_bug.cgi?id=13992 Yocto project uses 34Kf cpu type to run 32 bit mips im

Re: [RFC] Don't lookup full CPU state in the indirect branch fast path on AArch64 when running in user mode.

2020-10-12 Thread Owen Anderson
Ping. I'd like to get feedback on how/whether this could be developed into a landable version. Thanks, --Owen On Tue, Sep 29, 2020 at 2:32 PM Owen Anderson wrote: > > Hello, > > I would like to request feedback on the following patch, which I do > not believe should be applied to master as-is.

Re: [PULL v2 00/38] SCSI, qdev, qtest, meson patches for 2020-10-10

2020-10-12 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20201012203343.1105018-1-pbonz...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20201012203343.1105018-1-pbonz...@redhat.com Subject: [PULL v2 00/38] SCSI, qdev, qtest

Re: [PATCH] hw/rtc/m48t59: Simplify m48t59_init()

2020-10-12 Thread Laurent Vivier
Le 30/09/2020 à 13:25, Laurent Vivier a écrit : > Le 14/09/2020 à 12:24, Philippe Mathieu-Daudé a écrit : >> As the 'io_base' argument of m48t59_init() is unused (set to 0), >> remove it to simplify. >> To create a device on the ISA bus, m48t59_init_isa() is the >> preferred function to use. >> >>

Re: [PATCH 3/3] Acceptance tests: show test report on GitLab CI

2020-10-12 Thread Cleber Rosa
On Mon, Oct 12, 2020 at 02:09:22PM +0100, Alex Bennée wrote: > > Philippe Mathieu-Daudé writes: > > > On 10/9/20 10:55 PM, Cleber Rosa wrote: > >> Avocado will, by default, produce JUnit files. Let's ask GitLab > >> to present those in the web UI. > > > > https://gitlab.com/philmd/qemu/-/pipeli

[PATCH v2 2/3] qtest: unbreak non-TCG builds in bios-tables-test

2020-10-12 Thread Claudio Fontana
the tests assume TCG is available, thus breaking for TCG-only tests, where only the TCG accelerator option is passed to the QEMU binary. Suggested-by: Paolo Bonzini Acked-by: Paolo Bonzini Signed-off-by: Claudio Fontana --- tests/qtest/bios-tables-test.c | 10 ++ 1 file changed, 10 ins

[PATCH v2 0/3] unbreak non-tcg builds

2020-10-12 Thread Claudio Fontana
This series now unbreaks current non-tcg builds (!CONFIG_TCG). tests Makefiles need to avoid relying on all non-native archs binaries to be present, bios-tables-test needs to skip tests that are tcg-only, and notably the replay framework needs to consider that it might not be functional (or its

[PATCH v2 1/3] tests/Makefile.include: unbreak non-tcg builds

2020-10-12 Thread Claudio Fontana
From: Paolo Bonzini remove dependency of check-block from non-native archs Signed-off-by: Claudio Fontana --- tests/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index 5aca98e60c..4037490b69 100644 --- a/tes

[PATCH v2 3/3] replay: do not build if TCG is not available

2020-10-12 Thread Claudio Fontana
this fixes non-TCG builds broken recently by replay reverse debugging. stub the needed functions in stub/, including errors for hmp and qmp. change hooks for the case when replay code is disabled (!CONFIG_TCG), as we need to avoid sinking all the events in replay in this case. Surprisingly, only

Re: [PULL v2 00/30] Block patches

2020-10-12 Thread Peter Maydell
On Mon, 12 Oct 2020 at 19:28, Stefan Hajnoczi wrote: > > The following changes since commit 2387df497b4b4bcf754eb7398edca82889e2ef54: > > Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2020-10-10' > into staging (2020-10-12 11:29:42 +0100) > > are available in the Git repository at

[PATCH v3 RESEND] fcntl: Add 32bit filesystem mode

2020-10-12 Thread Linus Walleij
It was brought to my attention that this bug from 2018 was still unresolved: 32 bit emulators like QEMU were given 64 bit hashes when running 32 bit emulation on 64 bit systems. This adds a flag to the fcntl() F_GETFD and F_SETFD operations to set the underlying filesystem into 32bit mode even if

[Bug 1899539] [NEW] keyboard errors in DOS, found links to similar errors for reference

2020-10-12 Thread p kirkham
Public bug reported: OS: slackware 14.2, updated. qemu version: 4.1.0 (from slackbuild script) command line: qemu-system-i386 -hda msdos.vhd Description of problem: MSDOS 6.22 disk image running gwbasic 3.23. Cursor keys and sometimes letter keys are repeated. Cursor keys seemingly always, lette

Re: [PATCH v2 3/3] replay: do not build if TCG is not available

2020-10-12 Thread Paolo Bonzini
On 12/10/20 23:45, Claudio Fontana wrote: > +ctx = blk_get_aio_context(blk); > +if (!replay_bh_schedule_oneshot_event(ctx, error_callback_bh, acb)) { > +/* regular case without replay */ > +aio_bh_schedule_oneshot(ctx, error_callback_bh, acb); > +} Why can't the stub ju

Re: [PATCH v4 4/5] spapr_numa: consider user input when defining associativity

2020-10-12 Thread David Gibson
On Mon, Oct 12, 2020 at 07:44:14PM +0200, Philippe Mathieu-Daudé wrote: > On 10/7/20 7:28 PM, Daniel Henrique Barboza wrote: > > A new function called spapr_numa_define_associativity_domains() > > is created to calculate the associativity domains and change > > the associativity arrays considering

Re: Using virtio-vhost-user or vhost-pci

2020-10-12 Thread Nikos Dragazis
On 12/10/20 10:22 μ.μ., Cosmin Chenaru wrote: Hi, Could you please tell me if there has been any more work on virtio-vhost-user or vhost-pci? The last messages that I could find were from January 2018, from this thread [1], and from what I see the latest Qemu code does not have that included

[PATCH v7 0/4] Improve cirrus msys2

2020-10-12 Thread Yonggang Luo
Fixes the broken msys2/mingw ci and speed it up. V6-V7 * cirrus: Enable doc build on msys2/mingw * docs: Fixes build docs on msys2/mingw * gitignore: ignore a bit more * scripts: Convert qemu-version.sh to qemu-version.py V5-V6 Remove the university mirror, the main repo are back. rename to setup

[PATCH v7 1/4] scripts: Convert qemu-version.sh to qemu-version.py

2020-10-12 Thread Yonggang Luo
The sh script are harder to maintain for compatible different xsh environment so convert it to python script Also incorporate the fixes in https://patchew.org/QEMU/20200929143654.518157-1-marcandre.lur...@redhat.com/ According to https://github.com/msys2/MSYS2-packages/issues/2176 We need use CYGW

[PATCH v7 2/4] gitignore: ignore a bit more

2020-10-12 Thread Yonggang Luo
Enable the creating multiple build directory at the source root. Ignore /meson/ and /roms/ for better search experience. Signed-off-by: Yonggang Luo --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b32bca1315..f78ee9f297 100644 -

[PATCH v7 3/4] docs: Fixes build docs on msys2/mingw

2020-10-12 Thread Yonggang Luo
Signed-off-by: Yonggang Luo --- docs/conf.py | 2 +- docs/sphinx/kerneldoc.py | 2 +- scripts/rst-sanitize.py | 21 + tests/qapi-schema/meson.build | 5 +++-- 4 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 scripts/rst-sanit

[PATCH v7 4/4] cirrus: Enable doc build on msys2/mingw

2020-10-12 Thread Yonggang Luo
Currently rST depends on old version sphinx-2.x. Install it by downloading it. Remove the need of university mirror, the main repo are recovered. Signed-off-by: Yonggang Luo --- .cirrus.yml | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 9

<    1   2   3   4   5   >