Re: [PATCH V2] Add a new PIIX option to control PCI hot unplugging of devices on non-root buses

2020-04-29 Thread Ani Sinha
> On Apr 29, 2020, at 12:22 PM, Michael S. Tsirkin wrote: > > On Wed, Apr 29, 2020 at 06:11:20AM +, Ani Sinha wrote: >> >> >>> On Apr 29, 2020, at 10:58 AM, Michael S. Tsirkin wrote: >>> >>> o if there's a need to disable >>> just one of these, commit log needs to do a better job

Re: [PATCH V2] Add a new PIIX option to control PCI hot unplugging of devices on non-root buses

2020-04-29 Thread Michael S. Tsirkin
On Wed, Apr 29, 2020 at 06:11:20AM +, Ani Sinha wrote: > > > > On Apr 29, 2020, at 10:58 AM, Michael S. Tsirkin wrote: > > > > o if there's a need to disable > > just one of these, commit log needs to do a better job documenting the > > usecase. > > The use case is simple. With this

Re: [PATCH V2] Add a new PIIX option to control PCI hot unplugging of devices on non-root buses

2020-04-29 Thread Michael S. Tsirkin
On Wed, Apr 29, 2020 at 06:54:52AM +, Ani Sinha wrote: > > > > On Apr 29, 2020, at 12:22 PM, Michael S. Tsirkin wrote: > > > > On Wed, Apr 29, 2020 at 06:11:20AM +, Ani Sinha wrote: > >> > >> > >>> On Apr 29, 2020, at 10:58 AM, Michael S. Tsirkin wrote: > >>> > >>> o if there's a

[PULL 03/32] qemu-options: Factor out get_opt_name_value() helper

2020-04-29 Thread Markus Armbruster
The next commits will put it to use. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Message-Id: <20200415074927.19897-3-arm...@redhat.com> --- util/qemu-option.c | 102 + 1 file changed, 56 insertions(+), 46

[PULL 00/32] Miscellaneous patches for 2020-04-29

2020-04-29 Thread Markus Armbruster
The following changes since commit fdd76fecdde1ad444ff4deb7f1c4f7e4a1ef97d6: Update version for v5.0.0 release (2020-04-28 17:46:57 +0100) are available in the Git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-misc-2020-04-29 for you to fetch changes up to

[PULL 07/32] qemu-option: Avoid has_help_option() in qemu_opts_parse_noisily()

2020-04-29 Thread Markus Armbruster
When opts_parse() sets @invalidp to true, qemu_opts_parse_noisily() uses has_help_option() to decide whether to print help. This parses the input string a second time. Easy to avoid: replace @invalidp by @help_wanted. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id:

[PULL 04/32] qemu-option: Fix sloppy recognition of "id=..." after ", , "

2020-04-29 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Message-Id: <20200415074927.19897-4-arm...@redhat.com> --- tests/test-qemu-opts.c | 4 ++-- util/qemu-option.c | 27 +++ 2 files changed, 21 insertions(+), 10 deletions(-) diff --git

[PULL 05/32] qemu-option: Fix has_help_option()'s sloppy parsing

2020-04-29 Thread Markus Armbruster
has_help_option() uses its own parser. It's inconsistent with qemu_opts_parse(), as demonstrated by test-qemu-opts case /qemu-opts/has_help_option. Fix by reusing the common parser. Signed-off-by: Markus Armbruster Message-Id: <20200415074927.19897-5-arm...@redhat.com> Reviewed-by: Eric Blake

[PULL 24/32] qga: Fix qmp_guest_suspend_{disk, ram}() error handling

2020-04-29 Thread Markus Armbruster
The Error ** argument must be NULL, _abort, _fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second qmp_guest_suspend_disk() and

[PULL 08/32] qemu-img: Factor out accumulate_options() helper

2020-04-29 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Message-Id: <20200415074927.19897-8-arm...@redhat.com> --- qemu-img.c | 59 +- 1 file changed, 23 insertions(+), 36 deletions(-) diff --git a/qemu-img.c

Re: [PATCH V2] Add a new PIIX option to control PCI hot unplugging of devices on non-root buses

2020-04-29 Thread Ani Sinha
> On Apr 29, 2020, at 10:58 AM, Michael S. Tsirkin wrote: > > For example, how about hot-plugging a bridge which doesn't > support hotplug itself? So now for every device we want to hot plug, we will add a new bridge? Sounds not a scalable and elegant idea. > Would that happen to make

[PATCH v3 2/5] block/block-copy: alloc task on each iteration

2020-04-29 Thread Vladimir Sementsov-Ogievskiy
We are going to use aio-task-pool API, so tasks will be handled in parallel. We need therefore separate allocated task on each iteration. Introduce this logic now. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/block-copy.c | 18 +++--- 1 file changed,

Re: [PATCH v2 2/3] docs/nvdimm: add description of alignment requirement of device dax

2020-04-29 Thread Liu, Jingqi
On 4/29/2020 12:22 AM, Joao Martins wrote: On 4/15/20 4:35 AM, Jingqi Liu wrote: For device dax (e.g., /dev/dax0.0), the NUM of 'align=NUM' option needs to match the alignment requirement of the device dax. It must be larger than or equal to the 'align' of device dax. Signed-off-by: Jingqi Liu

[PATCH v3 3/5] block/block-copy: add state pointer to BlockCopyTask

2020-04-29 Thread Vladimir Sementsov-Ogievskiy
We are going to use aio-task-pool API, so we'll need state pointer in BlockCopyTask anyway. Add it now and use where possible. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/block-copy.c | 28 +++- 1 file changed, 15 insertions(+), 13

[PATCH] audio/jack: add JACK client audiodev

2020-04-29 Thread Geoffrey McRae
This commit adds a new audiodev backend to allow QEMU to use JACK as both an audio sink and source. Signed-off-by: Geoffrey McRae --- audio/Makefile.objs| 5 + audio/audio.c | 1 + audio/audio_template.h | 2 + audio/jackaudio.c | 583

[PATCH v3 5/5] block/block-copy: use aio-task-pool API

2020-04-29 Thread Vladimir Sementsov-Ogievskiy
Run block_copy iterations in parallel in aio tasks. Changes: - BlockCopyTask becomes aio task structure. Add zeroes field to pass it to block_copy_do_copy - add call state - it's a state of one call of block_copy(), shared between parallel tasks. For now used only to keep information

[PATCH v3 1/5] block/block-copy: rename in-flight requests to tasks

2020-04-29 Thread Vladimir Sementsov-Ogievskiy
We are going to use aio-task-pool API and extend in-flight request structure to be a successor of AioTask, so rename things appropriately. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/block-copy.c | 98 +++--- 1 file changed, 48 insertions(+), 50

[PATCH v3 0/5] block-copy: use aio-task-pool

2020-04-29 Thread Vladimir Sementsov-Ogievskiy
Hi all! v3: 01: drop extra line "+s->in_flight_bytes -= task->bytes - new_bytes;" 02: add Max's r-b 03: rebased on 01 fix (dropped line not updated now). keep Max's r-b 04: more refactoring: don't require offset argument of block_copy_task_create being dirty, use

Re: [PATCH-for-5.1 v3 5/7] hw/mips/boston: Add missing error-propagation code

2020-04-29 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Running the coccinelle script produced: > > $ spatch \ > --macro-file scripts/cocci-macro-file.h --include-headers \ > --sp-file scripts/coccinelle/find-missing-error_propagate.cocci \ > --keep-comments --smpl-spacing --dir . > HANDLING:

Re: [PATCH V2] Add a new PIIX option to control PCI hot unplugging of devices on non-root buses

2020-04-29 Thread Ani Sinha
> On Apr 29, 2020, at 12:27 PM, Michael S. Tsirkin wrote: > > On Wed, Apr 29, 2020 at 06:54:52AM +, Ani Sinha wrote: >> >> >>> On Apr 29, 2020, at 12:22 PM, Michael S. Tsirkin wrote: >>> >>> On Wed, Apr 29, 2020 at 06:11:20AM +, Ani Sinha wrote: > On Apr 29, 2020,

Re: [PATCH v2 00/14] Miscellaneous error handling fixes

2020-04-29 Thread Markus Armbruster
Queued.

Re: [PATCH v2 0/4] smbus: SPD fixes

2020-04-29 Thread Markus Armbruster
Queued.

[PULL 27/32] bamboo, sam460ex: Tidy up error message for unsupported RAM size

2020-04-29 Thread Markus Armbruster
Improve $ ppc-softmmu/qemu-system-ppc -M sam460ex -m 4096 qemu-system-ppc: Max 1 banks of 2048 ,1024 ,512 ,256 ,128 ,64 ,32 MB DIMM/bank supported qemu-system-ppc: Possible valid RAM size: 2048 to qemu-system-ppc: at most 1 bank of 2048, 1024, 512, 256, 128, 64, 32 MiB each

[PULL 20/32] io: Fix qio_channel_socket_close() error handling

2020-04-29 Thread Markus Armbruster
The Error ** argument must be NULL, _abort, _fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second call. qio_channel_socket_close()

[PULL 16/32] fdc: Fix fallback=auto error handling

2020-04-29 Thread Markus Armbruster
fdctrl_realize_common() rejects fallback=auto. Used by devices "isa-fdc", "sysbus-fdc", "SUNW,fdtwo". The error handling is broken: $ qemu-system-x86_64 -nodefaults -device isa-fdc,fallback=auto,driveA=fd0 -drive if=none,id=fd0 **

[PULL 09/32] qemu-img: Move is_valid_option_list() to qemu-img.c and rewrite

2020-04-29 Thread Markus Armbruster
is_valid_option_list()'s purpose is ensuring qemu-img.c's can safely join multiple parameter strings separated by ',' like this: g_strdup_printf("%s,%s", params1, params2); How it does that is anything but obvious. A close reading of the code reveals that it fails exactly when its

Re: [PATCH-for-5.1 v3 2/7] various: Use _abort in instance_init()

2020-04-29 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Patch created mechanically by running: > > $ spatch \ > --macro-file scripts/cocci-macro-file.h \ > --include-headers --keep-comments --in-place \ > --sp-file \ > scripts/coccinelle/use-error_abort-in-instance_init.cocci > > Reviewed-by:

Re: [PATCH v3] target/arm: Use correct variable for setting 'max' cpu's MIDR_EL1

2020-04-29 Thread Laurent Desnogues
On Tue, Apr 28, 2020 at 7:26 PM Philippe Mathieu-Daudé wrote: > > MIDR_EL1 a 64-bit system register with the top 32-bit being RES0. > > This fixes when compiling with -Werror=conversion: > > target/arm/cpu64.c: In function ‘aarch64_max_initfn’: > target/arm/cpu64.c:628:21: error: conversion

Re: [PATCH 16/17] spapr_pci: Drop some dead error handling

2020-04-29 Thread Greg Kurz
On Tue, 28 Apr 2020 18:34:18 +0200 Markus Armbruster wrote: > chassis_from_bus() uses object_property_get_uint() to get property > "chassis_nr" of the bridge device. Failure would be a programming > error. Pass _abort, and simplify its callers. > > Cc: David Gibson > Cc: qemu-...@nongnu.org

Re: [PATCH v2 3/3] configure: add libdaxctl support

2020-04-29 Thread Liu, Jingqi
On 4/29/2020 12:23 AM, Joao Martins wrote: On 4/15/20 4:35 AM, Jingqi Liu wrote: Add a pair of configure options --{enable,disable}-libdaxctl to control whether QEMU is compiled with libdaxctl [1]. Libdaxctl is a utility library for managing the device dax subsystem. QEMU uses mmap(2) to maps

Re: [PATCH 07/11] mips/malta: Fix create_cps() error handling

2020-04-29 Thread Philippe Mathieu-Daudé
+Peter for crediting his advice. On 4/29/20 7:59 AM, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: On 4/24/20 9:20 PM, Markus Armbruster wrote: The Error ** argument must be NULL, _abort, _fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind

Re: [PATCH v2 for-5.1 0/9] qemu-option: Fix corner cases and clean up

2020-04-29 Thread Markus Armbruster
Queued.

[PULL 10/32] qemu-img: Reject broken -o ""

2020-04-29 Thread Markus Armbruster
qemu-img create, convert, amend, and measure use accumulate_options() to merge multiple -o options. This is broken for -o "": $ qemu-img create -f qcow2 -o backing_file=a -o "" -o backing_fmt=raw,size=1M new.qcow2 qemu-img: warning: Could not verify backing image. This may become an

Re: [PATCH-for-5.1 v3 01/24] various: Remove suspicious '\' character outside of #define in C code

2020-04-29 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Fixes the following coccinelle warnings: > > $ spatch --sp-file --verbose-parsing ... \ > scripts/coccinelle/remove_local_err.cocci > ... > SUSPICIOUS: a \ character appears outside of a #define at > ./target/ppc/translate_init.inc.c:5213 [...] >

[PATCH v3 4/5] block/block-copy: refactor task creation

2020-04-29 Thread Vladimir Sementsov-Ogievskiy
Instead of just relying on the comment "Called only on full-dirty region" in block_copy_task_create() let's move initial dirty area search directly to block_copy_task_create(). Let's also use effective bdrv_dirty_bitmap_next_dirty_area instead of looping through all non-dirty clusters.

Re: [PATCH V2] Add a new PIIX option to control PCI hot unplugging of devices on non-root buses

2020-04-29 Thread Ani Sinha
> On Apr 29, 2020, at 10:58 AM, Michael S. Tsirkin wrote: > > o if there's a need to disable > just one of these, commit log needs to do a better job documenting the > usecase. The use case is simple. With this feature admins will be able to do what they were forced to do from Windows

Re: [PATCH 0/2] virt: Set tpm-tis-device ppi property to off by default

2020-04-29 Thread Cornelia Huck
On Tue, 28 Apr 2020 16:13:05 -0400 Stefan Berger wrote: > On 4/28/20 6:38 AM, Cornelia Huck wrote: > > On Mon, 27 Apr 2020 16:31:43 +0200 > > Eric Auger wrote: > > > >> Instead of using a compat in the mach-virt machine to force > >> PPI off for all virt machines (PPI not supported by the >

Re: [PATCH 08/11] mips/boston: Fix boston_mach_init() error handling

2020-04-29 Thread Markus Armbruster
Markus Armbruster writes: > The Error ** argument must be NULL, _abort, _fatal, or a > pointer to a variable containing NULL. Passing an argument of the > latter kind twice without clearing it in between is wrong: if the > first call sets an error, it no longer points to NULL for the second

Re: [PATCH] audio/jack: add JACK client audiodev

2020-04-29 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200429061054.348b23c0...@aeryn.lan.ktmba/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH] audio/jack: add JACK client audiodev Message-id: 20200429061054.348b23c0...@aeryn.lan.ktmba

Re: [PATCH] s390x/kvm: help valgrind in several places

2020-04-29 Thread Philippe Mathieu-Daudé
Hi Christian, On 4/28/20 8:31 PM, Christian Borntraeger wrote: We need some little help in the code to reduce the valgrind noise. - some designated initializers for the cpu model features and subfunctions ^ This could go as trivial patch while we discuss the rest. - mark memory as defined

Re: [PATCH 0/3] fuzz: Probably there is a better way to do this

2020-04-29 Thread Markus Armbruster
Markus Armbruster writes: > ... the comment next to qos_set_machines_devices_available() wonders. > Yup, there is! Queued.

[PULL 25/32] sam460ex: Suppress useless warning on -m 32 and -m 64

2020-04-29 Thread Markus Armbruster
Requesting 32 or 64 MiB of RAM with the sam460ex machine type produces a useless warning: qemu-system-ppc: warning: Memory size is too small for SDRAM type, adjusting type This is because sam460ex_init() asks spd_data_generate() for DDR2, which is impossible, so spd_data_generate() corrects

[PULL 02/32] tests-qemu-opts: Cover has_help_option(), qemu_opt_has_help_opt()

2020-04-29 Thread Markus Armbruster
The two turn out to be inconsistent for "a,b,,help". Test case marked /* BUG */. Signed-off-by: Markus Armbruster Message-Id: <20200415074927.19897-2-arm...@redhat.com> Reviewed-by: Eric Blake --- tests/test-qemu-opts.c | 44 ++ 1 file changed, 44

[PULL 06/32] test-qemu-opts: Simplify test_has_help_option() after bug fix

2020-04-29 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Message-Id: <20200415074927.19897-6-arm...@redhat.com> --- tests/test-qemu-opts.c | 36 +--- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/tests/test-qemu-opts.c

[PULL 31/32] libqos: Give get_machine_allocator() internal linkage

2020-04-29 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <20200424071142.3525-4-arm...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé --- tests/qtest/libqos/qos_external.h | 2 -- tests/qtest/libqos/qos_external.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git

[PULL 19/32] xen/pt: Fix flawed conversion to realize()

2020-04-29 Thread Markus Armbruster
The conversion of xen_pt_initfn() to xen_pt_realize() blindly replaced XEN_PT_ERR() by error_setg(). Several error conditions that did not fail xen_pt_initfn() now fail xen_pt_realize(). Unsurprisingly, the cleanup on these errors looks highly suspicious. Revert the inappropriate replacements.

[PULL 32/32] qemu-option: pass NULL rather than 0 to the id of qemu_opts_set()

2020-04-29 Thread Markus Armbruster
From: Masahiro Yamada The second argument 'id' is a pointer. Pass NULL rather than 0. Signed-off-by: Masahiro Yamada Message-Id: <20200427005704.2475782-1-masahi...@kernel.org> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- softmmu/vl.c | 10 +- 1 file changed,

[PULL 01/32] various: Remove suspicious '\' character outside of #define in C code

2020-04-29 Thread Markus Armbruster
From: Philippe Mathieu-Daudé Fixes the following coccinelle warnings: $ spatch --sp-file --verbose-parsing ... \ scripts/coccinelle/remove_local_err.cocci ... SUSPICIOUS: a \ character appears outside of a #define at ./target/ppc/translate_init.inc.c:5213 SUSPICIOUS: a \

[PULL 15/32] arm/virt: Fix virt_machine_device_plug_cb() error API violation

2020-04-29 Thread Markus Armbruster
The Error ** argument must be NULL, _abort, _fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second call. virt_machine_device_plug_cb()

[PULL 28/32] smbus: Fix spd_data_generate() for number of banks > 2

2020-04-29 Thread Markus Armbruster
spd_data_generate() splits @ram_size bytes into @nbanks RAM banks of 1 << sz_log2 MiB each, like this: size = ram_size >> 20; /* work in terms of megabytes */ [...] nbanks = 1; while (sz_log2 > max_log2 && nbanks < 8) { sz_log2--; nbanks++; } Each iteration

[PATCH v2 1/4] block: Add bdrv_make_empty()

2020-04-29 Thread Max Reitz
Right now, all users of bdrv_make_empty() call the BlockDriver method directly. That is not only bad style, it is also wrong, unless the caller has a BdrvChild with a WRITE or WRITE_UNCHANGED permission. (WRITE_UNCHANGED suffices, because callers generally use this function to clear a node with a

[PATCH v2 2/4] block: Use bdrv_make_empty() where possible

2020-04-29 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf --- block/replication.c | 6 ++ block/vvfat.c | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/block/replication.c b/block/replication.c index da013c2041..cc6a40d577 100644 ---

[PATCH v3 08/15] acpi: serial: don't use _STA method

2020-04-29 Thread Gerd Hoffmann
The _STA method dates back to the days where we had a static DSDT. The device is listed in the DSDT table unconditionally and the _STA method checks a bit in the isa bridge pci config space to figure whenever a given is isa device is present or not, then evaluates to 0x0f (present) or 0x00

Re: [Virtio-fs] [PATCH] virtiofsd: jail lo->proc_self_fd

2020-04-29 Thread Vivek Goyal
On Wed, Apr 29, 2020 at 02:47:33PM +0200, Miklos Szeredi wrote: > While it's not possible to escape the proc filesystem through > lo->proc_self_fd, it is possible to escape to the root of the proc > filesystem itself through "../..". Hi Miklos, So this attack will work with some form of

Re: R: About hardfloat in ppc

2020-04-29 Thread Peter Maydell
On Wed, 29 Apr 2020 at 15:33, Dino Papararo wrote: > > Hi Alex, > maybe a pseudo code can show better what I mean > > if (ppc_fpu_instruction == USE_FPSCR) /* instruction have dot '.' so FPSCR > will be updated and we need have care about it */ > soft_decode (ppc_fpu_instruction) > else

Re: [PATCH v2 1/4] block: Add bdrv_make_empty()

2020-04-29 Thread Eric Blake
On 4/29/20 9:11 AM, Max Reitz wrote: Right now, all users of bdrv_make_empty() call the BlockDriver method directly. That is not only bad style, it is also wrong, unless the caller has a BdrvChild with a WRITE or WRITE_UNCHANGED permission. (WRITE_UNCHANGED suffices, because callers generally

Re: [Virtio-fs] [PATCH] virtiofsd: jail lo->proc_self_fd

2020-04-29 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > On Wed, Apr 29, 2020 at 02:47:33PM +0200, Miklos Szeredi wrote: > > While it's not possible to escape the proc filesystem through > > lo->proc_self_fd, it is possible to escape to the root of the proc > > filesystem itself through "../..". > > > >

[PATCH v4 4/5] block/block-copy: refactor task creation

2020-04-29 Thread Vladimir Sementsov-Ogievskiy
Instead of just relying on the comment "Called only on full-dirty region" in block_copy_task_create() let's move initial dirty area search directly to block_copy_task_create(). Let's also use effective bdrv_dirty_bitmap_next_dirty_area instead of looping through all non-dirty clusters.

Re: R: About hardfloat in ppc

2020-04-29 Thread Alex Bennée
罗勇刚(Yonggang Luo) writes: > On Wed, Apr 29, 2020 at 7:57 PM Alex Bennée wrote: > >> >> Dino Papararo writes: >> >> > Hello, >> > about handling of PPC fpu exceptions and Hard Floats support we could >> consider a different approach for different instructions. >> > i.e. not all fpu

Re: [PATCH 0/2] Additional parameters for qemu_img map

2020-04-29 Thread John Snow
Hi, this series is 30 days old and didn't attract any replies. As the 5.0 release has just shipped, it may be re-appropriate to resubmit this series for inclusion in the next release. On 3/22/20 5:11 AM, Eyal Moscovici wrote: > Hi, > > The following series adds two parameters to qemu-img map: >

Re: [PATCH 4/4] scripts/qmp: Fix QEMU Python scripts path

2020-04-29 Thread John Snow
On 4/21/20 5:42 AM, Philippe Mathieu-Daudé wrote: > QEMU Python scripts have been moved in commit 8f8fd9edba4 ("Introduce > Python module structure"). Use the same sys.path modification used > in the referenced commit to be able to use these scripts again. > > Signed-off-by: Philippe

Re: [PATCH 1/2] softfloat: m68k: infinity is a valid encoding

2020-04-29 Thread Laurent Vivier
Le 29/04/2020 à 11:26, Alex Bennée a écrit : > > Laurent Vivier writes: > >> Le 28/04/2020 à 20:43, Alex Bennée a écrit : >>> >>> KONRAD Frederic writes: >>> The MC68881 say about infinities (3.2.4): "*For the extended precision format, the most significant bit of the

Re: [Virtio-fs] [PATCH] virtiofsd: jail lo->proc_self_fd

2020-04-29 Thread Vivek Goyal
On Wed, Apr 29, 2020 at 04:47:19PM +0200, Miklos Szeredi wrote: > On Wed, Apr 29, 2020 at 4:36 PM Vivek Goyal wrote: > > > > On Wed, Apr 29, 2020 at 02:47:33PM +0200, Miklos Szeredi wrote: > > > While it's not possible to escape the proc filesystem through > > > lo->proc_self_fd, it is possible

Re: [PATCH RFC 0/4] vl: Sync dirty bitmap when system resets

2020-04-29 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > This RFC series starts from the fact that we will sync dirty bitmap when > removing a memslot for KVM. IIUC that was majorly to maintain the dirty > bitmap > even across a system reboot. > > This series wants to move that sync from kvm memslot removal to

[PATCH v3 10/15] acpi: parallel: don't use _STA method

2020-04-29 Thread Gerd Hoffmann
The _STA method dates back to the days where we had a static DSDT. The device is listed in the DSDT table unconditionally and the _STA method checks a bit in the isa bridge pci config space to figure whenever a given is isa device is present or not, then evaluates to 0x0f (present) or 0x00

[PATCH v3 06/15] rtc: add RTC_ISA_BASE

2020-04-29 Thread Gerd Hoffmann
Add and use RTC_ISA_BASE define instead of hardcoding 0x70. Signed-off-by: Gerd Hoffmann --- include/hw/rtc/mc146818rtc.h | 1 + hw/rtc/mc146818rtc.c | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/hw/rtc/mc146818rtc.h b/include/hw/rtc/mc146818rtc.h

[PATCH v3 05/15] acpi: add ISADeviceClass->build_aml()

2020-04-29 Thread Gerd Hoffmann
Also add isa_aml_build() function which walks all isa devices. This allows to move aml builder code to isa devices. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov --- include/hw/isa/isa.h | 2 ++ hw/i386/acpi-build.c | 1 + hw/isa/isa-bus.c | 15 +++ 3 files changed,

[PATCH v3 07/15] acpi: move aml builder code for rtc device

2020-04-29 Thread Gerd Hoffmann
Also use a single io range instead of two, following what real hardware does. Signed-off-by: Gerd Hoffmann --- hw/i386/acpi-build.c | 17 - hw/rtc/mc146818rtc.c | 20 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/hw/i386/acpi-build.c

Re: [PATCH v2 02/17] block: use int64_t as bytes type in tracked requests

2020-04-29 Thread Eric Blake
On 4/27/20 3:23 AM, Vladimir Sementsov-Ogievskiy wrote: We are generally moving to int64_t for both offset and bytes parameters on all io paths. Convert tracked requests now. As mentioned elsewhere in the thread, this states 'what' but not 'why'; adding a bit more of the 'why' can be useful

Re: Failing property setters + hardwired devices + -global = a bad day

2020-04-29 Thread Daniel P . Berrangé
On Wed, Apr 29, 2020 at 05:28:25PM +0200, Markus Armbruster wrote: > Is there any sane use for configuring backends via any of the default > mechanisms? > > I'm aware of one, but it's outdated: -global isa-fdc.driveA=... Use > -device floppy instead. > > I'd love to deprecate -global wholesale,

-nic model=rocker causes qemu to abort

2020-04-29 Thread Michael Tokarev
Hi! Just a fun case of (invalid) usage of qemu-system command line. Someone tried -nic model=rocker, and qemu does this: Unexpected error in object_property_find() at /build/qemu/git/qom/object.c:1029: qemu-system-x86_64: Property '.mac' not found Aborted This happens after this commit:

Re: [PATCH] virtiofsd: Show submounts

2020-04-29 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > * Max Reitz (mre...@redhat.com) wrote: > > Currently, setup_mounts() bind-mounts the shared directory without > > MS_REC. This makes all submounts disappear. > > > > Pass MS_REC so that the guest can see submounts again. > > Thanks! > > >

Re: [PATCH v3] audio/jack: add JACK client audiodev

2020-04-29 Thread Geoffrey McRae
On 2020-04-29 22:59, Eric Blake wrote: On 4/29/20 12:53 AM, Geoffrey McRae wrote: This commit adds a new audiodev backend to allow QEMU to use JACK as both an audio sink and source. Signed-off-by: Geoffrey McRae --- audio/Makefile.objs| 5 + audio/audio.c | 1 +

[PATCH] tests: add a "check-flake8" test for validating python code style

2020-04-29 Thread Daniel P . Berrangé
The flake8 program is a standard tool used by Python projects for validating many commonly recommended style rules. It would be desirable for QEMU to come into alignment with normal Python coding style best practices. QEMU currently violates a huge number of the style rules, so we can't blindly

Re: [PATCH] virtiofsd: Show submounts

2020-04-29 Thread Vivek Goyal
On Wed, Apr 29, 2020 at 03:57:20PM +0100, Dr. David Alan Gilbert wrote: > * Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > > * Max Reitz (mre...@redhat.com) wrote: > > > Currently, setup_mounts() bind-mounts the shared directory without > > > MS_REC. This makes all submounts disappear. > >

Re: [PATCH] Add a new PIIX option to control PCI hot unplugging of devices on non-root buses

2020-04-29 Thread Igor Mammedov
On Fri, 24 Apr 2020 14:44:48 -0400 Eduardo Habkost wrote: > On Fri, Apr 24, 2020 at 03:23:56PM +, Ani Sinha wrote: > > > > > > > On Apr 22, 2020, at 4:15 PM, Ani Sinha wrote: > > > > > > > > > > > >> On Apr 21, 2020, at 8:32 PM, Daniel P. Berrangé > > >> wrote: > > >> > > >> On

Re: [PATCH 1/1] target/riscv: fix VS interrupts forwarding to HS

2020-04-29 Thread Jose Martins
> If the Hypervisor sets the V* interrupts why does it then want to > receive the interrupt itself? I don't think this is a question of whether there is a use case for it or not (I agree with you, of the top of my head I don't see why would you forward v* interrupts to the hypervisor). However,

dirty bitmap migration refactor

2020-04-29 Thread John Snow
Hi all, as you are probably aware I haven't been paying attention to dirty bitmap work very much for the past month. Around KVM Forum, we had a giant thread dedicated to discussing the problems with dirty bitmap migration, which in a nutshell, are that it migrates using the node name with no

[PATCH v3 15/15] acpi: simplify build_isa_devices_aml()

2020-04-29 Thread Gerd Hoffmann
x86 machines can have a single ISA bus only. Signed-off-by: Gerd Hoffmann --- hw/i386/acpi-build.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index a8b790021974..98b3fd1cdb14 100644 --- a/hw/i386/acpi-build.c

[PATCH v3 11/15] acpi: move aml builder code for parallel device

2020-04-29 Thread Gerd Hoffmann
Also adds support for multiple LPT devices. Signed-off-by: Gerd Hoffmann --- hw/char/parallel.c | 32 hw/i386/acpi-build.c | 23 --- 2 files changed, 32 insertions(+), 23 deletions(-) diff --git a/hw/char/parallel.c b/hw/char/parallel.c

[PATCH v2] hw: add compat machines for 5.1

2020-04-29 Thread Cornelia Huck
Add 5.1 machine types for arm/i440fx/q35/s390x/spapr. Acked-by: David Gibson Reviewed-by: Michael S. Tsirkin Signed-off-by: Cornelia Huck --- v1->v2: rebased on top of "virt: Set tpm-tis-device ppi property to off by default" to avoid breakage on arm --- hw/arm/virt.c |

Re: [Virtio-fs] [PATCH] virtiofsd: jail lo->proc_self_fd

2020-04-29 Thread Miklos Szeredi
On Wed, Apr 29, 2020 at 4:36 PM Vivek Goyal wrote: > > On Wed, Apr 29, 2020 at 02:47:33PM +0200, Miklos Szeredi wrote: > > While it's not possible to escape the proc filesystem through > > lo->proc_self_fd, it is possible to escape to the root of the proc > > filesystem itself through "../..". >

Re: [PATCH 3/4] scripts/qmp: Use Python 3 interpreter

2020-04-29 Thread John Snow
On 4/21/20 5:42 AM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > scripts/qmp/qom-get | 2 +- > scripts/qmp/qom-list | 2 +- > scripts/qmp/qom-set | 2 +- > scripts/qmp/qom-tree | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) > > diff --git

Re: [PATCH v22 3/4] qcow2: add zstd cluster compression

2020-04-29 Thread Eric Blake
On 4/29/20 8:02 AM, Vladimir Sementsov-Ogievskiy wrote: +    /* + * The compressed stream from the input buffer may consist of more + * than one zstd frame. Can it? If not, we must require it in the specification. Actually, now that you mention it, it would make sense anyway to

[PATCH v3 12/15] acpi: move aml builder code for floppy device

2020-04-29 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/block/fdc.c | 83 hw/i386/acpi-build.c | 83 stubs/cmos.c | 7 stubs/Makefile.objs | 1 + 4 files changed, 91 insertions(+), 83 deletions(-) create

[PATCH v2 3/4] block: Add blk_make_empty()

2020-04-29 Thread Max Reitz
Two callers of BlockDriver.bdrv_make_empty() remain that should not call this method directly. Both do not have access to a BdrvChild, but they can use a BlockBackend, so we add this function that lets them use it. Signed-off-by: Max Reitz --- include/sysemu/block-backend.h | 2 ++

Re: [PATCH v5 0/4] introduction of migration_version attribute for VFIO live migration

2020-04-29 Thread Eric Blake
[meta-comment] On 4/29/20 4:35 AM, Yan Zhao wrote: On Wed, Apr 29, 2020 at 04:22:01PM +0800, Dr. David Alan Gilbert wrote: [...] This patchset introduces a migration_version attribute under sysfs of VFIO Mediated devices. Hmm, several pages with up to 16 levels of quoting, with editors

[PATCH v3 02/15] acpi: add aml builder stubs

2020-04-29 Thread Gerd Hoffmann
Needed when moving aml builder code to devices. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov --- hw/acpi/aml-build-stub.c | 79 hw/acpi/Makefile.objs| 4 +- 2 files changed, 81 insertions(+), 2 deletions(-) create mode 100644

Re: [PATCH 2/2] qemu-img: Add --start-offset and --max-length to map

2020-04-29 Thread Eric Blake
On 3/22/20 4:11 AM, Eyal Moscovici wrote: The mapping operation of large disks especially ones stored over a long chain of QCOW2 files can take a long time to finish. Additionally when mapping fails there was no way recover by restarting the mapping from the failed location. The new options,

Re: [Virtio-fs] [PATCH] virtiofsd: jail lo->proc_self_fd

2020-04-29 Thread Miklos Szeredi
On Wed, Apr 29, 2020 at 5:00 PM Vivek Goyal wrote: > > On Wed, Apr 29, 2020 at 04:47:19PM +0200, Miklos Szeredi wrote: > > On Wed, Apr 29, 2020 at 4:36 PM Vivek Goyal wrote: > > > > > > On Wed, Apr 29, 2020 at 02:47:33PM +0200, Miklos Szeredi wrote: > > > > While it's not possible to escape the

Failing property setters + hardwired devices + -global = a bad day

2020-04-29 Thread Markus Armbruster
Here's how we represent QOM properties: struct ObjectProperty { gchar *name; [...] ObjectPropertyAccessor *get; ObjectPropertyAccessor *set; ObjectPropertyInit *init; void *opaque; QObject *defval; }; = The setter = A ->set()

[PATCH v4 5/5] block/block-copy: use aio-task-pool API

2020-04-29 Thread Vladimir Sementsov-Ogievskiy
Run block_copy iterations in parallel in aio tasks. Changes: - BlockCopyTask becomes aio task structure. Add zeroes field to pass it to block_copy_do_copy - add call state - it's a state of one call of block_copy(), shared between parallel tasks. For now used only to keep information

Re: [PATCH 0/9] More truncate improvements

2020-04-29 Thread Eric Blake
On 4/28/20 9:24 PM, no-re...@patchew.org wrote: Patchew URL: https://patchew.org/QEMU/20200428202905.770727-1-ebl...@redhat.com/ /tmp/qemu-test/src/block/parallels.c: In function 'parallels_co_writev': /tmp/qemu-test/src/block/parallels.c:218:12: error: 'ret' may be used uninitialized in

[PATCH v3 09/15] acpi: move aml builder code for serial device

2020-04-29 Thread Gerd Hoffmann
The code uses the isa_serial_io array to figure what the device uid is. Side effect is that acpi antries are not limited to port 1+2 any more, we'll also get entries for ports 3+4. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov --- hw/char/serial-isa.c | 32

[PATCH v3 01/15] move 'typedef Aml' to qemu/types.h

2020-04-29 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov --- include/hw/acpi/aml-build.h | 1 - include/qemu/typedefs.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index 0f4ed53d7fbf..1539fe066714 100644 ---

[PATCH v3 14/15] acpi: factor out fw_cfg_add_acpi_dsdt()

2020-04-29 Thread Gerd Hoffmann
Add helper function to add fw_cfg device, also move code to hw/i386/fw_cfg.c. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/fw_cfg.h | 1 + hw/i386/acpi-build.c | 24 +--- hw/i386/fw_cfg.c | 28 3 files

Re: [PATCH v2 4/4] block: Use blk_make_empty() after commits

2020-04-29 Thread Max Reitz
On 29.04.20 16:11, Max Reitz wrote: > bdrv_commit() already has a BlockBackend pointing to the BDS that we > want to empty, it just has the wrong permissions. > > qemu-img commit has no BlockBackend pointing to the old backing file > yet, but introducing one is simple. > > After this commit,

[PATCH v2 4/4] block: Use blk_make_empty() after commits

2020-04-29 Thread Max Reitz
bdrv_commit() already has a BlockBackend pointing to the BDS that we want to empty, it just has the wrong permissions. qemu-img commit has no BlockBackend pointing to the old backing file yet, but introducing one is simple. After this commit, bdrv_make_empty() is the only remaining caller of

Re: [PATCH RFC 0/4] vl: Sync dirty bitmap when system resets

2020-04-29 Thread Peter Xu
On Wed, Apr 29, 2020 at 02:26:07PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > This RFC series starts from the fact that we will sync dirty bitmap when > > removing a memslot for KVM. IIUC that was majorly to maintain the dirty > > bitmap > > even across a

R: R: About hardfloat in ppc

2020-04-29 Thread Dino Papararo
Hi Alex, maybe a pseudo code can show better what I mean  if (ppc_fpu_instruction == USE_FPSCR) /* instruction have dot '.' so FPSCR will be updated and we need have care about it */ soft_decode (ppc_fpu_instruction) else /* instruction have not dot '.' and FPSCR will be never updated

  1   2   3   4   5   >