Re: [PATCH v4 8/9] aspeed: Add an AST1030 eval board

2022-04-01 Thread Cédric Le Goater
On 4/1/22 05:46, Jamin Lin wrote: The image should be supplied with ELF binary. $ qemu-system-arm -M ast1030-evb -kernel zephyr.elf -nographic Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Signed-off-by: Steven Lee --- hw/arm/aspeed.c | 97

Re: [RFC PATCH 1/2] spapr: Report correct GTSE support via ov5

2022-04-01 Thread Aneesh Kumar K.V
David Gibson writes: > On Mon, Mar 14, 2022 at 07:10:10PM -0300, Fabiano Rosas wrote: >> David Gibson writes: >> >> > On Tue, Mar 08, 2022 at 10:23:59PM -0300, Fabiano Rosas wrote: >> ... >> To satisfy TCG we could keep a spapr capability as ON and usually the >> guest would pass cap-gtse=off

Re: [PATCH v1 1/2] timer: cadence_ttc: Break out header file to allow embedding

2022-04-01 Thread Luc Michel
On 00:20 Fri 01 Apr , Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Break out header file to allow embedding of the the TTC. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Luc Michel > --- > include/hw/timer/cadence_ttc.h | 54 ++ > hw/timer

Re: [PATCH v1 2/2] hw/arm/xlnx-zynqmp: Connect 4 TTC timers

2022-04-01 Thread Luc Michel
On 00:20 Fri 01 Apr , Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Connect the 4 TTC timers on the ZynqMP. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Luc Michel > --- > include/hw/arm/xlnx-zynqmp.h | 4 > hw/arm/xlnx-zynqmp.c | 22 ++

Re: [PATCH] vhost: Fix bad return of descriptors to SVQ

2022-04-01 Thread Eugenio Perez Martin
On Fri, Apr 1, 2022 at 4:30 AM Jason Wang wrote: > > On Fri, Apr 1, 2022 at 2:14 AM Eugenio Pérez wrote: > > > > Only the first one of them were properly enqueued back. > > > > Fixes: 100890f7ca ("vhost: Shadow virtqueue buffers forwarding") > > Signed-off-by: Eugenio Pérez > > --- > > hw/virti

Re: [PATCH v1 1/9] qapi: fix example of netdev_add command

2022-04-01 Thread Markus Armbruster
Victor Toso writes: > Example output has the optional member @dnssearch as string type. It > should be an array of strings instead. Fix it. > > For reference, see NetdevUserOptions. > > Signed-off-by: Victor Toso > --- > qapi/net.json | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >

Re: [PATCH v1 2/9] qapi: fix examples: replay-break and replay-seek

2022-04-01 Thread Markus Armbruster
Victor Toso writes: > Both examples outputs are using @data member for the arguments. This > is wrong. The expected member for the QMP is @arguments. Fix it. > > Signed-off-by: Victor Toso > --- > qapi/replay.json | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/qapi

Re: [PATCH v1 5/9] qapi: fix example of query-vnc command

2022-04-01 Thread Markus Armbruster
Victor Toso writes: > The return value is missing the mandatory member @websocket. Fix it. > > Signed-off-by: Victor Toso > --- > qapi/ui.json | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/qapi/ui.json b/qapi/ui.json > index c039b8b3cb..13a8bb82aa 100644 > --- a/qapi/ui.json > +++ b/

Re: [PATCH v1 3/9] qapi: fix example of query-named-block-nodes command

2022-04-01 Thread Markus Armbruster
Victor Toso writes: > Example output is missing mandatory member @detect_zeroes. Fix it. > > Signed-off-by: Victor Toso > --- > qapi/block-core.json | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/qapi/block-core.json b/qapi/block-core.json > index 4a7a6940a3..beeb91952a 100644 > --- a

Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept

2022-04-01 Thread Emanuele Giuseppe Esposito
Am 31/03/2022 um 18:40 schrieb Paolo Bonzini: > On 3/31/22 15:51, Emanuele Giuseppe Esposito wrote: >> >> bdrv_graph_list_wrlock <-> start_exclusive >> bdrv_graph_list_wrunlock <-> end_exclusive >> bdrv_graph_list_rdlock <-> cpu_exec_start >> bdrv_graph_list_rdunlock <-> cpu_exec_end > > This w

Re: [PATCH v1 4/9] qapi: fix example of query-spice command

2022-04-01 Thread Markus Armbruster
Victor Toso writes: > Example output is missing mandatory members @migrated and @mouse-mode. > Fix it. > > Signed-off-by: Victor Toso > --- > qapi/ui.json | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/qapi/ui.json b/qapi/ui.json > index a810ed680c..c039b8b3cb 100644 > --- a/qapi/ui

Re: [PATCH v1 6/9] qapi: fix example of query-colo-status command

2022-04-01 Thread Markus Armbruster
Victor Toso writes: > The example output is missing the mandatory member @last-mode in the > return value. Fix it. > > Signed-off-by: Victor Toso > --- > qapi/migration.json | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/qapi/migration.json b/qapi/migration.json > inde

Re: [PATCH v1 7/9] qapi: fix example of trace-event-get-state command

2022-04-01 Thread Markus Armbruster
Victor Toso writes: > The example output is missing the mandatory member @vcpu. Fix it. > > Signed-off-by: Victor Toso > --- > qapi/trace.json | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/qapi/trace.json b/qapi/trace.json > index 119509f565..6c6982a587 100644 > --- a

Re: [PATCH v1 9/9] qapi: fix example of query-memdev command

2022-04-01 Thread Markus Armbruster
Victor Toso writes: > Example output is missing mandatory argument @share for the return > JSON object. Add it. > > Signed-off-by: Victor Toso > --- > qapi/machine.json | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/qapi/machine.json b/qapi/machine.json > index 968f912989..d25a481ce

Re: use of uninitialized variable involving visit_type_uint32() and friends

2022-04-01 Thread Paolo Bonzini
On Thu, Mar 31, 2022 at 7:35 PM Peter Maydell wrote: > Coverity warns about use of uninitialized data in what seems > to be a common pattern of use of visit_type_uint32() and similar > functions. Here's an example from target/arm/cpu64.c: > > static void cpu_max_set_sve_max_vq(Object *obj, Visito

Re: [RFC PATCH] tests/qtest: attempt to enable tests for virtio-gpio (!working)

2022-04-01 Thread Stefan Hajnoczi
On Thu, Mar 31, 2022 at 10:52:56AM +0100, Alex Bennée wrote: > > (expanding the CC list for help, anyone have a better idea about how > vhost-user qtests should work/see obvious issues with this patch?) This is better than no test :). Stefan signature.asc Description: PGP signature

Re: [PATCH v1 8/9] qapi: fix example of query-cpus-fast command

2022-04-01 Thread Markus Armbruster
Victor Toso writes: > Example output contains member @arch that was removed in 445a5b4087 > "machine: remove 'arch' field from 'query-cpus-fast' QMP command". Fix > it. > > Signed-off-by: Victor Toso > --- > qapi/machine.json | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/qapi/machin

Re: [PATCH v1 1/2] timer: cadence_ttc: Break out header file to allow embedding

2022-04-01 Thread Francisco Iglesias
On [2022 Apr 01] Fri 00:20:16, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Break out header file to allow embedding of the the TTC. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Francisco Iglesias > --- > include/hw/timer/cadence_ttc.h | 54 +

[PATCH 10/9] qapi: Fix calc-dirty-rate example

2022-04-01 Thread Markus Armbruster
The example shows {"command": ...}, which is wrong. Fix it to {"execute": ...}. Signed-off-by: Markus Armbruster --- qapi/migration.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/migration.json b/qapi/migration.json index f74777608a..27d7b28158 100644 --- a/qapi/m

Re: [PATCH v1 2/2] hw/arm/xlnx-zynqmp: Connect 4 TTC timers

2022-04-01 Thread Francisco Iglesias
On [2022 Apr 01] Fri 00:20:17, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Connect the 4 TTC timers on the ZynqMP. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Francisco Iglesias > --- > include/hw/arm/xlnx-zynqmp.h | 4 > hw/arm/xlnx-zynqmp.c | 22 ++

Re: [PATCH 7/7] vhost-vdpa: backend feature should set only once

2022-04-01 Thread Eugenio Perez Martin
On Thu, Mar 31, 2022 at 11:15 PM Si-Wei Liu wrote: > > > > On 3/31/2022 1:02 AM, Eugenio Perez Martin wrote: > > On Thu, Mar 31, 2022 at 1:03 AM Si-Wei Liu wrote: > >> > >> > >> On 3/30/2022 12:01 PM, Eugenio Perez Martin wrote: > >>> On Wed, Mar 30, 2022 at 8:33 AM Si-Wei Liu wrote: > The

[PATCH v5 0/9] Add support for AST1030 SoC

2022-04-01 Thread Jamin Lin
Changes from v5: - remove TYPE_ASPEED_MINIBMC_MACHINE and ASPEED_MINIBMC_MACHINE - remove ast1030_machine_instance_init function Changes from v4: - drop the ASPEED_SMC_FEATURE_WDT_CONTROL flag in hw/ssi/aspeed_smc.c Changes from v3: - remove AspeedMiniBmcMachineState state structure and AspeedM

[PATCH v5 3/9] aspeed/wdt: Fix ast2500/ast2600 default reload value

2022-04-01 Thread Jamin Lin
From: Steven Lee Per ast2500_2520_datasheet_v1.8 and ast2600v11.pdf, the default value of WDT00 and WDT04 is 0x014FB180 for ast2500/ast2600. Add default_status and default_reload_value attributes for storing counter status and reload value as they are different from ast2400. Signed-off-by: Troy

[PATCH v5 1/9] aspeed/adc: Add AST1030 support

2022-04-01 Thread Jamin Lin
From: Steven Lee Per ast1030_v7.pdf, AST1030 ADC engine is identical to AST2600's ADC. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Signed-off-by: Steven Lee Reviewed-by: Cédric Le Goater --- hw/adc/aspeed_adc.c | 16 include/hw/adc/aspeed_adc.h | 1 + 2 files

[PATCH v5 5/9] aspeed/timer: Add AST1030 support

2022-04-01 Thread Jamin Lin
From: Steven Lee ast1030 tmc(timer controller) is identical to ast2600 tmc. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Signed-off-by: Steven Lee Reviewed-by: Cédric Le Goater --- hw/timer/aspeed_timer.c | 17 + include/hw/timer/aspeed_timer.h | 1 + 2 files ch

Re: [PATCH v4 8/9] aspeed: Add an AST1030 eval board

2022-04-01 Thread Jamin Lin
The 04/01/2022 06:59, Cédric Le Goater wrote: > On 4/1/22 05:46, Jamin Lin wrote: > > The image should be supplied with ELF binary. > > $ qemu-system-arm -M ast1030-evb -kernel zephyr.elf -nographic > > > > Signed-off-by: Troy Lee > > Signed-off-by: Jamin Lin > > Signed-off-by: Steven Lee > > -

[PATCH v5 2/9] aspeed/smc: Add AST1030 support

2022-04-01 Thread Jamin Lin
From: Steven Lee AST1030 spi controller's address decoding unit is 1MB that is identical to ast2600, but fmc address decoding unit is 512kb. Introduce seg_to_reg and reg_to_seg handlers for ast1030 fmc controller. In addition, add ast1030 fmc, spi1, and spi2 class init handler. Signed-off-by: Tr

[PATCH v5 4/9] aspeed/wdt: Add AST1030 support

2022-04-01 Thread Jamin Lin
From: Steven Lee AST1030 wdt controller is similiar to AST2600's wdt, but it has extra registers. Introduce ast1030 object class and increse the number of regs(offset) of ast1030 model. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Signed-off-by: Steven Lee Reviewed-by: Cédric Le Goater -

Re: [PATCH v5 8/9] aspeed: Add an AST1030 eval board

2022-04-01 Thread Cédric Le Goater
On 4/1/22 10:38, Jamin Lin wrote: The image should be supplied with ELF binary. $ qemu-system-arm -M ast1030-evb -kernel zephyr.elf -nographic Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Signed-off-by: Steven Lee Reviewed-by: Cédric Le Goater Thanks, C. --- hw/arm/aspeed.c | 66

[PATCH v5 8/9] aspeed: Add an AST1030 eval board

2022-04-01 Thread Jamin Lin
The image should be supplied with ELF binary. $ qemu-system-arm -M ast1030-evb -kernel zephyr.elf -nographic Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Signed-off-by: Steven Lee --- hw/arm/aspeed.c | 66 + 1 file changed, 66 insertions(+)

[PATCH v5 9/9] test/avocado/machine_aspeed.py: Add ast1030 test case

2022-04-01 Thread Jamin Lin
Add test case to test "ast1030-evb" machine with zephyr os Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Signed-off-by: Steven Lee Reviewed-by: Cédric Le Goater --- tests/avocado/machine_aspeed.py | 36 + 1 file changed, 36 insertions(+) create mode 100644

[PATCH v5 6/9] aspeed/scu: Add AST1030 support

2022-04-01 Thread Jamin Lin
From: Steven Lee Per ast1030_v07.pdf, AST1030 SOC doesn't have SCU300, the pclk divider selection is defined in SCU310[11:8]. Add a get_apb_freq function and a class init handler for ast1030. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Signed-off-by: Steven Lee Reviewed-by: Cédric Le Goa

[PATCH] build-sys: drop ntddscsi.h check

2022-04-01 Thread marcandre . lureau
From: Marc-André Lureau The header has been part of MinGW-w64 since the introduction of the project (2007). While on MinGW(32), the legacy project, it was imported in 2014 from w32api-3.17 (commit e4803e0da2). According to build-platform.rst and our CI coverage, we only support building with Min

[PATCH v5 7/9] aspeed/soc : Add AST1030 support

2022-04-01 Thread Jamin Lin
From: Steven Lee The embedded core of AST1030 SoC is ARM Coretex M4. It is hard to be integrated in the common Aspeed Soc framework. We introduce a new ast1030 class with instance_init and realize handlers. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Signed-off-by: Steven Lee Reviewed-by

Re: [PATCH 2/2] NVDIMM: Init vNVDIMM's LSA index block if it hasn't been

2022-04-01 Thread Igor Mammedov
On Fri, 01 Apr 2022 12:07:56 +0800 Robert Hoo wrote: > On Thu, 2022-03-31 at 16:41 +0200, Igor Mammedov wrote: > > On Thu, 31 Mar 2022 21:08:12 +0800 > > Robert Hoo wrote: > > > > > > > > > > Can user initialize/format LSA from guest using ndctl/some other > > > > tool? > > > > > > >

Re: [PATCH v5 0/9] Add support for AST1030 SoC

2022-04-01 Thread Cédric Le Goater
Hello Jamin, Thanks for these new models and machine. They are queued for QEMU 7.1. There are a couple of patchsets adding support for the AST1030 GPIO controller and the I2C new mode that would be good extensions but they need review first. What are the next steps? any plans for network ? The N

Re: [PULL 19/35] ppc/pnv: Add models for POWER9 PHB4 PCIe Host bridge

2022-04-01 Thread Frederic Barrat
On 01/04/2022 03:59, Benjamin Herrenschmidt wrote: This one: #define PHB4_PEC_PCI_REGS_COUNT 0x2 Should be #define PHB4_PEC_PCI_REGS_COUNT 0x3 There is no register at 0x1 though. Patch on the way Fred

Re: [RFC PATCH 0/4] hw/i2c: i2c slave mode support

2022-04-01 Thread Damien Hedde
On 4/1/22 08:29, Klaus Jensen wrote: On Mar 31 15:32, Corey Minyard wrote: On Thu, Mar 31, 2022 at 06:57:33PM +0200, Klaus Jensen wrote: From: Klaus Jensen Hi all, This RFC series adds I2C "slave mode" support for the Aspeed I2C controller as well as the necessary infrastructure in the i2c

Re: use of uninitialized variable involving visit_type_uint32() and friends

2022-04-01 Thread Markus Armbruster
Paolo Bonzini writes: > On Thu, Mar 31, 2022 at 7:35 PM Peter Maydell > wrote: > >> Coverity warns about use of uninitialized data in what seems >> to be a common pattern of use of visit_type_uint32() and similar >> functions. Here's an example from target/arm/cpu64.c: >> >> static void cpu_max_

[PATCH] ppc/pnv: Fix number of registers in the PCIe controller on POWER9

2022-04-01 Thread Frederic Barrat
The spec defines 3 registers, even though only index 0 and 2 are valid on POWER9. The same model is used on POWER10. Register 1 is defined there but we currently don't use it in skiboot. So we can keep reporting an error on write. Reported by Coverity (CID 1487176). Fixes: 4f9924c4d4cf ("ppc/pnv:

[PATCH v2 2/7] block/copy-before-write: add on-cbw-error open parameter

2022-04-01 Thread Vladimir Sementsov-Ogievskiy
Currently, behavior on copy-before-write operation failure is simple: report error to the guest. Let's implement alternative behavior: break the whole copy-before-write process (and corresponding backup job or NBD client) but keep guest working. It's needed if we consider guest stability as more i

[PATCH v2 3/7] iotests: add copy-before-write: on-cbw-error tests

2022-04-01 Thread Vladimir Sementsov-Ogievskiy
Add tests for new option of copy-before-write filter: on-cbw-error. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/tests/copy-before-write| 128 ++ .../qemu-iotests/tests/copy-before-write.out | 5 + 2 files changed, 133 insertions(+) create mode 10075

[PATCH v2 0/7] copy-before-write: on-cbw-error and cbw-timeout

2022-04-01 Thread Vladimir Sementsov-Ogievskiy
Hi all! Here are two new options for copy-before-write filter: on-cbw-error allows to alter the behavior on copy-before-write operation failure: not break guest write but break the snapshot (and therefore backup process) cbw-timeout allows to limit cbw operation by some timeout. So, for example

[PATCH v2 6/7] block/copy-before-write: implement cbw-timeout option

2022-04-01 Thread Vladimir Sementsov-Ogievskiy
In some scenarios, when copy-before-write operations lasts too long time, it's better to cancel it. Most useful would be to use the new option together with on-cbw-error=break-snapshot: this way if cbw operation takes too long time we'll just cancel backup process but do not disturb the guest too

Re: [RFC PATCH 0/4] hw/i2c: i2c slave mode support

2022-04-01 Thread Klaus Jensen
On Apr 1 10:58, Damien Hedde wrote: > > On 4/1/22 08:29, Klaus Jensen wrote: > > On Mar 31 15:32, Corey Minyard wrote: > > > On Thu, Mar 31, 2022 at 06:57:33PM +0200, Klaus Jensen wrote: > > > > From: Klaus Jensen > > > > > > > > Hi all, > > > > > > > > This RFC series adds I2C "slave mode" su

[PATCH v2 4/7] util: add qemu-co-timeout

2022-04-01 Thread Vladimir Sementsov-Ogievskiy
Add new API, to make a time limited call of the coroutine. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/qemu/coroutine.h | 13 ++ util/meson.build | 1 + util/qemu-co-timeout.c | 89 3 files changed, 103 insertions(+) create mod

[PATCH v2 5/7] block/block-copy: block_copy(): add timeout_ns parameter

2022-04-01 Thread Vladimir Sementsov-Ogievskiy
Add possibility to limit block_copy() call in time. To be used in the next commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/block-copy.c | 26 +++--- block/copy-before-write.c | 2 +- include/block/block-copy.h | 2 +- 3 files changed, 21 insertions(+)

[PATCH v4 0/4] util/thread-pool: Expose minimun and maximum size

2022-04-01 Thread Nicolas Saenz Julienne
As discussed on the previous RFC[1] the thread-pool's dynamic thread management doesn't play well with real-time and latency sensitive systems. This series introduces a set of controls that'll permit achieving more deterministic behaviours, for example by fixing the pool's size. We first introduce

[PATCH v4 2/3] util/main-loop: Introduce the main loop into QOM

2022-04-01 Thread Nicolas Saenz Julienne
'event-loop-base' provides basic property handling for all 'AioContext' based event loops. So let's define a new 'MainLoopClass' that inherits from it. This will permit tweaking the main loop's properties through qapi as well as through the command line using the '-object' keyword[1]. Only one inst

Re: [PATCH] build-sys: drop ntddscsi.h check

2022-04-01 Thread Konstantin Kostiuk
Reviewed-by: Konstantin Kostiuk On Fri, Apr 1, 2022 at 11:51 AM wrote: > From: Marc-André Lureau > > The header has been part of MinGW-w64 since the introduction of the > project (2007). While on MinGW(32), the legacy project, it was imported > in 2014 from w32api-3.17 (commit e4803e0da2). > >

[PATCH v4 1/3] Introduce event-loop-base abstract class

2022-04-01 Thread Nicolas Saenz Julienne
Introduce the 'event-loop-base' abstract class, it'll hold the properties common to all event loops and provide the necessary hooks for their creation and maintenance. Then have iothread inherit from it. EventLoopBaseClass is defined as user creatable and provides a hook for its children to attach

Re: [PATCH v5 1/4] hw/arm/realview: replace 'qemu_split_irq' with 'TYPE_SPLIT_IRQ'

2022-04-01 Thread Peter Maydell
On Thu, 24 Mar 2022 at 18:16, Zongyuan Li wrote: > > Signed-off-by: Zongyuan Li > --- > hw/arm/realview.c | 33 - > 1 file changed, 24 insertions(+), 9 deletions(-) > Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH] intel-iommu: correct the value used for error_setg_errno()

2022-04-01 Thread Peter Maydell
On Fri, 1 Apr 2022 at 03:29, Jason Wang wrote: > > error_setg_errno() expects a normal errno value, not a negated > one, so we should use ENOTSUP instead of -ENOSUP. > > Fixes: Coverity CID 1487174 > Fixes: ("intel_iommu: support snoop control") > Signed-off-by: Jason Wang > --- > hw/i386/intel_

Re: [PATCH v5 2/4] hw/arm/stellaris: replace 'qemu_split_irq' with 'TYPE_SPLIT_IRQ'

2022-04-01 Thread Peter Maydell
On Thu, 24 Mar 2022 at 18:16, Zongyuan Li wrote: > > Signed-off-by: Zongyuan Li > --- > hw/arm/stellaris.c | 15 +-- > 1 file changed, 13 insertions(+), 2 deletions(-) Reviewed-by: Peter Maydell thanks -- PMM

[PATCH v2 1/7] block/copy-before-write: refactor option parsing

2022-04-01 Thread Vladimir Sementsov-Ogievskiy
We are going to add one more option of enum type. Let's refactor option parsing so that we can simply work with BlockdevOptionsCbw object. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/copy-before-write.c | 68 +++ 1 file changed, 41 insertions(+), 27

[PATCH v4 3/3] util/event-loop-base: Introduce options to set the thread pool size

2022-04-01 Thread Nicolas Saenz Julienne
The thread pool regulates itself: when idle, it kills threads until empty, when in demand, it creates new threads until full. This behaviour doesn't play well with latency sensitive workloads where the price of creating a new thread is too high. For example, when paired with qemu's '-mlock', or usi

[PATCH v2 7/7] iotests: copy-before-write: add cases for cbw-timeout option

2022-04-01 Thread Vladimir Sementsov-Ogievskiy
Add two simple test-cases: timeout failure with break-snapshot-on-cbw-error behavior and similar with break-guest-write-on-cbw-error behavior. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/tests/copy-before-write| 78 +++ .../qemu-iotests/tests/copy-befor

RE: [PATCH v5 0/9] Add support for AST1030 SoC

2022-04-01 Thread Jamin Lin
Hi Cedric, One more question, what is the progress about SFDP patch, https://patchwork.kernel.org/project/qemu-devel/list/?series=342081&archive=both We need these patches for future SPI support. Thanks-Jamin * Email Confidentiality Notice DISCLAIMER: This messa

RE: [PATCH v5 0/9] Add support for AST1030 SoC

2022-04-01 Thread Jamin Lin
Hi Cedric, Joel and Andrew First all, thanks for all your kindly support and review. We are so glad that QEMU v7.1 will support AST1030 model. 1. The ast1030 and ast2600 HACE controller are identical. Steven submitted the patch to support HACE ACC mode. Once his patch accept. We will submit p

[PATCH v3 2/3] block: improve block_dirty_bitmap_merge(): don't allocate extra bitmap

2022-04-01 Thread Vladimir Sementsov-Ogievskiy
We don't need extra bitmap. All we need is to backup the original bitmap when we do first merge. So, drop extra temporary bitmap and work directly with target and backup. Still to keep old semantics, that on failure target is unchanged and user don't need to restore, we need a local_backup variabl

[PATCH v3 1/3] block: block_dirty_bitmap_merge(): fix error path

2022-04-01 Thread Vladimir Sementsov-Ogievskiy
At the end we ignore failure of bdrv_merge_dirty_bitmap() and report success. And still set errp. That's wrong. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Nikita Lapshin --- block/monitor/bitmap-qmp-cmds.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/blo

[PATCH v3 0/3] block/dirty-bitmaps: fix and improve bitmap merge

2022-04-01 Thread Vladimir Sementsov-Ogievskiy
v3: rebase on master, one patch is already merged. Vladimir Sementsov-Ogievskiy (3): block: block_dirty_bitmap_merge(): fix error path block: improve block_dirty_bitmap_merge(): don't allocate extra bitmap block: simplify handling of try to merge different sized bitmaps include/block/block

[PATCH v3 3/3] block: simplify handling of try to merge different sized bitmaps

2022-04-01 Thread Vladimir Sementsov-Ogievskiy
We have too much logic to simply check that bitmaps are of the same size. Let's just define that hbitmap_merge() and bdrv_dirty_bitmap_merge_internal() require their argument bitmaps be of same size, this simplifies things. Let's look through the callers: For backup_init_bcs_bitmap() we already a

Re: [PATCH] build-sys: drop ntddscsi.h check

2022-04-01 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH] virtio-net: use g_memdup2() instead of unsafe g_memdup()

2022-04-01 Thread Philippe Mathieu-Daudé
On 1/4/22 04:31, Jason Wang wrote: On Fri, Apr 1, 2022 at 2:29 AM Eugenio Pérez wrote: Fixing that literal checkpatch.pl because it will complain when we modify the file See https://www.mail-archive.com/qemu-devel@nongnu.org/msg834178.html Signed-off-by: Eugenio Pérez Acked-by: Jason W

Re: [PATCH 2/3] i386: factor out x86_firmware_configure()

2022-04-01 Thread Philippe Mathieu-Daudé
On 1/4/22 07:28, Xiaoyao Li wrote: On 4/1/2022 1:08 PM, Gerd Hoffmann wrote:    if (sev_enabled()) { ^^^ Can we remove the SEV check ... +    pc_system_parse_ovmf_flash(ptr, size); + +    if (sev_enabled()) { ... because we are still checking SEV here.

Re: [PATCH v2 1/7] block/copy-before-write: refactor option parsing

2022-04-01 Thread Hanna Reitz
On 01.04.22 11:19, Vladimir Sementsov-Ogievskiy wrote: We are going to add one more option of enum type. Let's refactor option parsing so that we can simply work with BlockdevOptionsCbw object. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/copy-before-write.c | 68

Re: [RFC PATCH v3 19/28] hw/virtio: Replace g_memdup() by g_memdup2()

2022-04-01 Thread Eugenio Perez Martin
On Fri, Sep 3, 2021 at 8:11 PM Philippe Mathieu-Daudé wrote: > > Per > https://discourse.gnome.org/t/port-your-module-from-g-memdup-to-g-memdup2-now/5538 > > The old API took the size of the memory to duplicate as a guint, > whereas most memory functions take memory sizes as a gsize. This >

Re: [PATCH] virtio-net: use g_memdup2() instead of unsafe g_memdup()

2022-04-01 Thread Eugenio Perez Martin
On Fri, Apr 1, 2022 at 12:31 PM Philippe Mathieu-Daudé wrote: > > On 1/4/22 04:31, Jason Wang wrote: > > On Fri, Apr 1, 2022 at 2:29 AM Eugenio Pérez wrote: > >> > >> Fixing that literal checkpatch.pl because it will complain when we modify > >> the file > > See https://www.mail-archive.com/qemu

Re: [PATCH v1 1/9] qapi: fix example of netdev_add command

2022-04-01 Thread Victor Toso
Hi, On Fri, Apr 01, 2022 at 09:56:40AM +0200, Markus Armbruster wrote: > Victor Toso writes: > > > Example output has the optional member @dnssearch as string type. It > > should be an array of strings instead. Fix it. > > > > For reference, see NetdevUserOptions. > > > > Signed-off-by: Victor T

Re: [PATCH 10/9] qapi: Fix calc-dirty-rate example

2022-04-01 Thread Victor Toso
On Fri, Apr 01, 2022 at 10:20:28AM +0200, Markus Armbruster wrote: > The example shows {"command": ...}, which is wrong. Fix it to > {"execute": ...}. > > Signed-off-by: Markus Armbruster > --- > qapi/migration.json | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/qapi/

Re: [PATCH v2] 9p: move P9_XATTR_SIZE_MAX from 9p.h to 9p.c

2022-04-01 Thread Thomas Huth
On 31/03/2022 22.06, Will Cohen wrote: On Thu, Mar 31, 2022 at 4:00 PM Peter Maydell > wrote: On Thu, 31 Mar 2022 at 19:27, Will Cohen mailto:wwco...@gmail.com>> wrote: > > The patch set adding 9p functionality to darwin introduced an issue > w

Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept

2022-04-01 Thread Paolo Bonzini
On 4/1/22 10:05, Emanuele Giuseppe Esposito wrote: The list itself would be used internally to implement the write-side lock and unlock primitives, but it would not be protected by the above functions.  So there would be a couple additional functions:   bdrv_graph_list_lock <-> cpu_list_lock  

[PATCH v1.1 1/9] qapi: fix example of netdev_add command

2022-04-01 Thread Victor Toso
Example output has the optional member @dnssearch as string type. It should be an array of strings instead. Fix it. For reference, see NetdevUserOptions. Signed-off-by: Victor Toso --- qapi/net.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/net.json b/qapi/net.jso

[PATCH 1/3] vhost: Refactor vhost_reset_device() in VhostOps

2022-04-01 Thread Michael Qiu
Currently in vhost framwork, vhost_reset_device() is misnamed. Actually, it should be vhost_reset_owner(). In vhost user, it make compatible with reset device ops, but vhost kernel does not compatible with it, for vhost vdpa, it only implement reset device action. So we need seperate the function

[PATCH 2/3] vhost: add vhost_dev_reset()

2022-04-01 Thread Michael Qiu
Not all vhost-user backends support ops->vhost_reset_device(). Instead of adding backend check and call backend ops directly, it's better to implement a function in vhost framework, so that it could hide vhost_ops details. SIgned-off-by: Michael Qiu --- hw/virtio/vhost.c | 14 +++

[PATCH 3/3 v5] vdpa: reset the backend device in the end of vhost_net_stop()

2022-04-01 Thread Michael Qiu
Currently, when VM poweroff, it will trigger vdpa device(such as mlx bluefield2 VF) reset many times(with 1 datapath queue pair and one control queue, triggered 3 times), this leads to below issue: vhost VQ 2 ring restore failed: -22: Invalid argument (22) This because in vhost_net_stop(), it wil

Re: use of uninitialized variable involving visit_type_uint32() and friends

2022-04-01 Thread Paolo Bonzini
On 4/1/22 11:15, Markus Armbruster wrote: +assert (v->type == expected_type); +if (expected_type & (VISITOR_INPUT | VISITOR_DEALLOC)) { Backwards. Yes, I always get input vs output wrong. With an input visitor @v, visit_type_uint32(v, "name", &val, errp) stores to @val wit

Re: [PATCH v4 2/2] Added parameter to take screenshot with screendump as PNG

2022-04-01 Thread Markus Armbruster
Dave, please have a look at the HMP compatibility issue in hmp-command.hx below. Kshitij Suri writes: > Currently screendump only supports PPM format, which is un-compressed and not > standard. If "standard" means "have to pay a standards organization $$$ to access the spec", PPM is not standar

[PATCH 0/3] Refactor vhost device reset

2022-04-01 Thread Michael Qiu
Now adays, vhost framework does a misnamed for vhost_reset_device(), actually we need seperate vhost_reset_device() and vhost_reset_owner(), this patchset refactor it, and make different backend call the right function. Base on those work, fix an issue of vdpa device reset for several times. Test

Re: [PATCH v2] 9p: move P9_XATTR_SIZE_MAX from 9p.h to 9p.c

2022-04-01 Thread Christian Schoenebeck
On Freitag, 1. April 2022 13:01:31 CEST Thomas Huth wrote: > On 31/03/2022 22.06, Will Cohen wrote: > > On Thu, Mar 31, 2022 at 4:00 PM Peter Maydell > > > > wrote: > > On Thu, 31 Mar 2022 at 19:27, Will Cohen > > > > wrote:

[PATCH] build-sys: simplify AF_VSOCK check

2022-04-01 Thread marcandre . lureau
From: Marc-André Lureau The current test checks more than AF_VSOCK availability, and doesn't need to be that long. Since its introduction in Linux in 2013, AF_VSOCK came with linux/vm_sockets.h for sockaddr_vm, let's check that. We could even go back to the initial configure-less approach propo

Re: [PATCH] build-sys: simplify AF_VSOCK check

2022-04-01 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH v2 2/7] block/copy-before-write: add on-cbw-error open parameter

2022-04-01 Thread Hanna Reitz
On 01.04.22 11:19, Vladimir Sementsov-Ogievskiy wrote: Currently, behavior on copy-before-write operation failure is simple: report error to the guest. Let's implement alternative behavior: break the whole copy-before-write process (and corresponding backup job or NBD client) but keep guest work

Re: [PATCH v2 1/7] block/copy-before-write: refactor option parsing

2022-04-01 Thread Vladimir Sementsov-Ogievskiy
01.04.2022 13:50, Hanna Reitz wrote: On 01.04.22 11:19, Vladimir Sementsov-Ogievskiy wrote: We are going to add one more option of enum type. Let's refactor option parsing so that we can simply work with BlockdevOptionsCbw object. Signed-off-by: Vladimir Sementsov-Ogievskiy ---   block/copy-be

Re: [PATCH] intel-iommu: correct the value used for error_setg_errno()

2022-04-01 Thread Peter Xu
On Fri, Apr 01, 2022 at 10:28:24AM +0800, Jason Wang wrote: > error_setg_errno() expects a normal errno value, not a negated > one, so we should use ENOTSUP instead of -ENOSUP. > > Fixes: Coverity CID 1487174 > Fixes: ("intel_iommu: support snoop control") > Signed-off-by: Jason Wang Reviewed-by

Re: [PATCH v2 2/7] block/copy-before-write: add on-cbw-error open parameter

2022-04-01 Thread Vladimir Sementsov-Ogievskiy
01.04.2022 14:58, Hanna Reitz wrote: On 01.04.22 11:19, Vladimir Sementsov-Ogievskiy wrote: Currently, behavior on copy-before-write operation failure is simple: report error to the guest. Let's implement alternative behavior: break the whole copy-before-write process (and corresponding backup

[PATCH v3] hw/riscv: virt: Exit if the user provided -bios in combination with KVM

2022-04-01 Thread Ralf Ramsauer
The -bios option is silently ignored if used in combination with -enable-kvm. The reason is that the machine starts in S-Mode, and the bios typically runs in M-Mode. Better exit in that case to not confuse the user. Signed-off-by: Ralf Ramsauer --- hw/riscv/virt.c | 14 ++ 1 file ch

[PATCH] target/riscv: Fix incorrect PTE merge in walk_pte

2022-04-01 Thread Ralf Ramsauer
Two non-subsequent PTEs can be mapped to subsequent paddrs. In this case, walk_pte will erroneously merge them. Enforce the split up, by tracking the virtual base address. Let's say we have the mapping: 0x8120 -> 0x89623000 (4K) 0x8120f000 -> 0x89624000 (4K) Before, walk_pte would have shown

Re: [PATCH v2] target/riscv: Call probe_write() before atomic operations

2022-04-01 Thread Richard Henderson
On 3/31/22 19:49, Alistair Francis wrote: +void helper_atomic_check(CPURISCVState *env, target_ulong address, + int mmu_idx) +{ +#ifndef CONFIG_USER_ONLY +void *phost; +int ret = probe_access_flags(env, address, MMU_DATA_STORE, mmu_idx, false, +

[PATCH 0/2] target/riscv: Annotate atomic operations

2022-04-01 Thread Richard Henderson
If an atomic operation fails on RISC-V, we want to generate a store/amo fault and not a load fault. Annotate amo insns, so that we can recognize them after unwinding. Transform the implementation access type to store/amo for reporting. r~ Richard Henderson (2): target/riscv: Use cpu_loop_exi

[PATCH 1/2] target/riscv: Use cpu_loop_exit_restore directly from mmu faults

2022-04-01 Thread Richard Henderson
The riscv_raise_exception function stores its argument into exception_index and then exits to the main loop. When we have already set exception_index, we can just exit directly. Signed-off-by: Richard Henderson --- target/riscv/cpu_helper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletio

[PATCH 2/2] target/riscv: Mark amo insns during translation

2022-04-01 Thread Richard Henderson
Atomic memory operations perform both reads and writes as part of their implementation, but always raise write faults. Use TARGET_INSN_START_EXTRA_WORDS to mark amo insns in the opcode stream, and force the access type to write at the point of raising the exception. Signed-off-by: Richard Henders

Re: [PATCH v2] tests/migration: Introduce dirty-ring-size option into guestperf

2022-04-01 Thread Hyman Huang
Hi, Daniel. Sorry to bother you, but i have a request of you. I'm posting a simple patch of Qemu guestperf test to support dirty ring migration test. I'm very pleased if you could spare some time to review it and even give some advices. Yong 在 2022/3/16 21:39, huang...@chinatelecom.cn

Re: [RFC PATCH 0/4] hw/i2c: i2c slave mode support

2022-04-01 Thread Corey Minyard
On Fri, Apr 01, 2022 at 08:29:03AM +0200, Klaus Jensen wrote: > On Mar 31 15:32, Corey Minyard wrote: > > On Thu, Mar 31, 2022 at 06:57:33PM +0200, Klaus Jensen wrote: > > > From: Klaus Jensen > > > > > > Hi all, > > > > > > This RFC series adds I2C "slave mode" support for the Aspeed I2C > > >

Re: use of uninitialized variable involving visit_type_uint32() and friends

2022-04-01 Thread Markus Armbruster
Paolo Bonzini writes: > On 4/1/22 11:15, Markus Armbruster wrote: >> +assert (v->type == expected_type); >> +if (expected_type & (VISITOR_INPUT | VISITOR_DEALLOC)) { >> >> Backwards. > > Yes, I always get input vs output wrong. Output becomes input becomes output. How not to be con

Re: [PATCH v5 0/9] Add support for AST1030 SoC

2022-04-01 Thread Cédric Le Goater
On 4/1/22 11:47, Jamin Lin wrote: Hi Cedric, One more question, what is the progress about SFDP patch, https://patchwork.kernel.org/project/qemu-devel/list/?series=342081&archive=both We need these patches for future SPI support. Francisco had comments I didn't have time to address. Theses wer

Re: [PATCH] target/riscv: Fix incorrect PTE merge in walk_pte

2022-04-01 Thread Richard Henderson
On 4/1/22 06:22, Ralf Ramsauer wrote: Two non-subsequent PTEs can be mapped to subsequent paddrs. In this case, walk_pte will erroneously merge them. Enforce the split up, by tracking the virtual base address. Let's say we have the mapping: 0x8120 -> 0x89623000 (4K) 0x8120f000 -> 0x89624000

Re: [PATCH v2 4/7] util: add qemu-co-timeout

2022-04-01 Thread Hanna Reitz
On 01.04.22 11:19, Vladimir Sementsov-Ogievskiy wrote: Add new API, to make a time limited call of the coroutine. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/qemu/coroutine.h | 13 ++ util/meson.build | 1 + util/qemu-co-timeout.c | 89

Re: [PATCH v2 5/7] block/block-copy: block_copy(): add timeout_ns parameter

2022-04-01 Thread Hanna Reitz
On 01.04.22 11:19, Vladimir Sementsov-Ogievskiy wrote: Add possibility to limit block_copy() call in time. To be used in the next commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/block-copy.c | 26 +++--- block/copy-before-write.c | 2 +- include/b

  1   2   3   >