Re: [PATCH] MAINTAINERS: Orphan MIPS KVM CPUs

2020-02-15 Thread Paolo Bonzini
On 16/02/20 07:57, James Hogan wrote: >> We are in the process of handling this within the company, and this >> patch should go via MIPS tree, not trivial tree - will be updated when >> the opinions are crystallized, and all consultations with others were >> done. There is no rush. > Hi

[Bug 1863445] Re: assertion failed at translate-all.c:2523 with version 3.1.1

2020-02-15 Thread Ayman Khamouma
indeed, works fine with 4.2 thanks -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1863445 Title: assertion failed at translate-all.c:2523 with version 3.1.1 Status in QEMU: Incomplete Bug

Re: [PATCH v2 1/2] target/arm: Fix select for aa64_va_parameters_both

2020-02-15 Thread Richard Henderson
On 2/13/20 5:25 AM, Peter Maydell wrote: > On Thu, 13 Feb 2020 at 13:12, Peter Maydell wrote: >> >> On Tue, 11 Feb 2020 at 19:42, Richard Henderson >> wrote: >>> >>> Select should always be 0 for a regime with one range. >>> >>> Signed-off-by: Richard Henderson >> >> This change makes sense,

Re: hw/net/rocker: Dubious code in tx_consume()

2020-02-15 Thread Jiri Pirko
Sat, Feb 15, 2020 at 02:15:22PM CET, phi...@redhat.com wrote: >Hi Jiri, > >I am trying to understand this code Scott Feldman added in commit >dc488f88806: > > 157 static int tx_consume(Rocker *r, DescInfo *info) > 158 { > ... > 212 if (tlvs[ROCKER_TLV_TX_TSO_MSS]) { > 213 tx_tso_mss =

Re: [PATCH] MAINTAINERS: Orphan MIPS KVM CPUs

2020-02-15 Thread James Hogan
On Thu, Feb 13, 2020 at 01:34:57AM +0100, Aleksandar Markovic wrote: > On Wed, Feb 12, 2020 at 7:44 PM Philippe Mathieu-Daudé > wrote: > > > > Cc'ing qemu-trivial@ & Paolo. > > > > We are in the process of handling this within the company, and this > patch should go via MIPS tree, not trivial

[Bug 1863445] Re: assertion failed at translate-all.c:2523 with version 3.1.1

2020-02-15 Thread Richard Henderson
Please try again with 4.2; there have been changes in this function. ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1863445 Title: assertion

Re: [PATCH v3 1/2] target/arm: Support SError injection

2020-02-15 Thread Richard Henderson
On 2/13/20 9:59 PM, Gavin Shan wrote: > diff --git a/target/arm/cpu.c b/target/arm/cpu.c > index b0762a76c4..180e29fb83 100644 > --- a/target/arm/cpu.c > +++ b/target/arm/cpu.c > @@ -78,7 +78,7 @@ static bool arm_cpu_has_work(CPUState *cs) > && cs->interrupt_request & >

Re: [PATCH v2] compiler.h: Don't use compile-time assert when __NO_INLINE__ is defined

2020-02-15 Thread Richard Henderson
On 2/5/20 6:15 AM, Zenghui Yu wrote: > Our robot reported the following compile-time warning while compiling > Qemu with -fno-inline cflags: > > In function 'load_memop', > inlined from 'load_helper' at /qemu/accel/tcg/cputlb.c:1578:20, > inlined from 'full_ldub_mmu' at

Re: [PATCH 02/12] hw/arm/raspi: Avoid using TypeInfo::class_data pointer

2020-02-15 Thread Richard Henderson
On 2/15/20 11:15 AM, Philippe Mathieu-Daudé wrote: > Using class_data pointer to create a MachineClass is not > the recommended way anymore. The correct way is to open-code > the MachineClass::fields in the class_init() method. > > This partly reverts commit a03bde3674e. > > Suggested-by: Igor

Re: [PATCH 01/12] hw/arm/raspi: Remove ignore_memory_transaction_failures on the raspi2

2020-02-15 Thread Richard Henderson
On 2/15/20 11:15 AM, Philippe Mathieu-Daudé wrote: > Commit 1c3db49d39 added the raspi3, which uses the same peripherals > than the raspi2 (but with different ARM cores). The raspi3 was > introduced without the ignore_memory_transaction_failures flag. > Almost 2 years later, the machine is usable

Re: [PATCH] configure: Avoid compiling system tools on user build by default

2020-02-15 Thread Richard Henderson
On 2/15/20 8:23 AM, Philippe Mathieu-Daudé wrote: > User-mode does not need the sytem tools. Do not build them by > default if user specified --disable-system. > > Signed-off-by: Philippe Mathieu-Daudé > --- > configure | 11 ++- > 1 file changed, 10 insertions(+), 1 deletion(-)

Re: [PATCH 3/3] hw/block/pflash_cfi02: Remove unneeded variable assignment

2020-02-15 Thread Richard Henderson
On 2/15/20 8:15 AM, Philippe Mathieu-Daudé wrote: > Fix warning reported by Clang static code analyzer: > > CC hw/block/pflash_cfi02.o > hw/block/pflash_cfi02.c:311:5: warning: Value stored to 'ret' is never read > ret = -1; > ^ ~~ > > Reported-by: Clang Static

Re: [PATCH 2/3] hw/display/qxl: Remove unneeded variable assignment

2020-02-15 Thread Richard Henderson
On 2/15/20 8:15 AM, Philippe Mathieu-Daudé wrote: > Fix warning reported by Clang static code analyzer: > > hw/display/qxl.c:1634:14: warning: Value stored to 'orig_io_port' during > its initialization is never read > uint32_t orig_io_port = io_port; >^~~~

Re: [PATCH 1/3] block/qcow2-bitmap: Remove unneeded variable assignment

2020-02-15 Thread Richard Henderson
On 2/15/20 8:15 AM, Philippe Mathieu-Daudé wrote: > Fix warning reported by Clang static code analyzer: > > CC block/qcow2-bitmap.o > block/qcow2-bitmap.c:650:5: warning: Value stored to 'ret' is never read > ret = -EINVAL; > ^ ~~~ > > Reported-by: Clang Static

Re: [PATCH 0/2] hw: Delay timer_new() from init to realize to avoid memleaks

2020-02-15 Thread Richard Henderson
On 2/15/20 7:47 AM, Philippe Mathieu-Daudé wrote: > Philippe Mathieu-Daudé (2): > hw/ipmi/bmc: Delay timer_new_ns() from init to realize to avoid > memleaks > hw/sd/sd: Delay timer_new_ns() from init to realize to avoid memleaks Reviewed-by: Richard Henderson r~

Re: [PATCH 0/5] hw/display/artist: Fix Coverity 1419388 & 1419389

2020-02-15 Thread Richard Henderson
On 2/13/20 4:12 PM, Philippe Mathieu-Daudé wrote: > Another easy Coverity fix. > > Philippe Mathieu-Daudé (5): > hw/display/artist: Move trace event to draw_line() > hw/display/artist: Remove pointless initialization > hw/display/artist: Delay some variables initialization >

Re: [PATCH 0/4] hw/hppa/dino: Fix Coverity 1419393 & 1419394

2020-02-15 Thread Richard Henderson
On 2/13/20 3:41 PM, Philippe Mathieu-Daudé wrote: > Easy fix for the overrun reported by Coverity. > > Last 2 patches are RFC because I haven't tested them, > I simply took note while reviewing the datasheet (I > also checked the errata). > > Philippe Mathieu-Daudé (4): > hw/hppa/dino: Add

[Bug 1863445] Re: assertion failed at translate-all.c:2523 with version 3.1.1

2020-02-15 Thread Ayman Khamouma
tested on fedora 30: ``` uname -a Linux bigfoot.home.ak42.io 5.4.18-100.fc30.x86_64 #1 SMP Fri Feb 7 14:37:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux ``` -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

[Bug 1863445] [NEW] assertion failed at translate-all.c:2523 with version 3.1.1

2020-02-15 Thread Ayman Khamouma
Public bug reported: I was trying to debug a userspace binary with radare2 and met the following assertion in qemu: ``` qemu-mipsel: /builddir/build/BUILD/qemu-3.1.1/accel/tcg/translate-all.c:2523: page_check_range: Assertion `start < ((target_ulong)1 << L1_MAP_ADDR_SPACE_BITS)' failed.

[Bug 1863445] Re: assertion failed at translate-all.c:2523 with version 3.1.1

2020-02-15 Thread Ayman Khamouma
in order to reproduce the bug: ``` qemu-mipsel -g 1234 ch67 ``` and then juste launch (after installing r2): ``` r2 -a mips -b 32 -d gdb://127.0.0.1:1234 ``` qemu will crash -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

[Bug 1863445] Re: assertion failed at translate-all.c:2523 with version 3.1.1

2020-02-15 Thread Ayman Khamouma
** Attachment added: "debuged binary" https://bugs.launchpad.net/qemu/+bug/1863445/+attachment/5328542/+files/ch67.zip -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1863445 Title: assertion

Re: [PATCH v2 07/30] qapi/block-core.json: Use literal block for ascii art

2020-02-15 Thread Aleksandar Markovic
9:56 PM Sub, 15.02.2020. Philippe Mathieu-Daudé је написао/ла: > > Hi Aleksandar, > > On Fri, Feb 14, 2020 at 12:04 AM Aleksandar Markovic > wrote: > > > > 6:59 PM Čet, 13.02.2020. Peter Maydell је написао/ла: > > > > > > The ascii-art graph > > > > Just out of couriousity, are unicode

Re: [PATCH v2 07/30] qapi/block-core.json: Use literal block for ascii art

2020-02-15 Thread Philippe Mathieu-Daudé
Hi Aleksandar, On Fri, Feb 14, 2020 at 12:04 AM Aleksandar Markovic wrote: > > 6:59 PM Čet, 13.02.2020. Peter Maydell је > написао/ла: > > > > The ascii-art graph > > Just out of couriousity, are unicode characters allowed in rst files? I remember 2 years ago a blind developer thanked the

[Bug 1863441] [NEW] cmd_mode_sense always reports 0x70, no CDROM present

2020-02-15 Thread Benjamin David Lunt
Public bug reported: cmd_mode_sense https://git.qemu.org/?p=qemu.git;a=blob;f=hw/ide/atapi.c;hb=refs/heads/master#l852 always reports 0x70 in byte 2 returned, indicating no CD-ROM present. If CD-ROM is present, should report 0x01 (or 0x11). If CD-ROM absent, should report 0x70. ** Affects:

Re: [RFC PATCH 3/4] hw/hppa/dino: Fix PCIROR register access bitmask

2020-02-15 Thread Helge Deller
On 14.02.20 00:41, Philippe Mathieu-Daudé wrote: > Only 24 bits of the PCIROR register are documented > (see pp. 37 of datasheet referenced in this file header). > > Signed-off-by: Philippe Mathieu-Daudé Acked-by: Helge Deller > --- > hw/hppa/dino.c | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [RFC PATCH 4/4] hw/hppa/dino: Do not accept accesses to registers 0x818 and 0x82c

2020-02-15 Thread Helge Deller
On 14.02.20 00:41, Philippe Mathieu-Daudé wrote: > Register 0x818 is documented as 'undefined', and register > 0x82c is not documented. Refuse their access. > > Signed-off-by: Philippe Mathieu-Daudé Acked-by: Helge Deller > --- > hw/hppa/dino.c | 4 +++- > 1 file changed, 3 insertions(+), 1

Re: [PATCH 2/4] hw/hppa/dino: Fix reg800_keep_bits[] overrun (CID 1419393 & 1419394)

2020-02-15 Thread Helge Deller
On 14.02.20 00:41, Philippe Mathieu-Daudé wrote: > > Fixes: Covertiy CID 1419393 and 1419394 (commit 18092598a5) > Signed-off-by: Philippe Mathieu-Daudé Acked-by: Helge Deller > --- > hw/hppa/dino.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/hw/hppa/dino.c

Re: [PATCH 1/4] hw/hppa/dino: Add comments with register name

2020-02-15 Thread Helge Deller
On 14.02.20 00:41, Philippe Mathieu-Daudé wrote: > Add a comment with the name of each register in the 0x800-0x833 range. > > Signed-off-by: Philippe Mathieu-Daudé Acked-by: Helge Deller > --- > hw/hppa/dino.c | 24 > 1 file changed, 12 insertions(+), 12 deletions(-)

[PATCH 8/8] tests/acceptance: Count Raspberry Pi logos displayed on framebuffer

2020-02-15 Thread Philippe Mathieu-Daudé
Add a test that verifies that each core properly displays the Raspberry Pi logo on the framebuffer device. We simply follow the OpenCV "Template Matching with Multiple Objects" tutorial, replacing Lionel Messi by a raspberrry:

[PATCH 6/8] tests/boot_linux_console: Test booting U-Boot on the Raspberry Pi 2

2020-02-15 Thread Philippe Mathieu-Daudé
This test runs U-Boot on the Raspberry Pi 2. It is very simple and fast: $ avocado --show=app,console run -t raspi2 -t u-boot tests/acceptance/ JOB LOG: avocado/job-results/job-2020-01-20T23.40-2424777/job.log (1/1)

[PATCH 7/8] tests/boot_linux_console: Test booting U-Boot on the Raspberry Pi 3

2020-02-15 Thread Philippe Mathieu-Daudé
This test runs U-Boot on the Raspberry Pi 3. It is very simple and fast: $ avocado --show=app,console run -t raspi3 -t u-boot tests/acceptance/ JOB LOG: avocado/job-results/job-2020-01-20T23.40-2424777/job.log (1/1)

[PATCH 5/8] tests/acceptance/boot_linux_console: Test the raspi1 AUX console

2020-02-15 Thread Philippe Mathieu-Daudé
$ avocado --show=app,console run -t device:bcm2835_aux tests/acceptance/ JOB ID : a8846d69d52da701681b1d17f80ef299009fd078 JOB LOG: avocado/job-results/job-2020-02-05T23.44-a8846d6/job.log (1/3) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_raspi0_uart1:

[PATCH 3/8] tests/acceptance/boot_linux_console: Test the raspi1 console

2020-02-15 Thread Philippe Mathieu-Daudé
$ avocado --show=app,console run -t machine:raspi1 tests/acceptance/ JOB ID : c49310d4a21444f03789cd2c443d8c54a29ffd0a JOB LOG: avocado/job-results/job-2020-02-05T23.52-c49310d/job.log (1/1) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_raspi1_uart0: console:

[PATCH 4/8] tests/acceptance/boot_linux_console: Test the raspi0 console

2020-02-15 Thread Philippe Mathieu-Daudé
$ avocado --show=app,console run -t machine:raspi0 tests/acceptance/ JOB ID : af8e017486290758bff39c986934134199af3556 JOB LOG: avocado/job-results/job-2020-02-05T23.53-af8e017/job.log (1/1) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_raspi0_uart0: console:

[PATCH 0/8] hw/arm: Add raspi[0123] acceptance tests

2020-02-15 Thread Philippe Mathieu-Daudé
- Add raspi0/raspi1 Linux boot tests - Add raspi2/raspi3 U-Boot tests - Add bcm2835 framebuffer test I'll send another series moving these tests from boot_linux_console.py to machine_arm_raspi.py, but this doesn't affect the review. raspi0/raspi1 are based on "hw/arm: Add raspi0 and raspi1

[PATCH 2/8] tests/acceptance/boot_linux_console: Add raspi version=2 parameter

2020-02-15 Thread Philippe Mathieu-Daudé
We want to tests different Raspberry Pi machines. Refactor to take the board version as argument. Signed-off-by: Philippe Mathieu-Daudé --- tests/acceptance/boot_linux_console.py | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git

[PATCH 1/8] tests/acceptance/boot_linux_console: Use raspi console model as key

2020-02-15 Thread Philippe Mathieu-Daudé
Python dictionary are not that expensive. Use a key makes the code easier to review. Signed-off-by: Philippe Mathieu-Daudé --- tests/acceptance/boot_linux_console.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/acceptance/boot_linux_console.py

[PATCH 10/12] hw/arm/bcm2836: Introduce the BCM2835 SoC

2020-02-15 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/hw/arm/bcm2836.h | 1 + hw/arm/bcm2836.c | 40 hw/arm/raspi.c | 2 ++ 3 files changed, 43 insertions(+) diff --git a/include/hw/arm/bcm2836.h b/include/hw/arm/bcm2836.h index

[PATCH 11/12] hw/arm/raspi: Add the Raspberry Pi B+ machine

2020-02-15 Thread Philippe Mathieu-Daudé
$ qemu-system-arm -M raspi1 -serial stdio \ -kernel raspberrypi/firmware/boot/kernel.img \ -dtb raspberrypi/firmware/boot/bcm2708-rpi-b.dtb \ -append 'printk.time=0 earlycon=pl011,0x20201000 console=ttyAMA0' [0.00] Booting Linux on physical CPU 0x0 [0.00]

[PATCH 09/12] hw/arm/bcm2836: Split out common realize() code

2020-02-15 Thread Philippe Mathieu-Daudé
The realize() function is clearly composed of two parts, each described by a comment: void realize() { /* common peripherals from bcm2835 */ ... /* bcm2836 interrupt controller (and mailboxes, etc.) */ ... } Split the two part, so we can reuse the common part with

[PATCH 12/12] hw/arm/raspi: Add the Raspberry Pi Zero machine

2020-02-15 Thread Philippe Mathieu-Daudé
Add a Raspberry Pi Zero machine. $ qemu-system-arm -M raspi0 -serial stdio \ -kernel raspberrypi/firmware/boot/kernel.img \ -dtb raspberrypi/firmware/boot/bcm2708-rpi-zero-w.dtb \ -append 'printk.time=0 earlycon=pl011,0x20201000 console=ttyAMA0' [0.00] Booting Linux

[PATCH 06/12] hw/arm/bcm2836: QOM'ify more by adding class_init() to each SoC type

2020-02-15 Thread Philippe Mathieu-Daudé
Remove usage of TypeInfo::class_data. Instead fill the fields in the corresponding class_init(). Cc: Igor Mammedov Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/bcm2836.c | 109 ++- 1 file changed, 51 insertions(+), 58 deletions(-) diff --git

[PATCH 03/12] hw/arm/raspi: Introduce RaspiProcessorId enum

2020-02-15 Thread Philippe Mathieu-Daudé
As we only support a reduced set of the REV_CODE_PROCESSOR id encoded in the board revision, define the PROCESSOR_ID values as an enum. We can simplify the board_soc_type and cores_count methods. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/raspi.c | 45

[PATCH 08/12] hw/arm/bcm2836: Only provide "enabled-cpus" property to multicore SoCs

2020-02-15 Thread Philippe Mathieu-Daudé
It makes no sense to set enabled-cpus=0 on single core SoCs. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/bcm2836.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c index 3b95ad11e9..caaa4b625e 100644 ---

[PATCH 04/12] hw/arm/raspi: Remove use of the 'version' value in the board code

2020-02-15 Thread Philippe Mathieu-Daudé
We expected the 'version' ID to match the board processor ID, but this is not always true (for example boards with revision id 0xa02042/0xa22042 are Raspberry Pi 2 with a BCM2837 SoC). This was not important because we were not modelling them, but since the recent refactor now allow to model these

[PATCH 05/12] hw/arm/bcm2836: Restrict BCM283XClass declaration to C source

2020-02-15 Thread Philippe Mathieu-Daudé
No code out of bcm2836.c uses (or requires) this declarations. Move it locally to the C source file. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/arm/bcm2836.h | 12 hw/arm/bcm2836.c | 14 ++ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git

[PATCH 01/12] hw/arm/raspi: Remove ignore_memory_transaction_failures on the raspi2

2020-02-15 Thread Philippe Mathieu-Daudé
Commit 1c3db49d39 added the raspi3, which uses the same peripherals than the raspi2 (but with different ARM cores). The raspi3 was introduced without the ignore_memory_transaction_failures flag. Almost 2 years later, the machine is usable running U-Boot and Linux. In commit 00cbd5bd74 we mapped a

[PATCH 07/12] hw/arm/bcm2836: Introduce BCM283XClass::core_count

2020-02-15 Thread Philippe Mathieu-Daudé
The BCM2835 has only one core. Introduce the core_count field to be able to use values different than BCM283X_NCPUS (4). Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/bcm2836.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c

[PATCH 02/12] hw/arm/raspi: Avoid using TypeInfo::class_data pointer

2020-02-15 Thread Philippe Mathieu-Daudé
Using class_data pointer to create a MachineClass is not the recommended way anymore. The correct way is to open-code the MachineClass::fields in the class_init() method. This partly reverts commit a03bde3674e. Suggested-by: Igor Mammedov Signed-off-by: Philippe Mathieu-Daudé ---

[PATCH 00/12] hw/arm: Add raspi0 and raspi1 machines

2020-02-15 Thread Philippe Mathieu-Daudé
This series addresses suggestions from Igor and Peter on the raspi machines, then add the raspi0 and raspi1. Philippe Mathieu-Daudé (12): hw/arm/raspi: Remove ignore_memory_transaction_failures on the raspi2 hw/arm/raspi: Avoid using TypeInfo::class_data pointer hw/arm/raspi: Introduce

Re: [PATCH v3 12/13] hw/arm/raspi: Use a unique raspi_machine_class_init() method

2020-02-15 Thread Philippe Mathieu-Daudé
On Thu, Feb 13, 2020 at 3:16 PM Philippe Mathieu-Daudé wrote: > On 2/13/20 2:59 PM, Peter Maydell wrote: > > On Sat, 8 Feb 2020 at 16:57, Philippe Mathieu-Daudé wrote: > >> > >> With the exception of the ignore_memory_transaction_failures > >> flag set for the raspi2, both machine_class_init()

[PATCH] configure: Avoid compiling system tools on user build by default

2020-02-15 Thread Philippe Mathieu-Daudé
User-mode does not need the sytem tools. Do not build them by default if user specified --disable-system. Signed-off-by: Philippe Mathieu-Daudé --- configure | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 16f94cd96b..557ca4bd04 100755

[PATCH] hw/misc/iotkit-secctl: Fix writing to 'PPC Interrupt Clear' register

2020-02-15 Thread Philippe Mathieu-Daudé
Fix warning reported by Clang static code analyzer: CC hw/misc/iotkit-secctl.o hw/misc/iotkit-secctl.c:343:9: warning: Value stored to 'value' is never read value &= 0x00f000f3; ^~~ Fixes: b3717c23e1c Reported-by: Clang Static Analyzer

[PATCH 2/3] hw/display/qxl: Remove unneeded variable assignment

2020-02-15 Thread Philippe Mathieu-Daudé
Fix warning reported by Clang static code analyzer: hw/display/qxl.c:1634:14: warning: Value stored to 'orig_io_port' during its initialization is never read uint32_t orig_io_port = io_port; ^~~~ ~~~ Reported-by: Clang Static Analyzer Signed-off-by: Philippe

[PATCH 1/3] block/qcow2-bitmap: Remove unneeded variable assignment

2020-02-15 Thread Philippe Mathieu-Daudé
Fix warning reported by Clang static code analyzer: CC block/qcow2-bitmap.o block/qcow2-bitmap.c:650:5: warning: Value stored to 'ret' is never read ret = -EINVAL; ^ ~~~ Reported-by: Clang Static Analyzer Signed-off-by: Philippe Mathieu-Daudé ---

[PATCH 0/3] hw: Remove unneeded variable assignment

2020-02-15 Thread Philippe Mathieu-Daudé
Fix few warnings reported by Clang static code analyzer. Philippe Mathieu-Daudé (3): block/qcow2-bitmap: Remove unneeded variable assignment hw/display/qxl: Remove unneeded variable assignment hw/block/pflash_cfi02: Remove unneeded variable assignment block/qcow2-bitmap.c| 1 -

[PATCH 3/3] hw/block/pflash_cfi02: Remove unneeded variable assignment

2020-02-15 Thread Philippe Mathieu-Daudé
Fix warning reported by Clang static code analyzer: CC hw/block/pflash_cfi02.o hw/block/pflash_cfi02.c:311:5: warning: Value stored to 'ret' is never read ret = -1; ^ ~~ Reported-by: Clang Static Analyzer Signed-off-by: Philippe Mathieu-Daudé ---

[PATCH 2/3] tools/virtiofsd/passthrough_ll: Remove unneeded variable assignment

2020-02-15 Thread Philippe Mathieu-Daudé
Fix warning reported by Clang static code analyzer: CC tools/virtiofsd/passthrough_ll.o tools/virtiofsd/passthrough_ll.c:925:9: warning: Value stored to 'newfd' is never read newfd = -1; ^ ~~ tools/virtiofsd/passthrough_ll.c:942:9: warning: Value stored to

[PATCH 1/3] tools/virtiofsd/passthrough_ll: Remove unneeded variable assignment

2020-02-15 Thread Philippe Mathieu-Daudé
Fix warning reported by Clang static code analyzer: CC tools/virtiofsd/passthrough_ll.o tools/virtiofsd/passthrough_ll.c:1083:5: warning: Value stored to 'saverr' is never read saverr = ENOMEM; ^~~ Fixes: 7c6b66027 Reported-by: Clang Static Analyzer

[PATCH 0/3] tools/virtiofsd: Fix warning reported by Clang static code analyzer

2020-02-15 Thread Philippe Mathieu-Daudé
Philippe Mathieu-Daudé (3): tools/virtiofsd/passthrough_ll: Remove unneeded variable assignment tools/virtiofsd/passthrough_ll: Remove unneeded variable assignment tools/virtiofsd/fuse_lowlevel: Fix fuse_out_header.error value tools/virtiofsd/fuse_lowlevel.c | 2 +-

[PATCH 3/3] tools/virtiofsd/fuse_lowlevel: Fix fuse_out_header.error value

2020-02-15 Thread Philippe Mathieu-Daudé
Fix warning reported by Clang static code analyzer: CC tools/virtiofsd/fuse_lowlevel.o tools/virtiofsd/fuse_lowlevel.c:195:9: warning: Value stored to 'error' is never read error = -ERANGE; ^ ~~~ Fixes: 2de121f01e Reported-by: Clang Static Analyzer

[PATCH 0/2] hw: Delay timer_new() from init to realize to avoid memleaks

2020-02-15 Thread Philippe Mathieu-Daudé
After reviewing various patches from Pan Nengyuan fixing errors reported Huawei's Euler Robot, I wrote this tiny coccinelle script to find all occurences of this pattern: @ match @ identifier instance_init; typedef Object; identifier obj; expression val, scale; identifier

[PATCH 1/2] hw/ipmi/bmc: Delay timer_new_ns() from init to realize to avoid memleaks

2020-02-15 Thread Philippe Mathieu-Daudé
In commit f3a508eb4e the Euler Robot reported calling timer_new() in instance_init() can leak heap memory. The easier fix is to delay the timer creation at instance realize(). Similarly move timer_del() into a new instance unrealize() method. This case was found with the following coccinelle

[PATCH 2/2] hw/sd/sd: Delay timer_new_ns() from init to realize to avoid memleaks

2020-02-15 Thread Philippe Mathieu-Daudé
In commit f3a508eb4e the Euler Robot reported calling timer_new() in instance_init() can leak heap memory. The easier fix is to delay the timer creation at instance realize(). Similarly move timer_del() into a new instance unrealize() method. This case was found with the following coccinelle

QAPI schema for desired state of LUKS keyslots (was: [PATCH 02/13] qcrypto-luks: implement encryption key management)

2020-02-15 Thread Markus Armbruster
Review of this patch led to a lengthy QAPI schema design discussion. Let me try to condense it into a concrete proposal. This is about the QAPI schema, and therefore about QMP. The human-friendly interface is out of scope. Not because it's not important (it clearly is!), only because we need to

Re: Build for qemu-sh4 broken since 2445971604c

2020-02-15 Thread John Paul Adrian Glaubitz
On 2/15/20 2:53 PM, Philippe Mathieu-Daudé wrote: > On 2/15/20 11:53 AM, John Paul Adrian Glaubitz wrote: >> Hi! >> >> Currently trying to build qemu-sh4 in static configuration fails with: >> >> make[1]: Entering directory '/root/qemu/slirp' >> make[1]: Nothing to be done for 'all'. >> make[1]:

Re: Build for qemu-sh4 broken since 2445971604c

2020-02-15 Thread Philippe Mathieu-Daudé
On Sat, Feb 15, 2020 at 2:53 PM Philippe Mathieu-Daudé wrote: > > Hi John, > > On 2/15/20 11:53 AM, John Paul Adrian Glaubitz wrote: > > Hi! > > > > Currently trying to build qemu-sh4 in static configuration fails with: > > > > make[1]: Entering directory '/root/qemu/slirp' > > make[1]: Nothing

Re: Build for qemu-sh4 broken since 2445971604c

2020-02-15 Thread Philippe Mathieu-Daudé
Hi John, On 2/15/20 11:53 AM, John Paul Adrian Glaubitz wrote: Hi! Currently trying to build qemu-sh4 in static configuration fails with: make[1]: Entering directory '/root/qemu/slirp' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/root/qemu/slirp' CC

hw/net/rocker: Dubious code in tx_consume()

2020-02-15 Thread Philippe Mathieu-Daudé
Hi Jiri, I am trying to understand this code Scott Feldman added in commit dc488f88806: 157 static int tx_consume(Rocker *r, DescInfo *info) 158 { ... 212 if (tlvs[ROCKER_TLV_TX_TSO_MSS]) { 213 tx_tso_mss = rocker_tlv_get_le16(tlvs[ROCKER_TLV_TX_TSO_MSS]); 214 } ...

[PULL 2/5] qapi: Split control.json off misc.json

2020-02-15 Thread Markus Armbruster
From: Kevin Wolf misc.json contains definitions that are related to the system emulator, so it can't be used for other tools like the storage daemon. This patch moves basic functionality that is shared between all tools (and mostly related to the monitor itself) into a new control.json, which

[PULL 0/5] Monitor patches for 2020-02-15

2020-02-15 Thread Markus Armbruster
The following changes since commit b29c3e23f64938784c42ef9fca896829e3c19120: Merge remote-tracking branch 'remotes/juanquintela/tags/pull-migration-pull-request' into staging (2020-02-14 17:57:15 +) are available in the Git repository at: git://repo.or.cz/qemu/armbru.git

[PULL 3/5] monitor: Collect "control" command handlers in qmp-cmds.control.c

2020-02-15 Thread Markus Armbruster
From: Kevin Wolf Move all of the QMP commands handlers to implement the 'control' module (qapi/control.json) that can be shared between the system emulator and tools such as a storage daemon to a new file monitor/qmp-cmds-control.c. Signed-off-by: Kevin Wolf Reviewed-by: Markus Armbruster

[PULL 1/5] monitor: Move monitor option parsing to monitor/monitor.c

2020-02-15 Thread Markus Armbruster
From: Kevin Wolf Both the system emulators and tools with QMP support (specifically, the planned storage daemon) will need to parse monitor options, so move that code to monitor/monitor.c, which can be linked into binaries that aren't a system emulator. Signed-off-by: Kevin Wolf Reviewed-by:

[PULL 5/5] qemu-doc: Clarify extent of build platform support

2020-02-15 Thread Markus Armbruster
Supporting a build platform beyond its end of life makes no sense. Spell that out just to be clear. Signed-off-by: Markus Armbruster Message-Id: <20200213084335.15100-1-arm...@redhat.com> Reviewed-by: Daniel P. Berrangé Reviewed-by: Eduardo Habkost --- qemu-doc.texi | 9 + 1 file

[PULL 4/5] monitor: Move qmp_query_qmp_schema to qmp-cmds-control.c

2020-02-15 Thread Markus Armbruster
From: Kevin Wolf monitor/misc.c contains code that works only in the system emulator, so it can't be linked to tools like a storage daemon. In order to make schema introspection available for tools, move the function to monitor/qmp-cmds-control.c, which can be linked into the storage daemon.

[PATCH v2 2/2] hw/usb/hcd-ehci-sysbus: Remove obsolete xlnx, ps7-usb class

2020-02-15 Thread Guenter Roeck
Xilinx USB devices are now instantiated through TYPE_CHIPIDEA, and xlnx support in the EHCI code is no longer needed. Signed-off-by: Guenter Roeck --- v2: No change hw/usb/hcd-ehci-sysbus.c | 17 - 1 file changed, 17 deletions(-) diff --git a/hw/usb/hcd-ehci-sysbus.c

[PATCH v2 1/2] hw/arm/xilinx_zynq: Fix USB port instantiation

2020-02-15 Thread Guenter Roeck
USB ports on Xilinx Zync must be instantiated as TYPE_CHIPIDEA to work. Linux expects and checks various chipidea registers, which do not exist with the basic ehci emulation. This patch series fixes the problem. Without this patch, USB ports fail to instantiate under Linux. ci_hdrc ci_hdrc.0:

[PATCH v2 0/2] hw/arm/xilinx_zynq: Fix USB port instantiation

2020-02-15 Thread Guenter Roeck
USB ports on Xilinx Zync must be instantiated as TYPE_CHIPIDEA to work. Linux expects and checks various chipidea registers, which do not exist with the basic ehci emulation. This patch series fixes the problem. The first patch in the series fixes the actual problem. The second patch removes the

[PULL 11/18] qapi: Fix indent level on doc comments in json files

2020-02-15 Thread Markus Armbruster
From: Peter Maydell The current doc generation doesn't care much about indentation levels, but we would like to switch to an rST format, and rST does care about indentation. Make the doc comments more strongly consistent about indentation for multiline constructs like: @arg: description line 1

[PULL 04/18] configure: Check that sphinx-build is using Python 3

2020-02-15 Thread Markus Armbruster
From: Peter Maydell Currently configure's has_sphinx_build() check simply runs a dummy sphinx-build and either passes or fails. This means that "no sphinx-build at all" and "sphinx-build exists but is too old" are both reported the same way. Further, we want to assume that all the Python we

[PULL 10/18] qapi: Fix incorrect "Not documented" claims in QMP documentation

2020-02-15 Thread Markus Armbruster
From: Peter Maydell Some qapi doc comments have forgotten the ':' after the @argument, like this: # @filename Filename for the new image file # @size Size of the virtual disk in bytes The result is that these are parsed as part of the body text and appear as a run-on line:

[PULL 09/18] qapi/block-core.json: Use literal block for ascii art

2020-02-15 Thread Markus Armbruster
From: Peter Maydell The ascii-art graph in the BlockLatencyHistogramInfo documentation doesn't render correctly, because the whitespace is collapsed. Use the '|' format that emits a literal 'example' block so the graph is displayed correctly. Strictly the Texinfo generated is still wrong

[PULL 13/18] qapi/ui.json: Put input-send-event body text in the right place

2020-02-15 Thread Markus Armbruster
From: Peter Maydell In the doc comment for input-send-event, there is a multi-line chunk of text ("The @device...take precedence") which is intended to be the main body text describing the event. However it has been placed after the arguments and Returns: section, which means that the parser

[PULL 16/18] qapi: Add blank lines before bulleted lists

2020-02-15 Thread Markus Armbruster
From: Peter Maydell We would like to switch the doc comments to rST format. rST insists on a blank line before and after a bulleted list, but our Texinfo doc generator did not. Add some extra blank lines in the doc comments so they're acceptable rST input. Signed-off-by: Peter Maydell

[PULL 12/18] qapi: Remove hardcoded tabs

2020-02-15 Thread Markus Armbruster
From: Peter Maydell There are some stray hardcoded tabs in some of our json files; remove them. Signed-off-by: Peter Maydell Reviewed-by: Markus Armbruster Message-Id: <20200213175647.17628-11-peter.mayd...@linaro.org> Signed-off-by: Markus Armbruster --- qapi/block-core.json | 4 ++--

[PULL 17/18] qapi/migration.json: Replace _this_ with *this*

2020-02-15 Thread Markus Armbruster
From: Peter Maydell The MigrationInfo::setup-time documentation is the only place where we use _this_ inline markup for emphasis, commonly rendered in italics. We would like to switch the doc comments to rST format, but rST doesn't recognize that markup and emits literal underscores. Switch to

[PULL 05/18] Makefile: Fix typo in dependency list for interop manpages

2020-02-15 Thread Markus Armbruster
From: Peter Maydell Fix a typo in the dependency list for the manpages built from the 'interop' manual, which meant we were accidentally not including the .hx file in the dependency list. Fixes: e13c59fa4414215500e6 Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[PULL 02/18] configure: Allow user to specify sphinx-build binary

2020-02-15 Thread Markus Armbruster
From: Peter Maydell Currently we insist on using 'sphinx-build' from the $PATH; allow the user to specify the binary to use. This will be more useful as we become pickier about the capabilities we require (eg needing a Python 3 sphinx-build). Signed-off-by: Peter Maydell Reviewed-by: Alex

[PULL 15/18] qapi: Use explicit bulleted lists

2020-02-15 Thread Markus Armbruster
From: Peter Maydell A JSON block comment like this: Returns: nothing on success If @node is not a valid block device, DeviceNotFound If @name is not found, GenericError with an explanation renders like this: Returns: nothing on success If node is not a

[PULL 14/18] qapi/ui.json: Avoid `...' Texinfo style quoting

2020-02-15 Thread Markus Armbruster
From: Peter Maydell Avoid Texinfo style quoting with `...', because we would like to switch the doc comments to rST format, and rST treats it as a syntax error. Use '...' instead, as we do in other doc comments. This looks OK in Texinfo, and rST formats it as paired-quotation-marks.

[PULL 08/18] qga/qapi-schema.json: minor format fixups for rST

2020-02-15 Thread Markus Armbruster
From: Peter Maydell We would like to switch the doc comments to rST format, and rST requires a blank line before the start of a bulleted or enumerated list. Two places in qapi-schema.json were missing this blank line. Some places were using an indented line as a sort of single-item bulleted

[PULL 01/18] qapi: Expand documentation for LostTickPolicy

2020-02-15 Thread Markus Armbruster
From: Andrea Bolognani The current documentation is fairly terse and not easy to decode for someone who's not intimately familiar with the inner workings of timer devices. Expand on it by providing a somewhat verbose description of what behavior each policy will result in, as seen from both the

[PULL 18/18] qapi: Delete all the "foo: dropped in n.n" notes

2020-02-15 Thread Markus Armbruster
From: Peter Maydell A handful of QAPI doc comments include lines like "ppcemb: dropped in 3.1". The doc comment parser will just put these into whatever the preceding section was; sometimes that's "Notes", and sometimes it's some random other section, as with "NetClientDriver" where the "'dump':

[PULL 06/18] qga/qapi-schema.json: Fix missing '-' in GuestDiskBusType doc comment

2020-02-15 Thread Markus Armbruster
From: Peter Maydell The doc comment for GuestDiskBusType doesn't match up with the enumeration because of a missing hyphen in 'file-backed-virtual'. This means the docs are rendered wrongly: "virtual" Win virtual bus type "file-backed" virtual: Win file-backed bus type

[PULL 00/18] QAPI patches for 2020-02-15

2020-02-15 Thread Markus Armbruster
The following changes since commit 517c84cef759a453cfb8f51498aebc909a5f3b39: Merge remote-tracking branch 'remotes/kraxel/tags/vga-20200213-pull-request' into staging (2020-02-13 18:55:57 +) are available in the Git repository at: git://repo.or.cz/qemu/armbru.git

[PULL 03/18] configure: Pick sphinx-build-3 when available

2020-02-15 Thread Markus Armbruster
The next commit will require a sphinx-build that uses Python 3. On some systems, sphinx-build is fine, on others you need to use sphinx-build-3. To keep things working out of the box on both kinds of systems, try sphinx-build-3, then sphinx-build. Signed-off-by: Markus Armbruster Message-Id:

[PULL 07/18] qga/qapi-schema.json: Fix indent level on doc comments

2020-02-15 Thread Markus Armbruster
From: Peter Maydell The current doc generation doesn't care much about indentation levels, but we would like to switch to an rST format, and rST does care about indentation. Make the doc comments more strongly consistent about indentation for multiline constructs like: @arg: description line 1

Build for qemu-sh4 broken since 2445971604c

2020-02-15 Thread John Paul Adrian Glaubitz
Hi! Currently trying to build qemu-sh4 in static configuration fails with: make[1]: Entering directory '/root/qemu/slirp' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/root/qemu/slirp' CC sh4-linux-user/tcg/tcg-op-gvec.o /root/qemu/tcg/tcg-op-gvec.c:298:25: error:

Re: [PATCH 1/2] s390x: fix memleaks in cpu_finalize

2020-02-15 Thread Pan Nengyuan
On 2/15/2020 6:28 PM, Philippe Mathieu-Daudé wrote: > Hi Pan, > > On 2/15/20 9:32 AM, pannengy...@huawei.com wrote: >> From: Pan Nengyuan >> >> This patch fix memleaks when we call tests/qtest/cpu-plug-test on s390x. The >> leak stack is as follow: >> >> Direct leak of 48 byte(s) in 1

Re: [PATCH 2/2] hw: move timer_new from init() into realize() to avoid memleaks

2020-02-15 Thread Philippe Mathieu-Daudé
On 2/15/20 9:37 AM, pannengy...@huawei.com wrote: From: Pan Nengyuan There are some memleaks when we call 'device_list_properties'. This patch move timer_new from init into realize to fix it. Meanwhile, do the null check in mos6522_reset() to avoid null deref if we move timer_new into

  1   2   >