[PATCH] console: avoid passing con=NULL to graphic_hw_update_done() In graphic_hw_update(), first select an existing console, a specific-console or active_console(if not specified), then updating the

2020-11-06 Thread lichun
Signed-off-by: lichun --- ui/console.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/console.c b/ui/console.c index e8e5970..e07d2c3 100644 --- a/ui/console.c +++ b/ui/console.c @@ -270,10 +270,11 @@ void graphic_hw_update_done(QemuConsole *con) void graphic_hw_upda

Re: [PATCH 1/2] block: make bdrv_drop_intermediate() less wrong

2020-11-06 Thread Vladimir Sementsov-Ogievskiy
05.11.2020 18:14, Alberto Garcia wrote: On Sat 31 Oct 2020 01:35:01 PM CET, Vladimir Sementsov-Ogievskiy wrote: -QLIST_FOREACH_SAFE(c, &top->parents, next_parent, next) { /* ... */ +QLIST_FOREACH_SAFE(c, &base->parents, next_parent, next) { I also wonder, is top->parents and base-

Re: [PATCH] console: avoid passing con=NULL to graphic_hw_update_done() In graphic_hw_update(), first select an existing console, a specific-console or active_console(if not specified), then updating

2020-11-06 Thread Gerd Hoffmann
Hi, If you have an long commit message put it into the body not the subject please. On Sat, Nov 07, 2020 at 01:03:39AM +0800, lichun wrote: > Signed-off-by: lichun > --- > ui/console.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/ui/console.c b/ui/console.c >

Re: Re: [PATCH] console: avoid passing con=NULL to graphic_hw_update_done() In graphic_hw_update(), first select an existing console, a specific-console or active_console(if not specified), then updat

2020-11-06 Thread lichun
>  Hi, > >If you have an long commit message put it into the body not the subject >please. Okey, I should leave a blank line. > >On Sat, Nov 07, 2020 at 01:03:39AM +0800, lichun wrote: >> Signed-off-by: lichun >> --- >>  ui/console.c | 5 +++-- >>  1 file changed, 3 insertions(+), 2 deletions(-) >

[PULL 0/4] 9p queue for 5.2 (2020-11-06)

2020-11-06 Thread Christian Schoenebeck
tags/pull-9p-20201106 for you to fetch changes up to e6b99460b14469e0b83febc8d5a501947d1d5c7c: hw/9pfs: Fix Kconfig dependency problem between 9pfs and Xen (2020-11-05 15:21:11 +0100) 9pfs: some fixes * Fix meson build conf

[PULL 2/4] hw/9pfs : open brace '{' following struct go on the same line

2020-11-06 Thread Christian Schoenebeck
From: Xinhao Zhang Fix code style. Open braces for struct should go on the same line. Signed-off-by: Xinhao Zhang Signed-off-by: Kai Deng Reported-by: Euler Robot Reviewed-by: Greg Kurz Message-Id: <20201030043515.1030223-2-zhangxinh...@huawei.com> Signed-off-by: Christian Schoenebeck ---

[PULL 1/4] hw/9pfs : add spaces around operator

2020-11-06 Thread Christian Schoenebeck
From: Xinhao Zhang Fix code style. Operator needs spaces both sides. Signed-off-by: Xinhao Zhang Signed-off-by: Kai Deng Reported-by: Euler Robot Reviewed-by: Greg Kurz Message-Id: <20201030043515.1030223-1-zhangxinh...@huawei.com> Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p-local.

[PULL 4/4] hw/9pfs: Fix Kconfig dependency problem between 9pfs and Xen

2020-11-06 Thread Christian Schoenebeck
From: Philippe Mathieu-Daudé Commit b2c00bce54c ("meson: convert hw/9pfs, cleanup") introduced CONFIG_9PFS (probably a wrong conflict resolution). This config is not used anywhere. Backends depend on CONFIG_FSDEV_9P which itself depends on CONFIG_VIRTFS. Remove the invalid CONFIG_9PFS and use CO

Re: [PULL 0/4] Linux user for 5.2 patches

2020-11-06 Thread Peter Maydell
On Thu, 5 Nov 2020 at 07:10, Laurent Vivier wrote: > > The following changes since commit 8680d6e36468f1ca00e2fe749bef50585d632401: > > Merge remote-tracking branch 'remotes/nvme/tags/pull-nvme-20201102' into st= > aging (2020-11-02 17:17:29 +) > > are available in the Git repository at: > >

[PULL 3/4] hw/9pfs : add space before the open parenthesis '('

2020-11-06 Thread Christian Schoenebeck
From: Xinhao Zhang Fix code style. Space required before the open parenthesis '('. Signed-off-by: Xinhao Zhang Signed-off-by: Kai Deng Reported-by: Euler Robot Reviewed-by: Greg Kurz Message-Id: <20201030043515.1030223-3-zhangxinh...@huawei.com> Signed-off-by: Christian Schoenebeck --- hw/

Re: [PATCH v2 00/44] Make qdev static property API usable by any QOM type

2020-11-06 Thread Kevin Wolf
Am 04.11.2020 um 16:59 hat Eduardo Habkost geschrieben: > This series refactor the qdev property code so the static > property system can be used by any QOM type. As an example, at > the end of the series some properties in TYPE_MACHINE are > converted to static properties to demonstrate the new A

[PATCH] migration/multifd: close TLS channel before socket finalize

2020-11-06 Thread Chuan Zheng
Since we now support tls multifd, when we cancel migration, the TLS sockets will be left as CLOSE-WAIT On Src which results in socket leak. Fix it by closing TLS channel before socket finalize. Signed-off-by: Chuan Zheng --- migration/multifd.c | 14 ++ 1 file changed, 14 insertions(

Re: [PATCH] migration/multifd: close TLS channel before socket finalize

2020-11-06 Thread no-reply
Patchew URL: https://patchew.org/QEMU/1604657935-56394-1-git-send-email-zhengch...@huawei.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 1604657935-56394-1-git-send-email-zhengch...@huawei.com Subject: [PATCH] mig

Re: [RFC PATCH 02/15] hw/riscv: migrate fdt field to generic MachineState

2020-11-06 Thread Alex Bennée
Bin Meng writes: > On Fri, Nov 6, 2020 at 1:57 AM Alex Bennée wrote: >> >> This is a mechanical change to make the fdt available through >> MachineState. >> >> Signed-off-by: Alex Bennée >> Reviewed-by: Alistair Francis >> Message-Id: <20201021170842.25762-3-alex.ben...@linaro.org> >> Signed

Re: [PATCH] target/microblaze: Fix possible array out of bounds in mmu_write()

2020-11-06 Thread Edgar E. Iglesias
On Tue, Nov 03, 2020 at 03:46:02PM +0800, AlexChen wrote: > The size of env->mmu.regs is 3, but the range of 'rn' is [0, 5]. > To avoid data access out of bounds, only if 'rn' is less than 3, we > can print env->mmu.regs[rn]. In other cases, we can print > env->mmu.regs[MMU_R_TLBX]. > > Reported-b

Re: [RFC PATCH 12/15] stubs/xen-hw-stub: drop xenstore_store_pv_console_info stub

2020-11-06 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 11/5/20 6:51 PM, Alex Bennée wrote: >> We should never build something that calls this without having it. > > "because ..."? xen-all.c is only built when we have CONFIG_XEN which also gates the only call-site in xen-console.c > > Reviewed-by: Philippe M

Re: [PULL 0/4] 9p queue for 5.2 (2020-11-06)

2020-11-06 Thread Peter Maydell
00) > > are available in the Git repository at: > > https://github.com/cschoenebeck/qemu.git tags/pull-9p-20201106 > > for you to fetch changes up to e6b99460b14469e0b83febc8d5a501947d1d5c7c: > > hw/9pfs: Fix Kconfig dependency proble

Re: Emulation for riscv

2020-11-06 Thread Alex Bennée
Palmer Dabbelt writes: > On Thu, 22 Oct 2020 17:56:38 PDT (-0700), alistai...@gmail.com wrote: >> On Thu, Oct 22, 2020 at 4:58 PM Moises Arreola wrote: >>> >>> Hello everyone, my name is Moses and I'm trying to set up a VM for a risc-v >>> processor, I'm using the Risc-V Getting Started Guide

[PATCH v2] migration/multifd: close TLS channel before socket finalize

2020-11-06 Thread Chuan Zheng
Since we now support tls multifd, when we cancel migration, the TLS sockets will be left as CLOSE-WAIT On Src which results in socket leak. Fix it by closing TLS channel before socket finalize. Signed-off-by: Chuan Zheng --- migration/multifd.c | 14 ++ 1 file changed, 14 insertions(

Re: [PATCH] scripts/checkpatch.pl: Modify the line length limit of the code

2020-11-06 Thread Peter Maydell
On Fri, 6 Nov 2020 at 06:15, Gan Qixin wrote: > > Modify the rule that limit the length of lines according to the following > ideas: > > --add a variable max_line_length to indicate the limit of line length and set > it to 100 by default > --when the line length exceeds max_line_length, output w

[PATCH] CODING_STYLE.rst: Be less strict about 80 character limit

2020-11-06 Thread Peter Maydell
Relax the wording about line lengths a little bit; this goes with the checkpatch changes to warn at 100 characters rather than 80. (Compare the Linux kernel commit bdc48fa11e46f8; our coding style is not theirs, but the rationale is good and applies to us too.) Signed-off-by: Peter Maydell ---

Re: [RFC PATCH 02/15] hw/riscv: migrate fdt field to generic MachineState

2020-11-06 Thread Bin Meng
On Fri, Nov 6, 2020 at 6:21 PM Alex Bennée wrote: > > > Bin Meng writes: > > > On Fri, Nov 6, 2020 at 1:57 AM Alex Bennée wrote: > >> > >> This is a mechanical change to make the fdt available through > >> MachineState. > >> > >> Signed-off-by: Alex Bennée > >> Reviewed-by: Alistair Francis >

Re: [PATCH v9 08/12] hw/block/nvme: Support Zoned Namespace Command Set

2020-11-06 Thread Niklas Cassel
On Thu, Nov 05, 2020 at 11:53:38AM +0900, Dmitry Fomichev wrote: > The emulation code has been changed to advertise NVM Command Set when > "zoned" device property is not set (default) and Zoned Namespace > Command Set otherwise. > > Define values and structures that are needed to support Zoned > N

[PATCH v2 0/7] block: permission update fix & refactor

2020-11-06 Thread Vladimir Sementsov-Ogievskiy
Hi all! These series supersedes "Fix nested permission update" and includes one more fix (patch 01) and more improvements. I think patch 01 is good to have in 5.2, 02 is probably OK for 5.2 and the others are OK for next release. Still all may be taken to 5.2, up to block maintainers. Actually t

[PATCH 0/2] Increase amount of data for monitor to read

2020-11-06 Thread Andrey Shinkevich via
The subject was discussed here: https://lists.gnu.org/archive/html/qemu-devel/2017-05/msg00206.html This series is a solution for the issue with QMP monitor buffered input. A little parser is introduced to throttle JSON commands read from the buffer so that QMP requests do not overwhelm the monito

[PATCH v2 2/7] block: add bdrv_replace_node_common()

2020-11-06 Thread Vladimir Sementsov-Ogievskiy
Add new parameter to bdrv_replace_node(): auto_skip. With auto_skip=false we'll have stricter behavior: update _all_ from parents or fail. New behaviour will be used in the following commit in block.c, so keep original function name as public interface. Note: new error message is a bit funny in co

[PATCH 1/2] iotests: add another bash sleep command to 247

2020-11-06 Thread Andrey Shinkevich via
This patch paves the way for the one that follows. The following patch makes the QMP monitor to read up to 4K from stdin at once. That results in running the bash 'sleep' command before the _qemu_proc_exec() starts in subshell. Another 'sleep' command with an unobtrusive 'query-status' plays as a w

[PATCH v2 6/7] block: bdrv_child_set_perm() drop redundant parameters.

2020-11-06 Thread Vladimir Sementsov-Ogievskiy
We must set the permission used for _check_. Assert that we have backup and drop extra arguments. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/block.c b/block.c index b61d20252f..b44db05d14 100644 --

[PATCH v2 3/7] block: make bdrv_drop_intermediate() less wrong

2020-11-06 Thread Vladimir Sementsov-Ogievskiy
First, permission update loop tries to do iterations transactionally, but the whole update is not transactional: nobody roll-back successful loop iterations when some iteration fails. Second, in the iteration we have nested permission update: c->klass->update_filename may point to bdrv_child_cb_up

[PATCH v2 1/7] block: add forgotten bdrv_abort_perm_update() to bdrv_co_invalidate_cache()

2020-11-06 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block.c b/block.c index 56bacc9e9f..19db7b7aeb 100644 --- a/block.c +++ b/block.c @@ -5782,6 +5782,7 @@ int coroutine_fn bdrv_co_invalidate_cache(BlockDriverState *bs, Error **errp)

[PATCH v2 7/7] block: drop tighten_restrictions

2020-11-06 Thread Vladimir Sementsov-Ogievskiy
The only users of this thing are: 1. bdrv_child_try_set_perm, to ignore failures on loosen restrictions 2. assertion in bdrv_replace_child 3. assertion in bdrv_inactivate_recurse Assertions are not enough reason for overcomplication the permission update system. So, look at bdrv_child_try_set_p

[PATCH v2 5/7] block: bdrv_set_perm() drop redundant parameters.

2020-11-06 Thread Vladimir Sementsov-Ogievskiy
We should never set permissions other than cumulative permissions of parents. During bdrv_reopen_multiple() we _check_ for synthetic permissions but when we do _set_ the graph is already updated. Add an assertion to bdrv_reopen_multiple(), other cases are more obvious. Signed-off-by: Vladimir Seme

[PATCH v2 4/7] block: add bdrv_refresh_perms() helper

2020-11-06 Thread Vladimir Sementsov-Ogievskiy
Make separate function for common pattern. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 60 - 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/block.c b/block.c index 77a3f8f1e2..fc7633307f 100644 --- a/block.c +

[PATCH 2/2] monitor: increase amount of data for monitor to read

2020-11-06 Thread Andrey Shinkevich via
QMP and HMP monitors read one byte at a time from the socket or stdin, which is very inefficient. With 100+ VMs on the host, this results in multiple extra system calls and CPU overuse. This patch increases the amount of read data up to 4096 bytes that fits the buffer size on the channel level. Su

Re: [PATCH v3 0/9] Add support for Control-Flow Integrity

2020-11-06 Thread Cornelia Huck
On Thu, 5 Nov 2020 17:18:56 -0500 Daniele Buono wrote: > This patch adds supports for Control-Flow Integrity checks > on indirect function calls. > > Requires the use of clang, and link-time optimizations > > Changes in v3: > > - clang 11+ warnings are now handled directly at the source, > in

Re: [PATCH v2 1/7] block: add forgotten bdrv_abort_perm_update() to bdrv_co_invalidate_cache()

2020-11-06 Thread Alberto Garcia
On Fri 06 Nov 2020 01:42:35 PM CET, Vladimir Sementsov-Ogievskiy wrote: > Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Berto

Re: Documents not in sphinx toctree

2020-11-06 Thread Pankaj Gupta
> > >> By running sphinx over the docs/ directory (like readthedocs.org > > >> presumably does), it finds a couple of rst documents that are not > > >> referenced: > > >> - cpu-hotplug.rst > > >> - microvm.rst > > >> - pr-manager.rst > > >> - virtio-net-failover.rst > > > > Given the current stru

Re: [PATCH] scripts/checkpatch.pl: Modify the line length limit of the code

2020-11-06 Thread Markus Armbruster
Peter Maydell writes: > On Fri, 6 Nov 2020 at 06:15, Gan Qixin wrote: >> >> Modify the rule that limit the length of lines according to the following >> ideas: >> >> --add a variable max_line_length to indicate the limit of line length and >> set it to 100 by default >> --when the line length

Re: [PATCH] CODING_STYLE.rst: Be less strict about 80 character limit

2020-11-06 Thread Markus Armbruster
Peter Maydell writes: > Relax the wording about line lengths a little bit; this goes with the > checkpatch changes to warn at 100 characters rather than 80. > > (Compare the Linux kernel commit bdc48fa11e46f8; our coding style is > not theirs, but the rationale is good and applies to us too.) > >

[PULL for-5.2 3/4] target/s390x: fix execution with icount

2020-11-06 Thread Cornelia Huck
From: Pavel Dovgalyuk This patch adds some gen_io_start() calls to allow execution of s390x targets in icount mode with -smp 1. It enables deterministic timers and record/replay features. Suggested-by: Richard Henderson Signed-off-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson Acked-by: D

[PULL for-5.2 1/4] s390-bios: Skip writing iplb location to low core for ccw ipl

2020-11-06 Thread Cornelia Huck
From: "Jason J. Herne" The architecture states that the iplb location is only written to low core for list directed ipl and not for traditional ccw ipl. If we don't skip this then operating systems that load by reading into low core memory may fail to start. We should also not write the iplb poi

[PULL for-5.2 4/4] s390x: fix build for --without-default-devices

2020-11-06 Thread Cornelia Huck
s390-pci-vfio.c calls into the vfio code, so we need it to be built conditionally on vfio (which implies CONFIG_LINUX). Fixes: cd7498d07fbb ("s390x/pci: Add routine to get the vfio dma available count") Reported-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe

[PULL for-5.2 0/4] s390x fixes

2020-11-06 Thread Cornelia Huck
The following changes since commit 3d6e32347a3b57dac7f469a07c5f520e69bd070a: Update version for v5.2.0-rc0 release (2020-11-03 21:11:57 +) are available in the Git repository at: https://github.com/cohuck/qemu tags/s390x-20201106 for you to fetch changes up to

Re: [PATCH for-5.2 3/4] qtest: escape device name in device-introspect-test

2020-11-06 Thread Markus Armbruster
Paolo Bonzini writes: > device-introspect-test uses HMP, so it should escape the device name > properly. Because of this, a few devices that had commas in their > names were escaping testing. > Signed-off-by: Paolo Bonzini $ git-grep '\.name *= *"[^"]*,' | cat hw/block/fdc.c:.name

Re: [PATCH V2 1/2] plugins: Fix resource leak in connect_socket()

2020-11-06 Thread Eric Blake
On 11/5/20 7:59 PM, AlexChen wrote: > Close the fd when the connect() fails. > > Reported-by: Euler Robot > Signed-off-by: Alex Chen Your From: line ("AlexChen") is spelled differently than your S-o-b: line ("Alex Chen"). While this is not fatal to the patch, it is confusing, so you may want t

[PULL for-5.2 2/4] pc-bios/s390: update s390-ccw bios binaries

2020-11-06 Thread Cornelia Huck
Contains "s390-bios: Skip writing iplb location to low core for ccw ipl". Signed-off-by: Cornelia Huck --- pc-bios/s390-ccw.img | Bin 42608 -> 46704 bytes pc-bios/s390-netboot.img | Bin 67232 -> 71328 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/pc-bios/s390-ccw.img

[Question] Fuzz: No rule to make target 'i386-softmmu/fuzz'

2020-11-06 Thread liqiuhao727
Hi, I am a newbie to QEMU and trying to build the virtual-device fuzzer according to qemu/docs/devel/fuzzing.txt, which says: --- Configure with (substitute the clang binaries with the version you installed). ... CC=clang-8 CXX=clang++-8 /path/to/configure --enable-fuzzing \

Re: [Question] Fuzz: No rule to make target 'i386-softmmu/fuzz'

2020-11-06 Thread Alexander Bulekov
On 201106 2104, liqiuhao727 wrote: > Hi, > > I am a newbie to QEMU and trying to build the virtual-device fuzzer > according to qemu/docs/devel/fuzzing.txt, which says: > > --- > Configure with (substitute the clang binaries with the version you > installed). > ... > CC=clang-8 CXX=clang++-8

Re: [PATCH for-5.2 3/4] qtest: escape device name in device-introspect-test

2020-11-06 Thread Paolo Bonzini
On 06/11/20 14:15, Markus Armbruster wrote: Paolo Bonzini writes: device-introspect-test uses HMP, so it should escape the device name properly. Because of this, a few devices that had commas in their names were escaping testing. Signed-off-by: Paolo Bonzini $ git-grep '\.name *= *"[^"]*,'

Re: [PATCH v3 0/9] Add support for Control-Flow Integrity

2020-11-06 Thread Daniele Buono
Hi Cornelia, I don't have a real preference either way. So if it is acceptable to have the clang11+ patches separated and handled by the maintainers for the proper subsystem, I'd say whatever the maintainers prefer. In my opinion, the patches for clang11+ support may be merged separately. I'm

Re: [PATCH] scripts/checkpatch.pl: Modify the line length limit of the code

2020-11-06 Thread Peter Maydell
On Fri, 6 Nov 2020 at 13:07, Markus Armbruster wrote: > The current "warn at 80, error at 90" is a compromise. It's the result > of a lengthy argument. Why reopen it? There was some previous discussion under this thread: https://lists.gnu.org/archive/html/qemu-devel/2020-10/msg05653.html which

Re: [PATCH] physmem: improve ram size error messages

2020-11-06 Thread Pankaj Gupta
Ping > Ram size mismatch condition logs below message. > >"Length mismatch: pc.ram: 0x8000 in != 0x18000: Invalid argument" > > This patch improves the readability of error messages. > Removed the superflous "in" and changed "Length" to "Size". > > Signed-off-by: Pankaj Gupta > Rep

Re: [PATCH] scripts/checkpatch.pl: Modify the line length limit of the code

2020-11-06 Thread Philippe Mathieu-Daudé
On 11/6/20 2:39 PM, Peter Maydell wrote: > On Fri, 6 Nov 2020 at 13:07, Markus Armbruster wrote: >> The current "warn at 80, error at 90" is a compromise. It's the result >> of a lengthy argument. Why reopen it? > > There was some previous discussion under this thread: > https://lists.gnu.org/a

[PATCH 1/1] Change the order of g_free(info) and tracepoint

2020-11-06 Thread Kirti Wankhede
Fixes Coverity issue: CID 1436126: Memory - illegal accesses (USE_AFTER_FREE) Fixes: a9e271ec9b36 ("vfio: Add migration region initialization and finalize function") Signed-off-by: Kirti Wankhede --- hw/vfio/migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/vf

Re: [PATCH] target/microblaze: Fix possible array out of bounds in mmu_write()

2020-11-06 Thread Philippe Mathieu-Daudé
On 11/3/20 8:46 AM, AlexChen wrote: > The size of env->mmu.regs is 3, but the range of 'rn' is [0, 5]. > To avoid data access out of bounds, only if 'rn' is less than 3, we > can print env->mmu.regs[rn]. In other cases, we can print > env->mmu.regs[MMU_R_TLBX]. > > Reported-by: Euler Robot > Sign

Re: [PATCH] scripts/checkpatch.pl: Modify the line length limit of the code

2020-11-06 Thread Peter Maydell
On Fri, 6 Nov 2020 at 14:08, Philippe Mathieu-Daudé wrote: > Can we keep the error please? Maybe 132 is the next display logical > limit once we increased the warning from 80 to 100. > > I understand hardware evolved, we have larger displays with better > resolution and can fit more characters in

Re: [PATCH] qtest: Fix bad printf format specifiers

2020-11-06 Thread Philippe Mathieu-Daudé
On 11/6/20 7:33 AM, Markus Armbruster wrote: > Thomas Huth writes: > >> On 05/11/2020 06.14, AlexChen wrote: >>> On 2020/11/4 18:44, Thomas Huth wrote: On 04/11/2020 11.23, AlexChen wrote: > We should use printf format specifier "%u" instead of "%d" for > argument of type "unsigned i

Re: [PATCH v1 1/1] hw/intc/ibex_plic: Clear the claim register when read

2020-11-06 Thread Philippe Mathieu-Daudé
On 11/6/20 3:32 AM, Alistair Francis wrote: > After claiming the interrupt by reading the claim register we want to > clear the register to make sure the interrupt doesn't appear at the next > read. > > This matches the documentation for the claim register as it clears the > pending bit (which we

Re: [PATCH-for-5.2? v3 3/9] hw/usb: reorder fields in UASStatus

2020-11-06 Thread Philippe Mathieu-Daudé
On 11/5/20 11:18 PM, Daniele Buono wrote: > The UASStatus data structure has a variable sized field inside of type uas_iu, > that however is not placed at the end of the data structure. > > This placement triggers a warning with clang 11, and while not a bug right > now, > (the status is never a

Re: [PATCH-for-5.2? v3 5/9] scsi: fix overflow in scsi_disk_new_request_dump

2020-11-06 Thread Philippe Mathieu-Daudé
On 11/5/20 11:19 PM, Daniele Buono wrote: > scsi_disk_new_request_dump is used to dump the content of a scsi request > for tracing. It does that by decoding the command to get the size of the > command buffer, and then printing the content of such buffer on a string. > > When using gcc with link-t

Re: [PATCH-for-5.2? v3 5/9] scsi: fix overflow in scsi_disk_new_request_dump

2020-11-06 Thread Philippe Mathieu-Daudé
On 11/6/20 3:32 PM, Philippe Mathieu-Daudé wrote: > On 11/5/20 11:19 PM, Daniele Buono wrote: >> scsi_disk_new_request_dump is used to dump the content of a scsi request >> for tracing. It does that by decoding the command to get the size of the >> command buffer, and then printing the content of s

Re: [PATCH] scripts/checkpatch.pl: Modify the line length limit of the code

2020-11-06 Thread Philippe Mathieu-Daudé
On 11/6/20 3:16 PM, Peter Maydell wrote: > On Fri, 6 Nov 2020 at 14:08, Philippe Mathieu-Daudé wrote: >> Can we keep the error please? Maybe 132 is the next display logical >> limit once we increased the warning from 80 to 100. >> >> I understand hardware evolved, we have larger displays with bett

Re: [PATCH v3 1/9] fuzz: Make fork_fuzz.ld compatible with LLVM's LLD

2020-11-06 Thread Alexander Bulekov
On 201105 1718, Daniele Buono wrote: > LLVM's linker, LLD, supports the keyword "INSERT AFTER", starting with > version 11. > However, when multiple sections are defined in the same "INSERT AFTER", > they are added in a reversed order, compared to BFD's LD. > > This patch makes fork_fuzz.ld generi

Re: [PATCH v3 0/9] Add support for Control-Flow Integrity

2020-11-06 Thread Alexander Bulekov
On 201106 0835, Daniele Buono wrote: > Hi Cornelia, > > I don't have a real preference either way. > > So if it is acceptable to have the clang11+ patches separated and > handled by the maintainers for the proper subsystem, I'd say whatever > the maintainers prefer. > > In my opinion, the patche

Re: [PULL for-5.2 0/4] s390x fixes

2020-11-06 Thread Peter Maydell
m/cohuck/qemu tags/s390x-20201106 > > for you to fetch changes up to 77280d33bc9cfdbfb5b5d462259d644f5aefe9b3: > > s390x: fix build for --without-default-devices (2020-11-05 13:04:07 +0100) > > &

Re: [PATCH 1/2] qemu-option: move help handling to get_opt_name_value

2020-11-06 Thread Markus Armbruster
Paolo Bonzini writes: > Right now, help options are parsed normally and then checked > specially in opt_validate. but only if coming from > qemu_opts_parse or qemu_opts_parse_noisily. > Move the check from opt_validate to the common workhorses > of qemu_opts_parse and qemu_opts_parse_noisily, opt

Re: [PATCH v2 3/7] block: make bdrv_drop_intermediate() less wrong

2020-11-06 Thread Alberto Garcia
On Fri 06 Nov 2020 01:42:37 PM CET, Vladimir Sementsov-Ogievskiy wrote: > First, permission update loop tries to do iterations transactionally, > but the whole update is not transactional: nobody roll-back successful > loop iterations when some iteration fails. > > Second, in the iteration we have

Re: [PATCH v2 4/7] block: add bdrv_refresh_perms() helper

2020-11-06 Thread Alberto Garcia
On Fri 06 Nov 2020 01:42:38 PM CET, Vladimir Sementsov-Ogievskiy wrote: > Make separate function for common pattern. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block.c | 60 - > 1 file changed, 30 insertions(+), 30 deletions(-)

[PATCH v2 1/4] linux-user/sparc: Correct sparc64_get/set_context() FPU handling

2020-11-06 Thread Peter Maydell
The handling of the FPU state in sparc64_get_context() and sparc64_set_context() is not the same as what the kernel actually does: we unconditionally read and write the FP registers and the FSR, GSR and FPRS, but the kernel logic is more complicated: * in get_context the kernel has code for saving

[PATCH v2 0/4] linux/sparc: more get/set_context fixes

2020-11-06 Thread Peter Maydell
Based-on: 20201105212314.9628-1-peter.mayd...@linaro.org ("[PATCH for-5.2 0/3] linux-user: fix various sparc64 guest bugs") This series fixes a few more issues with our sparc linux-user sparc64_get_context() and sparc64_set_context() implementation: * we weren't handling FPU regs correctly, and a

[PATCH v2 4/4] linux-user/sparc: Handle tstate in sparc64_get/set_context()

2020-11-06 Thread Peter Maydell
Correctly implement save/restore of the tstate field in sparc64_get_context() and sparc64_set_context(): * Don't use the CWP value from the guest in set_context * Construct and save a tstate value rather than leaving it as zero in get_context To do this we factor out the "calculate TSTATE val

[PATCH v2 2/4] linux-user/sparc: Remove unneeded checks of 'err' from sparc64_get_context()

2020-11-06 Thread Peter Maydell
Unlike the kernel macros, our __get_user() and __put_user() do not return a failure code. Kernel code typically has a style of err |= __get_user(...); err |= __get_user(...); and then checking err at the end. In sparc64_get_context() our version of the code dropped the accumulating into err but

[PATCH v2 3/4] linux-user/sparc: Don't restore %g7 in sparc64_set_context()

2020-11-06 Thread Peter Maydell
The kernel does not restore the g7 register in sparc64_set_context(); neither should we. (We still save it in sparc64_get_context().) Signed-off-by: Peter Maydell --- linux-user/sparc/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/sparc/signal.c b/linux-u

Re: [PATCH v2 0/4] linux/sparc: more get/set_context fixes

2020-11-06 Thread Peter Maydell
On Fri, 6 Nov 2020 at 15:27, Peter Maydell wrote: > > Based-on: 20201105212314.9628-1-peter.mayd...@linaro.org > ("[PATCH for-5.2 0/3] linux-user: fix various sparc64 guest bugs") > > This series fixes a few more issues with our sparc linux-user > sparc64_get_context() and sparc64_set_context() im

Re: [PATCH v2 2/7] block: add bdrv_replace_node_common()

2020-11-06 Thread Alberto Garcia
On Fri 06 Nov 2020 01:42:36 PM CET, Vladimir Sementsov-Ogievskiy wrote: > Add new parameter to bdrv_replace_node(): auto_skip. With > auto_skip=false we'll have stricter behavior: update _all_ from > parents or fail. New behaviour will be used in the following commit in > block.c, so keep original

Re: [PATCH 0/2] Increase amount of data for monitor to read

2020-11-06 Thread Andrey Shinkevich
Please exclude this address when reply: jc...@redhat.com Andrey

Re: [PATCH for-5.2 3/4] qtest: escape device name in device-introspect-test

2020-11-06 Thread Markus Armbruster
Paolo Bonzini writes: > On 06/11/20 14:15, Markus Armbruster wrote: >> Paolo Bonzini writes: >> >>> device-introspect-test uses HMP, so it should escape the device name >>> properly. Because of this, a few devices that had commas in their >>> names were escaping testing. >>> Signed-off-by: Pao

Re: Migrating to the gitlab issue tracker

2020-11-06 Thread Laszlo Ersek
On 11/04/20 18:19, Daniel P. Berrangé wrote: > This just sounds like fairly niche requirements for which directly > subscribing to the project issue tracker will satisfy 99% of the time. OK. Laszlo

Re: [PATCH] qtest: Fix bad printf format specifiers

2020-11-06 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 11/6/20 7:33 AM, Markus Armbruster wrote: [...] >> In other words "%" PRIu32 is just a less legible alias for "%u" in all >> cases that matter. > > Can we add a checkpatch rule to avoid using 'PRI[dux]32' format, > so it is clear for everyone? I guess we could

Re: [PATCH v2 00/44] Make qdev static property API usable by any QOM type

2020-11-06 Thread Eduardo Habkost
On Fri, Nov 06, 2020 at 10:45:11AM +0100, Kevin Wolf wrote: > Am 04.11.2020 um 16:59 hat Eduardo Habkost geschrieben: > > This series refactor the qdev property code so the static > > property system can be used by any QOM type. As an example, at > > the end of the series some properties in TYPE_M

Re: [PATCH 1/1] Change the order of g_free(info) and tracepoint

2020-11-06 Thread David Edmondson
On Friday, 2020-11-06 at 19:09:24 +0530, Kirti Wankhede wrote: > Fixes Coverity issue: > CID 1436126: Memory - illegal accesses (USE_AFTER_FREE) > > Fixes: a9e271ec9b36 ("vfio: Add migration region initialization and finalize > function") > > Signed-off-by: Kirti Wankhede Maybe "fix use after

Re: [PATCH] scripts/checkpatch.pl: Modify the line length limit of the code

2020-11-06 Thread Markus Armbruster
Peter Maydell writes: > On Fri, 6 Nov 2020 at 14:08, Philippe Mathieu-Daudé wrote: >> Can we keep the error please? Maybe 132 is the next display logical >> limit once we increased the warning from 80 to 100. >> >> I understand hardware evolved, we have larger displays with better >> resolution

Re: [PATCH] scripts/checkpatch.pl: Modify the line length limit of the code

2020-11-06 Thread Peter Maydell
On Fri, 6 Nov 2020 at 16:08, Markus Armbruster wrote: > Peter Maydell writes: > > Personally I just don't think checkpatch should be nudging people > > into folding 85-character lines, especially when there are > > multiple very similar lines in a row and only one would get > > folded, eg the pro

Re: [PATCH 1/1] Change the order of g_free(info) and tracepoint

2020-11-06 Thread Alex Bennée
Kirti Wankhede writes: > Fixes Coverity issue: > CID 1436126: Memory - illegal accesses (USE_AFTER_FREE) > > Fixes: a9e271ec9b36 ("vfio: Add migration region initialization and finalize > function") > > Signed-off-by: Kirti Wankhede Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH] CODING_STYLE.rst: Be less strict about 80 character limit

2020-11-06 Thread Michael S. Tsirkin
On Fri, Nov 06, 2020 at 11:29:40AM +, Peter Maydell wrote: > Relax the wording about line lengths a little bit; this goes with the > checkpatch changes to warn at 100 characters rather than 80. > > (Compare the Linux kernel commit bdc48fa11e46f8; our coding style is > not theirs, but the ratio

Re: [PATCH 2/2] qemu-option: warn for short-form boolean options

2020-11-06 Thread Markus Armbruster
Paolo Bonzini writes: > Options such as "server" or "nowait", that are commonly found in -chardev, > are sugar for "server=on" and "wait=off". This is quite surprising and > also does not have any notion of typing attached. It is even possible to > do "-device e1000,noid" and get a device with

Re: [PATCH] migration/dirtyrate: simplify inlcudes in dirtyrate.c

2020-11-06 Thread Dr. David Alan Gilbert
* Zheng Chuan (zhengch...@huawei.com) wrote: > Kindly ping for not forgetting this trivial fix:) Yes but it's too late for the merge window, so it'll happen on the next one, no rush! Dave > On 2020/10/30 22:09, Mark Kanda wrote: > > On 10/29/2020 10:58 PM, Chuan Zheng wrote: > >> Remove redundan

Re: [PATCH 1/2] qemu-option: move help handling to get_opt_name_value

2020-11-06 Thread Markus Armbruster
One more thought... Markus Armbruster writes: > Paolo Bonzini writes: [...] >> diff --git a/util/qemu-option.c b/util/qemu-option.c [...] >> @@ -767,16 +763,18 @@ void qemu_opts_print(QemuOpts *opts, const char >> *separator) >> >> static const char *get_opt_name_value(const char *params, >

Re: [PATCH 1/1] Change the order of g_free(info) and tracepoint

2020-11-06 Thread Philippe Mathieu-Daudé
On 11/6/20 4:59 PM, David Edmondson wrote: > On Friday, 2020-11-06 at 19:09:24 +0530, Kirti Wankhede wrote: > >> Fixes Coverity issue: >> CID 1436126: Memory - illegal accesses (USE_AFTER_FREE) >> >> Fixes: a9e271ec9b36 ("vfio: Add migration region initialization and finalize >> function") >> >>

[PATCH-for-6.0 0/2] hw/scsi/scsi-disk: QOM style change

2020-11-06 Thread Philippe Mathieu-Daudé
Some QOM style changes in TYPE_SCSI_DISK to follow the rest of the codebase style. No logical change. Philippe Mathieu-Daudé (2): hw/scsi/scsi-disk: Rename type as TYPE_SCSI_DISK hw/scsi/scsi-disk: Use SCSI_DISK_GET_CLASS() macro hw/scsi/scsi-disk.c | 26 +- 1 file ch

[PATCH-for-6.0 2/2] hw/scsi/scsi-disk: Use SCSI_DISK_GET_CLASS() macro

2020-11-06 Thread Philippe Mathieu-Daudé
Use the SCSI_DISK_GET_CLASS() macro to match the rest of the codebase. Signed-off-by: Philippe Mathieu-Daudé --- hw/scsi/scsi-disk.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index d2b9cb28da1..deb51ec8e7d 100644 --- a/h

[PATCH-for-6.0 1/2] hw/scsi/scsi-disk: Rename type as TYPE_SCSI_DISK

2020-11-06 Thread Philippe Mathieu-Daudé
Rename TYPE_SCSI_DISK without the '_BASE' suffix to match the other abstract types in the codebase. Signed-off-by: Philippe Mathieu-Daudé --- hw/scsi/scsi-disk.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index

Re: [PATCH v2 1/4] linux-user/sparc: Correct sparc64_get/set_context() FPU handling

2020-11-06 Thread Richard Henderson
On 11/6/20 7:27 AM, Peter Maydell wrote: > +if (fprs & FPRS_DU) { > +for (i = 16; i < 31; i++) { 32. Otherwise, Reviewed-by: Richard Henderson r~

Re: Question on UEFI ACPI tables setup and probing on arm64

2020-11-06 Thread Laszlo Ersek
On 11/05/20 05:30, Ying Fang wrote: > I see it in Qemu the *loader_start* is fixed at 1 GiB on the > physical address space which points to the DRAM base. In ArmVirtQemu.dsc > PcdDeviceTreeInitialBaseAddress is set 0x4000 with correspondence. > > Here I also see the discussion about DRAM base

Re: [PATCH v2 3/4] linux-user/sparc: Don't restore %g7 in sparc64_set_context()

2020-11-06 Thread Richard Henderson
On 11/6/20 7:27 AM, Peter Maydell wrote: > The kernel does not restore the g7 register in sparc64_set_context(); > neither should we. (We still save it in sparc64_get_context().) > > Signed-off-by: Peter Maydell > --- > linux-user/sparc/signal.c | 2 +- > 1 file changed, 1 insertion(+), 1 deleti

Re: [PATCH v2 2/4] linux-user/sparc: Remove unneeded checks of 'err' from sparc64_get_context()

2020-11-06 Thread Richard Henderson
On 11/6/20 7:27 AM, Peter Maydell wrote: > Unlike the kernel macros, our __get_user() and __put_user() do not > return a failure code. Kernel code typically has a style of > err |= __get_user(...); err |= __get_user(...); > and then checking err at the end. In sparc64_get_context() our > versio

[PATCH for-5.2 1/4] hw/net/can/ctucan: Don't allow guest to write off end of tx_buffer

2020-11-06 Thread Peter Maydell
The ctucan device has 4 CAN bus cores, each of which has a set of 20 32-bit registers for writing the transmitted data. The registers are however not contiguous; each core's buffers is 0x100 bytes after the last. We got the checks on the address wrong in the ctucan_mem_write() function: * the fir

[PATCH for-5.2 4/4] hw/net/ctucan_core: Use stl_le_p to write to tx_buffers

2020-11-06 Thread Peter Maydell
Instead of casting an address within a uint8_t array to a uint32_t*, use stl_le_p(). This handles possibly misaligned addresses which would otherwise crash on some hosts. Signed-off-by: Peter Maydell --- hw/net/can/ctucan_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH for-5.2 2/4] hw/net/can/ctucan: Avoid unused value in ctucan_send_ready_buffers()

2020-11-06 Thread Peter Maydell
Coverity points out that in ctucan_send_ready_buffers() we set buff_st_mask = 0xf << (i * 4) inside the loop, but then we never use it before overwriting it later. The only thing we use the mask for is as part of the code that is inserting the new buff_st field into tx_status. That is more compre

Re: [PATCH v2 1/4] linux-user/sparc: Correct sparc64_get/set_context() FPU handling

2020-11-06 Thread Peter Maydell
On Fri, 6 Nov 2020 at 17:09, Richard Henderson wrote: > > On 11/6/20 7:27 AM, Peter Maydell wrote: > > +if (fprs & FPRS_DU) { > > +for (i = 16; i < 31; i++) { > > 32. Derp. Lucky this code basically never gets run, eh ? :-) -- PMM

  1   2   >