Re: [PATCH v6 resend 0/4] add generic vDPA device support

2022-05-31 Thread Jason Wang
On Mon, May 30, 2022 at 12:16 PM Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: > > Hi guys, > > Ping...Any other comments? Will go through this and try to provide some acks soon. Thanks > > 在 2022/5/14 12:11, Longpeng(Mike) 写道: > > From: Longpeng > > > > Hi guys, > > > > W

Re: [PATCH v2] net: fix multicast support with BSD (macOS) socket implementations

2022-05-31 Thread Jason Wang
On Wed, May 18, 2022 at 3:40 PM Vitaly Cheptsov wrote: > Hi Vitaly: We need a changelog to describe why we need this. Thanks > Cc: Jason Wang > Cc: Daniel P. Berrange > Cc: Philippe Mathieu-Daudé > Signed-off-by: Vitaly Cheptsov > --- > net/socket.c | 18 ++ > 1 file chang

Re: [PATCH 5/8] pci/pci_expander_bridge: For CXL HB delay the HB register memory region setup.

2022-05-31 Thread Paolo Bonzini
On 5/30/22 15:45, Jonathan Cameron via wrote: +/* Walk the pci busses looking for pxb busses to hook up */ +if (bus) { +QLIST_FOREACH(bus, &bus->child, sibling) { +if (!pci_bus_is_root(bus)) { +continue; +} +if (pci_bus_is_cxl(bu

Re: [PATCH 1/8] hw/cxl: Make the CXL fixed memory window setup a machine parameter.

2022-05-31 Thread Paolo Bonzini
On 5/30/22 15:45, Jonathan Cameron via wrote: +object_property_add(obj, "cxl-fmw", "CXLFixedMemoryWindow", +machine_get_cfmw, machine_set_cfmw, +NULL, state); +object_property_set_description(obj, "cxl-fmw", +

Re: [PATCH v2 14/25] hw/sd: Basis for eMMC support

2022-05-31 Thread Philippe Mathieu-Daudé via
On 30/5/22 21:38, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé I missed something during the cherry-pick, this should be: From: Cédric Le Goater The initial eMMC support from Vincent Palatin was largely reworked to match the current SD framework. Signed-off-by: Cédric Le Goa

Re: [PATCH v2 00/25] hw/sd: Rework models for eMMC support

2022-05-31 Thread Philippe Mathieu-Daudé via
On 31/5/22 08:31, Cédric Le Goater wrote: On 5/30/22 21:37, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé Rebase/respin of Cédric RFC: https://lore.kernel.org/qemu-devel/20220318132824.1134400-1-...@kaod.org/ (sorry it took me so long guys...) Pushed at https://gitlab.com/philmd/

Re: [PATCH v2 00/25] hw/sd: Rework models for eMMC support

2022-05-31 Thread Philippe Mathieu-Daudé via
On Tue, May 31, 2022 at 9:56 AM Philippe Mathieu-Daudé wrote: > On 31/5/22 08:31, Cédric Le Goater wrote: > > On 5/30/22 21:37, Philippe Mathieu-Daudé wrote: > >> I plan to queue patches 1-12 via sdmmc-next later this week. > >> > >> Cédric, if you are happy with this series, it should be easy to

Re: [RFC PATCH v5 0/3] Sysbus device generic QAPI plug support

2022-05-31 Thread Mark Cave-Ayland
On 30/05/2022 15:05, Damien Hedde wrote: On 5/30/22 12:25, Peter Maydell wrote: On Mon, 30 May 2022 at 10:50, Damien Hedde wrote: TYPE_SYS_BUS_DEVICE also comes with reset support. If a device is on not on any bus it is not reached by the root sysbus reset which propagates to every device (an

Re: [PATCH v2 03/25] hw/sd: When card is in wrong state, log which spec version is used

2022-05-31 Thread Cédric Le Goater
On 5/30/22 21:37, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé Add the sd_version_str() helper. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater --- hw/sd/sd.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/hw/s

Re: [PATCH v5 10/17] target/m68k: Implement TRAPcc

2022-05-31 Thread Laurent Vivier
Le 27/05/2022 à 18:48, Richard Henderson a écrit : Resolves: https://gitlab.com/qemu-project/qemu/-/issues/754 Reviewed-by: Laurent Vivier Signed-off-by: Richard Henderson --- target/m68k/cpu.h | 2 ++ linux-user/m68k/cpu_loop.c | 1 + target/m68k/cpu.c | 1 + target/m

Re: [PATCH v2 13/25] hw/sd: Add sd_cmd_SET_BLOCK_COUNT() handler

2022-05-31 Thread Cédric Le Goater
On 5/30/22 21:38, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater --- hw/sd/sd.c | 30 -- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c

Re: [PATCH 4/4] target/mips: Do not treat msa INSERT as NOP when wd is zero

2022-05-31 Thread Philippe Mathieu-Daudé via
On 3/5/22 15:07, nihui wrote: From: Ni Hui Only for msa COPY_U/COPY_S with wd zero, we treat it as NOP. Move this special rule into COPY_U and COPY_S trans function. Fixes: 97fe675519 ("target/mips: Convert MSA COPY_S and INSERT opcodes to decodetree") Reviewed-by: Philippe Mathieu-Daudé

Re: [RFC PATCH 11/17] hw/sd: Add eMMC support

2022-05-31 Thread Philippe Mathieu-Daudé via
On 31/5/22 07:58, Cédric Le Goater wrote: On 5/30/22 19:40, Philippe Mathieu-Daudé wrote: On 18/3/22 14:28, Cédric Le Goater wrote: The initial eMMC support from Vincent Palatin was largely reworked to match the current SD framework. The parameters mimick a real 4GB eMMC, but it can be set to v

[PATCH] qtest/npcm7xx_pwm-test: Fix memory leak in mft_qom_set

2022-05-31 Thread Miaoqian Lin
g_strdup_printf() allocated memory for path, we should free it with g_free() when no longer needed. Signed-off-by: Miaoqian Lin --- tests/qtest/npcm7xx_pwm-test.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qtest/npcm7xx_pwm-test.c b/tests/qtest/npcm7xx_pwm-test.c index c4a5fdca

Re: CTU CAN FD IP core SocketCAN driver - success with mainine Linux kernel and mainline QEMU builds

2022-05-31 Thread Philippe Mathieu-Daudé via
On 27/5/22 21:19, Pavel Pisa wrote: Hello everybody, I want to report successful build and test of the CTU CAN FD driver from actual Linux kernel mainline GIT on actual QEMU build from mainline git. Test on HW from net-next has been repeatedly run by Matej Vasilevski during his timestamping patc

Re: [PATCH] tests/Makefile.include: Fix 'make check-help' output

2022-05-31 Thread Philippe Mathieu-Daudé via
On 27/5/22 17:30, Dario Faggioli wrote: Since commit 3d2f73ef75e ("build: use "meson test" as the test harness"), check-report.tap is no more, and we have check-report.junit.xml. Update the output of 'make check-help', which was still listing 'check-report.tap', accordingly. Fixes: 3d2f73ef75e

Re: [RFC PATCH 11/17] hw/sd: Add eMMC support

2022-05-31 Thread Cédric Le Goater
On 5/31/22 10:03, Philippe Mathieu-Daudé wrote: On 31/5/22 07:58, Cédric Le Goater wrote: On 5/30/22 19:40, Philippe Mathieu-Daudé wrote: On 18/3/22 14:28, Cédric Le Goater wrote: The initial eMMC support from Vincent Palatin was largely reworked to match the current SD framework. The paramete

Re: [PATCH v5] tests/qtest: add qtests for npcm7xx sdhci

2022-05-31 Thread Philippe Mathieu-Daudé via
On 26/5/22 18:21, Patrick Venture wrote: On Thu, May 26, 2022 at 8:54 AM Peter Maydell > wrote: On Fri, 25 Feb 2022 at 17:45, Hao Wu mailto:wuhao...@google.com>> wrote: > > From: Shengtan Mao mailto:st...@google.com>> > > Reviewed-by: Hao

Re: -blockdev vs -snapshot bug

2022-05-31 Thread Philippe Mathieu-Daudé via
Cc'ing qemu-block@ On 13/5/22 20:54, Michael Tokarev wrote: Hi! Now here's something.. interesting. I tested -blockdev here with a real image.  This way: qemu-system-x86_64 ... -snapshot \  -blockdev qcow2,node-name=q,file.driver=file,file.filename=w.qcow2 \  -device ide-hd,drive=q I alway

Re: KVM call for 2022-05-31

2022-05-31 Thread Juan Quintela
Juan Quintela wrote: > Hi Hi As there are no topics on the agenda, call gets cancelled. Happy hacking, Juan. > Please, send any topic that you are interested in covering. > > At the end of Monday I will send an email with the agenda or the > cancellation of the call, so hurry up. > > After di

Re: -blockdev vs -snapshot bug

2022-05-31 Thread Michael Tokarev
31.05.2022 11:30, Philippe Mathieu-Daudé wrote: Cc'ing qemu-block@ FWIW, it is https://bugs.launchpad.net/qemu/+bug/1860759 - I found that one after asking on the qemu ML. Thanks, /mjt

Re: [PATCH v2 22/25] hw/sd: Add sd_emmc_cmd_SEND_EXT_CSD() handler

2022-05-31 Thread Cédric Le Goater
On 5/30/22 21:38, Philippe Mathieu-Daudé wrote: From: Cédric Le Goater The parameters mimick a real 4GB eMMC, but it can be set to various sizes. Initially from Vincent Palatin Signed-off-by: Cédric Le Goater [PMD: Remove CMD8 (SEND_EXT_CSD) case in sd_read_byte()] AFAICT and from the test

Re: [PATCH v2 14/25] hw/sd: Basis for eMMC support

2022-05-31 Thread Cédric Le Goater
On 5/30/22 21:38, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé The initial eMMC support from Vincent Palatin was largely reworked to match the current SD framework. Signed-off-by: Cédric Le Goater Signed-off-by: Philippe Mathieu-Daudé --- TODO: Do not inherit TYPE_SD_CARD, dupl

[PATCH v5] Use io_uring_register_ring_fd() to skip fd operations

2022-05-31 Thread Sam Li
Linux recently added a new io_uring(7) optimization API that QEMU doesn't take advantage of yet. The liburing library that QEMU uses has added a corresponding new API calling io_uring_register_ring_fd(). When this API is called after creating the ring, the io_uring_submit() library function passes

[Bug 1860759] Re: [REGRESSION] option `-snapshot` ignored with blockdev

2022-05-31 Thread Michael Tokarev
Internal implementation details aside, from the user PoV it is a *very* serious issue. If -snapshot can't be applied automatically, maybe qemu should warn or better fail if -snapshot is used together with -blockdev. -- You received this bug notification because you are a member of qemu- devel-ml,

Re: [PATCH v6 resend 0/4] add generic vDPA device support

2022-05-31 Thread Jason Wang
On Mon, May 30, 2022 at 12:16 PM Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: > > Hi guys, > > Ping...Any other comments? Looks good to me. Acked-by: Jason Wang (This probably requires a rebase since it doesn't apply cleanly on master). Thanks > > 在 2022/5/14 12:11, Lon

Re: [PATCH v2 14/25] hw/sd: Basis for eMMC support

2022-05-31 Thread Cédric Le Goater
On 5/30/22 21:38, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé The initial eMMC support from Vincent Palatin was largely reworked to match the current SD framework. Signed-off-by: Cédric Le Goater Signed-off-by: Philippe Mathieu-Daudé --- TODO: Do not inherit TYPE_SD_CARD, dupl

Re: [PATCH] target/mips: Fix WatchHi.M handling

2022-05-31 Thread Philippe Mathieu-Daudé via
On 11/5/22 23:29, Philippe Mathieu-Daudé wrote: From: Marcin Nowakowski bit 31 (M) of WatchHiN register is a read-only register indicating whether the next WatchHi register is present. It must not be reset during user writes to the register. Signed-off-by: Marcin Nowakowski Reviewed-by: David

Re: [PATCH v2 00/25] hw/sd: Rework models for eMMC support

2022-05-31 Thread Cédric Le Goater
On 5/30/22 21:37, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé Rebase/respin of Cédric RFC: https://lore.kernel.org/qemu-devel/20220318132824.1134400-1-...@kaod.org/ (sorry it took me so long guys...) Pushed at https://gitlab.com/philmd/qemu/-/commits/emmc-v2 I plan to queue pat

Re: [RFC PATCH v5 0/3] Sysbus device generic QAPI plug support

2022-05-31 Thread Damien Hedde
On 5/31/22 10:00, Mark Cave-Ayland wrote: On 30/05/2022 15:05, Damien Hedde wrote: On 5/30/22 12:25, Peter Maydell wrote: On Mon, 30 May 2022 at 10:50, Damien Hedde wrote: TYPE_SYS_BUS_DEVICE also comes with reset support. If a device is on not on any bus it is not reached by the root sys

[PATCH] pci: fix overflow in printf string formatting

2022-05-31 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- hw/pci/pci.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index a9b37f8000..6e7015329c 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -2640,15 +2640,15 @@ static char *pci_dev_fw_name(DeviceS

Re: QEMU malfunctioning if built with FORTIFY_SOURCE=3

2022-05-31 Thread Claudio Fontana
On 5/27/22 18:55, Dario Faggioli wrote: > Hello Everyone! > > So, I'm not sure how much this would be interesting, but I thought > about reporting it anyways, then let's see. > > A few days ago we started to build openSUSE_Tumbleweed packages with > -D_FORTIFY_SOURCES=3 by default (it was =2 befo

Re: [PATCH RFC 0/2] arm: enable MTE for QEMU + kvm

2022-05-31 Thread Cornelia Huck
Friendly ping :) On Thu, May 12 2022, Cornelia Huck wrote: > This series enables MTE for kvm guests, if the kernel supports it. > Lightly tested while running under the simulator (the arm64/mte/ > kselftests pass... if you wait patiently :) > > A new cpu property "mte" (defaulting to on if possi

[PATCH] pci: fix overflow in printf string formatting

2022-05-31 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- hw/pci/pci.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index a9b37f8000..6e7015329c 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -2640,15 +2640,15 @@ static char *pci_dev_fw_name(DeviceS

Re: [PATCH] vfio/common: remove spurious warning on vfio_listener_region_del

2022-05-31 Thread Cornelia Huck
On Tue, May 24 2022, Eric Auger wrote: > 851d6d1a0f ("vfio/common: remove spurious tpm-crb-cmd misalignment > warning") removed the warning on vfio_listener_region_add() path. > > However the same warning also hits on region_del path. Let's remove > it and reword the dynamic trace as this can be

Re: [PATCH] pci: fix overflow in printf string formatting

2022-05-31 Thread Peter Maydell
On Tue, 31 May 2022 at 10:34, Claudio Fontana wrote: > > Signed-off-by: Claudio Fontana It would be helpful to note in the commit message how bad the overflow is, in what situations it can happen, and how it was detected. thanks -- PMM

[PATCH v2] vduse-blk: Add name option

2022-05-31 Thread Xie Yongji
Currently we use 'id' option as the name of VDUSE device. It's a bit confusing since we use one value for two different purposes: the ID to identfy the export within QEMU (must be distinct from any other exports in the same QEMU process, but can overlap with names used by other processes), and the

Re: [PATCH v6 resend 0/4] add generic vDPA device support

2022-05-31 Thread longpeng2--- via
在 2022/5/31 16:50, Jason Wang 写道: On Mon, May 30, 2022 at 12:16 PM Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: Hi guys, Ping...Any other comments? Looks good to me. Acked-by: Jason Wang (This probably requires a rebase since it doesn't apply cleanly on master).

Re: [PATCH] pci: fix overflow in printf string formatting

2022-05-31 Thread Claudio Fontana
On 5/31/22 11:47, Peter Maydell wrote: > On Tue, 31 May 2022 at 10:34, Claudio Fontana wrote: >> >> Signed-off-by: Claudio Fontana > > It would be helpful to note in the commit message how > bad the overflow is, in what situations it can happen, > and how it was detected. > > thanks > -- PMM H

Re: [PATCH] hw/sd/sdhci: Block Size Register bits [14:12] is lost

2022-05-31 Thread Philippe Mathieu-Daudé via
On 21/3/22 06:56, Lu Gao wrote: Block Size Register bits [14:12] is SDMA Buffer Boundary, it is missed in register write, but it is needed in SDMA transfer. e.g. it will be used in sdhci_sdma_transfer_multi_blocks to calculate boundary_ variables. Missing this field will cause wrong operation fo

Re: [PATCH] pci: fix overflow in printf string formatting

2022-05-31 Thread Claudio Fontana
On 5/31/22 11:55, Claudio Fontana wrote: > On 5/31/22 11:47, Peter Maydell wrote: >> On Tue, 31 May 2022 at 10:34, Claudio Fontana wrote: >>> >>> Signed-off-by: Claudio Fontana >> >> It would be helpful to note in the commit message how >> bad the overflow is, in what situations it can happen, >>

Re: [PATCH] target/i386: Fix wrong count setting

2022-05-31 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH v5] Use io_uring_register_ring_fd() to skip fd operations

2022-05-31 Thread Stefan Hajnoczi
On Tue, 31 May 2022 at 09:49, Sam Li wrote: > > Linux recently added a new io_uring(7) optimization API that QEMU > doesn't take advantage of yet. The liburing library that QEMU uses > has added a corresponding new API calling io_uring_register_ring_fd(). > When this API is called after creating t

Re: [RESEND PATCH 0/2] modules: Improve modinfo.c support

2022-05-31 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH] pci: fix overflow in printf string formatting

2022-05-31 Thread Paolo Bonzini
On 5/31/22 11:25, Claudio Fontana wrote: Signed-off-by: Claudio Fontana --- hw/pci/pci.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index a9b37f8000..6e7015329c 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -2640,15 +26

Re: [PATCH v5 05/10] cutils: add functions for IEC and SI prefixes

2022-05-31 Thread Paolo Bonzini
On 5/30/22 23:59, Philippe Mathieu-Daudé via wrote: +    assert(exp10 % 3 == 0 && exp10 / 3 < ARRAY_SIZE(prefixes)); Can we add parenthesis to ease code review? I'm not sure where... I thought about using two asserts too, but checking both % and / seems clear enough. Paolo

[PATCH v7 02/13] multifd: Create page_size fields into both MultiFD{Recv, Send}Params

2022-05-31 Thread Juan Quintela
We were calling qemu_target_page_size() left and right. Signed-off-by: Juan Quintela --- migration/multifd.h | 4 migration/multifd-zlib.c | 12 +--- migration/multifd-zstd.c | 12 +--- migration/multifd.c | 18 -- 4 files changed, 22 insertions(+)

[PATCH v7 01/13] multifd: Document the locking of MultiFD{Send/Recv}Params

2022-05-31 Thread Juan Quintela
Reorder the structures so we can know if the fields are: - Read only - Their own locking (i.e. sems) - Protected by 'mutex' - Only for the multifd channel Signed-off-by: Juan Quintela --- migration/multifd.h | 90 ++--- 1 file changed, 53 insertions(+), 37

[PATCH v7 00/13] Migration: Transmit and detect zero pages in the multifd threads

2022-05-31 Thread Juan Quintela
This version: - rebase on upstream - changes due to zero copy leonardo changes. - fix minor spell typos. Please, review. [v6] In this version: - document what protects each field in MultiFDRecv/SendParams - calcule page_size once when we start the migration, and store it in a field - Same for p

[PATCH v7 03/13] multifd: Create page_count fields into both MultiFD{Recv, Send}Params

2022-05-31 Thread Juan Quintela
We were recalculating it left and right. We plan to change that values on next patches. Signed-off-by: Juan Quintela --- migration/multifd.h | 4 migration/multifd.c | 7 --- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/migration/multifd.h b/migration/multifd.h index

[PATCH v7 10/13] migration: Export ram_release_page()

2022-05-31 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/ram.h | 1 + migration/ram.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/migration/ram.h b/migration/ram.h index 7b641adc55..aee08de2a5 100644 --- a/migration/ram.h +++ b/migration/ram.h @@ -66,6 +66,7 @@ int ram_load_postcopy(Q

[PATCH v7 05/13] multifd: Count the number of bytes sent correctly

2022-05-31 Thread Juan Quintela
Current code asumes that all pages are whole. That is not true for example for compression already. Fix it for creating a new field ->sent_bytes that includes it. All ram_counters are used only from the migration thread, so we have two options: - put a mutex and fill everything when we sent it (

[PATCH v7 04/13] migration: Export ram_transferred_ram()

2022-05-31 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/ram.h | 2 ++ migration/ram.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/migration/ram.h b/migration/ram.h index ded0a3a086..7b641adc55 100644 --- a/migration/ram.h +++ b/migration/ram.h @@ -65,6 +65,8 @@ int ram_load_postcopy(

[PATCH v7 12/13] multifd: Zero pages transmission

2022-05-31 Thread Juan Quintela
This implements the zero page dection and handling. Signed-off-by: Juan Quintela --- Add comment for offset (dave) Use local variables for offset/block to have shorter lines --- migration/multifd.h | 5 + migration/multifd.c | 41 +++-- 2 files changed,

[PATCH v7 06/13] migration: Make ram_save_target_page() a pointer

2022-05-31 Thread Juan Quintela
We are going to create a new function for multifd latest in the series. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/ram.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 30b0680942..71506

[PATCH v7 07/13] multifd: Make flags field thread local

2022-05-31 Thread Juan Quintela
Use of flags with respect to locking was incensistant. For the sending side: - it was set to 0 with mutex held on the multifd channel. - MULTIFD_FLAG_SYNC was set with mutex held on the migration thread. - Everything else was done without the mutex held on the multifd channel. On the reception si

[PATCH v7 09/13] multifd: Add property to enable/disable zero_page

2022-05-31 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/migration.h | 3 +++ hw/core/machine.c | 1 + migration/migration.c | 11 +++ 3 files changed, 15 insertions(+) diff --git a/migration/migration.h b/migration/migration.h index 485d58b95f..1017c1bf4a 10

[PATCH v7 08/13] multifd: Prepare to send a packet without the mutex held

2022-05-31 Thread Juan Quintela
We do the send_prepare() and the fill of the head packet without the mutex held. It will help a lot for compression and later in the series for zero pages. Notice that we can use p->pages without holding p->mutex because p->pending_job == 1. Signed-off-by: Juan Quintela --- migration/multifd.h

[PATCH v7 13/13] migration: Use multifd before we check for the zero page

2022-05-31 Thread Juan Quintela
So we use multifd to transmit zero pages. Signed-off-by: Juan Quintela --- - Check zero_page property before using new code (Dave) --- migration/ram.c | 33 - 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/migration/ram.c b/migration/ram.c index 7

Re: [PATCH] hw/nvme: add new command abort case

2022-05-31 Thread Klaus Jensen
On Apr 20 14:48, Klaus Jensen wrote: > On Apr 20 15:31, Dmitry Tikhov wrote: > > On Wed, Apr 20, 2022 at 12:54:44, Klaus Jensen wrote: > > > > > > NVM Command Set Specification v1.0b, Section 5.2.3. It is exactly what > > > you quoted above. > > > > > > I think you are interpreting > > > > > >

[PATCH v7 11/13] multifd: Support for zero pages transmission

2022-05-31 Thread Juan Quintela
This patch adds counters and similar. Logic will be added on the following patch. Signed-off-by: Juan Quintela --- Added counters for duplicated/non duplicated pages. Removed reviewed by from David. Add total_zero_pages --- migration/multifd.h| 17 - migration/multifd.c

[PATCH v6] Use io_uring_register_ring_fd() to skip fd operations

2022-05-31 Thread Sam Li
Linux recently added a new io_uring(7) optimization API that QEMU doesn't take advantage of yet. The liburing library that QEMU uses has added a corresponding new API calling io_uring_register_ring_fd(). When this API is called after creating the ring, the io_uring_submit() library function passes

Re: [PATCH v2] net: fix multicast support with BSD (macOS) socket implementations

2022-05-31 Thread Vitaly Cheptsov
Hi Jason, This patch fixes socket communication with QEMU -> host and QEMU <--> QEMU on macOS, which was originally impossible due to QEMU and host program having to bind to the same ip/port in a way not supported by BSD sockets. The change was tested on both Linux and macOS. Basically after a

Re: [PATCH v6] Use io_uring_register_ring_fd() to skip fd operations

2022-05-31 Thread Stefan Hajnoczi
On Tue, May 31, 2022 at 06:50:11PM +0800, Sam Li wrote: > Linux recently added a new io_uring(7) optimization API that QEMU > doesn't take advantage of yet. The liburing library that QEMU uses > has added a corresponding new API calling io_uring_register_ring_fd(). > When this API is called after c

Re: [PATCH] hw/nvme: add new command abort case

2022-05-31 Thread Klaus Jensen
On May 31 13:13, Klaus Jensen wrote: > On Apr 20 14:48, Klaus Jensen wrote: > > On Apr 20 15:31, Dmitry Tikhov wrote: > > > On Wed, Apr 20, 2022 at 12:54:44, Klaus Jensen wrote: > > > > > > > > NVM Command Set Specification v1.0b, Section 5.2.3. It is exactly what > > > > you quoted above. > > > >

Re: [PATCH v6] Use io_uring_register_ring_fd() to skip fd operations

2022-05-31 Thread Sam Li
Stefan Hajnoczi 于2022年5月31日周二 19:31写道: > > On Tue, May 31, 2022 at 06:50:11PM +0800, Sam Li wrote: > > Linux recently added a new io_uring(7) optimization API that QEMU > > doesn't take advantage of yet. The liburing library that QEMU uses > > has added a corresponding new API calling io_uring_reg

[PATCH] target/arm: Declare support for FEAT_RASv1p1

2022-05-31 Thread Peter Maydell
The architectural feature RASv1p1 introduces the following new features: * new registers ERXPFGCDN_EL1, ERXPFGCTL_EL1 and ERXPFGF_EL1 * new bits in the fine-grained trap registers that control traps for these new registers * new trap bits HCR_EL2.FIEN and SCR_EL3.FIEN that control traps fo

[PATCH] pci: fix overflow in snprintf string formatting

2022-05-31 Thread Claudio Fontana
the code in pcibus_get_fw_dev_path contained the potential for a stack buffer overflow of 1 byte, potentially writing to the stack an extra NUL byte. This overflow could happen if the PCI slot is >= 0x1000, and the PCI function is >= 0x1000, due to the size parameter of snprintf being inco

Re: [PATCH v6] Use io_uring_register_ring_fd() to skip fd operations

2022-05-31 Thread Stefan Hajnoczi
On Tue, 31 May 2022 at 12:34, Sam Li wrote: > > Stefan Hajnoczi 于2022年5月31日周二 19:31写道: > > > > On Tue, May 31, 2022 at 06:50:11PM +0800, Sam Li wrote: > > > Linux recently added a new io_uring(7) optimization API that QEMU > > > doesn't take advantage of yet. The liburing library that QEMU uses >

Re: [PATCH 05/18] target/arm: Move arm_singlestep_active out of line

2022-05-31 Thread Peter Maydell
On Mon, 23 May 2022 at 21:53, Richard Henderson wrote: > > Move the function to debug_helper.c, and the > declaration to internals.h. > > Signed-off-by: Richard Henderson > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH 06/18] target/arm: Move arm_generate_debug_exceptions out of line

2022-05-31 Thread Peter Maydell
On Mon, 23 May 2022 at 21:53, Richard Henderson wrote: > > Move arm_generate_debug_exceptions and its two subroutines, > {aa32,aa64}_generate_debug_exceptions into debug_helper.c, > and the one interface declaration to internals.h. > > Signed-off-by: Richard Henderson > --- Reviewed-by: Peter Ma

Re: [PATCH 07/18] target/arm: Hoist arm_current_el in arm_generate_debug_exceptions

2022-05-31 Thread Peter Maydell
On Mon, 23 May 2022 at 21:58, Richard Henderson wrote: > > Read this value once in the main function, and pass it > around between the subroutines. > > Signed-off-by: Richard Henderson > --- What's the benefit from doing this ? thanks -- PMM

Re: [PATCH 08/18] target/arm: Use is_a64 in arm_generate_debug_exceptions

2022-05-31 Thread Peter Maydell
On Mon, 23 May 2022 at 21:59, Richard Henderson wrote: > > Use the accessor rather than the raw structure member. > > Signed-off-by: Richard Henderson > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH 11/18] target/arm: Move arm_debug_target_el to internals.h

2022-05-31 Thread Peter Maydell
On Mon, 23 May 2022 at 22:05, Richard Henderson wrote: > > This function is private to the implementation. > > Signed-off-by: Richard Henderson > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH 14/18] target/arm: Mark exception helpers as noreturn

2022-05-31 Thread Peter Maydell
On Mon, 23 May 2022 at 22:06, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v3 01/15] target/arm: Rename TBFLAG_A64 ZCR_LEN to SVE_LEN

2022-05-31 Thread Peter Maydell
On Fri, 27 May 2022 at 19:06, Richard Henderson wrote: > > With SME, the vector length does not only come from ZCR_ELx. > Comment that this is either the SVE VL, or the Streaming SVE VL. > > Signed-off-by: Richard Henderson > -- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v3 02/15] linux-user/aarch64: Use SVE_LEN from hflags

2022-05-31 Thread Peter Maydell
On Fri, 27 May 2022 at 19:07, Richard Henderson wrote: > > Use the digested vector length rather than the raw zcr_el[1] value. > > This fixes an incorrect return from do_prctl_set_vl where we didn't > take into account the set of vector lengths supported by the cpu. > It also prepares us for Strea

Re: [PATCH 17/18] target/arm: Add cur_el parameter to arm_generate_debug_exceptions

2022-05-31 Thread Peter Maydell
On Mon, 23 May 2022 at 22:07, Richard Henderson wrote: > > We often have this value already handy in the caller. > > Signed-off-by: Richard Henderson True, but it makes the function clunkier to use. Does it really make a noticeable difference to performance ? thanks -- PMM

Re: [PATCH v3 03/15] target/arm: Do not use aarch64_sve_zcr_get_valid_len in reset

2022-05-31 Thread Peter Maydell
On Fri, 27 May 2022 at 19:07, Richard Henderson wrote: > > We don't need to constrain the value set in zcr_el[1], > because it will be done by sve_zcr_len_for_el. > > Signed-off-by: Richard Henderson > --- > target/arm/cpu.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --gi

Re: [PATCH v3 08/15] target/arm: Add el_is_in_host

2022-05-31 Thread Peter Maydell
On Fri, 27 May 2022 at 19:18, Richard Henderson wrote: > > This (newish) ARM pseudocode function is easier to work with > than open-coded tests for HCR_E2H etc. Use of the function > will be staged into the code base in parts. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell tha

RE: RE: [PATCH v8 1/1] crypto: Introduce RSA algorithm

2022-05-31 Thread Gonglei (Arei)
> -Original Message- > From: zhenwei pi [mailto:pizhen...@bytedance.com] > Sent: Tuesday, May 31, 2022 9:48 AM > To: Gonglei (Arei) > Cc: qemu-devel@nongnu.org; m...@redhat.com; > virtualizat...@lists.linux-foundation.org; helei.si...@bytedance.com; > berra...@redhat.com > Subject: Re: R

Re: [PATCH v3 13/15] target/arm: Use expand_pred_b in mve_helper.c

2022-05-31 Thread Peter Maydell
On Fri, 27 May 2022 at 19:14, Richard Henderson wrote: > > Use the function instead of the array directly. > > Because the function performs its own masking, via the uint8_t > parameter, we need to nothing extra within the users: the bits "to do" > above the first 2 (_uh) or 4 (_uw) will be disc

Re: [PATCH v3 09/15] target/arm: Use el_is_in_host for sve_vqm1_for_el

2022-05-31 Thread Peter Maydell
On Fri, 27 May 2022 at 19:13, Richard Henderson wrote: > > The ARM pseudocode function NVL uses this predicate now, > and I think it's a bit clearer. Simplify the pseudocode > condition by noting that IsInHost is always false for EL1. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Mayd

Re: [PATCH v3 06/15] target/arm: Rename sve_zcr_len_for_el to sve_vqm1_for_el

2022-05-31 Thread Peter Maydell
On Fri, 27 May 2022 at 19:11, Richard Henderson wrote: > > This will be used for both Normal and Streaming SVE, and the value > does not necessarily come from ZCR_ELx. While we're at it, emphasize > the units in which the value is returned. > > Patch produced by > git grep -l sve_zcr_len_for_

Re: [PATCH] pci: fix overflow in snprintf string formatting

2022-05-31 Thread Ani Sinha
On Tue, May 31, 2022 at 5:20 PM Claudio Fontana wrote: > > the code in pcibus_get_fw_dev_path contained the potential for a > stack buffer overflow of 1 byte, potentially writing to the stack an > extra NUL byte. > > This overflow could happen if the PCI slot is >= 0x1000, > and the PCI functi

Re: [PATCH 2/5] bios-tables-test: teach test to use smbios 3.0 tables

2022-05-31 Thread Julia Suvorova
On Mon, May 30, 2022 at 8:11 AM Ani Sinha wrote: > > On Fri, May 27, 2022 at 10:27 PM Julia Suvorova wrote: > > > > Introduce the 64-bit entry point. Since we no longer have a total > > number of structures, stop checking for the new ones at the EOF > > structure (type 127). > > > > Signed-off-by

Re: [PATCH v3 10/15] target/arm: Split out load/store primitives to sve_ldst_internal.h

2022-05-31 Thread Peter Maydell
On Fri, 27 May 2022 at 19:18, Richard Henderson wrote: > > Begin creation of sve_ldst_internal.h by moving the primitives > that access host and tlb memory. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH 4/5] bios-tables-test: add test for number of cores > 255

2022-05-31 Thread Julia Suvorova
On Sat, May 28, 2022 at 7:22 AM Ani Sinha wrote: > > > > On Fri, 27 May 2022, Julia Suvorova wrote: > > > The new test is run with a large number of cpus and checks if the > > core_count field in smbios_cpu_test (structure type 4) is correct. > > > > Choose q35 as it allows to run with -smp > 255.

Re: [PATCH 0/2] i386: fixup number of logical CPUs when host-cache-info=on

2022-05-31 Thread Igor Mammedov
Paolo, can you pick this up if it looks fine, please? On Tue, 24 May 2022 11:10:18 -0400 Igor Mammedov wrote: > Igor Mammedov (2): > x86: cpu: make sure number of addressable IDs for processor cores > meets the spec > x86: cpu: fixup number of addressable IDs for logical processors >

Re: [PATCH v3 14/15] target/arm: Move expand_pred_h to vec_internal.h

2022-05-31 Thread Peter Maydell
On Fri, 27 May 2022 at 19:17, Richard Henderson wrote: > > Move the data to vec_helper.c and the inline to vec_internal.h. > > Signed-off-by: Richard Henderson > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH 1/5] hw/smbios: add core_count2 to smbios table type 4

2022-05-31 Thread Julia Suvorova
On Sat, May 28, 2022 at 6:34 AM Ani Sinha wrote: > > > > On Fri, 27 May 2022, Julia Suvorova wrote: > > > In order to use the increased number of cpus, we need to bring smbios > > tables in line with the SMBIOS 3.0 specification. This allows us to > > introduce core_count2 which acts as a duplicat

Re: [PATCH] pci: fix overflow in snprintf string formatting

2022-05-31 Thread Claudio Fontana
On 5/31/22 14:26, Ani Sinha wrote: > On Tue, May 31, 2022 at 5:20 PM Claudio Fontana wrote: >> >> the code in pcibus_get_fw_dev_path contained the potential for a >> stack buffer overflow of 1 byte, potentially writing to the stack an >> extra NUL byte. >> >> This overflow could happen if the PCI

Re: [PATCH v3 11/15] target/arm: Export sve contiguous ldst support functions

2022-05-31 Thread Peter Maydell
On Fri, 27 May 2022 at 19:12, Richard Henderson wrote: > > Export all of the support functions for performing bulk > fault analysis on a set of elements at contiguous addresses > controlled by a predicate. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

[PATCH] hw/cxl: Fix missing write mask for HDM decoder target list registers

2022-05-31 Thread Jonathan Cameron via
Without being able to write these registers, no interleaving is possible. More refined checks of HDM register state on commit to follow. Signed-off-by: Jonathan Cameron --- hw/cxl/cxl-component-utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/cxl/cxl-component-utils.c b/hw/cxl/cx

Re: [PATCH v3 12/15] target/arm: Move expand_pred_b to vec_internal.h

2022-05-31 Thread Peter Maydell
On Fri, 27 May 2022 at 19:11, Richard Henderson wrote: > > Put the inline function near the array declaration. > > Signed-off-by: Richard Henderson > --- > target/arm/vec_internal.h | 8 +++- > target/arm/sve_helper.c | 9 - > 2 files changed, 7 insertions(+), 10 deletions(-) > > d

Re: [PATCH v3 15/15] target/arm: Export bfdotadd from vec_helper.c

2022-05-31 Thread Peter Maydell
On Fri, 27 May 2022 at 19:19, Richard Henderson wrote: > > We will need this over in sme_helper.c. > > Signed-off-by: Richard Henderson > --- > target/arm/vec_internal.h | 2 ++ > target/arm/vec_helper.c | 2 +- > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/target/arm/vec_

Re: [PATCH] pci: fix overflow in snprintf string formatting

2022-05-31 Thread Ani Sinha
On Tue, May 31, 2022 at 6:15 PM Claudio Fontana wrote: > > On 5/31/22 14:26, Ani Sinha wrote: > > On Tue, May 31, 2022 at 5:20 PM Claudio Fontana wrote: > >> > >> the code in pcibus_get_fw_dev_path contained the potential for a > >> stack buffer overflow of 1 byte, potentially writing to the stac

Re: [PATCH 7/7] target/mips: Undeprecate nanoMips ISA support in QEMU

2022-05-31 Thread Philippe Mathieu-Daudé via
Hi Stefan, On 4/5/22 13:04, Stefan Pejic wrote: nanoMips ISA support in QEMU is actively used by MediaTek and is planned to be maintained and potentially extended by MediaTek in future. Un-orphan nanoMips ISA support in QEMU by setting a mainainer from MediaTek and remove deprecation notes from

Re: [PATCH 4/5] bios-tables-test: add test for number of cores > 255

2022-05-31 Thread Ani Sinha
On Tue, May 31, 2022 at 5:53 PM Julia Suvorova wrote: > > On Sat, May 28, 2022 at 7:22 AM Ani Sinha wrote: > > > > > > > > On Fri, 27 May 2022, Julia Suvorova wrote: > > > > > The new test is run with a large number of cpus and checks if the > > > core_count field in smbios_cpu_test (structure ty

Re: [PATCH] pci: fix overflow in snprintf string formatting

2022-05-31 Thread Michael S. Tsirkin
On Tue, May 31, 2022 at 01:47:07PM +0200, Claudio Fontana wrote: > the code in pcibus_get_fw_dev_path contained the potential for a > stack buffer overflow of 1 byte, potentially writing to the stack an > extra NUL byte. > > This overflow could happen if the PCI slot is >= 0x1000, > and the PC

  1   2   >