Re: QMP (without OOB) function running in thread different from the main thread as part of aio_poll

2023-04-19 Thread Paolo Bonzini
Il gio 20 apr 2023, 08:11 Markus Armbruster ha scritto: > So, splicing in a bottom half unmoored monitor commands from the main > loop. We weren't aware of that, as our commit messages show. > > I guess the commands themselves don't care; all they need is the BQL. > > However, did we unwittingly

Re: QMP (without OOB) function running in thread different from the main thread as part of aio_poll

2023-04-19 Thread Markus Armbruster
Fiona Ebner writes: > Hi, > while debugging a completely different issue, I was surprised to see > do_qmp_dispatch_bh being run in a vCPU thread. I was under the > impression that QMP functions are supposed to be executed in the main > thread. Is that wrong? > > I managed to reproduced the scenar

Re: [PATCH v12] audio/pwaudio.c: Add Pipewire audio backend for QEMU

2023-04-19 Thread Volker Rümelin
This commit adds a new audiodev backend to allow QEMU to use Pipewire as both an audio sink and source. This backend is available on most systems Add Pipewire entry points for QEMU Pipewire audio backend Add wrappers for QEMU Pipewire audio backend in qpw_pcm_ops() qpw_write function returns the

[PATCH v2 13/41] net/eth: Rename eth_setup_vlan_headers_ex

2023-04-19 Thread Akihiko Odaki
The old eth_setup_vlan_headers has no user so remove it and rename eth_setup_vlan_headers_ex. Signed-off-by: Akihiko Odaki --- include/net/eth.h | 9 + hw/net/net_tx_pkt.c | 2 +- net/eth.c | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/include/net/et

[PATCH v2 14/41] e1000x: Share more Rx filtering logic

2023-04-19 Thread Akihiko Odaki
This saves some code and enables tracepoint for e1000's VLAN filtering. Signed-off-by: Akihiko Odaki Reviewed-by: Sriram Yagnaraman --- hw/net/e1000x_common.h | 4 +++- hw/net/e1000.c | 35 +-- hw/net/e1000e_core.c | 47 +---

[PATCH v2 16/41] e1000x: Rename TcpIpv6 into TcpIpv6Ex

2023-04-19 Thread Akihiko Odaki
e1000e and igb employs NetPktRssIpV6TcpEx for RSS hash if TcpIpv6 MRQC bit is set. Moreover, igb also has a MRQC bit for NetPktRssIpV6Tcp though it is not implemented yet. Rename it to TcpIpv6Ex to avoid confusion. Signed-off-by: Akihiko Odaki --- hw/net/e1000x_regs.h | 24 --

[PATCH v2 07/41] e1000e: Always copy ethernet header

2023-04-19 Thread Akihiko Odaki
e1000e_receive_internal() used to check the iov length to determine copy the iovs to a contiguous buffer, but the check is flawed in two ways: - It does not ensure that iovcnt > 0. - It does not take virtio-net header into consideration. The size of this copy is just 18 octets, which can be even l

[PATCH v2 11/41] tests/avocado: Remove test_igb_nomsi_kvm

2023-04-19 Thread Akihiko Odaki
It is unlikely to find more bugs with KVM so remove test_igb_nomsi_kvm to save time to run it. Signed-off-by: Akihiko Odaki --- tests/avocado/netdev-ethtool.py | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/tests/avocado/netdev-ethtool.py b/tests/avocado/netdev-

[PATCH v2 31/41] igb: Use UDP for RSS hash

2023-04-19 Thread Akihiko Odaki
e1000e does not support using UDP for RSS hash, but igb does. Signed-off-by: Akihiko Odaki --- hw/net/igb_regs.h | 3 +++ hw/net/igb_core.c | 16 2 files changed, 19 insertions(+) diff --git a/hw/net/igb_regs.h b/hw/net/igb_regs.h index eb995d8b2e..e6ac26dc0e 100644 --- a/hw/n

[PATCH v2 41/41] docs/system/devices/igb: Note igb is tested for DPDK

2023-04-19 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- docs/system/devices/igb.rst | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/system/devices/igb.rst b/docs/system/devices/igb.rst index afe036dad2..60c10bf7c7 100644 --- a/docs/system/devices/igb.rst +++ b/docs/system/devices/i

[PATCH v2 21/41] e1000e: Reset packet state after emptying Tx queue

2023-04-19 Thread Akihiko Odaki
Keeping Tx packet state after the transmit queue is emptied has some problems: - The datasheet says the descriptors can be reused after the transmit queue is emptied, but the Tx packet state may keep references to them. - The Tx packet state cannot be migrated so it can be reset anytime the mig

[PATCH v2 27/41] net/eth: Always add VLAN tag

2023-04-19 Thread Akihiko Odaki
It is possible to have another VLAN tag even if the packet is already tagged. Signed-off-by: Akihiko Odaki --- include/net/eth.h | 4 ++-- hw/net/net_tx_pkt.c | 16 +++- net/eth.c | 22 ++ 3 files changed, 15 insertions(+), 27 deletions(-) diff --git

[PATCH v2 22/41] vmxnet3: Reset packet state after emptying Tx queue

2023-04-19 Thread Akihiko Odaki
Keeping Tx packet state after the transmit queue is emptied but this behavior is unreliable as the state can be reset anytime the migration happens. Always reset Tx packet state always after the queue is emptied. Signed-off-by: Akihiko Odaki --- hw/net/vmxnet3.c | 3 ++- 1 file changed, 2 inser

[PATCH v2 36/41] igb: Implement igb-specific oversize check

2023-04-19 Thread Akihiko Odaki
igb has a configurable size limit for LPE, and uses different limits depending on whether the packet is treated as a VLAN packet. Signed-off-by: Akihiko Odaki --- hw/net/igb_core.c | 36 +--- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/hw/net/i

[PATCH v2 18/41] igb: Always log status after building rx metadata

2023-04-19 Thread Akihiko Odaki
Without this change, the status flags may not be traced e.g. if checksum offloading is disabled. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé --- hw/net/igb_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c ind

[PATCH v2 33/41] igb: Implement Tx SCTP CSO

2023-04-19 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- hw/net/net_tx_pkt.h | 8 hw/net/igb_core.c | 12 +++- hw/net/net_tx_pkt.c | 18 ++ 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/hw/net/net_tx_pkt.h b/hw/net/net_tx_pkt.h index f5cd44da6f..fc00d7941d 100644 ---

[PATCH v2 37/41] igb: Implement Rx PTP2 timestamp

2023-04-19 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- hw/net/igb_common.h | 16 +++--- hw/net/igb_regs.h | 23 hw/net/igb_core.c | 129 3 files changed, 127 insertions(+), 41 deletions(-) diff --git a/hw/net/igb_common.h b/hw/net/igb_common.h index f2a90657

[PATCH v2 19/41] igb: Remove goto

2023-04-19 Thread Akihiko Odaki
The goto is a bit confusing as it changes the control flow only if L4 protocol is not recognized. It is also different from e1000e, and noisy when comparing e1000e and igb. Signed-off-by: Akihiko Odaki Reviewed-by: Sriram Yagnaraman --- hw/net/igb_core.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH v2 39/41] vmxnet3: Do not depend on PC

2023-04-19 Thread Akihiko Odaki
vmxnet3 has no dependency on PC, and VMware Fusion actually makes it available on Apple Silicon according to: https://kb.vmware.com/s/article/90364 Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé --- hw/net/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

[PATCH v2 29/41] tests/qtest/libqos/igb: Set GPIE.Multiple_MSIX

2023-04-19 Thread Akihiko Odaki
GPIE.Multiple_MSIX is not set by default, and needs to be set to get interrupts from multiple MSI-X vectors. Signed-off-by: Akihiko Odaki --- tests/qtest/libqos/igb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/libqos/igb.c b/tests/qtest/libqos/igb.c index 12fb531bf0..a603468

[PATCH v2 40/41] MAINTAINERS: Add a reviewer for network packet abstractions

2023-04-19 Thread Akihiko Odaki
I have made significant changes for network packet abstractions so add me as a reviewer. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index c31d2279ab..8b2ef5943c 100644 --- a/MAINT

[PATCH v2 08/41] igb: Always copy ethernet header

2023-04-19 Thread Akihiko Odaki
igb_receive_internal() used to check the iov length to determine copy the iovs to a contiguous buffer, but the check is flawed in two ways: - It does not ensure that iovcnt > 0. - It does not take virtio-net header into consideration. The size of this copy is just 22 octets, which can be even less

[PATCH v2 24/41] igb: Share common VF constants

2023-04-19 Thread Akihiko Odaki
The constants need to be consistent between the PF and VF. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Sriram Yagnaraman --- hw/net/igb_common.h | 8 hw/net/igb.c| 10 +- hw/net/igbvf.c | 7 --- 3 files changed, 13 insertion

[PATCH v2 35/41] igb: Filter with the second VLAN tag for extended VLAN

2023-04-19 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- hw/net/igb_core.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index 9590e9bc4e..54abcf023c 100644 --- a/hw/net/igb_core.c +++ b/hw/net/igb_core.c @@ -69,7 +69,7 @@ typedef struc

[PATCH v2 15/41] e1000x: Take CRC into consideration for size check

2023-04-19 Thread Akihiko Odaki
Section 13.7.15 Receive Length Error Count says: > Packets over 1522 bytes are oversized if LongPacketEnable is 0b > (RCTL.LPE). If LongPacketEnable (LPE) is 1b, then an incoming packet > is considered oversized if it exceeds 16384 bytes. > These lengths are based on bytes in the received packet

[PATCH v2 30/41] igb: Implement MSI-X single vector mode

2023-04-19 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki Reviewed-by: Sriram Yagnaraman --- hw/net/igb_core.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index c24c522244..2c287688c7 100644 --- a/hw/net/igb_core.c +++ b/hw/net/igb_core.c @@ -1870,7 +187

[PATCH v2 10/41] tests/avocado: Remove unused imports

2023-04-19 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- tests/avocado/netdev-ethtool.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/avocado/netdev-ethtool.py b/tests/avocado/netdev-ethtool.py index f7e9464184..8de118e313 100644 --- a/tests/avocado/netdev-ethtool.py +++ b/tests/avocado/netdev-ethtool.py @@

[PATCH v2 20/41] igb: Read DCMD.VLE of the first Tx descriptor

2023-04-19 Thread Akihiko Odaki
Section 7.2.2.3 Advanced Transmit Data Descriptor says: > For frames that spans multiple descriptors, all fields apart from > DCMD.EOP, DCMD.RS, DCMD.DEXT, DTALEN, Address and DTYP are valid only > in the first descriptors and are ignored in the subsequent ones. Signed-off-by: Akihiko Odaki Revie

[PATCH v2 38/41] igb: Implement Tx timestamp

2023-04-19 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- hw/net/igb_regs.h | 3 +++ hw/net/igb_core.c | 7 +++ 2 files changed, 10 insertions(+) diff --git a/hw/net/igb_regs.h b/hw/net/igb_regs.h index 894705599d..82ff195dfc 100644 --- a/hw/net/igb_regs.h +++ b/hw/net/igb_regs.h @@ -322,6 +322,9 @@ union e1000_adv_

[PATCH v2 34/41] igb: Strip the second VLAN tag for extended VLAN

2023-04-19 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- hw/net/net_rx_pkt.h | 19 include/net/eth.h| 4 ++-- hw/net/e1000e_core.c | 3 ++- hw/net/igb_core.c| 14 ++-- hw/net/net_rx_pkt.c | 15 + net/eth.c| 52 6 fi

[PATCH v2 26/41] net/eth: Use void pointers

2023-04-19 Thread Akihiko Odaki
The uses of uint8_t pointers were misleading as they are never accessed as an array of octets and it even require more strict alignment to access as struct eth_header. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé --- include/net/eth.h | 4 ++-- net/eth.c | 6 +++---

[PATCH v2 32/41] igb: Implement Rx SCTP CSO

2023-04-19 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- hw/net/igb_regs.h | 1 + include/net/eth.h | 4 ++- include/qemu/crc32c.h | 1 + hw/net/e1000e_core.c | 5 hw/net/igb_core.c | 15 +- hw/net/net_rx_pkt.c | 64 +++ net/eth.c | 4 +

[PATCH v2 23/41] igb: Add more definitions for Tx descriptor

2023-04-19 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- hw/net/igb_regs.h | 32 +++- hw/net/igb_core.c | 4 ++-- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/hw/net/igb_regs.h b/hw/net/igb_regs.h index 21ee9a3b2d..eb995d8b2e 100644 --- a/hw/net/igb_regs.h +++ b/hw/net/igb

[PATCH v2 28/41] hw/net/net_rx_pkt: Enforce alignment for eth_header

2023-04-19 Thread Akihiko Odaki
eth_strip_vlan and eth_strip_vlan_ex refers to ehdr_buf as struct eth_header. Enforce alignment for the structure. Signed-off-by: Akihiko Odaki --- hw/net/net_rx_pkt.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/net/net_rx_pkt.c b/hw/net/net_rx_pkt.c index

[PATCH v2 06/41] net/net_rx_pkt: Use iovec for net_rx_pkt_set_protocols()

2023-04-19 Thread Akihiko Odaki
igb does not properly ensure the buffer passed to net_rx_pkt_set_protocols() is contiguous for the entire L2/L3/L4 header. Allow it to pass scattered data to net_rx_pkt_set_protocols(). Fixes: 3a977deebe ("Intrdocue igb device emulation") Signed-off-by: Akihiko Odaki Reviewed-by: Sriram Yagnarama

[PATCH v2 03/41] e1000x: Fix BPRC and MPRC

2023-04-19 Thread Akihiko Odaki
Before this change, e1000 and the common code updated BPRC and MPRC depending on the matched filter, but e1000e and igb decided to update those counters by deriving the packet type independently. This inconsistency caused a multicast packet to be counted twice. Updating BPRC and MPRC depending on

[PATCH v2 25/41] igb: Fix igb_mac_reg_init coding style alignment

2023-04-19 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé --- hw/net/igb_core.c | 96 +++ 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index e23c638899..c24c522244 100644 --- a/hw/net/igb_

[PATCH v2 09/41] Fix references to igb Avocado test

2023-04-19 Thread Akihiko Odaki
Fixes: 9f95111474 ("tests/avocado: re-factor igb test to avoid timeouts") Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé --- MAINTAINERS| 2 +- docs/system/devices/igb.rst| 2 +- scripts/ci/org.centos/stream/8/x86_

[PATCH v2 04/41] igb: Fix Rx packet type encoding

2023-04-19 Thread Akihiko Odaki
igb's advanced descriptor uses a packet type encoding different from one used in e1000e's extended descriptor. Fix the logic to encode Rx packet type accordingly. Fixes: 3a977deebe ("Intrdocue igb device emulation") Signed-off-by: Akihiko Odaki --- hw/net/igb_regs.h | 5 + hw/net/igb_core.c

[PATCH v2 12/41] hw/net/net_tx_pkt: Remove net_rx_pkt_get_l4_info

2023-04-19 Thread Akihiko Odaki
This function is not used. Signed-off-by: Akihiko Odaki --- hw/net/net_rx_pkt.h | 9 - hw/net/net_rx_pkt.c | 5 - 2 files changed, 14 deletions(-) diff --git a/hw/net/net_rx_pkt.h b/hw/net/net_rx_pkt.h index a06f5c2675..ce8dbdb284 100644 --- a/hw/net/net_rx_pkt.h +++ b/hw/net/net_rx

[PATCH v2 02/41] hw/net/net_tx_pkt: Decouple interface from PCI

2023-04-19 Thread Akihiko Odaki
This allows to use the network packet abstractions even if PCI is not used. Signed-off-by: Akihiko Odaki --- hw/net/net_tx_pkt.h | 31 --- hw/net/e1000e_core.c | 13 - hw/net/igb_core.c| 13 ++--- hw/net/net_tx_pkt.c | 36 +---

[PATCH v2 17/41] e1000e: Always log status after building rx metadata

2023-04-19 Thread Akihiko Odaki
Without this change, the status flags may not be traced e.g. if checksum offloading is disabled. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé --- hw/net/e1000e_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_c

[PATCH v2 05/41] igb: Do not require CTRL.VME for tx VLAN tagging

2023-04-19 Thread Akihiko Odaki
While the datasheet of e1000e says it checks CTRL.VME for tx VLAN tagging, igb's datasheet has no such statements. It also says for "CTRL.VLE": > This register only affects the VLAN Strip in Rx it does not have any > influence in the Tx path in the 82576. (Appendix A. Changes from the 82575) There

[PATCH v2 00/41] igb: Fix for DPDK

2023-04-19 Thread Akihiko Odaki
This series has fixes and feature additions to pass DPDK Test Suite with igb. It also includes a few minor changes related to networking. Patch [01, 09] are bug fixes. Patch [10, 13] delete code which is unnecessary. Patch [14, 29] are minor changes. Patch [30, 39] implement new features. Patch [4

[PATCH v2 01/41] hw/net/net_tx_pkt: Decouple implementation from PCI

2023-04-19 Thread Akihiko Odaki
This is intended to be followed by another change for the interface. It also fixes the leak of memory mapping when the specified memory is partially mapped. Fixes: e263cd49c7 ("Packet abstraction for VMWARE network devices") Signed-off-by: Akihiko Odaki --- hw/net/net_tx_pkt.h | 9 hw/

Re: get_relocated_path: the configured paths are not looked for?

2023-04-19 Thread Akihiko Odaki
On 2023/04/19 16:32, Michael Tokarev wrote: Hello! Today I discovered an interesting issue here: I copied a system-installed binary into another directory, in order to debug an unrelated issue. Just to discover it does not work, being unable to find any modules or data files. Here's how the str

Re: [PATCH 1/2] Reduce vdpa initialization / startup overhead

2023-04-19 Thread Pei Li
Hi all, My bad, I just submitted the kernel patch. If we are passing some generic command, still we have to add an additional field in the structure to indicate what is the unbatched version of this command, and the struct vhost_ioctls would be some command specific structure. In summary, the stru

Re: [PATCH v2] tests/avocado/tuxrun_baselines.py: improve code coverage for ppc64

2023-04-19 Thread Harsh Prateek Bora
One minor comment below: On 4/19/23 14:52, Kautuk Consul wrote: Commit c0c8687ef0fd990db8db1655a8a6c5a5e35dd4bb disabled the boot_linux.py test-case due to which the code coverage for ppc decreased by around 2%. As per the discussion on https://lore.kernel.org/qemu-devel/87sfdpqcy4@linaro.or

Re: [PATCH 1/2] Reduce vdpa initialization / startup overhead

2023-04-19 Thread Jason Wang
On Wed, Apr 19, 2023 at 11:33 PM Eugenio Perez Martin wrote: > > On Wed, Apr 19, 2023 at 12:56 AM wrote: > > > > From: Pei Li > > > > Currently, part of the vdpa initialization / startup process > > needs to trigger many ioctls per vq, which is very inefficient > > and causing unnecessary contex

[PULL 04/11] Hexagon (target/hexagon) Remove redundant/unused macros

2023-04-19 Thread Taylor Simpson
Remove the following macros (remnants of the old generator design) READ_REG READ_PREG WRITE_RREG WRITE_PREG Modify macros that rely on the above The following are unused READ_IREG fGET_FIELD fSET_FIELD fREAD_P3 fREAD_NPC fWRITE_LC0 fWRITE_LC1 Signed-off

[PULL 09/11] Hexagon (target/hexagon) Remove unused slot variable in helpers

2023-04-19 Thread Taylor Simpson
The slot variable in helpers was only passed to log_reg_write function where the argument is unused. - Remove declaration from generated helper functions - Remove slot argument from log_reg_write Signed-off-by: Taylor Simpson Reviewed-by: Richard Henderson Message-Id: <20230407204521.357244-1-ts

[PULL 01/11] Hexagon (translate.c): avoid redundant PC updates on COF

2023-04-19 Thread Taylor Simpson
From: Matheus Tavares Bernardino When there is a conditional change of flow or an endloop instruction, we preload HEX_REG_PC with ctx->next_PC at gen_start_packet(). Nonetheless, we still generate TCG code to do this update again at gen_goto_tb() when the condition for the COF is not met, thus pr

[PULL 00/11] Hexagon queue

2023-04-19 Thread Taylor Simpson
The following changes since commit 60ca584b8af0de525656f959991a440f8c191f12: Merge tag 'pull-for-8.0-220323-1' of https://gitlab.com/stsquad/qemu into staging (2023-03-22 17:58:12 +) are available in the Git repository at: https://github.com/quic/qemu tags/pull-hex-20230419

[PULL 08/11] Hexagon (tests/tcg/hexagon) Move HVX test infra to header file

2023-04-19 Thread Taylor Simpson
This will facilitate adding additional tests in separate .c files Signed-off-by: Taylor Simpson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230406174241.853296-1-tsimp...@quicinc.com> --- tests/tcg/hexagon/hvx_misc.h | 178 ++ tests/tcg/hexagon/hvx_misc.c

[PULL 06/11] Hexagon (target/hexagon) Add overrides for count trailing zeros/ones

2023-04-19 Thread Taylor Simpson
The following instructions are overriden S2_ct0Count trailing zeros S2_ct1Count trailing ones S2_ct0p Count trailing zeros (register pair) S2_ct1p Count trailing ones (register pair) These instructions are not handled by idef-parser becau

[PULL 11/11] Hexagon (target/hexagon) Additional instructions handled by idef-parser

2023-04-19 Thread Taylor Simpson
Currently, idef-parser skips all floating point instructions. However, there are some floating point instructions that can be handled. The following instructions are now parsed F2_sfimm_p F2_sfimm_n F2_dfimm_p F2_dfimm_n F2_dfmpyll F2_dfmpylh To make these instructions wo

[PULL 02/11] Use f-strings in python scripts

2023-04-19 Thread Taylor Simpson
From: Marco Liebel Replace python 2 format string with f-strings Signed-off-by: Marco Liebel Signed-off-by: Taylor Simpson Reviewed-by: Taylor Simpson Tested-by: Taylor Simpson Message-Id: <20230320092533.2859433-2-quic_mlie...@quicinc.com> --- target/hexagon/gen_analyze_funcs.py | 115

[PULL 05/11] Hexagon (target/hexagon) Merge arguments to probe_pkt_scalar_hvx_stores

2023-04-19 Thread Taylor Simpson
Reducing the number of arguments reduces the overhead of the helper call Signed-off-by: Taylor Simpson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230405164211.30015-2-tsimp...@quicinc.com> --- target/hexagon/helper.h| 4 ++-- target/hexagon/translate.h | 1 + target/hexagon/op_hel

[PULL 10/11] Hexagon (target/hexagon) Add overrides for cache/sync/barrier instructions

2023-04-19 Thread Taylor Simpson
Most of these are not modelled in QEMU, so save the overhead of calling a helper. The only exception is dczeroa. It assigns to hex_dczero_addr, which is handled during packet commit. Signed-off-by: Taylor Simpson Reviewed-by: Richard Henderson Message-Id: <20230410202402.2856852-1-tsimp...@qui

[PULL 07/11] Hexagon (target/hexagon) Updates to USR should use get_result_gpr

2023-04-19 Thread Taylor Simpson
Signed-off-by: Taylor Simpson Reviewed-by: Anton Johansson Message-Id: <20230405164211.30015-3-tsimp...@quicinc.com> --- target/hexagon/gen_tcg.h| 4 +- target/hexagon/genptr.h | 10 ++--- target/hexagon/macros.h | 8 target/hexa

RE: [PATCH v4] memory: Optimize replay of guest mapping

2023-04-19 Thread Duan, Zhenzhong
>-Original Message- >From: Peter Maydell >Sent: Thursday, April 20, 2023 12:10 AM >To: Duan, Zhenzhong >Cc: qemu-devel@nongnu.org; m...@redhat.com; pet...@redhat.com; >jasow...@redhat.com; marcel.apfelb...@gmail.com; >pbonz...@redhat.com; richard.hender...@linaro.org; edua...@habkost.ne

Re: [PATCH v7 00/14] KVM: mm: fd-based approach for supporting KVM guest private memory

2023-04-19 Thread Sean Christopherson
On Wed, Apr 19, 2023, Christian Brauner wrote: > On Thu, Apr 13, 2023 at 03:28:43PM -0700, Sean Christopherson wrote: > > > But if you want to preserve the inode number and device number of the > > > relevant tmpfs instance but still report memfd restricted as your > > > filesystem type > > > > Un

Re: [PATCH v7 02/12] target/riscv/cpu.c: remove set_vext_version()

2023-04-19 Thread Alistair Francis
On Tue, Apr 18, 2023 at 12:08 AM Daniel Henrique Barboza wrote: > > This setter is doing nothing else but setting env->vext_ver. Assign the > value directly. > > Signed-off-by: Daniel Henrique Barboza > Reviewed-by: LIU Zhiwei > Reviewed-by: Weiwei Li I think you dropped my previous reviews A

Re: [PATCH v7 01/12] target/riscv/cpu.c: add riscv_cpu_validate_v()

2023-04-19 Thread Alistair Francis
On Tue, Apr 18, 2023 at 12:02 AM Daniel Henrique Barboza wrote: > > The RVV verification will error out if fails and it's being done at the > end of riscv_cpu_validate_set_extensions(), after we've already set some > extensions that are dependent on RVV. Let's put it in its own function > and do

Re: [PATCH v3] target/riscv: Fix Guest Physical Address Translation

2023-04-19 Thread Alistair Francis
On Tue, Apr 18, 2023 at 5:56 PM Irina Ryapolova wrote: > > Before changing the flow check for sv39/48/57. > > According to specification (for Supervisor mode): > Sv39 implementations support a 39-bit virtual address space, divided into 4 > KiB > pages. > Instruction fetch addresses and load and s

Re: [PATCH v2] riscv: Make sure an exception is raised if a pte is malformed

2023-04-19 Thread Alistair Francis
On Wed, Apr 19, 2023 at 8:48 PM Alexandre Ghiti wrote: > > As per the privileged specification, in 64-bit, if any of the pte reserved > bits 60-54 is set an exception should be triggered, and the same applies to > napot/pbmt bits if those extensions are not enabled > (see 4.4.1, "Addressing and Me

Re: [PATCH v2] riscv: Make sure an exception is raised if a pte is malformed

2023-04-19 Thread Alistair Francis
On Wed, Apr 19, 2023 at 8:48 PM Alexandre Ghiti wrote: > > As per the privileged specification, in 64-bit, if any of the pte reserved > bits 60-54 is set an exception should be triggered, and the same applies to > napot/pbmt bits if those extensions are not enabled > (see 4.4.1, "Addressing and Me

[PATCH v2 2/4] scripts/qapi: allow optional experimental enum values

2023-04-19 Thread Vladimir Sementsov-Ogievskiy
To be used in the next commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- scripts/qapi/types.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/qapi/types.py b/scripts/qapi/types.py index c39d054d2c..18f8734047 100644 --- a/scripts/qapi/types.py +++ b/scripts/qapi/types.py @@

[PATCH v2 3/4] build: move COLO under CONFIG_REPLICATION

2023-04-19 Thread Vladimir Sementsov-Ogievskiy
We don't allow to use x-colo capability when replication is not configured. So, no reason to build COLO when replication is disabled, it's unusable in this case. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hmp-commands.hx| 2 ++ migration/colo.c | 6 + mig

[PATCH v2 4/4] configure: add --disable-colo-filters option

2023-04-19 Thread Vladimir Sementsov-Ogievskiy
Add option to not build COLO Proxy subsystem if it is not needed. Signed-off-by: Vladimir Sementsov-Ogievskiy --- meson.build | 1 + meson_options.txt | 2 ++ net/meson.build | 11 --- scripts/meson-buildoptions.sh | 3 +++ 4 files changed,

[PATCH v2 1/4] block/meson.build: prefer positive condition for replication

2023-04-19 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/meson.build b/block/meson.build index 382bec0e7d..b9a72e219b 100644 --- a/block/meson.build +++ b/block/meson.build @@ -84,7 +84,7 @@ block_ss.add(when: 'CON

[PATCH v2 0/4] COLO: improve build options

2023-04-19 Thread Vladimir Sementsov-Ogievskiy
Hi all! COLO substem seems to be useless when CONFIG_REPLICATION is unset, as we simply don't allow to set x-colo capability in this case. So, let's not compile in unreachable code and interface we cannot use when CONFIG_REPLICATION is unset. Also, provide personal configure option for COLO Proxy

Re: [PATCH] replication: compile out some staff when replication is not configured

2023-04-19 Thread Vladimir Sementsov-Ogievskiy
On 11.04.23 17:51, Vladimir Sementsov-Ogievskiy wrote: Don't compile-in replication-related files when replication is disabled in config. Signed-off-by: Vladimir Sementsov-Ogievskiy v2 will be called "[PATCH v2 0/4] COLO: improve build options" -- Best regards, Vladimir

Re: [PATCH v2] tests/vm/freebsd: Update to FreeBSD 13.2

2023-04-19 Thread Warner Losh
On Wed, Apr 19, 2023 at 8:46 AM Thomas Huth wrote: > According to QEMU's support policy, we stop supporting the previous > major release two years after the the new major release has been > published. So we can stop testing FreeBSD 12 now and should switch > our FreeBSD VM to version 13 instead.

Re: [PATCH] replication: compile out some staff when replication is not configured

2023-04-19 Thread Vladimir Sementsov-Ogievskiy
On 17.04.23 20:19, Vladimir Sementsov-Ogievskiy wrote: On 16.04.23 21:44, Zhang, Chen wrote: -Original Message- From: Vladimir Sementsov-Ogievskiy Sent: Friday, April 14, 2023 5:51 PM To: Zhang, Chen ; qemu-devel@nongnu.org Cc: qemu-bl...@nongnu.org; pbonz...@redhat.com; arm...@redha

[ANNOUNCE] QEMU 8.0.0 is now available

2023-04-19 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the QEMU 8.0.0 release. This release contains 2800+ commits from 238 authors. A note from the maintainer (and the QEMU team in general): Thank you to everybody who contributed to this release, whether that was by wri

Looking for QEMU integration expert..

2023-04-19 Thread Dinesh Tyagi
Dear Qemu members, I apologize for sending this email, but I need some help to find a QEMU expert for our client in Silicon Valley. We are looking for someone who can integrate QEMU with simulators and preferably some experience in RISC-V CPU. Please let me know if you can connect me to

Re: [PATCH v3 00/12] Migration: Make more ram_counters atomic

2023-04-19 Thread Juan Quintela
Peter Xu wrote: > On Wed, Apr 19, 2023 at 06:24:03PM +0200, Juan Quintela wrote: >> Juan Quintela (12): >> migration: Merge ram_counters and ram_atomic_counters >> migration: Update atomic stats out of the mutex >> migration: Make multifd_bytes atomic >> migration: Make dirty_sync_missed_z

Re: [PATCH v2 4/4] migration: Allow postcopy_ram_supported_by_host() to report err

2023-04-19 Thread Juan Quintela
Peter Xu wrote: > Instead of print it to STDERR, bring the error upwards so that it can be > reported via QMP responses. > > E.g.: > > { "execute": "migrate-set-capabilities" , > "arguments": { "capabilities": > [ { "capability": "postcopy-ram", "state": true } ] } } > > { "error": > { "clas

Re: [PATCH v2 3/4] migration/postcopy: Detect file system on dest host

2023-04-19 Thread Juan Quintela
Peter Xu wrote: > Postcopy requires the memory support userfaultfd to work. Right now we > check it but it's a bit too late (when switching to postcopy migration). > > Do that early right at enabling of postcopy. > > Note that this is still only a best effort because ramblocks can be > dynamicall

Re: [PATCH v2 2/4] vl.c: Create late backends before migration object

2023-04-19 Thread Juan Quintela
Peter Xu wrote: > The migration object may want to check against different types of memory > when initialized. Delay the creation to be after late backends. > > Signed-off-by: Peter Xu Reviewed-by: Juan Quintela We are moving late to early, not the best name O:-)

Re: [PATCH v2 1/4] util/mmap-alloc: qemu_fd_getfs()

2023-04-19 Thread Juan Quintela
Peter Xu wrote: > This new helper fetches file system type for a fd. Only Linux is > implemented so far. Currently only tmpfs and hugetlbfs is defined, but it s/is/are/ > can grow per need. > > Signed-off-by: Peter Xu Reviewed-by: Juan Quintela ... > +#include ... > +case TMPFS_MAG

Re: [PATCH v4 2/7] hw/pci/pci.c: Don't leak PCIBus::irq_count[] in pci_bus_irqs()

2023-04-19 Thread Bernhard Beschow
Am 3. April 2023 07:41:19 UTC schrieb Bernhard Beschow : >When calling pci_bus_irqs() multiple times on the same object without calling >pci_bus_irqs_cleanup() in between PCIBus::irq_count[] is currently leaked. >Let's fix this because Xen will do just that in a few commits, and because >calling

Re: [PATCH v3 00/12] Migration: Make more ram_counters atomic

2023-04-19 Thread Peter Xu
On Wed, Apr 19, 2023 at 06:24:03PM +0200, Juan Quintela wrote: > Juan Quintela (12): > migration: Merge ram_counters and ram_atomic_counters > migration: Update atomic stats out of the mutex > migration: Make multifd_bytes atomic > migration: Make dirty_sync_missed_zero_copy atomic > migr

Re: [RFC PATCH v1 00/26] migration: File based migration with multifd and fixed-ram

2023-04-19 Thread Peter Xu
On Wed, Apr 19, 2023 at 06:12:05PM +0100, Daniel P. Berrangé wrote: > On Tue, Apr 18, 2023 at 03:26:45PM -0400, Peter Xu wrote: > > On Tue, Apr 18, 2023 at 05:58:44PM +0100, Daniel P. Berrangé wrote: > > > Libvirt has multiple APIs where it currently uses its migrate-to-file > > > approach > > > >

Re: [PATCH v2 16/16] virtio: make it possible to detach host notifier from any thread

2023-04-19 Thread Eric Blake
On Wed, Apr 19, 2023 at 01:28:17PM -0400, Stefan Hajnoczi wrote: > virtio_queue_aio_detach_host_notifier() does two things: > 1. It removes the fd handler from the event loop. > 2. It processes the virtqueue one last time. > > The first step can be peformed by any thread and without taking the > A

Re: [PATCH 2/2] vdpa: send CVQ state load commands in parallel

2023-04-19 Thread Eugenio Perez Martin
On Wed, Apr 19, 2023 at 1:50 PM Hawkins Jiawei wrote: > > This patch introduces the vhost_vdpa_net_cvq_add() and > refactors the vhost_vdpa_net_load*(), so that QEMU can > send CVQ state load commands in parallel. > > To be more specific, this patch introduces vhost_vdpa_net_cvq_add() > to add SVQ

[PATCH v2 04/16] block/export: only acquire AioContext once for vhost_user_server_stop()

2023-04-19 Thread Stefan Hajnoczi
vhost_user_server_stop() uses AIO_WAIT_WHILE(). AIO_WAIT_WHILE() requires that AioContext is only acquired once. Since blk_exp_request_shutdown() already acquires the AioContext it shouldn't be acquired again in vhost_user_server_stop(). Signed-off-by: Stefan Hajnoczi --- util/vhost-user-server

[PATCH v2 05/16] util/vhost-user-server: rename refcount to in_flight counter

2023-04-19 Thread Stefan Hajnoczi
The VuServer object has a refcount field and ref/unref APIs. The name is confusing because it's actually an in-flight request counter instead of a refcount. Normally a refcount destroys the object upon reaching zero. The VuServer counter is used to wake up the vhost-user coroutine when there are n

[PATCH v2 00/16] block: remove aio_disable_external() API

2023-04-19 Thread Stefan Hajnoczi
v2: - Do not rely on BlockBackend request queuing, implement .drained_begin/end() instead in xen-block, virtio-blk, and virtio-scsi [Paolo] - Add qdev_is_realized() API [Philippe] - Add patch to avoid AioContext lock around blk_exp_ref/unref() [Paolo] - Add patch to call .drained_begin/end() from

[PATCH v2 02/16] virtio-scsi: avoid race between unplug and transport event

2023-04-19 Thread Stefan Hajnoczi
Only report a transport reset event to the guest after the SCSIDevice has been unrealized by qdev_simple_device_unplug_cb(). qdev_simple_device_unplug_cb() sets the SCSIDevice's qdev.realized field to false so that scsi_device_find/get() no longer see it. scsi_target_emulate_report_luns() also ne

[PATCH v2 13/16] block/export: rewrite vduse-blk drain code

2023-04-19 Thread Stefan Hajnoczi
vduse_blk_detach_ctx() waits for in-flight requests using AIO_WAIT_WHILE(). This is not allowed according to a comment in bdrv_set_aio_context_commit(): /* * Take the old AioContex when detaching it from bs. * At this point, new_context lock is already acquired, and we are now * also ta

[PATCH v2 03/16] virtio-scsi: stop using aio_disable_external() during unplug

2023-04-19 Thread Stefan Hajnoczi
This patch is part of an effort to remove the aio_disable_external() API because it does not fit in a multi-queue block layer world where many AioContexts may be submitting requests to the same disk. The SCSI emulation code is already in good shape to stop using aio_disable_external(). It was only

[PATCH v2 15/16] block/fuse: do not set is_external=true on FUSE fd

2023-04-19 Thread Stefan Hajnoczi
This is part of ongoing work to remove the aio_disable_external() API. Use BlockDevOps .drained_begin/end/poll() instead of aio_set_fd_handler(is_external=true). As a side-effect the FUSE export now follows AioContext changes like the other export types. Signed-off-by: Stefan Hajnoczi --- bloc

[PATCH v2 11/16] xen-block: implement BlockDevOps->drained_begin()

2023-04-19 Thread Stefan Hajnoczi
Detach event channels during drained sections to stop I/O submission from the ring. xen-block is no longer reliant on aio_disable_external() after this patch. This will allow us to remove the aio_disable_external() API once all other code that relies on it is converted. Extend xen_device_set_event

[PATCH v2 14/16] block/export: don't require AioContext lock around blk_exp_ref/unref()

2023-04-19 Thread Stefan Hajnoczi
The FUSE export calls blk_exp_ref/unref() without the AioContext lock. Instead of fixing the FUSE export, adjust blk_exp_ref/unref() so they work without the AioContext lock. This way it's less error-prone. Suggested-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi --- include/block/export.h

[PATCH v2 07/16] block/export: stop using is_external in vhost-user-blk server

2023-04-19 Thread Stefan Hajnoczi
vhost-user activity must be suspended during bdrv_drained_begin/end(). This prevents new requests from interfering with whatever is happening in the drained section. Previously this was done using aio_set_fd_handler()'s is_external argument. In a multi-queue block layer world the aio_disable_exter

[PATCH v2 08/16] hw/xen: do not use aio_set_fd_handler(is_external=true) in xen_xenstore

2023-04-19 Thread Stefan Hajnoczi
There is no need to suspend activity between aio_disable_external() and aio_enable_external(), which is mainly used for the block layer's drain operation. This is part of ongoing work to remove the aio_disable_external() API. Reviewed-by: David Woodhouse Signed-off-by: Stefan Hajnoczi --- hw/i

[PATCH v2 06/16] block/export: wait for vhost-user-blk requests when draining

2023-04-19 Thread Stefan Hajnoczi
Each vhost-user-blk request runs in a coroutine. When the BlockBackend enters a drained section we need to enter a quiescent state. Currently any in-flight requests race with bdrv_drained_begin() because it is unaware of vhost-user-blk requests. When blk_co_preadv/pwritev()/etc returns it wakes th

[PATCH v2 16/16] virtio: make it possible to detach host notifier from any thread

2023-04-19 Thread Stefan Hajnoczi
virtio_queue_aio_detach_host_notifier() does two things: 1. It removes the fd handler from the event loop. 2. It processes the virtqueue one last time. The first step can be peformed by any thread and without taking the AioContext lock. The second step may need the AioContext lock (depending on t

  1   2   >