[PATCH v2] net/vmnet: Pad short Ethernet frames

2024-08-17 Thread William Hooper
At least on macOS 12.7.2, vmnet doesn't pad Ethernet frames, such as the host's ARP replies, to the minimum size (60 bytes before the frame check sequence) defined in IEEE Std 802.3-2022, so guests' Ethernet device drivers may drop them with "frame too short" errors. This patch calls eth_pad_short

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-08-17 Thread Akihiko Odaki
On 2024/08/09 0:25, Peter Xu wrote: On Thu, Aug 08, 2024 at 10:47:28AM -0400, Michael S. Tsirkin wrote: On Thu, Aug 08, 2024 at 10:15:36AM -0400, Peter Xu wrote: On Thu, Aug 08, 2024 at 07:12:14AM -0400, Michael S. Tsirkin wrote: This is too big of a hammer. People already use what you call "c

Re: [PATCH v2 4/4] virtio-net: Add support for USO features

2024-08-17 Thread Akihiko Odaki
On 2024/08/09 21:50, Fabiano Rosas wrote: Peter Xu writes: On Thu, Aug 08, 2024 at 10:47:28AM -0400, Michael S. Tsirkin wrote: On Thu, Aug 08, 2024 at 10:15:36AM -0400, Peter Xu wrote: On Thu, Aug 08, 2024 at 07:12:14AM -0400, Michael S. Tsirkin wrote: This is too big of a hammer. People al

Re: [PATCH for-9.2 v3 0/6] target/sparc: emulate floating point queue when raising fp traps -- CORRECTION

2024-08-17 Thread Carl Hauser
I changed translate.c:4597 from return true; to return advance_pc(dc); and it worked. On 8/16/24 17:16, Richard Henderson wrote: On 8/17/24 09:48, Carl Hauser wrote: netbsd panics in the kernel trap handler; unfortunately it does not in

Re: [PATCH for-9.2 v3 0/6] target/sparc: emulate floating point queue when raising fp traps

2024-08-17 Thread Carl Hauser
I changed target.c:4597 from return true; to return advance_pc(dc); and it worked. On 8/16/24 17:16, Richard Henderson wrote: On 8/17/24 09:48, Carl Hauser wrote: netbsd panics in the kernel trap handler; unfortunately it does not

Re: [PULL v2 for 9.1 00/21] Some fixes for 9.1-rc3 (build, replay, docs, plugins)

2024-08-17 Thread Richard Henderson
On 8/16/24 23:17, Alex Bennée wrote: The following changes since commit ecdfa31beb1f7616091bedba79dfdf9ee525ed9d: Merge tag 'pull-request-2024-08-16' ofhttps://gitlab.com/thuth/qemu into staging (2024-08-16 18:18:27 +1000) are available in the Git repository at: https://gitlab.com/stsqu

Re: [PATCH] hw/misc: Add a virtual PCILeech device

2024-08-17 Thread Zero Tang
Hello, I'd like to ping this patch in that the QEMU-PCILeech plugin is now merged into the PCILeech repository: https://github.com/ufrisk/LeechCore-plugins/pull/10 The Patchew link is: https://patchew.org/QEMU/caaxnugbyhpx249duwgyxotgjkxwatrhjsq94lrvfmgp._5fgjx...@mail.gmail.com/ Kind Regards, Ze

Re: [PATCH for-9.2 v6 03/12] hw/riscv: add RISC-V IOMMU base emulation

2024-08-17 Thread Andrew Jones
On Thu, Aug 01, 2024 at 12:43:24PM GMT, Daniel Henrique Barboza wrote: > From: Tomasz Jeznach > > The RISC-V IOMMU specification is now ratified as-per the RISC-V > international process. The latest frozen specifcation can be found at: > > https://github.com/riscv-non-isa/riscv-iommu/releases/do

[RFC PATCH v2 15/23] hw/ssi: add support for flexcomm spi

2024-08-17 Thread Octavian Purdila
From: Sebastian Ene Add support for NXP's flexcomm spi. It supports FIFO access, interrupts and master mode only. It does not support DMA. The patch includes an automatically generated header which contains the register layout and helpers. The header can be regenerated with the svd-flexcomm-spi

[RFC PATCH v2 14/23] test/unit: add unit tests for flexcomm i2c

2024-08-17 Thread Octavian Purdila
Add master mode tests for flexcomm i2c. Signed-off-by: Octavian Purdila --- tests/unit/test-flexcomm-i2c.c | 210 + tests/unit/meson.build | 10 ++ 2 files changed, 220 insertions(+) create mode 100644 tests/unit/test-flexcomm-i2c.c diff --git a/tests/u

[RFC PATCH v2 04/23] Add mcux-soc-svd subproject

2024-08-17 Thread Octavian Purdila
Add mcux-soc-svd subproject that contains SVD files that are going to be used to generate C header with register layout definitions and other helpers to create device models. Guard the subproject by a configuration option since it is rarely going to be used - whenever new headers will be generated

[RFC PATCH v2 17/23] test/unit: add unit tests for flexcomm spi

2024-08-17 Thread Octavian Purdila
From: Sebastian Ene Add master and loopback tests for flexcomm spi. Signed-off-by: Sebastian Ene [tavip: add master mode test] Signed-off-by: Octavian Purdila --- tests/unit/test-flexcomm-spi.c | 201 + tests/unit/meson.build | 12 ++ 2 files changed,

[RFC PATCH v2 11/23] test/unit: add flexcomm usart unit test

2024-08-17 Thread Octavian Purdila
Add polling and irq unit tests for the flexcomm usart device model. Signed-off-by: Octavian Purdila --- tests/unit/test-flexcomm-usart.c | 320 +++ tests/unit/meson.build | 7 + 2 files changed, 327 insertions(+) create mode 100644 tests/unit/test-flexcom

[RFC PATCH v2 20/23] hw/ssi: add support for flexspi

2024-08-17 Thread Octavian Purdila
This is mostly a stub which completes SPI transactions as noops by masking out the error interrupts and never clearing the IPCMDDONE interrupt. Although incomplete, this allows software that uses NXP's mcuxpresso SDK to run the SDK board initialization functions. It also supports AHB memory acces

[RFC PATCH v2 19/23] test/unit: add unit tests for RT500's clock controller

2024-08-17 Thread Octavian Purdila
Add test to exercise clocks set and clear, system PLL initialization, audio PLL initialization, systick and ostimer clock source selection. Signed-off-by: Octavian Purdila --- tests/unit/test-rt500-clkctl.c | 263 + tests/unit/meson.build | 7 + 2 files

[RFC PATCH v2 21/23] hw/misc: add support for RT500's reset controller

2024-08-17 Thread Octavian Purdila
The RT500 reset controller has two instances that have the same register layout but with different fields for some registers. The model only provides set and clear functionality for the various reset lines which is common for both instances. Because of that only one type is implemented for both co

[RFC PATCH v2 22/23] hw/arm: add basic support for the RT500 SoC

2024-08-17 Thread Octavian Purdila
Add basic support for the RT500 SoC. It supports enough peripherals to run the NXP's microXpresso SDK hello world example. The patch includes an automatically generated header which contains peripheral base addreses and interrupt numbers. The header can be regenerated with the svd-rt500 target wh

[RFC PATCH v2 10/23] hw/char: add support for flexcomm usart

2024-08-17 Thread Octavian Purdila
Add support for NXP's flexcomm usart. It supports interupts and FIFO access but no DMA. The patch includes an automatically generated header which contains the register layout and helpers. The header can be regenerated with the svd-flexcomm-usart target when the build is configured with --enable-

[RFC PATCH v2 08/23] test/unit: add register access macros and functions

2024-08-17 Thread Octavian Purdila
Add utility macros for accessing register or register bit fields in unit tests, e.g.: REG32_WRITE(f->dev, FLEXCOMM, PSELID, persel); g_assert(REG32_READ_FIELD(f->dev, FLEXCOMM, PSELID, PERSEL) == persel); Also add support for accessing 32bit registers with memory transaction state, e.g.: /

[RFC PATCH v2 09/23] test/unit: add flexcomm unit test

2024-08-17 Thread Octavian Purdila
Add flexcomm function selection unit tests. Signed-off-by: Octavian Purdila --- tests/unit/test-flexcomm.c | 212 + tests/unit/meson.build | 8 +- 2 files changed, 219 insertions(+), 1 deletion(-) create mode 100644 tests/unit/test-flexcomm.c diff --gi

[RFC PATCH v2 23/23] hw/arm: add RT595-EVK board

2024-08-17 Thread Octavian Purdila
Add basic support for the RT595-EVK board, enough to be able to run the NXP's microXpresso SDK hello world example. Signed-off-by: Octavian Purdila --- hw/arm/rt595-evk.c | 64 ++ hw/arm/Kconfig | 5 hw/arm/meson.build | 1 + 3 files changed

[RFC PATCH v2 06/23] hw/misc: add basic flexcomm device model

2024-08-17 Thread Octavian Purdila
Add support for NXP's FLEXCOMM device model. It uses the NXP RT595 SVD file to generate the register structure. FLEXCOMM is a generic serial communication module which support multiple functions: UART, SPI and I2C. These are configurable at runtime. This patch adds the infrastructure to support a

[RFC PATCH v2 13/23] test/unit: add i2c-tester

2024-08-17 Thread Octavian Purdila
Add a simple i2c peripheral to be used for testing I2C device models. The peripheral has a fixed number of registers that can be read and written. Signed-off-by: Octavian Purdila --- tests/unit/i2c_tester.h | 30 +++ tests/unit/i2c_tester.c | 108

[RFC PATCH v2 03/23] scripts: add script to generate C header files from SVD XML files

2024-08-17 Thread Octavian Purdila
From: Stefan Stanacar The CMSIS System View Description format(CMSIS-SVD) is an XML based description of Arm Cortex-M microcontrollers provided and maintained by sillicon vendors. It includes details such as peripherals registers (down to bitfields), peripheral register block addresses, reset val

[RFC PATCH v2 16/23] test/unit: add spi-tester

2024-08-17 Thread Octavian Purdila
Add a simple SPI peripheral that echoes back received data. Useful for testing SPI controllers. Signed-off-by: Octavian Purdila --- tests/unit/spi_tester.h | 32 +++ tests/unit/spi_tester.c | 57 + 2 files changed, 89 insertions(+) cre

[RFC PATCH v2 12/23] hw/i2c: add support for flexcomm i2c

2024-08-17 Thread Octavian Purdila
Add support for NXP's flexcomm i2c. It does not support slave mode or DMA. The patch includes an automatically generated header which contains the register layout and helpers. The header can be regenerated with the svd-flexcomm-i2c target when the build is configured with --enable-mcux-soc-svd.

[RFC PATCH v2 02/23] tests/unit: add fifo test

2024-08-17 Thread Octavian Purdila
Add a simple FIFO unit test that test wrap around and push, pop and peek for both fifo8 and fifo32. Signed-off-by: Octavian Purdila --- tests/unit/test-fifo.c | 97 ++ tests/unit/meson.build | 1 + 2 files changed, 98 insertions(+) create mode 100644 tes

[RFC PATCH v2 05/23] hw: add register access utility functions

2024-08-17 Thread Octavian Purdila
Add register access utility functions for device models, like checking aligned access. Signed-off-by: Octavian Purdila --- include/hw/regs.h | 34 ++ 1 file changed, 34 insertions(+) create mode 100644 include/hw/regs.h diff --git a/include/hw/regs.h b/include/h

[RFC PATCH v2 01/23] fifo32: add peek function

2024-08-17 Thread Octavian Purdila
Add fifo32_peek() that returns the first element from the queue without popping it. Signed-off-by: Octavian Purdila --- include/qemu/fifo32.h | 28 1 file changed, 28 insertions(+) diff --git a/include/qemu/fifo32.h b/include/qemu/fifo32.h index 4e9fd1b5ef..77aab488

[RFC PATCH v2 07/23] tests/unit: add system bus mock

2024-08-17 Thread Octavian Purdila
From: Valentin Ghita Add a system bus mock and the necessary memory access functions to be able to create unit tests for device models. Signed-off-by: Valentin Ghita [tavip: coding style fixes, add mocks for address_space_rw, address_space_write, address_space_read_full] Signed-off-by: Octavian

[RFC PATCH v2 00/23] NXP i.MX RT595, ARM SVD and device model unit tests

2024-08-17 Thread Octavian Purdila
This patch set adds support for NXP's RT500 MCU [1] and the RT595 EVK[2]. More RT500 device models will be submitted in future patch sets. The goal of this first patch set is to provide a minimal set that allows running the NXP MCU SDK hello world example[4]. The patch set introduces a (python) t

[PATCH] net: Check if nc is NULL in qemu_get_vnet_hdr_len()

2024-08-17 Thread Akihiko Odaki
tState *nc) { +if (!nc) { +return 0; +} + return nc->vnet_hdr_len; } --- base-commit: 31669121a01a14732f57c49400bc239cf9fd505f change-id: 20240817-net-dc461895a295 Best regards, -- Akihiko Odaki