[PATCH v2 1/9] MAINTAINERS: Add Sriram Yagnaraman as a igb reviewer

2023-01-30 Thread Sriram Yagnaraman
I would like to review and be informed on changes to igb device Signed-off-by: Sriram Yagnaraman --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index ece23b2b15..7d0e84ce37 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2224,6 +2224,7 @@ F:

[PATCH v4 15/28] e1000e: Introduce e1000_rx_desc_union

2023-01-30 Thread Akihiko Odaki
Before this change, e1000e_write_packet_to_guest() allocated the receive descriptor buffer as an array of uint8_t. This does not ensure the buffer is sufficiently aligned. Introduce e1000_rx_desc_union type, a union type of all receive descriptor types to correct this. Signed-off-by: Akihiko

[PATCH v4 17/28] e1000e: Remove extra pointer indirection

2023-01-30 Thread Akihiko Odaki
e1000e_write_packet_to_guest() passes the reference of variable ba as a pointer to an array, and that pointer indirection is just unnecessary; all functions which uses the passed reference performs no pointer operation on the pointer and they simply dereference the passed pointer. Remove the extra

[PATCH v4 10/28] e1000e: Use memcpy to intialize registers

2023-01-30 Thread Akihiko Odaki
Use memcpy instead of memmove to initialize registers. The initial register templates and register table instances will never overlap. Signed-off-by: Akihiko Odaki --- hw/net/e1000e_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/net/e1000e_core.c

[PATCH v4 07/28] e1000: Use more constant definitions

2023-01-30 Thread Akihiko Odaki
The definitions for E1000_VFTA_ENTRY_SHIFT, E1000_VFTA_ENTRY_MASK, and E1000_VFTA_ENTRY_BIT_SHIFT_MASK were copied from: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/net/ethernet/intel/e1000/e1000_hw.h?h=v6.0.9#n306 The definitions for E1000_NUM_UNICAST,

[PATCH v4 18/28] net: Check L4 header size

2023-01-30 Thread Akihiko Odaki
net_tx_pkt_build_vheader() inspects TCP header but had no check for the header size, resulting in an undefined behavior. Check the header size and drop the packet if the header is too small. Signed-off-by: Akihiko Odaki --- hw/net/e1000e_core.c | 19 ++- hw/net/net_tx_pkt.c |

[PATCH v4 00/28] e1000x cleanups (preliminary for IGB)

2023-01-30 Thread Akihiko Odaki
We are adding a new device named igb, yet another Intel NIC. As the new implementation derives from e1000e, overhaul e1000e implementation first. e1000 has many commonalities with e1000e so we also apply the corresponding changes to the device if possible. This was spun off from:

[PATCH v4 06/28] e1000e: Mask registers when writing

2023-01-30 Thread Akihiko Odaki
When a register has effective bits fewer than their width, the old code inconsistently masked when writing or reading. Make the code consistent by always masking when writing, and remove some code duplication. Signed-off-by: Akihiko Odaki --- hw/net/e1000e_core.c | 94

[PATCH] hw/timer/hpet: Fix expiration time overflow

2023-01-30 Thread Akihiko Odaki
The expiration time provided for timer_mod() can overflow if a ridiculously large value is set to the comparator register. The resulting value can represent a past time after rounded, forcing the timer to fire immediately. If the timer is configured as periodic, it will rearm the timer again, and

[PATCH v4 08/28] e1000e: Use more constant definitions

2023-01-30 Thread Akihiko Odaki
The definitions of SW Semaphore Register were copied from: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/net/ethernet/intel/e1000e/defines.h?h=v6.0.9#n374 Signed-off-by: Akihiko Odaki --- hw/net/e1000_regs.h | 7 +++ hw/net/e1000e_core.c | 49

[PATCH v4 14/28] e1000e: Configure ResettableClass

2023-01-30 Thread Akihiko Odaki
This is part of recent efforts of refactoring e1000 and e1000e. DeviceClass's reset member is deprecated so migrate to ResettableClass. There is no behavioral difference. Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé --- hw/net/e1000e.c | 10

[PATCH v4 25/28] hw/net/net_tx_pkt: Check the payload length

2023-01-30 Thread Akihiko Odaki
Check the payload length if checksumming to ensure the payload contains the space for the resulting value. This bug was found by Alexander Bulekov with the fuzzer: https://patchew.org/QEMU/20230129053316.1071513-1-alx...@bu.edu/ The fixed test case is:

[PATCH v4 26/28] e1000e: Do not assert when MSI-X is disabled later

2023-01-30 Thread Akihiko Odaki
Assertions will fail if MSI-X gets disabled while a timer for MSI-X interrupts is running so remove them to avoid abortions. Fortunately, nothing bad happens even if the assertions won't trigger as msix_notify(), called by timer handlers, does nothing when MSI-X is disabled. This bug was found by

Re: [PATCH v2 01/15] RISC-V: Adding XTheadCmo ISA extension

2023-01-30 Thread Christoph Müllner
On Sun, Jan 29, 2023 at 11:40 PM Alistair Francis wrote: > > On Wed, Jan 25, 2023 at 5:51 AM Christoph Müllner > wrote: > > > > > > > > On Tue, Jan 24, 2023 at 6:31 PM Christoph Müllner > > wrote: > >> > >> > >> > >> On Mon, Jan 23, 2023 at 11:50 PM Alistair Francis > >> wrote: > >>> > >>>

Re: [PATCH v3 02/14] RISC-V: Adding XTheadSync ISA extension

2023-01-30 Thread Christoph Müllner
On Tue, Jan 24, 2023 at 9:21 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 1/24/23 09:59, Christoph Muellner wrote: > > +static bool trans_th_sfence_vmas(DisasContext *ctx, arg_th_sfence_vmas > *a) > > +{ > > +(void) a; > > +REQUIRE_XTHEADSYNC(ctx); > > + > > +#ifndef

[PATCH] vhost-user-rng: Back up vqs before cleaning up vhost_dev

2023-01-30 Thread Akihiko Odaki
vhost_dev_cleanup() clears vhost_dev so back up its vqs member to free the memory pointed by the member. Fixes: 821d28b88f ("vhost-user-rng: Add vhost-user-rng implementation") Signed-off-by: Akihiko Odaki --- hw/virtio/vhost-user-rng.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)

[PATCH] vhost-user-i2c: Back up vqs before cleaning up vhost_dev

2023-01-30 Thread Akihiko Odaki
vhost_dev_cleanup() clears vhost_dev so back up its vqs member to free the memory pointed by the member. Fixes: 7221d3b634 ("hw/virtio: add boilerplate for vhost-user-i2c device") Signed-off-by: Akihiko Odaki --- hw/virtio/vhost-user-i2c.c | 5 +++-- 1 file changed, 3 insertions(+), 2

Re: [PATCH 3/3] migration: save/delete migration thread info

2023-01-30 Thread Juan Quintela
Jiang Jiacheng wrote: > On 2023/1/30 12:28, Juan Quintela wrote: >> Jiang Jiacheng wrote: >>> To support query migration thread infomation, save and delete >>> thread information at thread creation and end. >>> >>> Signed-off-by: Jiang Jiacheng >> >> Don't disagree with this, but if we create

Re: [PATCH v2 2/9] igb: handle PF/VF reset properly

2023-01-30 Thread Akihiko Odaki
On 2023/01/30 22:22, Sriram Yagnaraman wrote: Use PFRSTD to reset RSTI bit for VFs, and raise VFLRE interrupt when VF is reset. Signed-off-by: Sriram Yagnaraman --- hw/net/e1000x_regs.h | 1 + hw/net/igb_core.c| 33 + hw/net/trace-events | 2 ++ 3

Re: [PATCH v2 5/9] igb: check oversized packets for VMDq

2023-01-30 Thread Akihiko Odaki
On 2023/01/30 22:23, Sriram Yagnaraman wrote: Signed-off-by: Sriram Yagnaraman --- hw/net/igb_core.c | 48 +++ 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index cea7c036f0..89650fcfd4 100644

[PATCH 3/3] vhost-user: Adopt new backend naming

2023-01-30 Thread Maxime Coquelin
In order to get rid of harmful language, the Vhost-user specification changed features and requests naming from _SLAVE_ to _BACKEND_. This patch adopts the new naming convention. Signed-off-by: Maxime Coquelin --- hw/virtio/vhost-user.c | 30 +++---

[PATCH 6/6] gitlab-ci.d/buildtest: Disintegrate the build-coroutine-sigaltstack job

2023-01-30 Thread Thomas Huth
We can get rid of the build-coroutine-sigaltstack job by moving the configure flags that should be tested here to other jobs: Move --with-coroutine=sigaltstack to the build-without-defaults job and --enable-trace-backends=ftrace to the cross-s390x-kvm-only job. Signed-off-by: Thomas Huth ---

Re: [PATCH 3/3] vhost-user: Adopt new backend naming

2023-01-30 Thread Michael S. Tsirkin
On Mon, Jan 30, 2023 at 11:45:48AM +0100, Maxime Coquelin wrote: > In order to get rid of harmful language, the Vhost-user > specification changed features and requests naming from > _SLAVE_ to _BACKEND_. "features and requests naming" -> "feature and request naming" (a reduced relative drops

[PATCH v6 2/3] block/rbd: Add luks-any encryption opening option

2023-01-30 Thread o...@il.ibm.com
From: Or Ozeri Ceph RBD encryption API required specifying the encryption format for loading encryption. The supported formats were LUKS (v1) and LUKS2. Starting from Reef release, RBD also supports loading with "luks-any" format, which works for both versions of LUKS. This commit extends the

Re: [RFC PATCH] docs/about/deprecated: Deprecate 32-bit host systems

2023-01-30 Thread Peter Maydell
On Mon, 30 Jan 2023 at 11:44, Thomas Huth wrote: > > Testing 32-bit host OS support takes a lot of precious time during the QEMU > contiguous integration tests, and considering that many OS vendors stopped > shipping 32-bit variants of their OS distributions and most hardware from > the past >10

[PATCH v5 19/20] 9p: Drop superfluous include of linux/limits.h

2023-01-30 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Christian Schoenebeck Reviewed-by: Michael S. Tsirkin --- hw/9pfs/9p.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 9621ec1341..aa736af380 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -17,9 +17,6 @@

[PATCH v5 06/20] crypto: Clean up includes

2023-01-30 Thread Markus Armbruster
Clean up includes so that qemu/osdep.h is included first in .c, and not in .h, and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin ---

[PATCH v4 19/28] e1000x: Alter the signature of e1000x_is_vlan_packet

2023-01-30 Thread Akihiko Odaki
e1000x_is_vlan_packet() had a pointer to uint8_t as a parameter, but it does not have to be uint8_t. Change the type to void *. Signed-off-by: Akihiko Odaki --- hw/net/e1000x_common.c | 2 +- hw/net/e1000x_common.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v4 04/28] e1000: Use hw/net/mii.h

2023-01-30 Thread Akihiko Odaki
hw/net/mii.h provides common definitions for MII. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé --- hw/net/e1000.c | 86 ++-- hw/net/e1000_regs.h| 46 hw/net/e1000e.c| 1 + hw/net/e1000e_core.c | 99

[PATCH v4 24/28] hw/net/net_tx_pkt: Implement TCP segmentation

2023-01-30 Thread Akihiko Odaki
There was no proper implementation of TCP segmentation before this change, and net_tx_pkt relied solely on IPv4 fragmentation. Not only this is not aligned with the specification, but it also resulted in corrupted IPv6 packets. This is particularly problematic for the igb, a new proposed device

[PATCH v4 02/28] hw/net: Add more MII definitions

2023-01-30 Thread Akihiko Odaki
The definitions will be used by igb. Signed-off-by: Akihiko Odaki --- include/hw/net/mii.h | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/include/hw/net/mii.h b/include/hw/net/mii.h index 4ae4dcce7e..c6a767a49a 100644 --- a/include/hw/net/mii.h +++

[PATCH v4 28/28] MAINTAINERS: Add e1000e test files

2023-01-30 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki Acked-by: Thomas Huth --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 958915f227..e920d0061e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2218,6 +2218,8 @@ R: Akihiko Odaki S: Maintained F: hw/net/e1000e*

[PATCH v5 9/9] docs/system/devices/igb: Add igb documentation

2023-01-30 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- MAINTAINERS | 1 + docs/system/device-emulation.rst | 1 + docs/system/devices/igb.rst | 71 3 files changed, 73 insertions(+) create mode 100644 docs/system/devices/igb.rst diff --git a/MAINTAINERS

[PATCH v5 6/9] tests/qtest/libqos/e1000e: Export macreg functions

2023-01-30 Thread Akihiko Odaki
They will be useful for igb testing. Signed-off-by: Akihiko Odaki --- tests/qtest/libqos/e1000e.c | 12 tests/qtest/libqos/e1000e.h | 12 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/qtest/libqos/e1000e.c b/tests/qtest/libqos/e1000e.c index

[PATCH v5 5/9] tests/qtest/e1000e-test: Fabricate ethernet header

2023-01-30 Thread Akihiko Odaki
e1000e understands ethernet header so fabricate something convincing. Signed-off-by: Akihiko Odaki --- tests/qtest/e1000e-test.c | 17 +++-- tests/qtest/libqos/e1000e.h | 2 ++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/tests/qtest/e1000e-test.c

[PATCH v3 00/10] hw/cxl: CXL emulation cleanups and minor fixes for upstream

2023-01-30 Thread Jonathan Cameron via
V3: Thanks to Michael Tsirkin - Update tests/data/acpi/q35/DSDT.cxl to reflect dropping of the duplicate _UID. Usual dance with marking table to be ignored by test then making change and finally updating the table with the new version and dropping the entry preventing the tests from

[PATCH v3 01/10] hw/mem/cxl_type3: Improve error handling in realize()

2023-01-30 Thread Jonathan Cameron via
msix_init_exclusive_bar() can fail, so if it does cleanup the address space. Reviewed-by: Ira Weiny Signed-off-by: Jonathan Cameron --- hw/mem/cxl_type3.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c index

[PATCH] target/riscv: set tval for triggered watchpoints

2023-01-30 Thread Sergey Matyukevich
From: Sergey Matyukevich According to priviledged spec, if [sm]tval is written with a nonzero value when a breakpoint exception occurs, then [sm]tval will contain the faulting virtual address. Set tval to hit address when breakpoint exception is triggered by hardware watchpoint. Signed-off-by:

[PATCH 0/6] Shorten the runtime of some gitlab-CI shared runner jobs

2023-01-30 Thread Thomas Huth
We're currently facing the problem that the gitlab-CI jobs for the shared runners take too much of the limited CI minutes on gitlab.com. Here are now some patches that optimize some of the jobs a little bit to take less runtime. We slightly lose some test coverage by some of these changes (e.g. by

[PATCH 2/6] gitlab-ci.d/buildtest: Remove aarch64-softmmu from the build-system-ubuntu job

2023-01-30 Thread Thomas Huth
aarch64-softmmu is also checked on the same version of Ubuntu in the gprov-gcov job, so it is redundant to check it again in the normal ubuntu job. Signed-off-by: Thomas Huth --- .gitlab-ci.d/buildtest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH 6/6] gitlab-ci.d/buildtest: Disintegrate the build-coroutine-sigaltstack job

2023-01-30 Thread Daniel P . Berrangé
On Mon, Jan 30, 2023 at 11:44:46AM +0100, Thomas Huth wrote: > We can get rid of the build-coroutine-sigaltstack job by moving > the configure flags that should be tested here to other jobs: > Move --with-coroutine=sigaltstack to the build-without-defaults job > and --enable-trace-backends=ftrace

Re: [PATCH 0/3] Vhost-user: replace _SLAVE_ with _BACKEND_

2023-01-30 Thread Michael S. Tsirkin
On Mon, Jan 30, 2023 at 11:45:45AM +0100, Maxime Coquelin wrote: > This series continues the work done to get rid of harmful > language in the Vhost-user specification. I prefer a positive "switch to a more inclusive terminology". To consider if you keep doing this work. > While the spec texts

[PATCH v6 3/3] block/rbd: Add support for layered encryption

2023-01-30 Thread o...@il.ibm.com
From: Or Ozeri Starting from ceph Reef, RBD has built-in support for layered encryption, where each ancestor image (in a cloned image setting) can be possibly encrypted using a unique passphrase. A new function, rbd_encryption_load2, was added to librbd API. This new function supports an array

Re: [PATCH v3] docs/s390x/pcidevices: document pci devices on s390x

2023-01-30 Thread Thomas Huth
On 27/01/2023 13.33, Sebastian Mitterle wrote: Add some documentation about the zpci device and how to use it with pci devices on s390x. Used source: Cornelia Huck's blog post https://people.redhat.com/~cohuck/2018/02/19/notes-on-pci-on-s390x.html Signed-off-by: Sebastian Mitterle

Re: [PATCH v2] linux-user: Add emulation for MADV_WIPEONFORK and MADV_KEEPONFORK in madvise()

2023-01-30 Thread Laurent Vivier
Le 13/12/2022 à 18:03, Helge Deller a écrit : Both parameters have a different value on the parisc platform, so first translate the target value into a host value for usage in the native madvise() syscall. Those parameters are often used by security sensitive applications (e.g. tor browser,

Re: [PATCH v3 1/9] virtio: Add shared memory capability

2023-01-30 Thread Alex Bennée
Antonio Caggiano writes: > From: "Dr. David Alan Gilbert" > > Define a new capability type 'VIRTIO_PCI_CAP_SHARED_MEMORY_CFG' to allow > defining shared memory regions with sizes and offsets of 2^32 and more. > Multiple instances of the capability are allowed and distinguished > by a

[PATCH v5 16/20] accel: Clean up includes

2023-01-30 Thread Markus Armbruster
Clean up includes so that qemu/osdep.h is included first in .c, and not in .h, and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin ---

[PATCH v5 17/20] Fix non-first inclusions of qemu/osdep.h

2023-01-30 Thread Markus Armbruster
This commit was created with scripts/clean-includes. Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Reviewed-by: Juan Quintela --- audio/sndioaudio.c | 2 +- backends/hostmem-epc.c | 2 +- block/export/vduse-blk.c | 2 +-

[PATCH v2 9/9] igb: respect VMVIR and VMOLR for VLAN

2023-01-30 Thread Sriram Yagnaraman
Add support for stripping/inserting VLAN for VFs. Signed-off-by: Sriram Yagnaraman --- hw/net/igb_core.c | 84 ++- 1 file changed, 54 insertions(+), 30 deletions(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index 5ca666229e..a511c64773

[PATCH v2 3/9] igb: implement VFRE and VFTE registers

2023-01-30 Thread Sriram Yagnaraman
Also add checks for RXDCTL/TXDCTL queue enable bits Signed-off-by: Sriram Yagnaraman --- hw/net/igb_core.c | 41 ++--- hw/net/igb_regs.h | 4 +++- 2 files changed, 33 insertions(+), 12 deletions(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index

[PATCH v5 20/20] Drop duplicate #include

2023-01-30 Thread Markus Armbruster
Tracked down with the help of scripts/clean-includes. Signed-off-by: Markus Armbruster Acked-by: Dr. David Alan Gilbert Reviewed-by: Greg Kurz Reviewed-by: Michael S. Tsirkin Reviewed-by: Juan Quintela --- include/hw/arm/fsl-imx6ul.h | 1 - include/hw/arm/fsl-imx7.h | 1 -

[PATCH v5 18/20] Don't include headers already included by qemu/osdep.h

2023-01-30 Thread Markus Armbruster
This commit was created with scripts/clean-includes. Signed-off-by: Markus Armbruster Acked-by: Christian Schoenebeck Reviewed-by: Michael S. Tsirkin --- backends/tpm/tpm_ioctl.h | 2 -- fsdev/p9array.h | 2 -- include/hw/misc/aspeed_lpc.h | 2 --

Re: [RFC v4 3/3] hw/cxl: Multi-Region CXL Type-3 Devices (Volatile and Persistent)

2023-01-30 Thread Jonathan Cameron via
> diff --git a/tests/qtest/cxl-test.c b/tests/qtest/cxl-test.c > index e59ba22387..6893f54e28 100644 > --- a/tests/qtest/cxl-test.c > +++ b/tests/qtest/cxl-test.c > @@ -40,32 +40,46 @@ >"-device cxl-rp,id=rp2,bus=cxl.1,chassis=0,slot=2 " \ >"-device

[PATCH v2 2/9] igb: handle PF/VF reset properly

2023-01-30 Thread Sriram Yagnaraman
Use PFRSTD to reset RSTI bit for VFs, and raise VFLRE interrupt when VF is reset. Signed-off-by: Sriram Yagnaraman --- hw/net/e1000x_regs.h | 1 + hw/net/igb_core.c| 33 + hw/net/trace-events | 2 ++ 3 files changed, 24 insertions(+), 12 deletions(-) diff

[PATCH v2 5/9] igb: check oversized packets for VMDq

2023-01-30 Thread Sriram Yagnaraman
Signed-off-by: Sriram Yagnaraman --- hw/net/igb_core.c | 48 +++ 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index cea7c036f0..89650fcfd4 100644 --- a/hw/net/igb_core.c +++ b/hw/net/igb_core.c @@

[PATCH v5 11/20] migration: Clean up includes

2023-01-30 Thread Markus Armbruster
Clean up includes so that qemu/osdep.h is included first in .c, and not in .h, and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Markus Armbruster Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Michael S. Tsirkin

[PATCH v5 13/20] target/hexagon: Clean up includes

2023-01-30 Thread Markus Armbruster
Clean up includes so that qemu/osdep.h is included first in .c, and not in .h, and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Changes to standalone programs dropped, because these intentionally don't use qemu/osdep.h:

[PATCH v4 23/28] e1000e: Perform software segmentation for loopback

2023-01-30 Thread Akihiko Odaki
e1000e didn't perform software segmentation for loopback if virtio-net header is enabled, which is wrong. To fix the problem, introduce net_tx_pkt_send_custom(), which allows the caller to specify whether offloading should be assumed or not. net_tx_pkt_send_custom() also allows the caller to

[PATCH v4 27/28] MAINTAINERS: Add Akihiko Odaki as a e1000e reviewer

2023-01-30 Thread Akihiko Odaki
I want to know to be notified when there is a new change for e1000e as e1000e is similar to igb and such a change may also be applicable for igb. Signed-off-by: Akihiko Odaki --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index

[PATCH v4 12/28] e1000e: Improve software reset

2023-01-30 Thread Akihiko Odaki
This change makes e1000e reset more things when software reset was triggered. Some registers are exempted from software reset in the datasheet and this change also implements the behavior accordingly. Signed-off-by: Akihiko Odaki --- hw/net/e1000e_core.c | 24 +++- 1 file

[PATCH v4 21/28] hw/net/net_tx_pkt: Automatically determine if virtio-net header is used

2023-01-30 Thread Akihiko Odaki
The new function qemu_get_using_vnet_hdr() allows to automatically determine if virtio-net header is used. Signed-off-by: Akihiko Odaki --- hw/net/e1000e_core.c | 3 +-- hw/net/net_tx_pkt.c | 19 ++- hw/net/net_tx_pkt.h | 3 +-- hw/net/vmxnet3.c | 6 ++ 4 files

[PATCH v4 20/28] net: Strip virtio-net header when dumping

2023-01-30 Thread Akihiko Odaki
filter-dump specifiees Ethernet as PCAP LinkType, which does not expect virtio-net header. Having virtio-net header in such PCAP file breaks PCAP unconsumable. Unfortunately currently there is no LinkType for virtio-net so for now strip virtio-net header to convert the output to Ethernet.

[PATCH v4 16/28] e1000e: Set MII_ANER_NWAY

2023-01-30 Thread Akihiko Odaki
This keeps Windows driver 12.18.9.23 from generating an event with ID 30. The description of the event is as follows: > Intel(R) 82574L Gigabit Network Connection > PROBLEM: The network adapter is configured for auto-negotiation but > the link partner is not. This may result in a duplex

[PATCH v4 22/28] hw/net/net_rx_pkt: Remove net_rx_pkt_has_virt_hdr

2023-01-30 Thread Akihiko Odaki
When virtio-net header is not set, net_rx_pkt_get_vhdr() returns zero-filled virtio_net_hdr, which is actually valid. In fact, tap device uses zero-filled virtio_net_hdr when virtio-net header is not provided by the peer. Therefore, we can just remove net_rx_pkt_has_virt_hdr() and always assume

[PATCH v4 05/28] e1000: Mask registers when writing

2023-01-30 Thread Akihiko Odaki
When a register has effective bits fewer than their width, the old code inconsistently masked when writing or reading. Make the code consistent by always masking when writing, and remove some code duplication. Signed-off-by: Akihiko Odaki --- hw/net/e1000.c | 84

[PATCH v4 11/28] e1000e: Remove pending interrupt flags

2023-01-30 Thread Akihiko Odaki
They are duplicate of running throttling timer flags and incomplete as the flags are not cleared when the interrupts are fired or the device is reset. Signed-off-by: Akihiko Odaki --- hw/net/e1000e.c | 5 ++--- hw/net/e1000e_core.c | 19 +++ hw/net/e1000e_core.h | 2 --

[PATCH v5 2/9] pcie: Introduce pcie_sriov_num_vfs

2023-01-30 Thread Akihiko Odaki
igb can use this function to change its behavior depending on the number of virtual functions currently enabled. Signed-off-by: Gal Hammer Signed-off-by: Marcel Apfelbaum Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé --- hw/pci/pcie_sriov.c | 5 +

[PATCH v5 1/9] hw/net/net_tx_pkt: Introduce net_tx_pkt_get_eth_hdr

2023-01-30 Thread Akihiko Odaki
Expose the ethernet header so that igb can utilize it to perform the internal routing among its SR-IOV functions. Signed-off-by: Gal Hammer Signed-off-by: Marcel Apfelbaum Signed-off-by: Akihiko Odaki --- hw/net/net_tx_pkt.c | 6 ++ hw/net/net_tx_pkt.h | 8 2 files changed, 14

[PATCH v5 8/9] tests/avocado: Add igb test

2023-01-30 Thread Akihiko Odaki
This automates ethtool tests for igb registers, interrupts, etc. Signed-off-by: Akihiko Odaki --- MAINTAINERS | 1 + .../org.centos/stream/8/x86_64/test-avocado | 1 + tests/avocado/igb.py | 38 +++ 3 files changed,

[PATCH v5 0/9] Introduce igb

2023-01-30 Thread Akihiko Odaki
Based-on: <20230130134715.76604-1-akihiko.od...@daynix.com> ([PATCH v4 00/28] e1000x cleanups (preliminary for IGB)) igb is a family of Intel's gigabit ethernet controllers. This series implements 82576 emulation in particular. You can see the last patch for the documentation. Note that there is

[PATCH v5 7/9] igb: Introduce qtest for igb device

2023-01-30 Thread Akihiko Odaki
This change is derived from qtest for e1000e device. Signed-off-by: Akihiko Odaki --- MAINTAINERS | 2 + tests/qtest/fuzz/generic_fuzz_configs.h | 5 + tests/qtest/igb-test.c | 243 tests/qtest/libqos/igb.c

[PATCH v5 3/9] e1000: Split header files

2023-01-30 Thread Akihiko Odaki
Some definitions in the header files are invalid for igb so extract them to new header files to keep igb from referring to them. Signed-off-by: Gal Hammer Signed-off-by: Marcel Apfelbaum Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé --- hw/net/e1000.c | 1 +

Re: [PATCH v4 2/3] accel/tcg: Add debuginfo support

2023-01-30 Thread Thomas Huth
On 12/01/2023 16.20, Ilya Leoshkevich wrote: Add libdw-based functions for loading and querying debuginfo. Load debuginfo from the system and the linux-user loaders. This is useful for the upcoming perf support, which can then put human-readable guest symbols instead of raw guest PCs into

Re: [PATCH v2 00/13] Introduce igb

2023-01-30 Thread Akihiko Odaki
On 2023/01/29 5:57, Sriram Yagnaraman wrote: -Original Message- From: Akihiko Odaki Sent: Thursday, 26 January 2023 12:32 To: Sriram Yagnaraman ; Jason Wang Cc: Dmitry Fleytman ; Michael S. Tsirkin ; Marcel Apfelbaum ; Alex Bennée ; Philippe Mathieu-Daudé ; Thomas Huth ; Wainer dos

[PATCH v3 04/10] hw/cxl: Add CXL_CAPACITY_MULTIPLIER definition

2023-01-30 Thread Jonathan Cameron via
From: Gregory Price Remove usage of magic numbers when accessing capacity fields and replace with CXL_CAPACITY_MULTIPLIER, matching the kernel definition. Signed-off-by: Gregory Price Reviewed-by: Davidlohr Bueso Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jonathan Cameron --- v2:

[PATCH v3 02/10] hw/pci-bridge/cxl_downstream: Fix type naming mismatch

2023-01-30 Thread Jonathan Cameron via
Fix capitalization difference between struct name and typedef. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Ira Weiny Signed-off-by: Jonathan Cameron --- hw/pci-bridge/cxl_downstream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v3 03/10] hw/cxl: set cxl-type3 device type to PCI_CLASS_MEMORY_CXL

2023-01-30 Thread Jonathan Cameron via
From: Gregory Price Current code sets to STORAGE_EXPRESS and then overrides it. Reviewed-by: Davidlohr Bueso Reviewed-by: Ira Weiny Signed-off-by: Gregory Price Signed-off-by: Jonathan Cameron --- hw/mem/cxl_type3.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

RE: [PATCH 3/9] igb: implement VFRE and VFTE registers

2023-01-30 Thread Sriram Yagnaraman
> -Original Message- > From: Akihiko Odaki > Sent: Sunday, 29 January 2023 10:16 > To: Sriram Yagnaraman > Cc: qemu-devel@nongnu.org; Jason Wang ; Dmitry > Fleytman ; Michael S . Tsirkin > ; Marcel Apfelbaum > Subject: Re: [PATCH 3/9] igb: implement VFRE and VFTE registers > > On

Re: [PATCH v1 2/2] virtio-net: virtio_net_flush_tx() check for per-queue reset

2023-01-30 Thread Xuan Zhuo
On Mon, 30 Jan 2023 16:40:08 +0800, Jason Wang wrote: > On Mon, Jan 30, 2023 at 4:03 PM Xuan Zhuo wrote: > > > > On Mon, 30 Jan 2023 15:49:36 +0800, Jason Wang wrote: > > > On Mon, Jan 30, 2023 at 1:32 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Mon, Jan 30, 2023 at 10:15:12AM

[PATCH 5/6] gitlab-ci.d/buildtest: Merge the two gprof-gcov jobs

2023-01-30 Thread Thomas Huth
There is only one job depending on the build-gprof-gcov job, so there is no real need for keeping this separate. It likely only has been split since the complete runtime is more than 60 minutes, but that can be better handled with a proper timeout setting instead. By merging the two jobs, we safe

Re: [PATCH 2/2] linux-user: Show 4th argument of rt_sigprocmask() in strace

2023-01-30 Thread Laurent Vivier
Le 25/01/2023 à 14:57, Helge Deller a écrit : Add output for the missing 4th parameter (size_t sigsetsize). Signed-off-by: Helge Deller --- linux-user/strace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index

[PATCH v2 8/9] igb: respect VT_CTL ignore MAC field

2023-01-30 Thread Sriram Yagnaraman
Also trace out a warning if replication mode is disabled, since we only support replication mode enabled. Signed-off-by: Sriram Yagnaraman --- hw/net/igb_core.c | 9 + hw/net/trace-events | 2 ++ 2 files changed, 11 insertions(+) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c

[PATCH v4 01/28] e1000e: Fix the code style

2023-01-30 Thread Akihiko Odaki
igb implementation first starts off by copying e1000e code. Correct the code style before that. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé --- hw/net/e1000.c | 41 hw/net/e1000e.c| 72 ++-- hw/net/e1000e_core.c

Re: [PATCH v5 04/20] scripts/clean-includes: Improve --git commit message

2023-01-30 Thread Juan Quintela
Markus Armbruster wrote: > The script drops #include "qemu/osdep.h" from headers. Mention it in > the commit message it uses for --git. > > Signed-off-by: Markus Armbruster > --- > scripts/clean-includes | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git

[PATCH v3 08/10] qemu/bswap: Add const_le64()

2023-01-30 Thread Jonathan Cameron via
From: Ira Weiny Gcc requires constant versions of cpu_to_le* calls. Add a 64 bit version. Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Ira Weiny Signed-off-by: Jonathan Cameron --- v2: Update comment (Philippe) --- include/qemu/bswap.h | 12 +++-

[PATCH v3 09/10] qemu/uuid: Add UUID static initializer

2023-01-30 Thread Jonathan Cameron via
From: Ira Weiny UUID's are defined as network byte order fields. No static initializer was available for UUID's in their standard big endian format. Define a big endian initializer for UUIDs. Signed-off-by: Ira Weiny Signed-off-by: Jonathan Cameron --- include/qemu/uuid.h | 12

[PATCH v3 07/10] tests/acpi: Update q35/DSDT.cxl for removed duplicate _UID

2023-01-30 Thread Jonathan Cameron via
Dropping the ID effects this table in trivial fashion. Signed-off-by: Jonathan Cameron --- v3: New patch to update the table. tests/data/acpi/q35/DSDT.cxl| Bin 9636 -> 9622 bytes tests/qtest/bios-tables-test-allowed-diff.h | 1 - 2 files changed, 1 deletion(-) diff --git

Re: [PATCH 2/3] migration: implement query migration threadinfo by name

2023-01-30 Thread Jiang Jiacheng via
On 2023/1/30 12:27, Juan Quintela wrote: > Jiang Jiacheng wrote: >> Introduce interface query-migrationthreads. The interface is use >> with the migration thread name reported by qemu and returns with >> migration thread name and its pid. >> Introduce threadinfo.c to manage threads with

[PATCH v2] backends/vhost-user: remove the ioeventfd check

2023-01-30 Thread Alex Bennée
While ioeventfds are needed for good performance with KVM guests it should not be a gating requirement. We can run vhost-user backends using simulated ioeventfds or inband signalling. With this change I can run: $QEMU $OPTS \ -display gtk,gl=on \ -device

Re: [PATCH 1/3] migration: report migration thread name to libvirt

2023-01-30 Thread Jiang Jiacheng via
On 2023/1/30 12:19, Juan Quintela wrote: > Jiang Jiacheng wrote: >> Report migration thread name to libvirt in order to >> support query migration thread infomation by its name. >> >> Signed-off-by: Jiang Jiacheng >> --- >> migration/migration.c | 3 +++ >> migration/multifd.c | 5 -

Re: [PATCH v2] linux-user: Add emulation for MADV_WIPEONFORK and MADV_KEEPONFORK in madvise()

2023-01-30 Thread Laurent Vivier
Le 13/12/2022 à 18:03, Helge Deller a écrit : Both parameters have a different value on the parisc platform, so first translate the target value into a host value for usage in the native madvise() syscall. Those parameters are often used by security sensitive applications (e.g. tor browser,

Re: [RFC PATCH] docs/about/deprecated: Deprecate 32-bit host systems

2023-01-30 Thread Thomas Huth
On 30/01/2023 13.43, Daniel P. Berrangé wrote: On Mon, Jan 30, 2023 at 01:22:22PM +0100, Thomas Huth wrote: On 30/01/2023 13.01, Daniel P. Berrangé wrote: On Mon, Jan 30, 2023 at 11:47:02AM +, Peter Maydell wrote: On Mon, 30 Jan 2023 at 11:44, Thomas Huth wrote: Testing 32-bit host OS

[PATCH v2 0/9] igb: merge changes from <20221229190817.25500-1-sriram.yagnara...@est.tech>

2023-01-30 Thread Sriram Yagnaraman
Based-on: <20230126111943.38695-1-akihiko.od...@daynix.com> ([PATCH v4 00/13] Introduce igb) Rebased on latest changes from Akihiko, and merged changes from my original patchset: https://lists.gnu.org/archive/html/qemu-devel/2022-12/msg04670.html Changes since v1: - Fix review comments from

[PATCH v5 03/20] scripts/clean-includes: Skip symbolic links

2023-01-30 Thread Markus Armbruster
When a symbolic link points to a file that needs cleaning, the script replaces the link with a cleaned regular file. Not wanted; skip them. We have a few symbolic links under subprojects/libvduse/ and subprojects/libvhost-user/. Signed-off-by: Markus Armbruster Reviewed-by: Michael S. Tsirkin

[PATCH v5 09/20] hw/tricore: Clean up includes

2023-01-30 Thread Markus Armbruster
Clean up includes so that qemu/osdep.h is included first in .c, and not in .h, and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin ---

[PATCH v2 7/9] igb: implement VF Tx and Rx stats

2023-01-30 Thread Sriram Yagnaraman
Please note that loopback counters for VM to VM traffic is not implemented yet: VFGOTLBC, VFGPTLBC, VFGORLBC and VFGPRLBC. Signed-off-by: Sriram Yagnaraman --- hw/net/igb_core.c | 26 ++ 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/hw/net/igb_core.c

[PATCH v5 12/20] net: Clean up includes

2023-01-30 Thread Markus Armbruster
Clean up includes so that qemu/osdep.h is included first in .c, and not in .h, and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin ---

[PATCH v5 02/20] scripts/clean-includes: Don't claim duplicate headers found when not

2023-01-30 Thread Markus Armbruster
When running with --check-dup-head, the script always claims it "Found duplicate header file includes." Fix to do it only when it actually found some. Fixes: d66253e46ae2 ("scripts/clean-includes: added duplicate #include check") Signed-off-by: Markus Armbruster Reviewed-by: Michael S. Tsirkin

[PATCH v4 03/28] fsl_etsec: Use hw/net/mii.h

2023-01-30 Thread Akihiko Odaki
hw/net/mii.h provides common definitions for MII. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé --- hw/net/fsl_etsec/etsec.c | 11 ++- hw/net/fsl_etsec/etsec.h | 17 - hw/net/fsl_etsec/miim.c | 5 +++-- include/hw/net/mii.h | 1 + 4 files

Re: [PATCH v2 08/11] multifd: Add capability to enable/disable zero_page

2023-01-30 Thread Juan Quintela
Markus Armbruster wrote: > Juan Quintela writes: > >> We have to enable it by default until we introduce the new code. >> >> Signed-off-by: Juan Quintela > > The subject doesn't quite match the patch to the QAPI schema. It claims > "capability to enable/disable zero_page", but ... And here I

<    1   2   3   4   5   >