Re: [PATCH v6 26/36] qapi/gen.py: Fix edge-case of _is_user_module

2020-10-09 Thread Markus Armbruster
Eduardo Habkost writes: > On Fri, Oct 09, 2020 at 07:26:02PM +0200, Markus Armbruster wrote: >> John Snow writes: >> >> > The edge case is that if the name is '', this expression returns a >> > string instead of a bool, which violates our declared type. >> > In practice, module names are not al

Re: [PATCH] hw/net: move allocation to the heap due to very large stack frame

2020-10-09 Thread David Gibson
On Fri, Oct 09, 2020 at 07:02:56AM -0700, Elena Afanasova wrote: > >From 09905773a00e417d3a37c12350d9e55466fdce8a Mon Sep 17 00:00:00 2001 > From: Elena Afanasova > Date: Fri, 9 Oct 2020 06:41:36 -0700 > Subject: [PATCH] hw/net: move allocation to the heap due to very large stack > frame Patch l

Re: KVM call for agenda for 2020-10-06

2020-10-09 Thread Markus Armbruster
Eduardo Habkost writes: > On Thu, Oct 08, 2020 at 10:03:45AM +0200, Kevin Wolf wrote: >> Am 07.10.2020 um 19:50 hat Paolo Bonzini geschrieben: >> > On 06/10/20 20:21, Stefan Hajnoczi wrote: >> > > * Does command-line order matter? >> > > * Two options: allow any order OR left-to-right

Re: [PATCH] vhost: Don't special case vq->used_phys in vhost_get_log_size()

2020-10-09 Thread Jason Wang
On 2020/10/8 上午12:30, Greg Kurz wrote: The first loop in vhost_get_log_size() computes the size of the dirty log bitmap so that it allows to track changes in the entire guest memory, in terms of GPA. When not using a vIOMMU, the address of the vring's used structure, vq->used_phys, is a GPA. I

Re: [PATCH v3 3/3] vhost: Don't call log_access_ok() when using IOTLB

2020-10-09 Thread Jason Wang
On 2020/10/3 下午6:02, Greg Kurz wrote: When the IOTLB device is enabled, the log_guest_addr that is passed by userspace to the VHOST_SET_VRING_ADDR ioctl, and which is then written to vq->log_addr, is a GIOVA. All writes to this address are translated by log_user() to writes to an HVA, and then

Re: [PATCH v3 2/3] vhost: Use vhost_get_used_size() in vhost_vring_set_addr()

2020-10-09 Thread Jason Wang
On 2020/10/3 下午6:02, Greg Kurz wrote: The open-coded computation of the used size doesn't take the event into account when the VIRTIO_RING_F_EVENT_IDX feature is present. Fix that by using vhost_get_used_size(). Signed-off-by: Greg Kurz --- drivers/vhost/vhost.c |3 +-- 1 file changed,

Re: [RFC PATCH v2 0/8] block-backend: Introduce I/O hang

2020-10-09 Thread cenjiahui
Hi Kevin, Could you please spend some time reviewing and commenting on this patch series. Thanks, Jiahui Cen On 2020/9/30 17:45, Jiahui Cen wrote: > A VM in the cloud environment may use a virutal disk as the backend storage, > and there are usually filesystems on the virtual block device. When

Re: [PATCH V13 9/9] docs/system: Update MIPS machine documentation

2020-10-09 Thread Huacai Chen
Hi, Philippe, On Fri, Oct 9, 2020 at 11:29 PM Philippe Mathieu-Daudé wrote: > > Hi Huacai, > > On 10/7/20 10:39 AM, Huacai Chen wrote: > > Add Loongson-3A CPU models and Loongson-3 based machine description. > > > > Signed-off-by: Huacai Chen > > --- > > docs/system/cpu-models-mips.rst.inc | 1

Re: [RFC PATCH 0/4] generic loader FDT support (for direct Xen boot)

2020-10-09 Thread Alistair Francis
On Fri, Oct 9, 2020 at 10:07 AM Alex Bennée wrote: > > Hi, > > This series adds the ability to append FDT data for blobs loaded by > the generic loader. My principle use-case was to be able to directly > boot Xen with a kernel image which avoided having to: > > - get the kernel image into my sys

Re: Which qemu change corresponds to RedHat bug 1655408

2020-10-09 Thread Jakob Bohm
On 2020-10-09 15:56, Max Reitz wrote: On 09.10.20 14:55, Jakob Bohm wrote: On 2020-10-09 10:48, Max Reitz wrote: [...] The error I got was specifically "Failed to lock byte 100" and VM not starting.  The ISO file was on a R/W NFS3 share, but was itself R/O for the user that root was mapped t

Re: [PATCH v1 0/4] Allow loading a no MMU kernel

2020-10-09 Thread Alistair Francis
On Fri, Oct 9, 2020 at 2:53 AM Bin Meng wrote: > > Hi Alistair, > > On Fri, Oct 2, 2020 at 11:50 PM Alistair Francis > wrote: > > > > This series allows loading a noMMU kernel using the -kernel option. > > Currently if using -kernel QEMU assumes you also have firmware and loads > > the kernel at

Re: [PATCH] target/arm: Fix SMLAD incorrect setting of Q bit

2020-10-09 Thread Richard Henderson
On 10/9/20 1:48 PM, Peter Maydell wrote: > On Fri, 9 Oct 2020 at 15:47, Peter Maydell wrote: >> +tcg_gen_extr_i64_i32(t1, t2, p64); > > Oh, I forgot to mention, but it looks like extr_i64_i32 > isn't documented in tcg/README. Is that because it isn't > really a TCG IR op, or just an omiss

Re: [PATCH] target/arm: Fix SMLAD incorrect setting of Q bit

2020-10-09 Thread Richard Henderson
On 10/9/20 1:47 PM, Peter Maydell wrote: > On Fri, 9 Oct 2020 at 18:57, Richard Henderson > wrote: >> >> On 10/9/20 9:47 AM, Peter Maydell wrote: >>> +/* >>> + * t1 is the low half of the result which goes into Rd. >>> + * We have overflow and must set Q if the high half (t

Re: [RFC PATCH] contrib/gitdm: Add more individual contributors

2020-10-09 Thread Ahmed Karaman
On Sun, Oct 4, 2020, 8:25 PM Philippe Mathieu-Daudé wrote: > These individual contributors have a number of contributions, > add them to the 'individual' group map. > > Cc: Ahmed Karaman > Cc: Aleksandar Markovic > Cc: Alistair Francis > Cc: Artyom Tarasenko > Cc: David Carlier > Cc: Finn Th

Re: [PATCH v1 2/4] hw/riscv: Return the end address of the loaded firmware

2020-10-09 Thread Alistair Francis
On Fri, Oct 9, 2020 at 3:14 AM Bin Meng wrote: > > On Fri, Oct 2, 2020 at 11:42 PM Alistair Francis > wrote: > > It merits some commit message to explain why the return value of > riscv_load_firmware() was changed from firmware entry address to > firmware end address. Done. Alistair > > > > >

Re: [PATCH 2/2] goldfish_rtc: change MemoryRegionOps endianness to DEVICE_NATIVE_ENDIAN

2020-10-09 Thread Alistair Francis
On Fri, Oct 9, 2020 at 4:40 AM Laurent Vivier wrote: > > The doc [1] doesn't define the endianness, but the kernel driver > uses readl() to access the registers, so we can guess it depends > on the architecture endianness. > > As riscv architecture endianness is little it might not change anything

Re: [PATCH 1/2] hw/char/serial: remove duplicate .class_init in serial_mm_info

2020-10-09 Thread Alistair Francis
On Fri, Oct 9, 2020 at 4:39 AM Laurent Vivier wrote: > > .class_init is already set to serial_mm_class_init. > > Remove the duplicate entry. > > Fixes: 17fd1a6490b1 ("serial-mm: add "regshift" property") > Cc: marcandre.lur...@redhat.com > Signed-off-by: Laurent Vivier Reviewed-by: Alistair Fran

[PATCH v4 6/7] nbd: Refactor counting of metadata contexts

2020-10-09 Thread Eric Blake
Rather than open-code the count of negotiated contexts at several sites, embed it directly into the struct. Signed-off-by: Eric Blake --- nbd/server.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/nbd/server.c b/nbd/server.c index 05a8154975a1..27d

[PATCH v4 4/7] nbd: Update qapi to support exporting multiple bitmaps

2020-10-09 Thread Eric Blake
Since 'nbd-server-add' is deprecated, and 'block-export-add' is new to 5.2, we can still tweak the interface. Allowing 'bitmaps':['str'] is nicer than 'bitmap':'str'. This wires up the qapi and qemu-nbd changes to permit passing multiple bitmaps as distinct metadata contexts that the NBD client m

[PATCH v4 7/7] nbd: Allow export of multiple bitmaps for one device

2020-10-09 Thread Eric Blake
With this, 'qemu-nbd -B b0 -B b1 -f qcow2 img.qcow2' can let you sniff out multiple bitmaps from one server. qemu-img as client can still only read one bitmap per client connection, but other NBD clients (hello libnbd) can now read multiple bitmaps in a single pass. Signed-off-by: Eric Blake ---

[PATCH v4 2/7] nbd: Add new qemu:allocation-depth metadata context

2020-10-09 Thread Eric Blake
'qemu-img map' provides a way to determine which extents of an image come from the top layer vs. inherited from a backing chain. This is useful information worth exposing over NBD. There is a proposal to add a QMP command block-dirty-bitmap-populate which can create a dirty bitmap that reflects a

[PATCH v4 5/7] nbd: Simplify qemu bitmap context name

2020-10-09 Thread Eric Blake
Each dirty bitmap already knows its name; by reducing the scope of the places where we construct "qemu:dirty-bitmap:NAME" strings, tracking the name is more localized, and there are fewer per-export fields to worry about. This in turn will make it easier for an upcoming patch to export more than o

[PATCH v4 3/7] nbd: Add 'qemu-nbd -A' to expose allocation depth

2020-10-09 Thread Eric Blake
Allow the server to expose an additional metacontext to be requested by savvy clients. qemu-nbd adds a new option -A to expose the qemu:allocation-depth metacontext through NBD_CMD_BLOCK_STATUS; this can also be set via QMP when using block-export-add. qemu as client can be hacked into viewing th

[PATCH v4 0/7] Exposing backing-chain allocation over NBD

2020-10-09 Thread Eric Blake
v3 was here: https://lists.gnu.org/archive/html/qemu-devel/2020-10/msg02305.html Since then: rebase to master - patch 1 is new, fixing a theoretical bug in QAPI interaction and simplifying later patches - patch 2, 4, and 6 are renamed to favor the term 'metadata context' [Markus], sadly 'git bac

[PATCH v4 1/7] nbd: Utilize QAPI_CLONE for type conversion

2020-10-09 Thread Eric Blake
Rather than open-coding the translation from the deprecated NbdServerAddOptions type to the preferred BlockExportOptionsNbd, it's better to utilize QAPI_CLONE_MEMBERS. This solves a couple of issues: first, if we do any more refactoring of the base type (which an upcoming patch plans to do), we do

Re: [PATCH] vmbus: Don't make QOM property registration conditional

2020-10-09 Thread Maciej S. Szmigiero
On 09.10.2020 22:07, Eduardo Habkost wrote: > Having properties registered conditionally makes QOM type > introspection difficult. Instead of skipping registration of the > "instanceid" property, always register the property but validate > its value against the instance id required by the class. >

Re: [PATCH] vmbus: Don't make QOM property registration conditional

2020-10-09 Thread Eduardo Habkost
On Fri, Oct 09, 2020 at 11:05:47PM +0200, Maciej S. Szmigiero wrote: > On 09.10.2020 22:07, Eduardo Habkost wrote: > > Having properties registered conditionally makes QOM type > > introspection difficult. Instead of skipping registration of the > > "instanceid" property, always register the prope

[PATCH] check-qom-proplist: Don't register instance props for user-creatable type

2020-10-09 Thread Eduardo Habkost
user-creatable types will now be forbidden from registering instance properties, but check-qom-proplist reuse the same type for testing user_creatable_add_opts() and for testing class/instance property enumeration. To address those conflicting requirements, add two subclasses of TYPE_DUMMY: one th

Re: Who uses TYPE_VMBUS_DEVICE?

2020-10-09 Thread Eduardo Habkost
On Fri, Oct 09, 2020 at 11:05:31PM +0200, Maciej S. Szmigiero wrote: > Hi Eduardo, > > On 09.10.2020 21:39, Eduardo Habkost wrote: > > Hi, > > > > I've just stumbled upon hw/hyperv/vmbus.c and I'm a bit confused: > > I haven't found any subclasses of the abstract type > > TYPE_VMBUS_DEVICE in the

[Bug 1897783] Re: avocado tests not running on aarch64 host

2020-10-09 Thread Cleber Rosa
** Changed in: qemu Assignee: (unassigned) => Cleber Rosa (cleber-gnu) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1897783 Title: avocado tests not running on aarch64 host Status in QEMU:

Re: Who uses TYPE_VMBUS_DEVICE?

2020-10-09 Thread Maciej S. Szmigiero
Hi Eduardo, On 09.10.2020 21:39, Eduardo Habkost wrote: > Hi, > > I've just stumbled upon hw/hyperv/vmbus.c and I'm a bit confused: > I haven't found any subclasses of the abstract type > TYPE_VMBUS_DEVICE in the QEMU tree. > > I see a few patches in qemu-devel implementing a few vmbus > devices

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

2020-10-09 Thread Cleber Rosa
Avocado will, by default, produce JUnit files. Let's ask GitLab to present those in the web UI. Signed-off-by: Cleber Rosa --- .gitlab-ci.yml | 5 + 1 file changed, 5 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bed5fe6161..7d4b2ced9e 100644 --- a/.gitlab-ci.yml +++ b/.

[PATCH 2/3] Acceptance tests: do not show canceled test logs on GitLab CI

2020-10-09 Thread Cleber Rosa
Tests resulting in "CANCEL" in Avocado are usually canceled on purpose, and are almost identical to "SKIP". The logs for canceled tests are adding a lot of noise to the logs being shown on GitLab CI, and causing distraction from real failures. As a side note, this "after script" is scheduled for

[PATCH 0/3] Acceptance Tests: improve usage on GitLab CI

2020-10-09 Thread Cleber Rosa
This attempts to improve a bit the execution of acceptance tests in both GitLab CI, and in restricted Python environments. For the GitLab's rendering of test results, a sample can be seen here: https://gitlab.com/cleber.gnu/qemu/-/pipelines/200639030/test_report Cleber Rosa (3): Acceptance t

[PATCH 1/3] Acceptance tests: bump pycdlib version for easier installation

2020-10-09 Thread Cleber Rosa
On with certain versions of "pip", package installations will attempt to create wheels. And, on environments without a "complete" Python installation (as described in the acceptance tests requirements docs), that will fail. pycdlib, starting with version 1.11.0, is now being made available as whe

[PATCH v2] tests/acceptance: Test case for detecting -object crashes

2020-10-09 Thread Eduardo Habkost
Add a simple test case that will run QEMU directly (without QMP) just to check for crashes when using `-object`. Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * "Running command:" log message instead of "Command:" (Cleber) * Use universal_newlines=True instead of encoding='utf-8' (Cleber)

Re: [PULL 00/30] Block patches

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

Re: [PULL v2 0/8] NBD patches through 2020-10-08

2020-10-09 Thread Eric Blake
On 10/9/20 1:50 PM, Peter Maydell wrote: > On Fri, 9 Oct 2020 at 14:57, Eric Blake wrote: >> >> The following changes since commit 497d415d76b9f59fcae27f22df1ca2c3fa4df64e: >> >> Merge remote-tracking branch >> 'remotes/pmaydell/tags/pull-target-arm-20201008-1' into staging (2020-10-08 >> 21:4

Re: Requirements for out-of-process device emulation

2020-10-09 Thread Alex Williamson
On Fri, 9 Oct 2020 17:18:15 +0100 Stefan Hajnoczi wrote: > Device emulation > > Device resources > > Devices provide resources that drivers interact with such as hardware > registers, memory, or interrupts. The fundamental requirement of > out-of-process device e

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

2020-10-09 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 v3 6/8] qemu-nbd: Honor SIGINT and SIGHUP

2020-10-09 Thread Eric Blake
Honoring just SIGTERM on Linux is too weak; we also want to handle other common signals, and do so even on BSD. Why? Because at least 'qemu-nbd -B bitmap' needs a chance to clean up the in-use bit on bitmaps when the server is shut down via a signal. See also: http://bugzilla.redhat.com/1883608

[PATCH] vmbus: Don't make QOM property registration conditional

2020-10-09 Thread Eduardo Habkost
Having properties registered conditionally makes QOM type introspection difficult. Instead of skipping registration of the "instanceid" property, always register the property but validate its value against the instance id required by the class. Signed-off-by: Eduardo Habkost --- Note: due to the

[PULL v3 0/8] NBD patches through 2020-10-08

2020-10-09 Thread Eric Blake
The following changes since commit 4a7c0bd9dcb08798c6f82e55b5a3423f7ee669f1: Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-5.2-20201009' into staging (2020-10-09 15:48:04 +0100) are available in the Git repository at: https://repo.or.cz/qemu/ericb.git tags/pull-nbd-

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

2020-10-09 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

fixup! qom: Simplify and merge pointer property getters/setters

2020-10-09 Thread Eduardo Habkost
On Fri, Oct 09, 2020 at 03:02:58PM -0500, Eric Blake wrote: > On 10/9/20 2:15 PM, Eduardo Habkost wrote: > > Both the property getter and setter for pointer properties can > > simply call the visitor functions directly, instead of making > > extra copies and requiring additional logic. > > > > Rem

Re: [PATCH] block/blkdebug: fix memory leak

2020-10-09 Thread Eric Blake
On 10/9/20 2:09 PM, Elena Afanasova wrote: > Spotted by PVS-Studio > > Signed-off-by: Elena Afanasova > --- > block/blkdebug.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Eric Blake > > diff --git a/block/blkdebug.c b/block/blkdebug.c > index eecbf3e5c4..54da719dd1 100644 > --- a/bl

Who uses TYPE_VMBUS_DEVICE?

2020-10-09 Thread Eduardo Habkost
Hi, I've just stumbled upon hw/hyperv/vmbus.c and I'm a bit confused: I haven't found any subclasses of the abstract type TYPE_VMBUS_DEVICE in the QEMU tree. I see a few patches in qemu-devel implementing a few vmbus devices, but none were merged to qemu.git master. Are there any short term plan

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

2020-10-09 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 26/30] block/io: fix bdrv_co_block_status_above

2020-10-09 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

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

2020-10-09 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

Re: [PATCH 3/3] qom: Simplify and merge pointer property getters/setters

2020-10-09 Thread Eric Blake
On 10/9/20 2:15 PM, Eduardo Habkost wrote: > Both the property getter and setter for pointer properties can > simply call the visitor functions directly, instead of making > extra copies and requiring additional logic. > > Remove the extra copying logic, and merge the getter and setter > functions

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

2020-10-09 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 21/30] qemu-storage-daemon: avoid compiling blockdev_ss twice

2020-10-09 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 18/30] block/export: convert vhost-user-blk server to block export API

2020-10-09 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 28/30] block/io: bdrv_common_block_status_above: support bs == base

2020-10-09 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 15/30] util/vhost-user-server: check EOF when reading payload

2020-10-09 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 14/30] util/vhost-user-server: fix memory leak in vu_message_read()

2020-10-09 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 12/30] block/export: consolidate request structs into VuBlockReq

2020-10-09 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 27/30] block/io: bdrv_common_block_status_above: support include_base

2020-10-09 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 25/30] tests/qtest: add multi-queue test case to vhost-user-blk-test

2020-10-09 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

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

2020-10-09 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 09/30] util/vhost-user-server: s/fileds/fields/ typo fix

2020-10-09 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-3-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- util/vhost-user-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/vhost-user-server.c b/util/vhost-user-server.c index 7b50a2b1fd..2cd0cf8277

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

2020-10-09 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 24/30] block/export: add vhost-user-blk multi-queue support

2020-10-09 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 10/30] util/vhost-user-server: drop unnecessary QOM cast

2020-10-09 Thread Stefan Hajnoczi
We already have access to the value with the correct type (ioc and sioc are the same QIOChannel). Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-4-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- util/vhost-user-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PULL 08/30] MAINTAINERS: Add vhost-user block device backend server maintainer

2020-10-09 Thread Stefan Hajnoczi
From: Coiby Xu Suggested-by: Stefano Garzarella Signed-off-by: Coiby Xu Reviewed-by: Stefan Hajnoczi Reviewed-by: Marc-André Lureau Message-id: 20200918080912.321299-8-coiby...@gmail.com Signed-off-by: Stefan Hajnoczi --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git

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

2020-10-09 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 07/30] test: new qTest case to test the vhost-user-blk-server

2020-10-09 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 17/30] block/export: report flush errors

2020-10-09 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 13/30] util/vhost-user-server: drop unused DevicePanicNotifier

2020-10-09 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 04/30] util/vhost-user-server: generic vhost user server

2020-10-09 Thread Stefan Hajnoczi
From: Coiby Xu Sharing QEMU devices via vhost-user protocol. Only one vhost-user client can connect to the server one time. Suggested-by: Kevin Wolf Signed-off-by: Stefan Hajnoczi Signed-off-by: Coiby Xu Reviewed-by: Stefan Hajnoczi Reviewed-by: Marc-André Lureau Message-id: 20200918080912

[PULL 05/30] block: move logical block size check function to a common utility function

2020-10-09 Thread Stefan Hajnoczi
From: Coiby Xu Move the constants from hw/core/qdev-properties.c to util/block-helpers.h so that knowledge of the min/max values is Signed-off-by: Stefan Hajnoczi Signed-off-by: Coiby Xu Reviewed-by: Stefan Hajnoczi Reviewed-by: Marc-André Lureau Acked-by: Eduardo Habkost Message-id: 202009

Re: [PATCH 3/3] python/qemu/qmp.py: Fix settimeout operation

2020-10-09 Thread Philippe Mathieu-Daudé
On 10/9/20 7:51 PM, John Snow wrote: We enabled callers to interface directly with settimeout, but this reacts poorly with blocking/nonblocking operation; as they are using the same internal mechanism. 1. Whenever we change the blocking mechanism temporarily, always set it back to what it was af

[PULL 06/30] block/export: vhost-user block device backend server

2020-10-09 Thread Stefan Hajnoczi
From: Coiby Xu By making use of libvhost-user, block device drive can be shared to the connected vhost-user client. Only one client can connect to the server one time. Since vhost-user-server needs a block drive to be created first, delay the creation of this object. Suggested-by: Kevin Wolf S

[PULL 02/30] libvhost-user: Allow vu_message_read to be replaced

2020-10-09 Thread Stefan Hajnoczi
From: Coiby Xu Allow vu_message_read to be replaced by one which will make use of the QIOChannel functions. Thus reading vhost-user message won't stall the guest. For slave channel, we still use the default vu_message_read. Reviewed-by: Marc-André Lureau Signed-off-by: Coiby Xu Reviewed-by: St

[PULL 03/30] libvhost-user: remove watch for kick_fd when de-initialize vu-dev

2020-10-09 Thread Stefan Hajnoczi
From: Coiby Xu When the client is running in gdb and quit command is run in gdb, QEMU will still dispatch the event which will cause segment fault in the callback function. Signed-off-by: Coiby Xu Reviewed-by: Stefan Hajnoczi Reviewed-by: Marc-André Lureau Message-id: 20200918080912.321299-3-

[PULL 01/30] block/nvme: Add driver statistics for access alignment and hw errors

2020-10-09 Thread Stefan Hajnoczi
From: Philippe Mathieu-Daudé Keep statistics of some hardware errors, and number of aligned/unaligned I/O accesses. QMP example booting a full RHEL 8.3 aarch64 guest: { "execute": "query-blockstats" } { "return": [ { "device": "", "node-name": "drive0",

[PULL 00/30] Block patches

2020-10-09 Thread Stefan Hajnoczi
The following changes since commit 497d415d76b9f59fcae27f22df1ca2c3fa4df64e: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20201008-1' into staging (2020-10-08 21:41:20 +0100) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git tags/block-pull

Re: [PATCH 2/3] python/qemu/qmp.py: re-raise OSError when encountered

2020-10-09 Thread Philippe Mathieu-Daudé
On 10/9/20 7:51 PM, John Snow wrote: Nested if conditions don't change when the exception block fires; we need to explicitly re-raise the error if we didn't intend to capture and suppress it. Signed-off-by: John Snow --- python/qemu/qmp.py | 11 ++- 1 file changed, 6 insertions(+), 5

[PATCH 3/3] qom: Simplify and merge pointer property getters/setters

2020-10-09 Thread Eduardo Habkost
Both the property getter and setter for pointer properties can simply call the visitor functions directly, instead of making extra copies and requiring additional logic. Remove the extra copying logic, and merge the getter and setter functions in object_visit_uint*_ptr() accessors. Signed-off-by:

[PATCH 2/3] qom: Make object_property_add_uint*_ptr() get non-const pointers

2020-10-09 Thread Eduardo Habkost
Currently, the getter/setter functions are awkward because the visit_type_uint*() functions provided by QAPI will always write a value to the provided pointer. Getting a non-const pointer will allow us to simplify a lot of the getters/setters logic. Signed-off-by: Eduardo Habkost --- include/qo

[PATCH 1/3] acpi: Don't pass const pointers to object_property_add_uint*_ptr()

2020-10-09 Thread Eduardo Habkost
object_property_add_uint*_ptr() will be changed to get non-const pointers. Adapt the ACPI code to that. Signed-off-by: Eduardo Habkost --- hw/acpi/ich9.c| 2 +- hw/acpi/piix4.c | 10 +- hw/isa/lpc_ich9.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw

[PATCH 0/3] qom: Simplify pointer property getters/setters

2020-10-09 Thread Eduardo Habkost
The existing pointer property getters/setters are awkward because they are expected to work with const variables. If we remove that requirement, they can become a lot simpler and simply call the visit_type_uint*() functions directly. Git tree: https://github.com/ehabkost/qemu work/qom-ptr-prop-no

[PATCH] block/blkdebug: fix memory leak

2020-10-09 Thread Elena Afanasova
Spotted by PVS-Studio Signed-off-by: Elena Afanasova --- block/blkdebug.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/blkdebug.c b/block/blkdebug.c index eecbf3e5c4..54da719dd1 100644 --- a/block/blkdebug.c +++ b/block/blkdebug.c @@ -215,6 +215,7 @@ static int add_rule(void *opaque

Re: [PULL v2 0/8] NBD patches through 2020-10-08

2020-10-09 Thread Peter Maydell
On Fri, 9 Oct 2020 at 14:57, Eric Blake wrote: > > The following changes since commit 497d415d76b9f59fcae27f22df1ca2c3fa4df64e: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20201008-1' into staging (2020-10-08 > 21:41:20 +0100) > > are available in the Git reposito

Re: [PATCH] target/arm: Fix SMLAD incorrect setting of Q bit

2020-10-09 Thread Peter Maydell
On Fri, 9 Oct 2020 at 15:47, Peter Maydell wrote: > +tcg_gen_extr_i64_i32(t1, t2, p64); Oh, I forgot to mention, but it looks like extr_i64_i32 isn't documented in tcg/README. Is that because it isn't really a TCG IR op, or just an omission? thanks -- PMM

Re: [PATCH] target/arm: Fix SMLAD incorrect setting of Q bit

2020-10-09 Thread Peter Maydell
On Fri, 9 Oct 2020 at 18:57, Richard Henderson wrote: > > On 10/9/20 9:47 AM, Peter Maydell wrote: > > +/* > > + * t1 is the low half of the result which goes into Rd. > > + * We have overflow and must set Q if the high half (t2) > > + * is different from the sign-e

Re: [Virtio-fs] [PATCH] virtiofsd: Add support for FUSE_HANDLE_KILLPRIV_V2

2020-10-09 Thread Vivek Goyal
On Wed, Sep 16, 2020 at 12:35:53PM -0400, Vivek Goyal wrote: > This patch adds basic support for FUSE_HANDLE_KILLPRIV_V2. virtiofsd > can enable/disable this by specifying option "-o killpriv_v2/no_killpriv_v2". > By default this is enabled as long as client supports it. > > I have posted correspo

Re: [PATCH] target/arm: Fix SMLAD incorrect setting of Q bit

2020-10-09 Thread Richard Henderson
On 10/9/20 9:47 AM, Peter Maydell wrote: > +/* > + * t1 is the low half of the result which goes into Rd. > + * We have overflow and must set Q if the high half (t2) > + * is different from the sign-extension of t1. > + */ > +t3 = tcg_temp_new_i32();

[PATCH 1/3] python: add mypy config

2020-10-09 Thread John Snow
Formalize the options used for checking the python library. You can run mypy from the directory that mypy.ini is in by typing `mypy qemu/`. Signed-off-by: John Snow --- python/mypy.ini | 4 1 file changed, 4 insertions(+) create mode 100644 python/mypy.ini diff --git a/python/mypy.ini b/p

[PATCH 2/3] python/qemu/qmp.py: re-raise OSError when encountered

2020-10-09 Thread John Snow
Nested if conditions don't change when the exception block fires; we need to explicitly re-raise the error if we didn't intend to capture and suppress it. Signed-off-by: John Snow --- python/qemu/qmp.py | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/python/qemu/q

Re: Re%3A [PATCH v4 1%2F2] hw%2Fwatchdog%3A Implement SBSA watchdog device&In-Reply-To=

2020-10-09 Thread Peter Maydell
On Fri, 9 Oct 2020 at 18:30, Shashi Mallela wrote: > > The value being returned here is 0 (initialized to 0 at the beginning of read > function). > I have seen similar practices being followed in other qemu implementations > like for example bcm2835_dma_read() in > qemu/hw/dma/bcm2835_dma.c,a9_

Re: [PATCH 0/3] python/qemu: strictly typed mypy conversion, pt3

2020-10-09 Thread John Snow
On 10/9/20 1:51 PM, John Snow wrote: This is actually quite short; it's already fully typed. Attached are two fixes for settimeout and error handling. There are actually more fixes that need to be made here, because use of readline() in non-blocking mode is actually undefined behavior, so a more

[PATCH 0/3] python/qemu: strictly typed mypy conversion, pt3

2020-10-09 Thread John Snow
This is actually quite short; it's already fully typed. Attached are two fixes for settimeout and error handling. There are actually more fixes that need to be made here, because use of readline() in non-blocking mode is actually undefined behavior, so a more thorough re-work of the error classes u

[PATCH 3/3] python/qemu/qmp.py: Fix settimeout operation

2020-10-09 Thread John Snow
We enabled callers to interface directly with settimeout, but this reacts poorly with blocking/nonblocking operation; as they are using the same internal mechanism. 1. Whenever we change the blocking mechanism temporarily, always set it back to what it was afterwards. 2. Disallow callers from set

Re: [PATCH v6 26/36] qapi/gen.py: Fix edge-case of _is_user_module

2020-10-09 Thread Eduardo Habkost
On Fri, Oct 09, 2020 at 07:26:02PM +0200, Markus Armbruster wrote: > John Snow writes: > > > The edge case is that if the name is '', this expression returns a > > string instead of a bool, which violates our declared type. > > > > In practice, module names are not allowed to be the empty string,

Re: [PATCH 03/12] qom: Make object_class_property_add_uint*_ptr() get offset

2020-10-09 Thread Eduardo Habkost
On Fri, Oct 09, 2020 at 12:24:19PM -0500, Eric Blake wrote: > On 10/9/20 11:01 AM, Eduardo Habkost wrote: > > The existing object_class_property_add_uint*_ptr() functions are > > not very useful, because they need a pointer to the property > > value, which can't really be provided before the object

Re%3A [PATCH v4 1%2F2] hw%2Fwatchdog%3A Implement SBSA watchdog device&In-Reply-To=

2020-10-09 Thread Shashi Mallela
The value being returned here is 0 (initialized to 0 at the beginning of read function). I have seen similar practices being followed in other qemu implementations like for example bcm2835_dma_read() in qemu/hw/dma/bcm2835_dma.c,a9_scu_read() in qemu/hw/misc/a9scu.c. Please confirm if you would

Re: [PATCH v6 26/36] qapi/gen.py: Fix edge-case of _is_user_module

2020-10-09 Thread Markus Armbruster
John Snow writes: > The edge case is that if the name is '', this expression returns a > string instead of a bool, which violates our declared type. > > In practice, module names are not allowed to be the empty string, but > this constraint is not modeled for the type system. > > Signed-off-by: J

Re: [PATCH v6 03/36] qapi-gen: Separate arg-parsing from generation

2020-10-09 Thread Markus Armbruster
John Snow writes: > This is a minor re-work of the entrypoint script. It isolates a entrypoint is not a word ;-P > generate() method from the actual command-line mechanism. > > Signed-off-by: John Snow > Reviewed-by: Eduardo Habkost > Reviewed-by: Cleber Rosa > Tested-by: Cleber Rosa > ---

  1   2   3   4   >