[PATCH] linux-user: report ENOTTY for unknown ioctls

2023-04-26 Thread Thomas Weißschuh
The correct error number for unknown ioctls is ENOTTY. ENOSYS would mean that the ioctl() syscall itself is not implemented, which is very improbable and unexpected for userspace. ENOTTY means "Inappropriate ioctl for device". This is what the kernel returns on unknown ioctls, what qemu is trying

Re: [PATCH v2 1/3] hw/i2c: add mctp core

2023-04-26 Thread Klaus Jensen
On Apr 25 10:19, Corey Minyard wrote: > On Tue, Apr 25, 2023 at 08:35:38AM +0200, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Add an abstract MCTP over I2C endpoint model. This implements MCTP > > control message handling as well as handling the actual I2C transport > > (packetization). >

Re: [PULL 61/73] hw/pci/aer: Implement PCI_ERR_UNCOR_MASK register

2023-04-26 Thread Juan Quintela
"Michael S. Tsirkin" wrote: > On Tue, Apr 25, 2023 at 08:42:17PM -0400, Peter Xu wrote: >> Hi, Michael, Jonathan, >> >> On Tue, Mar 07, 2023 at 08:13:53PM -0500, Michael S. Tsirkin wrote: >> This breaks the simplest migration from QEMU 8.0->7.2 binaries on all >> machine types I think as long as

patch:avoid-to-create-a-null-watch-in-flush_buf

2023-04-26 Thread wang...@chinatelecom.cn
Hi, I am testing when qga push msg to libvirt, when the vm saved and restore from the memory file, the qga will be hunged in writing. In flush_buf: (gdb) f 4 #4 0x55ffc716894a in flush_buf (port=0x55ffc87bf800, buf=, len=) at ../hw/char/virtio-console.c:100 100 vcon->wat

Re: [RFC PATCH v2 1/9] riscv: implement Ssqosid extension and sqoscfg CSR

2023-04-26 Thread Weiwei Li
On 2023/4/26 04:38, Drew Fustini wrote: From: Kornel Dulęba Implement the sqoscfg CSR defined by the Ssqosid ISA extension (Supervisor-mode Quality of Service ID). The CSR contains two fields: - Resource Control ID (RCID) used determine resource allocation - Monitoring Counter ID (MCID

Re: test-blockjob: intermittent CI failures in msys2-64bit job

2023-04-26 Thread Emanuele Giuseppe Esposito
Am 25/04/2023 um 18:48 schrieb Hanna Czenczek: > On 24.04.23 20:32, Vladimir Sementsov-Ogievskiy wrote: >> On 24.04.23 16:36, Emanuele Giuseppe Esposito wrote: >>> >>> >>> Am 21/04/2023 um 12:13 schrieb Vladimir Sementsov-Ogievskiy: On 17.03.23 15:35, Thomas Huth wrote: > On 17/03/2023

Re: test-blockjob: intermittent CI failures in msys2-64bit job

2023-04-26 Thread Hanna Czenczek
On 26.04.23 09:38, Emanuele Giuseppe Esposito wrote: Am 25/04/2023 um 18:48 schrieb Hanna Czenczek: On 24.04.23 20:32, Vladimir Sementsov-Ogievskiy wrote: On 24.04.23 16:36, Emanuele Giuseppe Esposito wrote: Am 21/04/2023 um 12:13 schrieb Vladimir Sementsov-Ogievskiy: On 17.03.23 15:35, Tho

Re: [RFC PATCH v3 00/20] configure: create a python venv and ensure meson, sphinx

2023-04-26 Thread Paolo Bonzini
On 4/24/23 22:02, John Snow wrote: Some important points as a pre-emptive "FAQ": - This venv is unconditionally created and lives at {build_dir}/pyvenv. - The python interpreter used by this venv is always the one identified by configure. (Which in turn is always the one specified by --pytho

[PATCH] tests/unit/test-blockjob: Re-enable complete_in_standby test

2023-04-26 Thread Emanuele Giuseppe Esposito
Pause the job while draining so that pause_count will be increased and bdrv_drain_all_end() won't reset it to 0, so the job will not continue. With this fix, the test is not flaky anymore. Additionally remove useless aiocontext lock around bdrv_drain_all_end() in test_complete_in_standby(). Fixe

Re: test-blockjob: intermittent CI failures in msys2-64bit job

2023-04-26 Thread Emanuele Giuseppe Esposito
Am 26/04/2023 um 10:03 schrieb Hanna Czenczek: > On 26.04.23 09:38, Emanuele Giuseppe Esposito wrote: >> >> Am 25/04/2023 um 18:48 schrieb Hanna Czenczek: >>> On 24.04.23 20:32, Vladimir Sementsov-Ogievskiy wrote: On 24.04.23 16:36, Emanuele Giuseppe Esposito wrote: > > Am 21/04/202

Re: [RFC PATCH v3 00/20] configure: create a python venv and ensure meson, sphinx

2023-04-26 Thread Daniel P . Berrangé
On Tue, Apr 25, 2023 at 02:58:53PM -0400, John Snow wrote: > On Tue, Apr 25, 2023 at 2:10 PM Daniel P. Berrangé > wrote: > > How about having --enable-pypi never|auto|force with the following > > semantics for --enable-docs + --enable-pypi > > > > > > * docs=no - pypi never used > > > > * d

Re: [PATCH v2 RESEND] xen: Fix SEGV on domain disconnect

2023-04-26 Thread Tim Smith
On Mon, Apr 24, 2023 at 2:51 PM Paul Durrant wrote: > > So if you drop the ring drain then this patch should still stop the > SEGVs, right? > I think that's worth a few test runs. I recall some coredumps in that condition when I was investigating early on, but I don't have them in my collection s

Re: [PATCH v3 2/7] target/i386: Add new EPYC CPU versions with updated cache_info

2023-04-26 Thread Maksim Davydov
On 4/25/23 18:35, Moger, Babu wrote: Hi Maksim, On 4/25/23 07:51, Maksim Davydov wrote: On 4/24/23 19:33, Babu Moger wrote: From: Michael Roth Introduce new EPYC cpu versions: EPYC-v4 and EPYC-Rome-v3. The only difference vs. older models is an updated cache_info with the 'complex_indexing

Re: [RFC PATCH v3 00/20] configure: create a python venv and ensure meson, sphinx

2023-04-26 Thread Paolo Bonzini
On 4/26/23 10:21, Daniel P. Berrangé wrote: So if you already have Sphinx, this should perform an upgrade to the latest version? Essentially I meant 'force' to mean*never* use the host python installation packages. Always install all the deps in the venv, even if they exist in the host with su

Re: [PATCH] tests/unit/test-blockjob: Re-enable complete_in_standby test

2023-04-26 Thread Thomas Huth
On 26/04/2023 10.16, Emanuele Giuseppe Esposito wrote: Pause the job while draining so that pause_count will be increased and bdrv_drain_all_end() won't reset it to 0, so the job will not continue. With this fix, the test is not flaky anymore. Additionally remove useless aiocontext lock around

Re: [PATCH 8/9] docs/devel: mention the spacing requirement for QOM

2023-04-26 Thread Mark Cave-Ayland
On 21/04/2023 07:15, Philippe Mathieu-Daudé wrote: On 20/4/23 21:32, Mark Cave-Ayland wrote: On 20/04/2023 16:57, Alex Bennée wrote: We have a more complete document on QOM but we should at least mention the style requirements in the style guide. Signed-off-by: Alex Bennée Cc: Mark Cave-Ayl

Re: [RFC PATCH v3 00/20] configure: create a python venv and ensure meson, sphinx

2023-04-26 Thread Paolo Bonzini
On 4/26/23 10:05, Paolo Bonzini wrote: Thanks, this looks pretty good.  Some changes I'd make for the non-RFC version: - I think we should just check in the meson wheel (which also removes the need for patch 12, so it can be done in its stead) and remove the submodule - The verbosity of

Re: [PATCH 17/18] docs/devel: mention the spacing requirement for QOM

2023-04-26 Thread Mark Cave-Ayland
On 24/04/2023 10:22, Alex Bennée wrote: We have a more complete document on QOM but we should at least mention the style requirements in the style guide. Signed-off-by: Alex Bennée Cc: Mark Cave-Ayland Reviewed-by: Juan Quintela Message-Id: <20230420155723.1711048-9-alex.ben...@linaro.org>

Re: [RFC PATCH v3 00/20] configure: create a python venv and ensure meson, sphinx

2023-04-26 Thread Daniel P . Berrangé
On Mon, Apr 24, 2023 at 04:02:28PM -0400, John Snow wrote: > GitLab CI: https://gitlab.com/jsnow/qemu/-/pipelines/846869409 >(All green, except Python self-tests, see below) > > This patch series creates a mandatory python virtual environment > ("venv") during configure time and uses i

Re: [RFC PATCH v3 00/20] configure: create a python venv and ensure meson, sphinx

2023-04-26 Thread Paolo Bonzini
On 4/26/23 10:53, Daniel P. Berrangé wrote: I think it'd be useful for support purposes if the configure script summary printed details of how we setup the venv. eg perhaps a summary for each python module of whether we added it to the venv, or relied on te site packages: python venv: meson

Re: [PATCH v2 2/6] tests/qtests: remove migration test iterations config

2023-04-26 Thread Daniel P . Berrangé
On Fri, Apr 21, 2023 at 11:54:55PM +0200, Juan Quintela wrote: > Daniel P. Berrangé wrote: > > The 'unsigned int interations' config for migration is somewhat > > overkill. Most tests don't set it, and a value of '0' is treated > > as equivalent to '1'. The only test that does set it, xbzrle, > >

Re: [PATCH v2 0/3] ROM migration

2023-04-26 Thread Gerd Hoffmann
Hi, > As I understand, netcard ROM file is needed only for network boot. So, > it's absolutely correct to use romfile="" option: network boot will > not work, but everything else will work correctly. Is that right? In most cases yes. The exception to the rule is virtio-net with UEFI firmware.

Re: [PATCH v2 2/6] tests/qtests: remove migration test iterations config

2023-04-26 Thread Juan Quintela
Daniel P. Berrangé wrote: > On Fri, Apr 21, 2023 at 11:54:55PM +0200, Juan Quintela wrote: >> Daniel P. Berrangé wrote: >> > The 'unsigned int interations' config for migration is somewhat >> > overkill. Most tests don't set it, and a value of '0' is treated >> > as equivalent to '1'. The only te

Re: [PATCH v2 2/6] tests/qtests: remove migration test iterations config

2023-04-26 Thread Daniel P . Berrangé
On Wed, Apr 26, 2023 at 11:42:51AM +0200, Juan Quintela wrote: > Daniel P. Berrangé wrote: > > On Fri, Apr 21, 2023 at 11:54:55PM +0200, Juan Quintela wrote: > >> Daniel P. Berrangé wrote: > >> > The 'unsigned int interations' config for migration is somewhat > >> > overkill. Most tests don't set

Re: [PATCH] multifd: Avoid busy-wait in multifd_send_pages()

2023-04-26 Thread Juan Quintela
"manish.mishra" wrote: > multifd_send_sync_main() posts request on the multifd channel > but does not call sem_wait() on channels_ready semaphore, making > the channels_ready semaphore count keep increasing. > As a result, sem_wait() on channels_ready in multifd_send_pages() > is always non-blocki

Re: [PATCH v3 01/18] hw/ide/piix: Expose output IRQ as properties for late object population

2023-04-26 Thread Mark Cave-Ayland
On 02/03/2023 22:40, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/piix.c | 14 -- include/hw/ide/piix.h | 4 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/hw/ide/piix.c b/hw/ide/piix.c index 41d60921e3..a36dac8469

[PATCH v4 02/48] hw/net/net_tx_pkt: Decouple interface from PCI

2023-04-26 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 v4 01/48] hw/net/net_tx_pkt: Decouple implementation from PCI

2023-04-26 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/

[PATCH v4 00/48] igb: Fix for DPDK

2023-04-26 Thread Akihiko Odaki
Based-on: <366bbcafdb6e0373f0deb105153768a8c0bded87.ca...@gmail.com> ("[PATCH 0/1] e1000e: Fix tx/rx counters") 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, 10] are bug fixes. Patch [11, 14] de

[PATCH v4 07/48] net/net_rx_pkt: Use iovec for net_rx_pkt_set_protocols()

2023-04-26 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 v4 06/48] igb: Clear IMS bits when committing ICR access

2023-04-26 Thread Akihiko Odaki
The datasheet says contradicting statements regarding ICR accesses so it is not reliable to determine the behavior of ICR accesses. However, e1000e does clear IMS bits when reading ICR accesses and Linux also expects ICR accesses will clear IMS bits according to: https://git.kernel.org/pub/scm/linu

[PATCH v4 17/48] e1000x: Rename TcpIpv6 into TcpIpv6Ex

2023-04-26 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 Reviewed-by: Sriram Yagnaraman --- hw/net/e1000x_re

[PATCH v4 21/48] igb: Read DCMD.VLE of the first Tx descriptor

2023-04-26 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 v4 09/48] igb: Always copy ethernet header

2023-04-26 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 v4 13/48] hw/net/net_tx_pkt: Remove net_rx_pkt_get_l4_info

2023-04-26 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 v4 11/48] tests/avocado: Remove unused imports

2023-04-26 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 v4 08/48] e1000e: Always copy ethernet header

2023-04-26 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 v4 18/48] e1000e: Always log status after building rx metadata

2023-04-26 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 v4 25/48] igb: Share common VF constants

2023-04-26 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 v4 28/48] e1000e: Rename a variable in e1000e_receive_internal()

2023-04-26 Thread Akihiko Odaki
Rename variable "n" to "causes", which properly represents the content of the variable. Signed-off-by: Akihiko Odaki --- hw/net/e1000e_core.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c index 7dce448657..aea70

[PATCH v4 27/48] igb: Clear EICR bits for delayed MSI-X interrupts

2023-04-26 Thread Akihiko Odaki
Section 7.3.4.1 says: > When auto-clear is enabled for an interrupt cause, the EICR bit is > set when a cause event mapped to this vector occurs. When the EITR > Counter reaches zero, the MSI-X message is sent on PCIe. Then the > EICR bit is cleared and enabled to be set by a new cause event Signe

[PATCH v4 37/48] igb: Implement Tx SCTP CSO

2023-04-26 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki Reviewed-by: Sriram Yagnaraman --- 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 4

[PATCH v4 20/48] igb: Remove goto

2023-04-26 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 v4 04/48] igb: Fix Rx packet type encoding

2023-04-26 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 Reviewed-by: Sriram Yagnaraman --- hw/net/igb_regs

[PATCH v4 30/48] net/eth: Use void pointers

2023-04-26 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 v4 12/48] tests/avocado: Remove test_igb_nomsi_kvm

2023-04-26 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 Reviewed-by: Thomas Huth Acked-by: Alex Bennée --- tests/avocado/netdev-ethtool.py | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/tests/

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

2023-04-26 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 v4 26/48] igb: Fix igb_mac_reg_init coding style alignment

2023-04-26 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 56a53872cf..20645c4764 100644 --- a/hw/net/igb_

[PATCH v4 16/48] e1000x: Take CRC into consideration for size check

2023-04-26 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

Re: [PATCH] multifd: Avoid busy-wait in multifd_send_pages()

2023-04-26 Thread manish.mishra
On 26/04/23 3:58 pm, Juan Quintela wrote: "manish.mishra" wrote: multifd_send_sync_main() posts request on the multifd channel but does not call sem_wait() on channels_ready semaphore, making the channels_ready semaphore count keep increasing. As a result, sem_wait() on channels_ready in mult

[PATCH v4 44/48] igb: Notify only new interrupts

2023-04-26 Thread Akihiko Odaki
This follows the corresponding change for e1000e. This fixes: tests/avocado/netdev-ethtool.py:NetDevEthtool.test_igb Signed-off-by: Akihiko Odaki --- hw/net/igb_core.c | 201 -- hw/net/trace-events | 11 +- .../org.centos/str

[PATCH v4 15/48] e1000x: Share more Rx filtering logic

2023-04-26 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 v4 29/48] igb: Rename a variable in igb_receive_internal()

2023-04-26 Thread Akihiko Odaki
Rename variable "n" to "causes", which properly represents the content of the variable. Signed-off-by: Akihiko Odaki Reviewed-by: Sriram Yagnaraman --- hw/net/igb_core.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index

[PATCH v4 24/48] igb: Add more definitions for Tx descriptor

2023-04-26 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki Reviewed-by: Sriram Yagnaraman --- 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

[PATCH v4 10/48] Fix references to igb Avocado test

2023-04-26 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 v4 46/48] vmxnet3: Do not depend on PC

2023-04-26 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 v4 31/48] net/eth: Always add VLAN tag

2023-04-26 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 v4 14/48] net/eth: Rename eth_setup_vlan_headers_ex

2023-04-26 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 Reviewed-by: Philippe Mathieu-Daudé --- include/net/eth.h | 9 + hw/net/net_tx_pkt.c | 2 +- net/eth.c | 2 +- 3 files changed, 3 insertions(+), 10 dele

[PATCH v4 33/48] tests/qtest/libqos/igb: Set GPIE.Multiple_MSIX

2023-04-26 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 Reviewed-by: Sriram Yagnaraman --- tests/qtest/libqos/igb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/libqos/igb.c b/tests/qtest/libqos

[PATCH v4 36/48] igb: Implement Rx SCTP CSO

2023-04-26 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki Reviewed-by: Sriram Yagnaraman --- 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 +++--

[PATCH v4 34/48] igb: Implement MSI-X single vector mode

2023-04-26 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 c954369964..6d55b43fb4 100644 --- a/hw/net/igb_core.c +++ b/hw/net/igb_core.c @@ -1873,7 +187

[PATCH v4 23/48] vmxnet3: Reset packet state after emptying Tx queue

2023-04-26 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

Re: [PATCH] tests/unit/test-blockjob: Re-enable complete_in_standby test

2023-04-26 Thread Emanuele Giuseppe Esposito
Am 26/04/2023 um 10:45 schrieb Thomas Huth: > On 26/04/2023 10.16, Emanuele Giuseppe Esposito wrote: >> Pause the job while draining so that pause_count will be >> increased and bdrv_drain_all_end() won't reset it to 0, so the >> job will not continue. >> >> With this fix, the test is not flaky

[PATCH v4 45/48] igb: Clear-on-read ICR when ICR.INTA is set

2023-04-26 Thread Akihiko Odaki
For GPIE.NSICR, Section 7.3.2.1.2 says: > ICR bits are cleared on register read. If GPIE.NSICR = 0b, then the > clear on read occurs only if no bit is set in the IMS or at least one > bit is set in the IMS and there is a true interrupt as reflected in > ICR.INTA. e1000e does similar though it chec

[PATCH v4 32/48] hw/net/net_rx_pkt: Enforce alignment for eth_header

2023-04-26 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 Reviewed-by: Sriram Yagnaraman --- hw/net/net_rx_pkt.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/net/net_rx_pk

[PATCH v4 35/48] igb: Use UDP for RSS hash

2023-04-26 Thread Akihiko Odaki
e1000e does not support using UDP for RSS hash, but igb does. Signed-off-by: Akihiko Odaki Reviewed-by: Sriram Yagnaraman --- 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 eb995d8b

[PATCH v4 43/48] e1000e: Notify only new interrupts

2023-04-26 Thread Akihiko Odaki
In MSI-X mode, if there are interrupts already notified but not cleared and a new interrupt arrives, e1000e incorrectly notifies the notified ones again along with the new one. To fix this issue, replace e1000e_update_interrupt_state() with two new functions: e1000e_raise_interrupts() and e1000e_l

[PATCH v2] tests/unit/test-blockjob: Re-enable complete_in_standby test

2023-04-26 Thread Emanuele Giuseppe Esposito
Pause the job while draining so that pause_count will be increased and bdrv_drain_all_end() won't reset it to 0, so the job will not continue. With this fix, the test is not flaky anymore. Additionally remove useless aiocontext lock around bdrv_drain_all_end() in test_complete_in_standby(). Fixe

[PATCH v4 42/48] igb: Implement Tx timestamp

2023-04-26 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki Reviewed-by: Sriram Yagnaraman --- 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 @@ -

[PATCH v4 41/48] igb: Implement Rx PTP2 timestamp

2023-04-26 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 v4 19/48] igb: Always log status after building rx metadata

2023-04-26 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 v4 48/48] docs/system/devices/igb: Note igb is tested for DPDK

2023-04-26 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

Re: [PATCH 01/13] hw/ide/pci: Expose legacy interrupts as GPIOs

2023-04-26 Thread Mark Cave-Ayland
On 22/04/2023 16:07, Bernhard Beschow wrote: Exposing the legacy IDE interrupts as GPIOs allows them to be connected in the parent device through qdev_connect_gpio_out(), i.e. without accessing private data of TYPE_PCI_IDE. Signed-off-by: Bernhard Beschow --- hw/ide/pci.c | 8 1 fi

[PATCH v4 38/48] igb: Strip the second VLAN tag for extended VLAN

2023-04-26 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 v4 22/48] e1000e: Reset packet state after emptying Tx queue

2023-04-26 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 v4 47/48] MAINTAINERS: Add a reviewer for network packet abstractions

2023-04-26 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 v4 40/48] igb: Implement igb-specific oversize check

2023-04-26 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 Reviewed-by: Sriram Yagnaraman --- hw/net/igb_core.c | 36 +--- 1 file changed, 21 insertions(+), 15 del

[PATCH v4 39/48] igb: Filter with the second VLAN tag for extended VLAN

2023-04-26 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 688eaf7319..5345f57031 100644 --- a/hw/net/igb_core.c +++ b/hw/net/igb_core.c @@ -69,7 +69,7 @@ typedef struc

[PATCH v4 03/48] e1000x: Fix BPRC and MPRC

2023-04-26 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

Re: [PATCH 02/13] hw/ide/via: Implement ISA IRQ routing

2023-04-26 Thread Mark Cave-Ayland
On 22/04/2023 16:07, Bernhard Beschow wrote: The VIA south bridge allows the legacy IDE interrupts to be routed to four different ISA interrupts. This can be configured through the 0x4a register in the PCI configuration space of the ISA function. The default routing matches the legacy ISA IRQs,

Re: [PATCH 03/13] hw/isa/vt82c686: Remove via_isa_set_irq()

2023-04-26 Thread Mark Cave-Ayland
On 22/04/2023 16:07, Bernhard Beschow wrote: Now that via_isa_set_irq() is unused it can be removed. Signed-off-by: Bernhard Beschow --- include/hw/isa/vt82c686.h | 2 -- hw/isa/vt82c686.c | 6 -- 2 files changed, 8 deletions(-) diff --git a/include/hw/isa/vt82c686.h b/include

Re: [PATCH 04/13] hw/ide: Extract IDEBus assignment into bmdma_init()

2023-04-26 Thread Mark Cave-Ayland
On 22/04/2023 16:07, Bernhard Beschow wrote: Every invocation of bmdma_init() is followed by `d->bmdma[i].bus = &d->bus[i]`. Resolve this redundancy by extracting it into bmdma_init(). Signed-off-by: Bernhard Beschow --- hw/ide/cmd646.c | 1 - hw/ide/pci.c | 1 + hw/ide/piix.c| 1

Re: [RFC PATCH 0/3] Deprecate the qemu-system-i386 binary

2023-04-26 Thread Paolo Bonzini
On 4/25/23 15:38, Thomas Huth wrote: - CPU types have different suffixes between the -x86_64 and -i386 variant (see TYPE_X86_CPU in cpu-qom.h) ... do we need to care about this in the new qemu-system-i386 symlink run mode? - The code in target/i386/tcg/sysemu/smm_helper.c looks like it

Re: [PATCH] multifd: Avoid busy-wait in multifd_send_pages()

2023-04-26 Thread Juan Quintela
"manish.mishra" wrote: > On 26/04/23 3:58 pm, Juan Quintela wrote: >> "manish.mishra" wrote: >>> multifd_send_sync_main() posts request on the multifd channel >>> but does not call sem_wait() on channels_ready semaphore, making >>> the channels_ready semaphore count keep increasing. >>> As a resu

Re: [PATCH 05/13] hw/ide: Extract pci_ide_class_init()

2023-04-26 Thread Mark Cave-Ayland
On 22/04/2023 16:07, Bernhard Beschow wrote: Resolves redundant code in every PCI IDE device model. I think this needs to mention that it's moving the PCIDeviceClass::exit() function from all of the PCI IDE controller implementations to a common implementation in the parent PCI_IDE type.

Re: [PATCH] linux-user: report ENOTTY for unknown ioctls

2023-04-26 Thread Philippe Mathieu-Daudé
On 26/4/23 09:06, Thomas Weißschuh wrote: The correct error number for unknown ioctls is ENOTTY. ENOSYS would mean that the ioctl() syscall itself is not implemented, which is very improbable and unexpected for userspace. ENOTTY means "Inappropriate ioctl for device". This is what the kernel re

Re: [PULL 00/17] QAPI patches patches for 2023-04-26

2023-04-26 Thread Richard Henderson
On 4/26/23 06:57, Markus Armbruster wrote: The following changes since commit 327ec8d6c2a2223b78d311153a471036e474c5c5: Merge tag 'pull-tcg-20230423' ofhttps://gitlab.com/rth7680/qemu into staging (2023-04-23 11:20:37 +0100) are available in the Git repository at: https://repo.or.cz/qe

Re: [PULL 00/25] Block layer patches

2023-04-26 Thread Richard Henderson
On 4/25/23 14:13, Kevin Wolf wrote: The following changes since commit ac5f7bf8e208cd7893dbb1a9520559e569a4677c: Merge tag 'migration-20230424-pull-request' ofhttps://gitlab.com/juan.quintela/qemu into staging (2023-04-24 15:00:39 +0100) are available in the Git repository at: https:/

Re: [PATCH 06/13] hw/ide: Extract bmdma_init_ops()

2023-04-26 Thread Mark Cave-Ayland
On 22/04/2023 16:07, Bernhard Beschow wrote: There are three private copies of bmdma_setup_bar() with small adaptions. Consolidate them into one public implementation. While at it rename the function to bmdma_init_ops() to reflect that the memory regions being initialized represent BMDMA operat

Re: [PATCH 07/13] hw/ide: Extract pci_ide_{cmd, data}_le_ops initialization into base class constructor

2023-04-26 Thread Mark Cave-Ayland
On 22/04/2023 16:07, Bernhard Beschow wrote: There is redundant code in cmd646 and via which can be extracted into the base class. In case of piix and sii3112 this is currently unneccessary but shouldn't interfere since the memory regions aren't mapped by those devices. In few commits later this

Re: [PATCH 08/13] hw/ide: Rename PCIIDEState::*_bar attributes

2023-04-26 Thread Mark Cave-Ayland
On 22/04/2023 16:07, Bernhard Beschow wrote: The attributes represent memory regions containing operations which are mapped by the device models into PCI BARs. Reflect this by changing the suffic into "_ops". Note that in a few commits piix will also use the {cmd,data}_ops but won't map them in

Re: [PATCH v3 18/57] tcg/loongarch64: Rationalize args to tcg_out_qemu_{ld, st}

2023-04-26 Thread Philippe Mathieu-Daudé
On 24/4/23 07:40, Richard Henderson wrote: Interpret the variable argument placement in the caller. Shift some code around slightly to share more between softmmu and user-only. Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 100 +-- 1 fil

Re: [PATCH] multifd: Avoid busy-wait in multifd_send_pages()

2023-04-26 Thread manish.mishra
On 26/04/23 4:35 pm, Juan Quintela wrote: "manish.mishra" wrote: On 26/04/23 3:58 pm, Juan Quintela wrote: "manish.mishra" wrote: multifd_send_sync_main() posts request on the multifd channel but does not call sem_wait() on channels_ready semaphore, making the channels_ready semaphore coun

Re: [PATCH 09/13] hw/ide/piix: Disuse isa_get_irq()

2023-04-26 Thread Mark Cave-Ayland
On 22/04/2023 16:07, Bernhard Beschow wrote: isa_get_irq() asks for an ISADevice which piix-ide doesn't provide. Passing a NULL pointer works but causes the isabus global to be used then. By fishing out TYPE_ISA_BUS from the QOM tree it is possible to achieve the same as using isa_get_irq(). Th

Re: [PATCH 10/13] hw/ide/piix: Reuse PCIIDEState::{cmd,data}_ops

2023-04-26 Thread Mark Cave-Ayland
On 22/04/2023 16:07, Bernhard Beschow wrote: Now that PCIIDEState::{cmd,data}_ops are initialized in the base class constructor there is an opportunity for PIIX to reuse these attributes. This resolves usage of ide_init_ioport() which would fall back internally to using the isabus global due to

Re: [PATCH v2] tests/unit/test-blockjob: Re-enable complete_in_standby test

2023-04-26 Thread Vladimir Sementsov-Ogievskiy
On 26.04.23 13:40, Emanuele Giuseppe Esposito wrote: Pause the job while draining so that pause_count will be increased and bdrv_drain_all_end() won't reset it to 0, so the job will not continue. With this fix, the test is not flaky anymore. Additionally remove useless aiocontext lock around bd

Re: [PATCH 11/13] hw/ide/sii3112: Reuse PCIIDEState::{cmd,data}_ops

2023-04-26 Thread Mark Cave-Ayland
On 22/04/2023 16:07, Bernhard Beschow wrote: Allows to unexport pci_ide_{cmd,data}_le_ops and models TYPE_SII3112_PCI as a standard-compliant PCI IDE device. Signed-off-by: Bernhard Beschow --- include/hw/ide/pci.h | 2 -- hw/ide/pci.c | 4 ++-- hw/ide/sii3112.c | 50

[PATCH] hw/remote: Fix vfu_cfg trace offset format

2023-04-26 Thread Mattias Nissler
The printed offset value is prefixed with 0x, but was actually printed in decimal. To spare others the confusion, adjust the format specifier to hexadecimal. Signed-off-by: Mattias Nissler --- hw/remote/trace-events | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/remot

Test-qga:Qga write is blocked when the client is no connected, virtio-serial port is throttled.

2023-04-26 Thread overgo
Hi, I am testing when qga push msg to libvirt, when the vm saved and restore from the memory file, the qga will be hunged in writing. In flush_buf:(gdb) f 4#4 0x55ffc716894a in flush_buf (port=0x55ffc87bf800, buf=, len=) at ../hw/char/virtio-console.c:100100 vcon->watch

Re: [PATCH 00/21] Hexagon (target/hexagon) short-circuit and move to DisasContext

2023-04-26 Thread Anton Johansson via
On 4/26/23 02:39, Taylor Simpson wrote: This patch series achieves two major goals Goal 1: Short-circuit packet semantics In certain cases, we can avoid the overhead of writing to hex_new_value and write directly to hex_gpr. Here's a simple example of the TCG generated for

  1   2   3   >