Re: [PATCH 1/3] block: push error reporting into bdrv_all_*_snapshot functions

2020-10-12 Thread Philippe Mathieu-Daudé
On 10/12/20 1:09 PM, Max Reitz wrote: On 12.10.20 12:16, Philippe Mathieu-Daudé wrote: On 10/12/20 12:07 PM, Max Reitz wrote: On 08.10.20 19:48, Philippe Mathieu-Daudé wrote: From: Daniel P. Berrangé The bdrv_all_*_snapshot functions return a BlockDriverState pointer for the invalid backend,

[PULL 4/6] virtiofsd: avoid /proc/self/fd tempdir

2020-10-12 Thread Dr. David Alan Gilbert (git)
From: Stefan Hajnoczi In order to prevent /proc/self/fd escapes a temporary directory is created where /proc/self/fd is bind-mounted. This doesn't work on read-only file systems. Avoid the temporary directory by bind-mounting /proc/self/fd over /proc. This does not affect other processes since w

Re: [PATCH] hw/pci-host/grackle: Verify PIC link is properly set

2020-10-12 Thread Philippe Mathieu-Daudé
On 10/12/20 11:23 AM, Mark Cave-Ayland wrote: On 11/10/2020 20:03, Philippe Mathieu-Daudé wrote: The Grackle PCI host model expects the interrupt controller being set, but does not verify it is present. Add a check to help developers using this model. Signed-off-by: Philippe Mathieu-Daudé ---

Re: [PATCH v4 3/7] keyval: Fix parsing of ', ' in value of implied key

2020-10-12 Thread Eric Blake
On 10/11/20 2:35 AM, Markus Armbruster wrote: The previous commit demonstrated documentation and code disagree on parsing of ',' in the value of an implied key. Fix the code to match the documentation. This breaks uses of keyval_parse() that pass an implied key and accept a value containing ','

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

2020-10-12 Thread Philippe Mathieu-Daudé
On 10/12/20 1:09 PM, Philippe Mathieu-Daudé wrote: On 10/10/20 8:07 AM, David Gibson wrote: On Fri, Oct 09, 2020 at 07:02:56AM -0700, Elena Afanasova wrote: >From 09905773a00e417d3a37c12350d9e55466fdce8a Mon Sep 17 00:00:00 2001 From: Elena Afanasova Date: Fri, 9 Oct 2020 06:41:36 -0700 Subjec

Re: [PATCH] hw/pci-host/grackle: Verify PIC link is properly set

2020-10-12 Thread Philippe Mathieu-Daudé
On 10/12/20 1:50 PM, BALATON Zoltan via wrote: On Mon, 12 Oct 2020, David Gibson wrote: On Mon, Oct 12, 2020 at 08:21:41AM +0200, Philippe Mathieu-Daudé wrote: On 10/12/20 12:34 AM, David Gibson wrote: On Sun, Oct 11, 2020 at 09:03:32PM +0200, Philippe Mathieu-Daudé wrote: The Grackle P

[PATCH v2 0/5] qapi: Restrict machine (and migration) specific commands

2020-10-12 Thread Philippe Mathieu-Daudé
Reduce the machine code pulled into qemu-storage-daemon. The series is fully Acked, but Markus wants it reviewed by the Machine core maintainers. Since v1: - Added A-b tags - Rebased Philippe Mathieu-Daudé (5): qapi: Restrict 'inject-nmi' command to machine code qapi: Restrict 'system wakeup

[PATCH v2 1/5] qapi: Restrict 'inject-nmi' command to machine code

2020-10-12 Thread Philippe Mathieu-Daudé
Restricting 'inject-nmi' to machine.json pulls slightly less QAPI-generated code into user-mode and tools. Acked-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- qapi/machine.json | 20 qapi/misc.json| 20 softmmu/cpus.c| 1 + 3 file

[PATCH v2 2/5] qapi: Restrict 'system wakeup/reset/powerdown' commands to machine.json

2020-10-12 Thread Philippe Mathieu-Daudé
Restricting system_wakeup/system_reset/system_powerdown to machine.json pulls slightly less QAPI-generated code into user-mode and tools. Acked-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- qapi/machine.json | 57 +++ qapi/misc.json|

[PATCH v2 5/5] qapi: Restrict Xen migration commands to migration.json

2020-10-12 Thread Philippe Mathieu-Daudé
Restricting xen-set-global-dirty-log and xen-load-devices-state commands migration.json pulls slightly less QAPI-generated code into user-mode and tools. Acked-by: Dr. David Alan Gilbert Signed-off-by: Philippe Mathieu-Daudé --- qapi/migration.json| 41 ++

[PATCH v2 3/5] qapi: Restrict '(p)memsave' command to machine code

2020-10-12 Thread Philippe Mathieu-Daudé
Restricting memsave/pmemsave to machine.json pulls slightly less QAPI-generated code into user-mode and tools. Acked-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- qapi/machine.json | 61 +++ qapi/misc.json| 61 ---

Re: [PATCH] hw/rtc/twl92230: Silence warnings about missing fallthrough statements

2020-10-12 Thread Laurent Vivier
Le 01/10/2020 à 20:21, Thomas Huth a écrit : > When compiling with -Werror=implicit-fallthrough, gcc complains about > missing fallthrough annotations in this file. Looking at the code, > the fallthrough is indeed wanted here, but instead of adding the > annotations, it can be done more efficiently

[PATCH v2 4/5] qapi: Restrict 'query-kvm' command to machine code

2020-10-12 Thread Philippe Mathieu-Daudé
Restricting query-kvm to machine.json pulls slightly less QAPI-generated code into user-mode and tools. Acked-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- qapi/machine.json | 30 ++ qapi/misc.json| 30 -- 2 files changed

Re: [PATCH] hw/block/nvme: Simplify timestamp sum

2020-10-12 Thread Laurent Vivier
Le 02/10/2020 à 09:57, Philippe Mathieu-Daudé a écrit : > As the 'timestamp' variable is declared as a 48-bit bitfield, > we do not need to wrap the sum result. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/block/nvme.c | 7 +-- > 1 file changed, 1 insertion(+), 6 deletions(-) > > di

[PATCH v2 0/3] migration: Make save/load_snapshot() return boolean

2020-10-12 Thread Philippe Mathieu-Daudé
Since v1: - Initialize variables in first patch (Max) - Added Pavel's A-b tag I had a pair of patches making save_snapshot/load_snapshot() return a boolean (like Markus recent qdev/QOM cleanup), then realized Daniel already has series changing migration/, so I rebased my patches in the first part

[PATCH v2 2/3] migration: Make save_snapshot() return bool, not 0/-1

2020-10-12 Thread Philippe Mathieu-Daudé
Just for consistency, following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), return a boolean value indicating an error is set or not. Acked-by: Pavel Dovgalyuk Signed-off-by: Philippe Mathieu-Daudé --- include/migration/snapshot.h | 9 - mi

[PATCH v2 1/3] block: push error reporting into bdrv_all_*_snapshot functions

2020-10-12 Thread Philippe Mathieu-Daudé
From: Daniel P. Berrangé The bdrv_all_*_snapshot functions return a BlockDriverState pointer for the invalid backend, which the callers then use to report an error message. In some cases multiple callers are reporting the same error message, but with slightly different text. In the future there w

[PATCH v2 3/3] migration: stop returning errno from load_snapshot()

2020-10-12 Thread Philippe Mathieu-Daudé
From: Daniel P. Berrangé None of the callers care about the errno value since there is a full Error object populated. This gives consistency with save_snapshot() which already just returns a boolean value. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrangé [PMD: Return false

[PATCH v2 2/8] migration: Don't use '#' flag of printf format

2020-10-12 Thread Bihong Yu
Signed-off-by: Bihong Yu Reviewed-by: Chuan Zheng --- migration/block.c | 2 +- migration/ram.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/migration/block.c b/migration/block.c index 4b8576b..273392b 100644 --- a/migration/block.c +++ b/migration/block.c @@ -998,7

[PATCH v2 1/8] migration: Do not use C99 // comments

2020-10-12 Thread Bihong Yu
Signed-off-by: Bihong Yu Reviewed-by: Chuan Zheng --- migration/block.c | 2 +- migration/rdma.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/migration/block.c b/migration/block.c index 737b649..4b8576b 100644 --- a/migration/block.c +++ b/migration/block.c @@ -40,7 +4

[PATCH v2 3/8] migration: Add spaces around operator

2020-10-12 Thread Bihong Yu
Signed-off-by: Bihong Yu Reviewed-by: Chuan Zheng --- migration/migration.c| 4 ++-- migration/postcopy-ram.c | 2 +- migration/ram.c | 2 +- migration/savevm.c | 2 +- migration/vmstate.c | 10 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git

[PATCH v2 0/8] Fix some style problems in migration

2020-10-12 Thread Bihong Yu
Recently I am reading migration related code, find some style problems in migration directory while using checkpatch.pl to check migration code. Fix the error style problems. v2: - fix Signed-off-by error - fix printf format error: "%0x" -> "0x%x" Bihong Yu (8): migration: Do not use C99 // com

[PATCH v2 4/8] migration: Open brace '{' following struct go on the same line

2020-10-12 Thread Bihong Yu
Signed-off-by: Bihong Yu Reviewed-by: Chuan Zheng --- migration/migration.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/migration/migration.h b/migration/migration.h index deb411a..99784b4 100644 --- a/migration/migration.h +++ b/migration/migration.h @@ -124,8 +124,7 @

[PATCH v2 8/8] migration: Delete redundant spaces

2020-10-12 Thread Bihong Yu
Signed-off-by: Bihong Yu Reviewed-by: Chuan Zheng --- migration/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/rdma.c b/migration/rdma.c index ca4d315..00eac34 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -855,7 +855,7 @@ static int qemu_rdma_brok

[PATCH v2 6/8] migration: Do not initialise statics and globals to 0 or NULL

2020-10-12 Thread Bihong Yu
Signed-off-by: Bihong Yu Reviewed-by: Chuan Zheng --- migration/ram.c| 2 +- migration/savevm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 09178cc..2da2b62 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -2743,7 +2743,

[PATCH v2 5/8] migration: Add braces {} for if statement

2020-10-12 Thread Bihong Yu
Signed-off-by: Bihong Yu Reviewed-by: Chuan Zheng --- migration/ram.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 0aea78f..09178cc 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -101,14 +101,16 @@ static struct { sta

[PATCH v2 7/8] migration: Open brace '{' following function declarations go on the next line

2020-10-12 Thread Bihong Yu
Signed-off-by: Bihong Yu Reviewed-by: Chuan Zheng --- migration/rdma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/migration/rdma.c b/migration/rdma.c index 0eb42b7..ca4d315 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -273,7 +273,8 @@ static uint64_t htonll(

[PATCH 0/5] hw: Use PCI macros from 'hw/pci/pci.h'

2020-10-12 Thread Philippe Mathieu-Daudé
Trivial patches using the generic PCI macros from "hw/pci/pci.h". Philippe Mathieu-Daudé (5): hw/pci-host/bonito: Make PCI_ADDR() macro more readable hw/pci-host: Use the PCI_BUILD_BDF() macro from 'hw/pci/pci.h' hw/pci-host/uninorth: Use the PCI_FUNC() macro from 'hw/pci/pci.h' hw: Use th

[PATCH 4/5] hw: Use the PCI_SLOT() macro from 'hw/pci/pci.h'

2020-10-12 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé We already have a generic PCI_SLOT() macro in "hw/pci/pci.h" to extract the PCI slot identifier, use it. Signed-off-by: Philippe Mathieu-Daudé --- hw/hppa/dino.c| 2 +- hw/i386/xen/xen-hvm.c | 2 +- hw/isa/piix3.c| 2 +- hw/mips/gt64xxx_pci.c | 2 +-

[PATCH 3/5] hw/pci-host/uninorth: Use the PCI_FUNC() macro from 'hw/pci/pci.h'

2020-10-12 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé We already have a generic PCI_FUNC() macro in "hw/pci/pci.h" to extract the PCI function identifier, use it. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/uninorth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci-host/uninorth.c

[PATCH 2/5] hw/pci-host: Use the PCI_BUILD_BDF() macro from 'hw/pci/pci.h'

2020-10-12 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé We already have a generic PCI_BUILD_BDF() macro in "hw/pci/pci.h" to pack these values, use it. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/bonito.c | 3 +-- hw/pci-host/pnv_phb4.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/h

[PATCH 1/5] hw/pci-host/bonito: Make PCI_ADDR() macro more readable

2020-10-12 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé The PCI_ADDR() macro use generic PCI fields shifted by 8-bit. Rewrite it extracting the shift operation one layer. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/bonito.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pci-host/bon

Re: [PATCH v1 2/8] migration: Don't use '#' flag of printf format

2020-10-12 Thread Bihong Yu
Thank you for your review. OK,I have fixed the problem in v2. On 2020/10/12 2:19, Peter Maydell wrote: > On Sun, 11 Oct 2020 at 14:52, Bihong Yu wrote: >> @@ -998,7 +998,7 @@ static int block_load(QEMUFile *f, void *opaque, int >> version_id) >> (addr == 100) ? '\n' : '\r');

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

2020-10-12 Thread Kevin Wolf
Am 12.10.2020 um 13:53 hat Philippe Mathieu-Daudé geschrieben: > On 10/12/20 1:25 PM, Kevin Wolf wrote: > > Am 12.10.2020 um 12:47 hat Alex Bennée geschrieben: > > > > > > Markus Armbruster writes: > > > > > > > From: Kevin Wolf > > > > > > > > This moves the QMP dispatcher to a coroutine and

[PATCH v2 3/3] hw/ssi: Rename SSI 'slave' as 'peripheral'

2020-10-12 Thread Philippe Mathieu-Daudé
In order to use inclusive terminology, rename SSI 'slave' as 'peripheral', following the specification resolution: https://www.oshwa.org/a-resolution-to-redefine-spi-signal-names/ Patch created mechanically using: $ sed -i s/SSISlave/SSIPeripheral/ $(git grep -l SSISlave) $ sed -i s/SSI_SLAVE

[PATCH v2 0/3] hw/ssi: Rename SSI 'slave' as 'peripheral'

2020-10-12 Thread Philippe Mathieu-Daudé
Since v1: - Fixed patch #1 subject (Kevin) In order to use inclusive terminology, rename SSI 'slave' as 'peripheral', following the resolution Paolo pointed in [*]: https://www.oshwa.org/a-resolution-to-redefine-spi-signal-names/ Candidate to be merged via the ARM or Trivial trees. [*] https://w

[PATCH 5/5] hw: Use the PCI_DEVFN() macro from 'hw/pci/pci.h'

2020-10-12 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé We already have a generic PCI_DEVFN() macro in "hw/pci/pci.h" to pack the PCI slot/function identifiers, use it. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/virt.c | 3 ++- hw/pci-host/uninorth.c | 6 ++ 2 files changed, 4 insertions(+), 5 deletio

RE: [PATCH 4/5] hw: Use the PCI_SLOT() macro from 'hw/pci/pci.h'

2020-10-12 Thread Paul Durrant
> -Original Message- > From: Philippe Mathieu-Daudé > Sent: 12 October 2020 13:45 > To: qemu-devel@nongnu.org > Cc: Peter Maydell ; qemu-...@nongnu.org; > qemu-triv...@nongnu.org; Paul > Durrant ; Aurelien Jarno ; > qemu-...@nongnu.org; Philippe Mathieu- > Daudé ; Michael S. Tsirkin ; Ed

[PATCH v2 1/3] hw/ssi/aspeed_smc: Rename 'max_slaves' variable as 'max_peripherals'

2020-10-12 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé In order to use inclusive terminology, rename max_slaves as max_peripherals. Patch generated using: $ sed -i s/slave/peripheral/ \ hw/ssi/aspeed_smc.c include/hw/ssi/aspeed_smc.h One line in aspeed_smc_read() has been manually tweaked to pass checkpatch.

[PATCH v2 2/3] hw/ssi: Update coding style to make checkpatch.pl happy

2020-10-12 Thread Philippe Mathieu-Daudé
To make the next commit easier to review, clean this code first. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/ssi/ssi.h | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/include/hw/ssi/ssi.h b/include/hw/ssi/ssi.h index fe3028c39dc..c15548425a3 100644 -

Re: [PATCH 3/4] hw/pci-host/versatile: Add WINDOW_COUNT definition to replace magic '3'

2020-10-12 Thread Philippe Mathieu-Daudé
On 10/11/20 10:46 PM, Peter Maydell wrote: On Sun, 11 Oct 2020 at 20:49, Philippe Mathieu-Daudé wrote: Use self-explicit WINDOW_COUNT definition instead of a magic value. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/versatile.c | 28 ++-- 1 file changed, 1

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

2020-10-12 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 10/9/20 10:55 PM, Cleber Rosa wrote: >> Avocado will, by default, produce JUnit files. Let's ask GitLab >> to present those in the web UI. > > https://gitlab.com/philmd/qemu/-/pipelines/200764992/test_report > > Reviewed-by: Philippe Mathieu-Daudé > Tested-

Re: [PATCH] tests/migration: Allow longer timeouts

2020-10-12 Thread Thomas Huth
On 08/10/2020 18.03, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > In travis, with gcov and gprof we're seeing timeouts; hopefully fix > this by increasing the test timeouts a bit, but for xbzrle ensure it > really does get a couple of cycles through to test the cache.

[PATCH v2 0/5] hw: Replace some magic by definitions

2020-10-12 Thread Philippe Mathieu-Daudé
A bunch of trivial cleanups, replacing magic values by definitions to make the code easier to review. Since v1: - Addressed Peter review comment on versatile PCI controller - Added Thomas R-b tag Expected to be merged via qemu-trivial@. Regards, Phil. Philippe Mathieu-Daudé (5): hw: Replace

[PATCH v2 1/5] hw: Replace magic value by PCI_NUM_PINS definition

2020-10-12 Thread Philippe Mathieu-Daudé
Use self-explicit PCI_NUM_PINS definition instead of magic value. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/virt.c | 4 ++-- hw/mips/gt64xxx_pci.c | 2 +- hw/pci-host/versatile.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/

[PATCH v2 4/5] hw/pci-host/versatile: Add the PCI_BAR_COUNT definition

2020-10-12 Thread Philippe Mathieu-Daudé
Note from Peter Maydell: The versatile/realview PCI controller has: * three PCI BARs which represent memory windows on the PCI bus which bus-master PCI devices can use to write back into the system address space - the device SMAPn registers allow the guest to configure

[PATCH v2 5/5] tests/qtest: Replace magic value by NANOSECONDS_PER_SECOND definition

2020-10-12 Thread Philippe Mathieu-Daudé
Use self-explicit NANOSECONDS_PER_SECOND definition instead of a magic value. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/rtc-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/rtc-test.c b/tests/qtest/rtc-test.c index c7af3

[PATCH v2 2/5] hw/pci-host/pam: Use ARRAY_SIZE() instead of magic value

2020-10-12 Thread Philippe Mathieu-Daudé
Replace the magic '4' by ARRAY_SIZE(mem->alias) which is more explicit. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/pam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci-host/pam.c b/hw/pci-host/pam.c index a4962057833..4712260025a 100644 --- a/hw/pci-host/pa

[PATCH v2 3/5] hw/pci-host/versatile: Add the MEMORY_WINDOW_COUNT definition

2020-10-12 Thread Philippe Mathieu-Daudé
Note from Peter Maydell: The versatile/realview PCI controller has: * three memory windows in the system address space - those are represented by the pci_mem_window[] array - mem_win_size[] holds the size of each window (which is fixed but varies between the different i

[PATCH] hw/scsi: remove dead code

2020-10-12 Thread Elena Afanasova
Since MEGASAS_MAX_SGE is defined to be 128 the following if statement can be removed. Spotted by PVS-Studio. Signed-off-by: Elena Afanasova --- hw/scsi/megasas.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index e24c12d7ee..6dcaad55fa 100644 --- a/

Re: [PATCH] hw/scsi: remove dead code

2020-10-12 Thread Philippe Mathieu-Daudé
Hi Elena, On 10/12/20 3:32 PM, Elena Afanasova wrote: Since MEGASAS_MAX_SGE is defined to be 128 the following if statement can be removed. Spotted by PVS-Studio. Signed-off-by: Elena Afanasova --- hw/scsi/megasas.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/scsi/megasas.c b/h

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

2020-10-12 Thread Paolo Bonzini
On 12/10/20 12:29, Peter Maydell wrote: > warning: Function parameter or member 'event' not described in > 'qtest_qmp_event_ref' > make: Leaving directory '/home/petmay01/linaro/qemu-for-merges/build/all' > make: Entering directory '/home/petmay01/linaro/qemu-for-merges/build/all' > [build continue

Re: [PATCH v2 4/5] hw/pci-host/versatile: Add the PCI_BAR_COUNT definition

2020-10-12 Thread Peter Maydell
On Mon, 12 Oct 2020 at 14:20, Philippe Mathieu-Daudé wrote: > > Note from Peter Maydell: > > The versatile/realview PCI controller has: >* three PCI BARs which represent memory windows on the >PCI bus which bus-master PCI devices can use to >write back into the system address

Re: [PATCH v7 02/13] qtest: Reintroduce qtest_qmp_receive

2020-10-12 Thread Paolo Bonzini
On 12/10/20 13:14, Thomas Huth wrote: >> +/** >> + * qtest_qmp_receive: >> + * @s: #QTestState instance to operate on. >> + * >> + * Reads a QMP message from QEMU and returns the response. >> + * Buffers all the events received meanwhile, until a >> + * call to qtest_qmp_eventwait >> + */ >> +QDict

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

2020-10-12 Thread Paolo Bonzini
On 12/10/20 12:44, Thomas Huth wrote: > I think this is one of the tasks from: > > https://wiki.qemu.org/Contribute/BiteSizedTasks#Compiler-driven_cleanups > > It has been added by Paolo in 2016: > > > https://wiki.qemu.org/index.php?title=Contribute/BiteSizedTasks&diff=5368&oldid=5367 > > .

Re: [PATCH v7 02/13] qtest: Reintroduce qtest_qmp_receive

2020-10-12 Thread Thomas Huth
On 12/10/2020 15.47, Paolo Bonzini wrote: > On 12/10/20 13:14, Thomas Huth wrote: >>> +/** >>> + * qtest_qmp_receive: >>> + * @s: #QTestState instance to operate on. >>> + * >>> + * Reads a QMP message from QEMU and returns the response. >>> + * Buffers all the events received meanwhile, until a >>

Re: [PATCH v2 3/5] hw/pci-host/versatile: Add the MEMORY_WINDOW_COUNT definition

2020-10-12 Thread Peter Maydell
On Mon, 12 Oct 2020 at 14:20, Philippe Mathieu-Daudé wrote: > > Note from Peter Maydell: > > The versatile/realview PCI controller has: >* three memory windows in the system address space > - those are represented by the pci_mem_window[] array > - mem_win_size[] holds the size of ea

Re: [PULL 5/7] gitlab-ci: Move edk2 and opensbi YAML files to .gitlab-ci.d folder

2020-10-12 Thread Philippe Mathieu-Daudé
Hi Thomas, Alex, +Daniel On 5/28/20 12:10 PM, Thomas Huth wrote: We have a dedicated folder for the gitlab-ci - so there is no need to clutter the top directory with these .yml files. Message-Id: <20200525131823.715-5-th...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Ben

Re: [PATCH 1/5] hw/pci-host/bonito: Make PCI_ADDR() macro more readable

2020-10-12 Thread BALATON Zoltan via
On Mon, 12 Oct 2020, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé The PCI_ADDR() macro use generic PCI fields shifted by 8-bit. Rewrite it extracting the shift operation one layer. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/bonito.c | 4 ++-- 1 file changed, 2 insertio

Re: [PULL 5/7] gitlab-ci: Move edk2 and opensbi YAML files to .gitlab-ci.d folder

2020-10-12 Thread Daniel P . Berrangé
On Mon, Oct 12, 2020 at 03:44:00PM +0200, Philippe Mathieu-Daudé wrote: > Hi Thomas, Alex, > > +Daniel > > On 5/28/20 12:10 PM, Thomas Huth wrote: > > We have a dedicated folder for the gitlab-ci - so there is no need > > to clutter the top directory with these .yml files. > > > > Message-Id: <2

Re: [PATCH v5] Add a comment in bios-tables-test.c to clarify the reason behind approach

2020-10-12 Thread Ani Sinha
Request to queue this patch with the next pull. > On Sep 29, 2020, at 7:55 PM, Ani Sinha wrote: > > A comment is added in bios-tables-test.c that explains the reasoning > behind the process of updating the ACPI table blobs when new tests are added > or old tests are modified or code is committ

Re: [PATCH] tests/test-char: Use a proper fallthrough comment

2020-10-12 Thread Laurent Vivier
Le 02/10/2020 à 19:13, Thomas Huth a écrit : > For being able to compile with -Werror=implicit-fallthrough we need > to use comments that the compiler recognizes. Use "fallthrough" instead > of "no break" here. > > Signed-off-by: Thomas Huth > --- > tests/test-char.c | 2 +- > 1 file changed, 1

Re: [PATCH v5] Add a comment in bios-tables-test.c to clarify the reason behind approach

2020-10-12 Thread Thomas Huth
On 12/10/2020 16.07, Ani Sinha wrote: > Request to queue this patch with the next pull. I can take it via qtest-next in case Michael / Igor do not plan to send a pull request any time soon. Thomas

Re: [PATCH 10/10] hw/isa: Add the ISA_IRQ_IDE_DEFAULT definition

2020-10-12 Thread John Snow
On 10/11/20 3:32 PM, Philippe Mathieu-Daudé wrote: The IDE controller uses IRQ #14 by default. Add this default definition to the IsaIrqNumber enum. Avoid magic values in the code, replace them by the newly introduced definition. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/isa/isa.h

Re: [PATCH 1/4] vmdk: fix maybe uninitialized warnings

2020-10-12 Thread Laurent Vivier
Le 05/10/2020 à 08:26, Christian Borntraeger a écrit : > On 30.09.20 18:36, Fam Zheng wrote: >> On Wed, 2020-09-30 at 17:58 +0200, Christian Borntraeger wrote: >>> Fedora 32 gcc 10 seems to give false positives: >>> >>> Compiling C object libblock.fa.p/block_vmdk.c.o >>> ../block/vmdk.c: In functio

Re: [PATCH] hw/acpi/piix4: Rename piix4_pm_add_propeties() to piix4_pm_add_properties()

2020-10-12 Thread Laurent Vivier
Le 02/10/2020 à 18:06, Greg Kurz a écrit : > Signed-off-by: Greg Kurz > --- > hw/acpi/piix4.c |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c > index 894d357f8c35..67a1ea41914f 100644 > --- a/hw/acpi/piix4.c > +++ b/hw/acpi/piix4.

Re: [PATCH 05/10] hw/isa: Add the ISA_IRQ_FDC_DEFAULT definition

2020-10-12 Thread John Snow
On 10/11/20 3:32 PM, Philippe Mathieu-Daudé wrote: The floppy disk controller uses IRQ #6 by default. Add this default definition to the IsaIrqNumber enum. Avoid magic values in the code, replace them by the newly introduced definition. Signed-off-by: Philippe Mathieu-Daudé Acked-by: John Sn

Re: [PATCH] softmmu/memory: Log invalid memory accesses

2020-10-12 Thread Laurent Vivier
Le 05/10/2020 à 17:27, Philippe Mathieu-Daudé a écrit : > Log invalid memory accesses with as GUEST_ERROR. > > This is particularly useful since commit 5d971f9e67 which reverted > ("memory: accept mismatching sizes in memory_region_access_valid"). > > Signed-off-by: Philippe Mathieu-Daudé > ---

Re: [PATCH v6 00/36] qapi: static typing conversion, pt1

2020-10-12 Thread John Snow
On 10/10/20 5:43 AM, Markus Armbruster wrote: John Snow writes: Hi, this series adds static type hints to the QAPI module. This is part one! Part 1: https://gitlab.com/jsnow/qemu/-/tree/python-qapi-cleanup-pt1 Everything: https://gitlab.com/jsnow/qemu/-/tree/python-qapi-cleanup-pt6 - Require

Re: [PATCH] hw/pci: Fix typo in PCI hot-plug error message

2020-10-12 Thread Laurent Vivier
Le 06/10/2020 à 15:39, Julia Suvorova a écrit : > 'occupied' is spelled like 'ocuppied' in the message. > > Signed-off-by: Julia Suvorova > --- > hw/pci/pci.c | 2 +- > hw/ppc/spapr_pci.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/hw/pci/pci.c b/hw/pci/pci

Re: [PATCH 1/5] hw/pci-host/bonito: Make PCI_ADDR() macro more readable

2020-10-12 Thread Philippe Mathieu-Daudé
On 10/12/20 3:55 PM, BALATON Zoltan wrote: On Mon, 12 Oct 2020, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé The PCI_ADDR() macro use generic PCI fields shifted by 8-bit. Rewrite it extracting the shift operation one layer. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/

Re: [PATCH] qom: Fix "typddef" typo

2020-10-12 Thread Laurent Vivier
Le 08/10/2020 à 00:02, Eduardo Habkost a écrit : > Fix typo introduced in the C11 #ifdef for qemu_max_align_t. It > never caused any problems because we always compile using > -std=gnu99. > > Fixes: 4c880f363e9e ("qom: Allow objects to be allocated with increased > alignment") > Signed-off-by: E

Re: [PATCH v4 4/7] keyval: Parse help options

2020-10-12 Thread Kevin Wolf
Am 11.10.2020 um 09:35 hat Markus Armbruster geschrieben: > From: Kevin Wolf > > This adds a special meaning for 'help' and '?' as options to the keyval > parser. Instead of being an error (because of a missing value) or a > value for an implied key, they now request help, which is a new boolean

Re: [PATCH] mingw: Fix builds on f33 mingw

2020-10-12 Thread Laurent Vivier
Le 08/10/2020 à 19:46, Thomas Huth a écrit : > On 08/10/2020 19.43, Dr. David Alan Gilbert (git) wrote: >> From: "Dr. David Alan Gilbert" >> >> Fedora 33's mingw moans about: >> >> In file included from ../tests/test-bitmap.c:12: >> /home/dgilbert/git/migpull/include/qemu/osdep.h:76: error: >> "_

Re: [PATCH v3] qom: code hardening - have bound checking while looping with integer value

2020-10-12 Thread Ani Sinha
Request to queue this patch for the next pull. On Mon, Sep 21, 2020 at 15:03 Ani Sinha wrote: > Object property insertion code iterates over an integer to get an unused > index that can be used as an unique name for an object property. This loop > increments the integer value indefinitely. Altho

Re: [PATCH v4 0/7] qemu-storage-daemon: Remove QemuOpts from --object

2020-10-12 Thread Kevin Wolf
Am 11.10.2020 um 09:34 hat Markus Armbruster geschrieben: > This replaces the QemuOpts-based help code for --object in the storage > daemon with code based on the keyval parser. > > Review of v3 led me to preexisting issues. Instead of posting my > fixes separately, then working with Kevin to reb

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

2020-10-12 Thread Laurent Vivier
Le 09/10/2020 à 13:38, Laurent Vivier a écrit : > .class_init is already set to serial_mm_class_init. > > Remove the duplicate entry. > > Fixes: 17fd1a6490b1 ("serial-mm: add "regshift" property") > Cc: marcandre.lur...@redhat.com > Signed-off-by: Laurent Vivier > --- > hw/char/serial.c | 1 - >

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

2020-10-12 Thread Laurent Vivier
Le 09/10/2020 à 21:09, Elena Afanasova a écrit : > Spotted by PVS-Studio > > Signed-off-by: Elena Afanasova > --- > block/blkdebug.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/block/blkdebug.c b/block/blkdebug.c > index eecbf3e5c4..54da719dd1 100644 > --- a/block/blkdebug.c > +++

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

2020-10-12 Thread Laurent Vivier
Le 09/10/2020 à 13:38, Laurent Vivier a écrit : > The doc [1] doesn't define the endianness, but the kernel driver > uses readl() to access the registers, so we can guess it depends > on the architecture endianness. > > As riscv architecture endianness is little it might not change anything > for

Re: [PATCH] target/sparc/int32_helper: Remove duplicated 'Tag Overflow' entry

2020-10-12 Thread Laurent Vivier
Le 11/10/2020 à 22:01, Philippe Mathieu-Daudé a écrit : > Commit 0b09be2b2f ("Nicer debug output for exceptions") added > twice the same "Tag Overflow" entry, remove the extra one. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/sparc/int32_helper.c | 1 - > 1 file changed, 1 deletion(-

Re: [PATCH] qom: Fix "typddef" typo

2020-10-12 Thread Daniel P . Berrangé
On Wed, Oct 07, 2020 at 06:02:55PM -0400, Eduardo Habkost wrote: > Fix typo introduced in the C11 #ifdef for qemu_max_align_t. It > never caused any problems because we always compile using > -std=gnu99. > > Fixes: 4c880f363e9e ("qom: Allow objects to be allocated with increased > alignment") >

Re: [PATCH 06/12] can_host: Use class properties

2020-10-12 Thread Pavel Pisa
Hello Eduardo, On Friday 09 of October 2020 18:01:16 Eduardo Habkost wrote: > Instance properties make introspection hard and are not shown by > "-object ...,help". Convert them to class properties. > > Signed-off-by: Eduardo Habkost > --- > Cc: Pavel Pisa > Cc: Vikram Garhwal > Cc: Jason Wang

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

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

Re: [PATCH v2] Adding ani's email as an individual contributor

2020-10-12 Thread Ani Sinha
Request to queue this patch for the next pull. On Wed, Oct 7, 2020 at 23:25 Philippe Mathieu-Daudé wrote: > On 10/7/20 6:19 PM, Ani Sinha wrote: > > Ani is an individual contributor into qemu project. Adding my email into > the > > correct file to reflect so. > > > > Reviewed-by: Philippe Mathie

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

2020-10-12 Thread John Snow
On 10/9/20 1:26 PM, Markus Armbruster wrote: John Snow writes: This is a minor re-work of the entrypoint script. It isolates a entrypoint is not a word ;-P I'm not entirely sure why a German is complaining about the birth of a new and beautiful compound noun. (I started to make sure I

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

2020-10-12 Thread Alex Bennée
Kevin Wolf writes: > Am 12.10.2020 um 13:53 hat Philippe Mathieu-Daudé geschrieben: >> On 10/12/20 1:25 PM, Kevin Wolf wrote: >> > Am 12.10.2020 um 12:47 hat Alex Bennée geschrieben: >> > > >> > > Markus Armbruster writes: >> > > >> > > > From: Kevin Wolf >> > > > >> > > > This moves the Q

Re: [PATCH] mingw: Fix builds on f33 mingw

2020-10-12 Thread Peter Maydell
On Mon, 12 Oct 2020 at 15:39, Laurent Vivier wrote: > > Le 08/10/2020 à 19:46, Thomas Huth a écrit : > > On 08/10/2020 19.43, Dr. David Alan Gilbert (git) wrote: > >> From: "Dr. David Alan Gilbert" > >> > >> Fedora 33's mingw moans about: > >> > >> In file included from ../tests/test-bitmap.c:12:

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

2020-10-12 Thread Mauro Matteo Cascella
Check the value of mps before it is used as divisor. Since HCCHAR_MPS is guest controllable, this prevents a malicious/buggy guest from crashing the QEMU process on the host. Signed-off-by: Mauro Matteo Cascella Reported-by: Gaoning Pan Reported-by: Xingwei Lin --- hw/usb/hcd-dwc2.c | 6 ++

Re: [PATCH] scripts: display how long each test takes to execute

2020-10-12 Thread Thomas Huth
On 14/09/2020 13.09, Daniel P. Berrangé wrote: > Sometimes under CI tests non-deterministically take longer to execute > than expected which can trigger timeouts. It is almost impossible to > diagnose this though without seeing execution time for each test case. > > With this change, when passing

Re: [PATCH] scripts: display how long each test takes to execute

2020-10-12 Thread Daniel P . Berrangé
On Mon, Oct 12, 2020 at 05:07:18PM +0200, Thomas Huth wrote: > On 14/09/2020 13.09, Daniel P. Berrangé wrote: > > Sometimes under CI tests non-deterministically take longer to execute > > than expected which can trigger timeouts. It is almost impossible to > > diagnose this though without seeing ex

Re: [PATCH] mingw: Fix builds on f33 mingw

2020-10-12 Thread Laurent Vivier
Le 12/10/2020 à 17:05, Peter Maydell a écrit : > On Mon, 12 Oct 2020 at 15:39, Laurent Vivier wrote: >> >> Le 08/10/2020 à 19:46, Thomas Huth a écrit : >>> On 08/10/2020 19.43, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" Fedora 33's mingw moans about: >>

Re: [PATCH v2] mingw: fix error __USE_MINGW_ANSI_STDIO redefined

2020-10-12 Thread Laurent Vivier
Le 08/10/2020 à 18:59, marcandre.lur...@redhat.com a écrit : > From: Marc-André Lureau > > Always put osdep.h first, and remove redundant stdlib.h include. > > Signed-off-by: Marc-André Lureau > --- > migration/dirtyrate.c | 3 ++- > tests/test-bitmap.c | 1 - > 2 files changed, 2 insertions

Re: [PULL 0/6] migration queue

2020-10-12 Thread Peter Maydell
On Mon, 12 Oct 2020 at 12:48, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > The following changes since commit 2387df497b4b4bcf754eb7398edca82889e2ef54: > > Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2020-10-10' > into staging (2020-10-12 11:29:42

[PATCH 2/4] spapr: Drop spapr_delete_vcpu() unused argument

2020-10-12 Thread Greg Kurz
The 'sc' argument is unused. Drop it. Signed-off-by: Greg Kurz --- hw/ppc/spapr_cpu_core.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index b6b217876750..64ce6a0cb781 100644 --- a/hw/ppc/spapr_cpu_core.c +++ b/hw

[PATCH 3/4] spapr: Introduce an .instance_finalize hook for TYPE_SPAPR_CPU_CORE

2020-10-12 Thread Greg Kurz
The array of vCPUs and each individual vCPU under the core can be freed in several locations. This is suboptimal and increases the odds of memory leaks in future changes. Actually they can be freed altogether when the core itself is ultimately freed in a finalize hook. Initialize the array with ze

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

2020-10-12 Thread Greg Kurz
spapr_cpu_core_realize() has an err_unrealize label which partially duplicates the code of spapr_cpu_core_realize(). Let's make spapr_cpu_core_unrealize() idempotent and call it instead. The registration and unregistration of the reset handler are moved around to simplify the code even more. Sign

[PATCH 0/4] spapr: Fix and cleanups for sPAPR CPU core

2020-10-12 Thread Greg Kurz
While reading the code _again_ I spotted a memory leak and I realized we can simplify some paths that deal with vCPU removal. --- Greg Kurz (4): spapr: Fix leak of CPU machine specific data spapr: Drop spapr_delete_vcpu() unused argument spapr: Introduce an .instance_finalize ho

Re: [PATCH v2 1/3] block: push error reporting into bdrv_all_*_snapshot functions

2020-10-12 Thread Max Reitz
On 12.10.20 14:27, Philippe Mathieu-Daudé wrote: > From: Daniel P. Berrangé > > The bdrv_all_*_snapshot functions return a BlockDriverState pointer > for the invalid backend, which the callers then use to report an > error message. In some cases multiple callers are reporting the > same error mes

[PATCH 1/4] spapr: Fix leak of CPU machine specific data

2020-10-12 Thread Greg Kurz
When a CPU core is being removed, the machine specific data of each CPU thread object is leaked. Fix this by calling the dedicated helper we have for that instead of simply unparenting the CPU object. Signed-off-by: Greg Kurz --- hw/ppc/spapr_cpu_core.c | 20 ++-- 1 file change

Re: [PATCH] qom: Fix "typddef" typo

2020-10-12 Thread Laurent Vivier
Le 12/10/2020 à 16:45, Daniel P. Berrangé a écrit : > On Wed, Oct 07, 2020 at 06:02:55PM -0400, Eduardo Habkost wrote: >> Fix typo introduced in the C11 #ifdef for qemu_max_align_t. It >> never caused any problems because we always compile using >> -std=gnu99. >> >> Fixes: 4c880f363e9e ("qom: Allo

<    1   2   3   4   5   >