Re: [PATCH 0/3] hw: Fix abuse of QOM class internals modified by their instances

2023-05-23 Thread Philippe Mathieu-Daudé
(posted too quickly) On 23/5/23 08:44, Philippe Mathieu-Daudé wrote: Bernhard warned for QOM class abuse here [*]: A realize method is supposed to modify a single instance only while we're modifying the behavior of whole classes here, i.e. will affect every instance of these classes. This goes

Re: [PATCH] bitops.h: Compile out asserts without --enable-debug

2023-05-23 Thread Alex Bennée
Richard Henderson writes: > On 5/22/23 15:26, BALATON Zoltan wrote: >> On Mon, 22 May 2023, Alex Bennée wrote: >>> (ajb: add Richard for his compiler-fu) >>> BALATON Zoltan writes: On Mon, 22 May 2023, Alex Bennée wrote: > BALATON Zoltan writes: > >> The low level extract and

Re: [PATCH 7/8] python/qemu: allow avocado to set logging name space

2023-05-23 Thread Daniel P . Berrangé
On Thu, May 18, 2023 at 04:15:03PM -0400, John Snow wrote: > On Thu, May 18, 2023 at 12:20 PM Alex Bennée wrote: > > > > Since the update to the latest version Avocado only automatically > > collects logging under the avocado name space. Tweak the QEMUMachine > > class to allow avocado to bring lo

Re: [PATCH v7 08/14] KVM: Rename mmu_notifier_*

2023-05-23 Thread Kautuk Consul
On 2022-07-06 16:20:10, Chao Peng wrote: > The sync mechanism between mmu_notifier and page fault handler employs > fields mmu_notifier_seq/count and mmu_notifier_range_start/end. For the > to be added private memory, there is the same mechanism needed but not > rely on mmu_notifier (It uses new in

Re: [PATCH] meson: remove -no-pie linker flag

2023-05-23 Thread Paolo Bonzini
On Mon, May 22, 2023 at 4:39 PM Richard Henderson wrote: > > + # What about linker flags? For a static build, no PIE is implied by > > -static > > + # which we added above. > > Is it though? That was the major problem at the time: it wasn't. It's what configure was doing: if test "$static"

[PATCH v2] meson: move -no-pie from linker to compiler

2023-05-23 Thread Paolo Bonzini
The large comment in the patch says it all; the -no-pie flag is broken and this is why it was not included in QEMU_LDFLAGS before commit a988b4c5614 ("build: move remaining compiler flag tests to meson", 2023-05-18). And some distros made things even worse, so we have to add it to the compiler com

[PULL 06/50] igb: Do not require CTRL.VME for tx VLAN tagging

2023-05-23 Thread Jason Wang
From: 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

[PULL 12/50] tests/avocado: Remove unused imports

2023-05-23 Thread Jason Wang
From: Akihiko Odaki Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- 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 f7e9464..8de118e 100644 --- a/tests/avocado/netdev-ethtool.p

[PULL 14/50] hw/net/net_tx_pkt: Remove net_rx_pkt_get_l4_info

2023-05-23 Thread Jason Wang
From: Akihiko Odaki This function is not used. Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- hw/net/net_rx_pkt.c | 5 - hw/net/net_rx_pkt.h | 9 - 2 files changed, 14 deletions(-) diff --git a/hw/net/net_rx_pkt.c b/hw/net/net_rx_pkt.c index 63be6e0..6125a06 100644 --

[PULL 07/50] igb: Clear IMS bits when committing ICR access

2023-05-23 Thread Jason Wang
From: 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.k

[PULL 02/50] hw/net/net_tx_pkt: Decouple implementation from PCI

2023-05-23 Thread Jason Wang
From: 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 Signed-off-by: Jason

[PULL 13/50] tests/avocado: Remove test_igb_nomsi_kvm

2023-05-23 Thread Jason Wang
From: 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 Signed-off-by: Jason Wang --- tests/avocado/netdev-ethtool.py | 12 +--- 1 file changed, 1 i

[PULL 09/50] e1000e: Always copy ethernet header

2023-05-23 Thread Jason Wang
From: 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 octet

[PULL 08/50] net/net_rx_pkt: Use iovec for net_rx_pkt_set_protocols()

2023-05-23 Thread Jason Wang
From: 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 Reviewe

[PULL 05/50] igb: Fix Rx packet type encoding

2023-05-23 Thread Jason Wang
From: 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

[PULL 28/50] igb: Clear EICR bits for delayed MSI-X interrupts

2023-05-23 Thread Jason Wang
From: 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

[PULL 01/50] e1000e: Fix tx/rx counters

2023-05-23 Thread Jason Wang
From: "timothee.coca...@gmail.com" The bytes and packets counter registers are cleared on read. Copying the "total counter" registers to the "good counter" registers has side effects. If the "total" register is never read by the OS, it only gets incremented. This leads to exponential growth of t

[PULL 23/50] e1000e: Reset packet state after emptying Tx queue

2023-05-23 Thread Jason Wang
From: 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 r

[PULL 20/50] igb: Always log status after building rx metadata

2023-05-23 Thread Jason Wang
From: 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é Signed-off-by: Jason Wang --- hw/net/igb_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PULL 42/50] igb: Implement Rx PTP2 timestamp

2023-05-23 Thread Jason Wang
From: Akihiko Odaki Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- hw/net/igb_common.h | 16 --- hw/net/igb_core.c | 129 ++-- hw/net/igb_regs.h | 23 ++ 3 files changed, 127 insertions(+), 41 deletions(-) diff --gi

[PULL 24/50] vmxnet3: Reset packet state after emptying Tx queue

2023-05-23 Thread Jason Wang
From: 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 Signed-off-by: Jason Wang ---

[PULL 00/50] Net patches

2023-05-23 Thread Jason Wang
The following changes since commit 886c0453cbf10eebd42a9ccf89c3e46eb389c357: Merge tag 'pull-qapi-2023-05-17-v2' of https://repo.or.cz/qemu/armbru into staging (2023-05-22 15:54:21 -0700) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for

[PULL 36/50] igb: Use UDP for RSS hash

2023-05-23 Thread Jason Wang
From: Akihiko Odaki e1000e does not support using UDP for RSS hash, but igb does. Signed-off-by: Akihiko Odaki Reviewed-by: Sriram Yagnaraman Signed-off-by: Jason Wang --- hw/net/igb_core.c | 16 hw/net/igb_regs.h | 3 +++ 2 files changed, 19 insertions(+) diff --git a/hw/

[PULL 18/50] e1000x: Rename TcpIpv6 into TcpIpv6Ex

2023-05-23 Thread Jason Wang
From: 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

[PULL 45/50] igb: Notify only new interrupts

2023-05-23 Thread Jason Wang
From: Akihiko Odaki This follows the corresponding change for e1000e. This fixes: tests/avocado/netdev-ethtool.py:NetDevEthtool.test_igb Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- hw/net/igb_core.c | 201 + hw/net/trace-even

[PULL 11/50] Fix references to igb Avocado test

2023-05-23 Thread Jason Wang
From: Akihiko Odaki Fixes: 9f95111474 ("tests/avocado: re-factor igb test to avoid timeouts") Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jason Wang --- MAINTAINERS| 2 +- docs/system/devices/igb.rst

[PULL 15/50] net/eth: Rename eth_setup_vlan_headers_ex

2023-05-23 Thread Jason Wang
From: 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é Signed-off-by: Jason Wang --- hw/net/net_tx_pkt.c | 2 +- include/net/eth.h | 9 + net/eth.c

[PULL 40/50] igb: Filter with the second VLAN tag for extended VLAN

2023-05-23 Thread Jason Wang
From: Akihiko Odaki Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- 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 688eaf7..5345f57 100644 --- a/hw/net/igb_core.c +++ b/hw/net

[PULL 44/50] e1000e: Notify only new interrupts

2023-05-23 Thread Jason Wang
From: 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_int

[PULL 19/50] e1000e: Always log status after building rx metadata

2023-05-23 Thread Jason Wang
From: 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é Signed-off-by: Jason Wang --- hw/net/e1000e_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) di

[PULL 49/50] docs/system/devices/igb: Note igb is tested for DPDK

2023-05-23 Thread Jason Wang
From: Akihiko Odaki Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- 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 07d95dd..04e79df 100644 --- a/docs/system/

[PULL 03/50] hw/net/net_tx_pkt: Decouple interface from PCI

2023-05-23 Thread Jason Wang
From: Akihiko Odaki This allows to use the network packet abstractions even if PCI is not used. Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- hw/net/e1000e_core.c | 13 - hw/net/igb_core.c| 13 ++--- hw/net/net_tx_pkt.c | 36 +-

[PULL 31/50] net/eth: Use void pointers

2023-05-23 Thread Jason Wang
From: 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é Signed-off-by: Jason Wang --- include/n

[PULL 37/50] igb: Implement Rx SCTP CSO

2023-05-23 Thread Jason Wang
From: Akihiko Odaki Signed-off-by: Akihiko Odaki Reviewed-by: Sriram Yagnaraman Signed-off-by: Jason Wang --- hw/net/e1000e_core.c | 5 hw/net/igb_core.c | 15 +++- hw/net/igb_regs.h | 1 + hw/net/net_rx_pkt.c | 64 ++-

[PULL 30/50] igb: Rename a variable in igb_receive_internal()

2023-05-23 Thread Jason Wang
From: Akihiko Odaki Rename variable "n" to "causes", which properly represents the content of the variable. Signed-off-by: Akihiko Odaki Reviewed-by: Sriram Yagnaraman Signed-off-by: Jason Wang --- hw/net/igb_core.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --g

[PULL 41/50] igb: Implement igb-specific oversize check

2023-05-23 Thread Jason Wang
From: 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 Signed-off-by: Jason Wang --- hw/net/igb_core.c | 36 +

[PULL 34/50] tests/qtest/libqos/igb: Set GPIE.Multiple_MSIX

2023-05-23 Thread Jason Wang
From: 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 Signed-off-by: Jason Wang --- tests/qtest/libqos/igb.c | 1 + 1 file changed, 1 insertion(+) diff --gi

[PULL 22/50] igb: Read DCMD.VLE of the first Tx descriptor

2023-05-23 Thread Jason Wang
From: 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

[PULL 16/50] e1000x: Share more Rx filtering logic

2023-05-23 Thread Jason Wang
From: Akihiko Odaki This saves some code and enables tracepoint for e1000's VLAN filtering. Signed-off-by: Akihiko Odaki Reviewed-by: Sriram Yagnaraman Signed-off-by: Jason Wang --- hw/net/e1000.c | 35 +-- hw/net/e1000e_core.c | 47 +

[PULL 39/50] igb: Strip the second VLAN tag for extended VLAN

2023-05-23 Thread Jason Wang
From: Akihiko Odaki Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- hw/net/e1000e_core.c | 3 ++- hw/net/igb_core.c| 14 -- hw/net/net_rx_pkt.c | 15 ++- hw/net/net_rx_pkt.h | 19 ++- include/net/eth.h| 4 ++-- net/eth.c

[PULL 10/50] igb: Always copy ethernet header

2023-05-23 Thread Jason Wang
From: 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,

[PULL 48/50] MAINTAINERS: Add a reviewer for network packet abstractions

2023-05-23 Thread Jason Wang
From: 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é Signed-off-by: Jason Wang --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINER

[PULL 29/50] e1000e: Rename a variable in e1000e_receive_internal()

2023-05-23 Thread Jason Wang
From: Akihiko Odaki Rename variable "n" to "causes", which properly represents the content of the variable. Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- hw/net/e1000e_core.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/net/e1000e_core

[PULL 04/50] e1000x: Fix BPRC and MPRC

2023-05-23 Thread Jason Wang
From: 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

[PULL 21/50] igb: Remove goto

2023-05-23 Thread Jason Wang
From: 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 Signed-off-by: Jason Wang --- hw/net/ig

[PULL 50/50] rtl8139: fix large_send_mss divide-by-zero

2023-05-23 Thread Jason Wang
From: Stefan Hajnoczi If the driver sets large_send_mss to 0 then a divide-by-zero occurs. Even if the division wasn't a problem, the for loop that emits MSS-sized packets would never terminate. Solve these issues by skipping offloading when large_send_mss=0. This issue was found by OSS-Fuzz as

[PULL 17/50] e1000x: Take CRC into consideration for size check

2023-05-23 Thread Jason Wang
From: 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 i

[PULL 35/50] igb: Implement MSI-X single vector mode

2023-05-23 Thread Jason Wang
From: Akihiko Odaki Signed-off-by: Akihiko Odaki Reviewed-by: Sriram Yagnaraman Signed-off-by: Jason Wang --- 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 c954369..6d55b43 100644 --- a/hw/net/igb_cor

[PULL 25/50] igb: Add more definitions for Tx descriptor

2023-05-23 Thread Jason Wang
From: Akihiko Odaki Signed-off-by: Akihiko Odaki Reviewed-by: Sriram Yagnaraman Signed-off-by: Jason Wang --- hw/net/igb_core.c | 4 ++-- hw/net/igb_regs.h | 32 +++- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_co

[PULL 32/50] net/eth: Always add VLAN tag

2023-05-23 Thread Jason Wang
From: Akihiko Odaki It is possible to have another VLAN tag even if the packet is already tagged. Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- hw/net/net_tx_pkt.c | 16 +++- include/net/eth.h | 4 ++-- net/eth.c | 22 ++ 3 files chang

[PULL 47/50] vmxnet3: Do not depend on PC

2023-05-23 Thread Jason Wang
From: 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é Signed-off-by: Jason Wang --- hw/net/Kconfig | 2 +- 1 file

[PULL 43/50] igb: Implement Tx timestamp

2023-05-23 Thread Jason Wang
From: Akihiko Odaki Signed-off-by: Akihiko Odaki Reviewed-by: Sriram Yagnaraman Signed-off-by: Jason Wang --- hw/net/igb_core.c | 7 +++ hw/net/igb_regs.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index 43d23c7..49d1917 100644 --- a/hw/

[PULL 27/50] igb: Fix igb_mac_reg_init coding style alignment

2023-05-23 Thread Jason Wang
From: Akihiko Odaki Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jason Wang --- 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_cor

[PULL 33/50] hw/net/net_rx_pkt: Enforce alignment for eth_header

2023-05-23 Thread Jason Wang
From: 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 Signed-off-by: Jason Wang --- hw/net/net_rx_pkt.c | 11 +++ 1 file changed, 7 insertions(

[PULL 26/50] igb: Share common VF constants

2023-05-23 Thread Jason Wang
From: 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 Signed-off-by: Jason Wang --- hw/net/igb.c| 10 +- hw/net/igb_common.h | 8 hw/net/igbvf.c

[PULL 46/50] igb: Clear-on-read ICR when ICR.INTA is set

2023-05-23 Thread Jason Wang
From: 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

[PULL 38/50] igb: Implement Tx SCTP CSO

2023-05-23 Thread Jason Wang
From: Akihiko Odaki Signed-off-by: Akihiko Odaki Reviewed-by: Sriram Yagnaraman Signed-off-by: Jason Wang --- hw/net/igb_core.c | 12 +++- hw/net/net_tx_pkt.c | 18 ++ hw/net/net_tx_pkt.h | 8 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/

Re: [PATCH] meson: remove -no-pie linker flag

2023-05-23 Thread Michael Tokarev
22.05.2023 18:54, Richard Henderson wrote: .. -no-pie is a linker flag, but distro folk that didn't quite know what they were doing made local changes to gcc's specs file.  So it *is* a compiler command-line flag, but only for some builds of gcc. Which distros is that? Debian? Patching gcc spec

Re: Add CI configuration for Kubernetes

2023-05-23 Thread Daniel P . Berrangé
On Mon, May 22, 2023 at 03:52:30PM -0700, Richard Henderson wrote: > On 5/22/23 10:41, Camilla Conte wrote: > > Here's a second version (v2) of patches to support the Kubernetes runner > > for Gitlab CI. > > You can find the v1 thread here: > > https://lore.kernel.org/qemu-devel/20230407145252.32

Re: [PATCH v3 3/3] tests/qtest: sifive-e-aon-watchdog-test.c : Add QTest of watchdog of sifive_e

2023-05-23 Thread Tommy Wu
Hi Thomas, Sorry for the very late reply. Thanks for the code review! I'll send patch v4 to fix these issues. On Wed, Nov 30, 2022 at 7:29 PM Thomas Huth wrote: > On 30/11/2022 02.54, Tommy Wu wrote: > > Add some simple tests of the watchdog timer in the always-on domain > device > > of HiFive 1

Re: [PATCH v3 1/3] hw/misc: sifive_e_aon: Support the watchdog timer of HiFive 1 rev b.

2023-05-23 Thread Tommy Wu
Hi Alistair, Sorry for the very late reply. Thanks for the code review! I'll send patch v4 to fix this issue. On Wed, Dec 7, 2022 at 12:02 PM Alistair Francis wrote: > On Wed, Nov 30, 2022 at 11:56 AM Tommy Wu wrote: > > > > The watchdog timer is in the always-on domain device of HiFive 1 rev b

Re: [PATCH] meson: remove -no-pie linker flag

2023-05-23 Thread Daniel P . Berrangé
On Mon, May 22, 2023 at 10:08:16AM +0200, Paolo Bonzini wrote: > The large comment in the patch says it all; the -no-pie flag is broken and > this is why it was not included in QEMU_LDFLAGS before commit a988b4c5614 > ("build: move remaining compiler flag tests to meson", 2023-05-18). > > Resolves

Re: [PATCH] meson: remove -no-pie linker flag

2023-05-23 Thread Paolo Bonzini
On Tue, May 23, 2023 at 10:00 AM Daniel P. Berrangé wrote: > I'm curious why we need to do anything ? I would have thought that meson > should handle 'b_pie' itself, passing the right args to $CC that it feels > are appropriate. I don't recall seeing other apps using meson trying to > handle b_pi

Re: [PATCH] ui/cursor: incomplete check for integer overflow in cursor_alloc

2023-05-23 Thread Daniel P . Berrangé
On Mon, May 22, 2023 at 08:55:02PM +0200, Philippe Mathieu-Daudé wrote: > On 9/5/23 09:13, Marc-André Lureau wrote: > > Hi > > > > On Mon, May 8, 2023 at 6:21 PM Mauro Matteo Cascella > > mailto:mcasc...@redhat.com>> wrote: > > > > The cursor_alloc function still accepts a signed integer for

Re: [PATCH v5 5/7] hw/cxl/events: Add injection of General Media Events

2023-05-23 Thread Markus Armbruster
Jonathan Cameron writes: > On Mon, 22 May 2023 09:19:57 +0200 > Markus Armbruster wrote: > >> Jonathan Cameron writes: >> >> > From: Ira Weiny >> > >> > To facilitate testing provide a QMP command to inject a general media >> > event. The event can be added to the log specified. >> > >> > Si

Re: [PATCH] ui/cursor: incomplete check for integer overflow in cursor_alloc

2023-05-23 Thread Daniel P . Berrangé
On Mon, May 08, 2023 at 04:18:13PM +0200, Mauro Matteo Cascella wrote: > The cursor_alloc function still accepts a signed integer for both the cursor > width and height. A specially crafted negative width/height could make > datasize > wrap around and cause the next allocation to be 0, potentially

Re: [PATCH v2] meson: move -no-pie from linker to compiler

2023-05-23 Thread Philippe Mathieu-Daudé
On 23/5/23 09:30, Paolo Bonzini wrote: The large comment in the patch says it all; the -no-pie flag is broken and this is why it was not included in QEMU_LDFLAGS before commit a988b4c5614 ("build: move remaining compiler flag tests to meson", 2023-05-18). And some distros made things even worse,

Re: [PATCH] meson: remove -no-pie linker flag

2023-05-23 Thread Daniel P . Berrangé
On Tue, May 23, 2023 at 10:02:51AM +0200, Paolo Bonzini wrote: > On Tue, May 23, 2023 at 10:00 AM Daniel P. Berrangé > wrote: > > I'm curious why we need to do anything ? I would have thought that meson > > should handle 'b_pie' itself, passing the right args to $CC that it feels > > are appropr

[PATCH] intel_iommu: Optimize out some unnecessary UNMAP calls

2023-05-23 Thread Zhenzhong Duan
Commit 63b88968f1 ("intel-iommu: rework the page walk logic") adds logic to record mapped IOVA ranges so we only need to send MAP or UNMAP when necessary. But there are still a few corner cases of unnecessary UNMAP. One is address space switch. During switching to iommu address space, all the orig

Re: Add CI configuration for Kubernetes

2023-05-23 Thread Camilla Conte
On Mon, May 22, 2023 at 11:52 PM Richard Henderson wrote: > This does not work: > > https://gitlab.com/qemu-project/qemu/-/pipelines/875254290 My bad, sorry. I didn't update the runner with the new values.yaml. The Docker environment variables were missing so it's looking for the Docker server at

Re: [PATCH v2 1/5] Remove redundant CI variables

2023-05-23 Thread Daniel P . Berrangé
On Mon, May 22, 2023 at 06:41:50PM +0100, Camilla Conte wrote: > These are not needed when using gitlab.com shared runners. > > Signed-off-by: Camilla Conte > --- > .gitlab-ci.d/opensbi.yml | 3 --- > 1 file changed, 3 deletions(-) Reviewed-by: Daniel P. Berrangé With regards, Daniel -- |:

Re: [PATCH v2 2/5] Use docker "stable" tag

2023-05-23 Thread Daniel P . Berrangé
On Mon, May 22, 2023 at 06:41:51PM +0100, Camilla Conte wrote: > Use the same tag in all jobs. > > Signed-off-by: Camilla Conte > --- > .gitlab-ci.d/container-template.yml | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Daniel P. Berrangé With regards, Daniel -- |: http

Re: [PATCH v2 3/5] Add loop over docker info

2023-05-23 Thread Daniel P . Berrangé
On Mon, May 22, 2023 at 06:41:52PM +0100, Camilla Conte wrote: > Wait for docker info to return successfuly to ensure that > the docker server (daemon) started. > This is needed for jobs running on Kubernetes. > See https://wiki.qemu.org/Testing/CI/KubernetesRunners. > > Signed-off-by: Camilla Con

Re: [PATCH v2 4/5] Add CI variable RUNNER_TAG

2023-05-23 Thread Daniel P . Berrangé
On Mon, May 22, 2023 at 06:41:53PM +0100, Camilla Conte wrote: > This allows to set a job tag dinamically. typo - s/dinamically/dynamically/ can be fixed when a maintainer queues this, no need to repost just for this typo. > We need this to be able to select the Kubernetes runner. > See https:/

Re: [PATCH] ui/cursor: incomplete check for integer overflow in cursor_alloc

2023-05-23 Thread Philippe Mathieu-Daudé
On 23/5/23 10:09, Daniel P. Berrangé wrote: On Mon, May 22, 2023 at 08:55:02PM +0200, Philippe Mathieu-Daudé wrote: On 9/5/23 09:13, Marc-André Lureau wrote: Hi On Mon, May 8, 2023 at 6:21 PM Mauro Matteo Cascella mailto:mcasc...@redhat.com>> wrote: The cursor_alloc function still accept

Re: [PATCH v2 5/5] Add Kubernetes runner configuration

2023-05-23 Thread Daniel P . Berrangé
On Mon, May 22, 2023 at 06:41:54PM +0100, Camilla Conte wrote: > Custom values for the gitlab-runner Helm chart. > See https://wiki.qemu.org/Testing/CI/KubernetesRunners. > > Signed-off-by: Camilla Conte > --- > .../ci/gitlab-kubernetes-runners/values.yaml | 30 +++ > 1 file cha

[PATCH v4 0/3] Implement the watchdog timer of HiFive 1 rev b.

2023-05-23 Thread Tommy Wu
The HiFive 1 rev b includes a watchdog module based on a 32-bit counter. The watchdog timer is in the always-on domain device of HiFive 1 rev b, so this patch added the AON device to the sifive_e machine. This patch only implemented the functionality of the watchdog timer, not all the functionality

[PATCH v4 3/3] tests/qtest: sifive-e-aon-watchdog-test.c: Add QTest of watchdog of sifive_e

2023-05-23 Thread Tommy Wu
Add some simple tests of the watchdog timer in the always-on domain device of HiFive 1 rev b. Signed-off-by: Tommy Wu Reviewed-by: Frank Chang --- tests/qtest/meson.build | 3 + tests/qtest/sifive-e-aon-watchdog-test.c | 450 +++ 2 files changed, 453 inser

[PATCH v4 2/3] hw/riscv: sifive_e: Support the watchdog timer of HiFive 1 rev b.

2023-05-23 Thread Tommy Wu
Create the AON device when we realize the sifive_e machine. This patch only implemented the functionality of the watchdog timer, not all the functionality of the AON device. Signed-off-by: Tommy Wu Reviewed-by: Frank Chang --- hw/riscv/Kconfig| 1 + hw/riscv/sifive_e.c | 13

[PATCH v4 1/3] hw/misc: sifive_e_aon: Support the watchdog timer of HiFive 1 rev b.

2023-05-23 Thread Tommy Wu
The watchdog timer is in the always-on domain device of HiFive 1 rev b, so this patch added the AON device to the sifive_e machine. This patch only implemented the functionality of the watchdog timer. Signed-off-by: Tommy Wu Reviewed-by: Frank Chang --- hw/misc/Kconfig| 3 + h

Re: [PATCH v2 1/1] Add vpd data for Rainier machine

2023-05-23 Thread Philippe Mathieu-Daudé
Hi Ninad, On 22/5/23 17:36, Ninad Palsule wrote: The VPD data is added for system and BMC FRU. This data is fabricated. Per https://www.qemu.org/docs/master/devel/submitting-a-patch.html#write-a-meaningful-commit-message: QEMU follows the usual standard for git commit messages: the first

Re: [PATCH 2/3] hw/ppc/e500plat: Fix modifying QOM class internal state from instance

2023-05-23 Thread Alexander Graf
Hi Philippe, On 23.05.23 08:44, Philippe Mathieu-Daudé wrote: QOM object instance should not modify its class state (because all other objects instanciated from this class get affected). Instead of modifying the PPCE500MachineClass 'mpic_version' field in the instance machine_init() handler, se

Re: [PATCH] machine: do not crash if default RAM backend name has been stollen

2023-05-23 Thread Shaoqin Huang
With the patch, qemu exits normally instead of Aborted. On 5/22/23 21:17, Igor Mammedov wrote: QEMU aborts when default RAM backend should be used (i.e. no explicit '-machine memory-backend=' specified) but user has created an object which 'id' equals to default RAM backend name used by board.

Re: Help finding Coverity defects for generated Hexagon code

2023-05-23 Thread Peter Maydell
On Mon, 22 May 2023 at 21:24, Anton Johansson wrote: > > Hi, > > coverity recently reported some defects in code generated by idef-parser > (email attached). These defects are expected and we plan to emit a > /* coverity[event_tag] */ comment to disable the specific event triggered. We don't mark

Re: [PATCH] ui/sdl2: fix surface_gl_update_texture: Assertion 'gls' failed

2023-05-23 Thread Bin Meng
On Thu, May 11, 2023 at 3:43 PM wrote: > > From: Marc-André Lureau > > Before sdl2_gl_update() is called, sdl2_gl_switch() may decide to > destroy the console window and its associated shaders. > > Fixes: > https://gitlab.com/qemu-project/qemu/-/issues/1644 This should be: Resolves: https://git

[PATCH v2 7/8] disas/riscv.c: Fix lines with over 80 characters

2023-05-23 Thread Weiwei Li
Fix lines with over 80 characters. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Daniel Henrique Barboza --- disas/riscv.c | 201 +++--- 1 file changed, 140 insertions(+), 61 deletions(-) diff --git a/disas/riscv.c b/disas/riscv

[PATCH v2 4/8] disas/riscv.c: Support disas for Zcm* extensions

2023-05-23 Thread Weiwei Li
Support disas for Zcmt* instructions only when related extensions are supported. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Daniel Henrique Barboza --- disas/riscv.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/disas/riscv.c b/disas/riscv.c

[PATCH v2 3/8] target/riscv: Pass RISCVCPUConfig as target_info to disassemble_info

2023-05-23 Thread Weiwei Li
Pass RISCVCPUConfig as disassemble_info.target_info to support disas of conflict instructions related to specific extensions. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Daniel Henrique Barboza --- disas/riscv.c | 10 +++--- target/riscv/cpu.c | 1 + 2 files ch

[PATCH v2 5/8] disas/riscv.c: Support disas for Z*inx extensions

2023-05-23 Thread Weiwei Li
Support disas for Z*inx instructions only when Zfinx extension is supported. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Daniel Henrique Barboza --- disas/riscv.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/disas/riscv.c b/disas/

[PATCH v2 1/8] disas: Change type of disassemble_info.target_info to pointer

2023-05-23 Thread Weiwei Li
Use pointer to pass more information of target to disasembler, such as pass cpu.cfg related information in following commits. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Daniel Henrique Barboza --- include/disas/dis-asm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH v2 0/8] Add support for extension specific disas

2023-05-23 Thread Weiwei Li
Some extensions have conflict encodings, such as * Z*inx reuse the same encodings as normal float point extensions. * Zcm* reuse the some encodings of Zcd. * Custom extensions from different vendors may share the same encodings. To resolve this problem, this patchset tries to pass RISCVCPUConfig

[PATCH v2 8/8] disas/riscv.c: Remove redundant parentheses

2023-05-23 Thread Weiwei Li
Remove redundant parenthese and fix multi-line comments. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Daniel Henrique Barboza --- disas/riscv.c | 219 +- 1 file changed, 110 insertions(+), 109 deletions(-) diff --git a/disa

[PATCH v2 2/8] target/riscv: Split RISCVCPUConfig declarations from cpu.h into cpu_cfg.h

2023-05-23 Thread Weiwei Li
Split RISCVCPUConfig declarations to prepare for passing it to disas. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu.h | 114 +- target/riscv/cpu_cfg.h | 136 + 2 files changed, 137 insertion

[PATCH v2 6/8] disas/riscv.c: Remove unused decomp_rv32/64 value for vector instructions

2023-05-23 Thread Weiwei Li
Currently decomp_rv32 and decomp_rv64 value in opcode_data for vector instructions are the same op index as their own. And they have no functional decomp_data. So they have no functional difference from just leaving them as zero. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by:

Re: [PTACH v2 1/6] update-linux-headers: sync-up header with Linux for KVM AIA support

2023-05-23 Thread Yong-Xuan Wang
On Mon, May 8, 2023 at 3:39 PM Cornelia Huck wrote: > > On Fri, May 05 2023, Alex Williamson wrote: > > > On Fri, 5 May 2023 11:39:36 + > > Yong-Xuan Wang wrote: > > > >> Update the linux headers to get the latest KVM RISC-V headers with AIA > >> support > >> by the scripts/update-linux-he

Re: [PTACH v2 1/6] update-linux-headers: sync-up header with Linux for KVM AIA support

2023-05-23 Thread Cornelia Huck
On Tue, May 23 2023, Yong-Xuan Wang wrote: > On Mon, May 8, 2023 at 3:39 PM Cornelia Huck wrote: >> >> On Fri, May 05 2023, Alex Williamson wrote: >> >> > On Fri, 5 May 2023 11:39:36 + >> > Yong-Xuan Wang wrote: >> > >> >> Update the linux headers to get the latest KVM RISC-V headers with

Re: [PATCH v2] hw/riscv: virt: Assume M-mode FW in pflash0 only when "-bios none"

2023-05-23 Thread Andrea Bolognani
On Fri, May 19, 2023 at 06:40:37PM +0200, Philippe Mathieu-Daudé wrote: > > On 18/5/23 08:03, Sunil V L wrote: > > > Agree. While I agree with Philippe, I think we better solve the current > > > problem by going back to v1 of the patch. > > BTW clarifying, I'm not rejecting this particular patch; I

Re: [PATCH 1/4] hw/intc/loongarch_ipi: Bring back all 4 IPI mailboxes

2023-05-23 Thread Song Gao
在 2023/5/23 上午11:22, Jiaxun Yang 写道: 2023年5月23日 02:25,Song Gao 写道: 在 2023/5/22 下午9:44, Philippe Mathieu-Daudé 写道: On 22/5/23 13:47, Jiaxun Yang wrote: 2023年5月22日 04:52,Huacai Chen 写道: Hi, Jiaxun, Rename loongarch_ipi to loongson_ipi? It will be shared by both MIPS and LoongArch in

[PATCH v5 09/11] hw: arm: allwinner-sramc: Add SRAM Controller support for R40

2023-05-23 Thread qianfanguijin
From: qianfan Zhao Only a few important registers are added, especially the SRAM_VER register. Signed-off-by: qianfan Zhao Reviewed-by: Niek Linnenbank --- hw/arm/Kconfig| 1 + hw/arm/allwinner-r40.c| 7 +- hw/misc/Kconfig | 3 + hw/misc

[PATCH v5 02/11] hw/arm/allwinner-r40: add Clock Control Unit

2023-05-23 Thread qianfanguijin
From: qianfan Zhao The CCU provides the registers to program the PLLs and the controls most of the clock generation, division, distribution, synchronization and gating. This commit adds support for the Clock Control Unit which emulates a simple read/write register interface. Signed-off-by: qian

  1   2   3   4   5   6   7   >