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

2023-01-28 Thread Xuan Zhuo
On Sun, 29 Jan 2023 14:23:21 +0800, Jason Wang wrote: > On Sun, Jan 29, 2023 at 10:52 AM Xuan Zhuo wrote: > > > > Check whether it is per-queue reset state in virtio_net_flush_tx(). > > > > Before per-queue reset, we need to recover async tx resources. At this > > time, virtio_net_flush_tx() is

Re: [PATCH v1 1/2] virtio: struct VirtQueue introduce reset

2023-01-28 Thread Xuan Zhuo
On Sun, 29 Jan 2023 02:37:22 -0500, "Michael S. Tsirkin" wrote: > On Sun, Jan 29, 2023 at 03:15:16PM +0800, Xuan Zhuo wrote: > > On Sun, 29 Jan 2023 02:12:36 -0500, "Michael S. Tsirkin" > > wrote: > > > > > > subject seems wrong. > > > > > > Will fix. > > > > > > > > > > On Sun, Jan 29, 2023

Re: [PATCH v1 1/2] virtio: struct VirtQueue introduce reset

2023-01-28 Thread Michael S. Tsirkin
On Sun, Jan 29, 2023 at 03:15:16PM +0800, Xuan Zhuo wrote: > On Sun, 29 Jan 2023 02:12:36 -0500, "Michael S. Tsirkin" > wrote: > > > > subject seems wrong. > > > Will fix. > > > > > > On Sun, Jan 29, 2023 at 10:51:49AM +0800, Xuan Zhuo wrote: > > > In the current design, we stop the device

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

2023-01-28 Thread Xuan Zhuo
On Sun, 29 Jan 2023 02:25:43 -0500, "Michael S. Tsirkin" wrote: > On Sun, Jan 29, 2023 at 10:51:50AM +0800, Xuan Zhuo wrote: > > Check whether it is per-queue reset state in virtio_net_flush_tx(). > > > > Before per-queue reset, we need to recover async tx resources. At this > > time,

Re: [PATCH v1 0/2] virtio: fix for assertion failure: virtio_net_get_subqueue(nc)->async_tx.elem failed

2023-01-28 Thread Michael S. Tsirkin
On Sun, Jan 29, 2023 at 10:51:48AM +0800, Xuan Zhuo wrote: > In the current design, we stop the device from operating on the vring > during per-queue reset by resetting the structure VirtQueue. > > But before the reset operation, when recycling some resources, we should > stop referencing new

Re: [PATCH v1 1/2] virtio: struct VirtQueue introduce reset

2023-01-28 Thread Xuan Zhuo
On Sun, 29 Jan 2023 02:12:36 -0500, "Michael S. Tsirkin" wrote: > > subject seems wrong. Will fix. > > On Sun, Jan 29, 2023 at 10:51:49AM +0800, Xuan Zhuo wrote: > > In the current design, we stop the device from operating on the vring > > during per-queue reset by resetting the structure

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

2023-01-28 Thread Michael S. Tsirkin
On Sun, Jan 29, 2023 at 10:51:50AM +0800, Xuan Zhuo wrote: > Check whether it is per-queue reset state in virtio_net_flush_tx(). > > Before per-queue reset, we need to recover async tx resources. At this > time, virtio_net_flush_tx() is called, but we should not try to send > new packets, so

Re: [PATCH 5/9] igb: respect E1000_VMOLR_RSSE

2023-01-28 Thread Akihiko Odaki
On 2023/01/28 22:46, Sriram Yagnaraman wrote: RSS for VFs is only enabled if VMOLR[n].RSSE is set. Signed-off-by: Sriram Yagnaraman --- hw/net/igb_core.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index

Re: [PATCH v1 1/2] virtio: struct VirtQueue introduce reset

2023-01-28 Thread Michael S. Tsirkin
subject seems wrong. On Sun, Jan 29, 2023 at 10:51:49AM +0800, Xuan Zhuo wrote: > In the current design, we stop the device from operating on the vring > during per-queue reset by resetting the structure VirtQueue. > > But before the reset operation, when recycling some resources, we should >

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

2023-01-28 Thread Akihiko Odaki
On 2023/01/28 22:46, Sriram Yagnaraman wrote: Signed-off-by: Sriram Yagnaraman --- hw/net/igb_core.c | 74 ++- 1 file changed, 54 insertions(+), 20 deletions(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index 6bca5459b9..1eb7ba168f 100644

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

2023-01-28 Thread Jason Wang
On Sun, Jan 29, 2023 at 10:52 AM Xuan Zhuo wrote: > > Check whether it is per-queue reset state in virtio_net_flush_tx(). > > Before per-queue reset, we need to recover async tx resources. At this > time, virtio_net_flush_tx() is called, but we should not try to send > new packets, so

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

2023-01-28 Thread Akihiko Odaki
On 2023/01/29 14:58, Akihiko Odaki wrote: On 2023/01/28 22:46, 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

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

2023-01-28 Thread Akihiko Odaki
On 2023/01/28 22:46, 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 v8 2/5] riscv: Change type of valid_vm_1_10_[32|64] to bool

2023-01-28 Thread Bin Meng
On Thu, Jan 26, 2023 at 12:22 AM Alexandre Ghiti wrote: > > This array is actually used as a boolean so swap its current char type > to a boolean and at the same time, change the type of validate_vm to > bool since it returns valid_vm_1_10_[32|64]. > > Suggested-by: Andrew Jones > Signed-off-by:

Re: [PATCH v8 1/5] riscv: Pass Object to register_cpu_props instead of DeviceState

2023-01-28 Thread Bin Meng
On Thu, Jan 26, 2023 at 12:21 AM Alexandre Ghiti wrote: > > One can extract the DeviceState pointer from the Object pointer, so pass > the Object for future commits to access other fields of Object. > > No functional changes intended. > > Signed-off-by: Alexandre Ghiti > Reviewed-by: Alistair

Re: [PATCH] linux-user: move target_flat.h to target subdirs

2023-01-28 Thread Richard Henderson
On 1/28/23 14:46, Mike Frysinger wrote: This makes target_flat.h behave like every other target_xxx.h header. It also makes it actually work -- while the current header says adding a header to the target subdir overrides the common one, it doesn't. This is for two reasons: * meson.build adds

Re: [PATCH v4 3/3] hw/riscv: change riscv_compute_fdt_addr() semantics

2023-01-28 Thread Bin Meng
On Thu, Jan 26, 2023 at 9:54 PM Daniel Henrique Barboza wrote: > > As it is now, riscv_compute_fdt_addr() is receiving a dram_base, a > mem_size (which is defaulted to MachineState::ram_size in all boards) > and the FDT pointer. And it makes a very important assumption: the DRAM > interval

Re: [PATCH] vdpa: fix VHOST_BACKEND_F_IOTLB_ASID flag check

2023-01-28 Thread Jason Wang
On Mon, Jan 23, 2023 at 10:39 PM Michael S. Tsirkin wrote: > > On Tue, Jan 17, 2023 at 11:53:08AM +0100, Eugenio Pérez wrote: > > VHOST_BACKEND_F_IOTLB_ASID is the feature bit, not the bitmask. Since > > the device under test also provided VHOST_BACKEND_F_IOTLB_MSG_V2 and > >

Re: [PATCH 0/3] Fix UNMAP notifier for intel-iommu

2023-01-28 Thread Jason Wang
On Fri, Jan 27, 2023 at 9:17 PM Michael S. Tsirkin wrote: > > On Mon, Jan 16, 2023 at 03:06:44PM +0800, Jason Wang wrote: > > On Mon, Jan 16, 2023 at 7:30 AM Viktor Prutyanov wrote: > > > > > > On Tue, Nov 29, 2022 at 11:10 AM Jason Wang wrote: > > > > > > > > Hi All: > > > > > > > > According

Re: [PATCH v4 2/3] hw/riscv: split fdt address calculation from fdt load

2023-01-28 Thread Bin Meng
On Thu, Jan 26, 2023 at 9:53 PM Daniel Henrique Barboza wrote: > > A common trend in other archs is to calculate the fdt address, which is > usually straightforward, and then calling a function that loads the > fdt/dtb by using that address. > > riscv_load_fdt() is doing a bit too much in

Re: [PATCH v7] tests/qtest: netdev: test stream and dgram backends

2023-01-28 Thread Jason Wang
On Thu, Jan 26, 2023 at 8:48 PM Thomas Huth wrote: > > On 18/01/2023 13.04, Laurent Vivier wrote: > > Signed-off-by: Laurent Vivier > > Acked-by: Michael S. Tsirkin > > Acked-by: Thomas Huth > > --- > > > > Notes: > > v7: > >- disable test_dgram_mcast() on windows > >-

Re: [PATCH v4] net: stream: add a new option to automatically reconnect

2023-01-28 Thread Jason Wang
On Thu, Jan 19, 2023 at 6:16 PM Laurent Vivier wrote: > > In stream mode, if the server shuts down there is currently > no way to reconnect the client to a new server without removing > the NIC device and the netdev backend (or to reboot). > > This patch introduces a reconnect option that

Re: [PATCH v4 1/3] hw/riscv/boot.c: calculate fdt size after fdt_pack()

2023-01-28 Thread Bin Meng
On Sun, Jan 29, 2023 at 10:20 AM Bin Meng wrote: > > Hi Daniel, > > On Thu, Jan 26, 2023 at 9:53 PM Daniel Henrique Barboza > wrote: > > > > fdt_pack() can change the fdt size, meaning that fdt_totalsize() can > > contain a now deprecated (bigger) value. > > The commit message is a bit

Re: [PATCH] pci: add enforce_slot_reserved_mask_manual property

2023-01-28 Thread Chuck Zmudzinski
On 1/28/2023 4:58 PM, Mark Cave-Ayland wrote: > On 28/01/2023 03:39, Chuck Zmudzinski wrote: > > > On 1/27/2023 8:28 AM, Michael S. Tsirkin wrote: > >> On Sun, Jan 15, 2023 at 07:49:51PM -0500, Chuck Zmudzinski wrote: > >>> The current reserved slot check in do_pci_register_device(), added with >

[PATCH v4 12/12] MAINTAINERS: add myself as the maintainer for cryptodev

2023-01-28 Thread zhenwei pi
I developed the akcipher service, QoS setting, QMP/HMP commands and statistics accounting for crypto device. Making myself as the maintainer for QEMU's cryptodev. Cc: Gonglei Signed-off-by: zhenwei pi --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS

[PATCH v4 11/12] cryptodev: Support query-stats QMP command

2023-01-28 Thread zhenwei pi
Now we can use "query-stats" QMP command to query statistics of crypto devices. (Originally this was designed to show statistics by '{"execute": "query-cryptodev"}'. Daniel Berrangé suggested that querying configuration info by "query-cryptodev", and querying runtime performance info by

[PATCH v4 04/12] cryptodev: Introduce server type in QAPI

2023-01-28 Thread zhenwei pi
Introduce cryptodev service type in cryptodev.json, then apply this to related codes. Now we can remove VIRTIO_CRYPTO_SERVICE_xxx dependence from QEMU cryptodev. Reviewed-by: Daniel P. Berrangé Signed-off-by: zhenwei pi --- backends/cryptodev-builtin.c| 8

[PATCH v4 06/12] cryptodev-builtin: Detect akcipher capability

2023-01-28 Thread zhenwei pi
Rather than exposing akcipher service/RSA algorithm to virtio crypto device unconditionally, detect akcipher capability from akcipher crypto framework. This avoids unsuccessful requests. Reviewed-by: Daniel P. Berrangé Signed-off-by: zhenwei pi --- backends/cryptodev-builtin.c | 18

[PATCH v4 10/12] cryptodev: support QoS

2023-01-28 Thread zhenwei pi
Add 'throttle-bps' and 'throttle-ops' limitation to set QoS. The two arguments work with both QEMU command line and QMP command. Example of QEMU command line: -object cryptodev-backend-builtin,id=cryptodev1,throttle-bps=1600,\ throttle-ops=100 Example of QMP command: virsh qemu-monitor-command

[PATCH v4 02/12] cryptodev: Remove 'name' & 'model' fields

2023-01-28 Thread zhenwei pi
We have already used qapi to generate crypto device types, this allows to convert type to a string 'model', so the 'model' field is not needed. And the 'name' field is not used by any backend driver, drop it. Reviewed-by: Daniel P. Berrangé Signed-off-by: zhenwei pi ---

[PATCH v4 09/12] cryptodev: Account statistics

2023-01-28 Thread zhenwei pi
Account OPS/BPS for crypto device, this will be used for 'query-stats' QEMU monitor command and QoS in the next step. Note that a crypto device may support symmetric mode, asymmetric mode, both symmetric and asymmetric mode. So we use two structure to describe the statistics of a crypto device.

[PATCH v4 07/12] hmp: add cryptodev info command

2023-01-28 Thread zhenwei pi
Example of this command: # virsh qemu-monitor-command vm --hmp info cryptodev cryptodev1: service=[akcipher|mac|hash|cipher] queue 0: type=builtin cryptodev0: service=[akcipher] queue 0: type=lkcf Signed-off-by: zhenwei pi --- hmp-commands-info.hx | 14 ++

[PATCH v4 05/12] cryptodev: Introduce 'query-cryptodev' QMP command

2023-01-28 Thread zhenwei pi
Now we have a QMP command to query crypto devices: virsh qemu-monitor-command vm '{"execute": "query-cryptodev"}' | jq { "return": [ { "service": [ "akcipher", "mac", "hash", "cipher" ], "id": "cryptodev1", "client": [ {

[PATCH v4 01/12] cryptodev: Introduce cryptodev.json

2023-01-28 Thread zhenwei pi
Introduce QCryptodevBackendType in cryptodev.json, also apply this to related codes. Then we can drop 'enum CryptoDevBackendOptionsType'. Note that `CRYPTODEV_BACKEND_TYPE_NONE` is *NOT* used by anywhere, so drop it(no 'none' enum in QCryptodevBackendType). Reviewed-by: Daniel P. Berrangé

[PATCH v4 08/12] cryptodev: Use CryptoDevBackendOpInfo for operation

2023-01-28 Thread zhenwei pi
Move queue_index, CryptoDevCompletionFunc and opaque into struct CryptoDevBackendOpInfo, then cryptodev_backend_crypto_operation() needs an argument CryptoDevBackendOpInfo *op_info only. And remove VirtIOCryptoReq from cryptodev. It's also possible to hide VirtIOCryptoReq into virtio-crypto.c in

[PATCH v4 03/12] cryptodev: Introduce cryptodev alg type in QAPI

2023-01-28 Thread zhenwei pi
Introduce cryptodev alg type in cryptodev.json, then apply this to related codes, and drop 'enum CryptoDevBackendAlgType'. There are two options: 1, { 'enum': 'QCryptodevBackendAlgType', 'prefix': 'CRYPTODEV_BACKEND_ALG', 'data': ['sym', 'asym']} Then we can keep 'CRYPTODEV_BACKEND_ALG_SYM'

[PATCH v4 00/12] Refactor cryptodev

2023-01-28 Thread zhenwei pi
v4 -> v5: - suggested by MST, use 'PRIu32' instead of '%u' to print a uint32_t value - correct *QCryptodevBackendClient* and *QCryptodevInfo* in qapi/cryptodev.json v3 -> v4: - a small change in '0005-cryptodev-Introduce-query-cryptodev-QMP-command.patch': use 'uint32' instead of 'int' to

[PATCH v1 0/2] virtio: fix for assertion failure: virtio_net_get_subqueue(nc)->async_tx.elem failed

2023-01-28 Thread Xuan Zhuo
In the current design, we stop the device from operating on the vring during per-queue reset by resetting the structure VirtQueue. But before the reset operation, when recycling some resources, we should stop referencing new vring resources. This bug is caused by this reason.

[PATCH v1 1/2] virtio: struct VirtQueue introduce reset

2023-01-28 Thread Xuan Zhuo
In the current design, we stop the device from operating on the vring during per-queue reset by resetting the structure VirtQueue. But before the reset operation, when recycling some resources, we should stop referencing new vring resources. For example, when recycling virtio-net's asynchronous

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

2023-01-28 Thread Xuan Zhuo
Check whether it is per-queue reset state in virtio_net_flush_tx(). Before per-queue reset, we need to recover async tx resources. At this time, virtio_net_flush_tx() is called, but we should not try to send new packets, so virtio_net_flush_tx() should check the current per-queue reset state.

Re: [PATCH 0/3] Misc sm501 clean ups

2023-01-28 Thread BALATON Zoltan
On Mon, 23 Jan 2023, Philippe Mathieu-Daudé wrote: On 21/1/23 21:35, BALATON Zoltan wrote: Some small trivial clean ups I've found while looking at this file. BALATON Zoltan (3): hw/display/sm501: Remove parenthesis around consant macro definitions hw/display/sm501: Remove unneeded casts

Re: [PATCH v4 1/3] hw/riscv/boot.c: calculate fdt size after fdt_pack()

2023-01-28 Thread Bin Meng
Hi Daniel, On Thu, Jan 26, 2023 at 9:53 PM Daniel Henrique Barboza wrote: > > fdt_pack() can change the fdt size, meaning that fdt_totalsize() can > contain a now deprecated (bigger) value. The commit message is a bit confusing. The original code in this patch does not call fdt_pack(). So not

[PATCH] linux-user: move target_flat.h to target subdirs

2023-01-28 Thread Mike Frysinger
This makes target_flat.h behave like every other target_xxx.h header. It also makes it actually work -- while the current header says adding a header to the target subdir overrides the common one, it doesn't. This is for two reasons: * meson.build adds -Ilinux-user before -Ilinux-user/$arch * the

Re: [PATCH 23/23] target/arm: Enable FEAT_FGT on '-cpu max'

2023-01-28 Thread Richard Henderson
On 1/27/23 07:55, Peter Maydell wrote: Update the ID registers for TCG's '-cpu max' to report the presence of FEAT_FGT Fine-Grained Traps support. Signed-off-by: Peter Maydell --- docs/system/arm/emulation.rst | 1 + target/arm/cpu64.c| 1 + 2 files changed, 2 insertions(+)

Re: [PATCH 22/23] target/arm: Implement MDCR_EL2.TDCC and MDCR_EL3.TDCC traps

2023-01-28 Thread Richard Henderson
On 1/27/23 07:55, Peter Maydell wrote: FEAT_FGT also implements an extra trap bit in the MDCR_EL2 and MDCR_EL3 registers: bit TDCC enables trapping of use of the Debug Comms Channel registers OSDTRRX_EL1, OSDTRTX_EL1, MDCCSR_EL0, MDCCINT_EL0, DBGDTR_EL0, DBGDTRRX_EL0 and DBGDTRTX_EL0 (and their

Re: [PATCH 21/23] target/arm: Implement the HFGITR_EL2.SVC_EL0 and SVC_EL1 traps

2023-01-28 Thread Richard Henderson
On 1/27/23 07:55, Peter Maydell wrote: Implement the HFGITR_EL2.SVC_EL0 and SVC_EL1 fine-grained traps. These trap execution of the SVC instruction from AArch32 and AArch64. (As usual, AArch32 can only trap from EL0, as fine grained traps are disabled with an AArch32 EL1.) Signed-off-by: Peter

Re: [PATCH 20/23] target/arm: Implement the HFGITR_EL2.ERET trap

2023-01-28 Thread Richard Henderson
On 1/27/23 07:55, Peter Maydell wrote: Implement the HFGITR_EL2.ERET fine-grained trap. This traps execution from AArch64 EL1 of ERET, ERETAA and ERETAB. The trap is reported with a syndrome value of 0x1a. The trap must take precedence over a possible pointer-authentication trap for ERETAA

Re: [PATCH 19/23] target/arm: Mark up sysregs for HFGITR bits 48..63

2023-01-28 Thread Richard Henderson
On 1/27/23 07:55, Peter Maydell wrote: Mark up the sysreg definitions for the system instructions trapped by HFGITR bits 48..63. Some of these bits are for trapping instructions which are not in the system instruction encoding (i.e. which are not handled by the ARMCPRegInfo mechanism): *

Re: [PATCH 18/23] target/arm: Mark up sysregs for HFGITR bits 18..47

2023-01-28 Thread Richard Henderson
On 1/27/23 07:55, Peter Maydell wrote: Mark up the sysreg definitions for the system instructions trapped by HFGITR bits 18..47. These bits cover TLBI TLB maintenance instructions. (If we implemented FEAT_XS we would need to trap some of the instructions added by that feature using these bits;

Re: [PATCH 17/23] target/arm: Mark up sysregs for HFGITR bits 12..17

2023-01-28 Thread Richard Henderson
On 1/27/23 07:55, Peter Maydell wrote: Mark up the sysreg definitions for the system instructions trapped by HFGITR bits 12..17. These bits cover AT address translation instructions. Signed-off-by: Peter Maydell --- target/arm/cpregs.h | 6 ++ target/arm/helper.c | 6 ++ 2 files

Re: [PATCH 16/23] target/arm: Mark up sysregs for HFGITR bits 0..11

2023-01-28 Thread Richard Henderson
On 1/27/23 07:55, Peter Maydell wrote: Mark up the sysreg definitions for the system instructions trapped by HFGITR bits 0..11. These bits cover various cache maintenance operations. Signed-off-by: Peter Maydell --- target/arm/cpregs.h | 14 ++ target/arm/helper.c | 28

Re: [PATCH 15/23] target/arm: Mark up sysregs for HDFGRTR bits 12..63

2023-01-28 Thread Richard Henderson
On 1/27/23 07:54, Peter Maydell wrote: Mark up the sysreg definitions for the registers trapped by HDFGRTR/HDFGWTR bits 12..x. Bits 12..22 and bit 58 are for PMU registers. The remaining bits in HDFGRTR/HDFGWTR are for traps on registers that are part of features we don't implement: Bits

Re: [PATCH 0/4] E500 cleanups and enhancements

2023-01-28 Thread Daniel Henrique Barboza
On 1/25/23 10:00, Bernhard Beschow wrote: This series includes some cleanups I came across when working on the ppce500 machine. Furthermore, it enables support for the 'dumpdtb' QMP/HMP command which was missing so far. Bernhard Beschow (4): hw/ppc: Set machine->fdt in e500 machines

Re: [PATCH 0/4] PCI-related cleanup for ppc/powernv

2023-01-28 Thread Daniel Henrique Barboza
On 1/27/23 09:28, Frederic Barrat wrote: Pretty simple PCI-related cleanup for powernv Frederic Barrat (4): ppc/pnv/pci: Cleanup PnvPHBPecState structure ppc/pnv/pci: Remove duplicate definition of PNV_PHB5_DEVICE_ID ppc/pnv/pci: Update PHB5 version register ppc/pnv/pci: Fix PHB

[PATCH v2] hvf: arm: Add support for GICv3

2023-01-28 Thread Alexander Graf
We currently only support GICv2 emulation. To also support GICv3, we will need to pass a few system registers into their respective handler functions. This patch adds support for HVF to call into the TCG callbacks for GICv3 system register handlers. This is safe because the GICv3 TCG code is

Re: [PATCH] hvf: arm: Add support for GICv3

2023-01-28 Thread Alexander Graf
On 06.01.23 17:37, Peter Maydell wrote: On Mon, 19 Dec 2022 at 22:08, Alexander Graf wrote: We currently only support GICv2 emulation. To also support GICv3, we will need to pass a few system registers into their respective handler functions. This patch adds support for HVF to call into the

Re: [PATCH 00/17] audio: improve callback interface for audio frontends

2023-01-28 Thread Mark Cave-Ayland
On 28/01/2023 09:03, Volker Rümelin wrote: Am 22.01.23 um 19:13 schrieb Mark Cave-Ayland: On 15/01/2023 13:45, Volker Rümelin wrote: Am 15.01.23 um 14:08 schrieb Volker Rümelin: Ccing a few more people who might be interested in this patch series. @Mark: After this patch series, the code

Re: [PATCH] pci: add enforce_slot_reserved_mask_manual property

2023-01-28 Thread Mark Cave-Ayland
On 28/01/2023 03:39, Chuck Zmudzinski wrote: On 1/27/2023 8:28 AM, Michael S. Tsirkin wrote: On Sun, Jan 15, 2023 at 07:49:51PM -0500, Chuck Zmudzinski wrote: The current reserved slot check in do_pci_register_device(), added with commit 8b8849844fd6 add ("subject here") please ,is done

Re: [PATCH] pci: add enforce_slot_reserved_mask_manual property

2023-01-28 Thread Chuck Zmudzinski
On 1/28/23 2:14 PM, Michael S. Tsirkin wrote: > On Sat, Jan 28, 2023 at 08:20:55AM -0500, Chuck Zmudzinski wrote: >> On 1/28/23 5:26 AM, Michael S. Tsirkin wrote: >> > On Fri, Jan 27, 2023 at 10:39:28PM -0500, Chuck Zmudzinski wrote: >> >> On 1/27/2023 8:28 AM, Michael S. Tsirkin wrote: >> >> > On

RE: [PATCH v2 00/13] Introduce igb

2023-01-28 Thread Sriram Yagnaraman
> -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 Santos > Moschetta ; Beraldo

[PATCH 0/9] igb: add missing feature set from

2023-01-28 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 Sriram Yagnaraman (9): MAINTAINERS: Add Sriram

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

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

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

2023-01-28 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 4/9] igb: check oversized packets for VMDq

2023-01-28 Thread Sriram Yagnaraman
Signed-off-by: Sriram Yagnaraman --- hw/net/igb_core.c | 74 ++- 1 file changed, 54 insertions(+), 20 deletions(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index 6bca5459b9..1eb7ba168f 100644 --- a/hw/net/igb_core.c +++ b/hw/net/igb_core.c

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

2023-01-28 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 | 31 ++- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git

[PATCH 6/9] igb: add ICR_RXDW

2023-01-28 Thread Sriram Yagnaraman
IGB uses RXDW ICR bit to indicate that rx descriptor has been written back. This is the same as RXT0 bit in older HW. Signed-off-by: Sriram Yagnaraman --- hw/net/e1000x_regs.h | 4 hw/net/igb_core.c| 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git

[PATCH 5/9] igb: respect E1000_VMOLR_RSSE

2023-01-28 Thread Sriram Yagnaraman
RSS for VFs is only enabled if VMOLR[n].RSSE is set. Signed-off-by: Sriram Yagnaraman --- hw/net/igb_core.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index 1eb7ba168f..e4fd4a1a5f 100644 --- a/hw/net/igb_core.c

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

2023-01-28 Thread Sriram Yagnaraman
Add support for stripping/inserting VLAN for VFs. Signed-off-by: Sriram Yagnaraman --- hw/net/igb_core.c | 100 ++ 1 file changed, 65 insertions(+), 35 deletions(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index 8e33e15505..96a5c5eca3

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

2023-01-28 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 8/9] igb: respect VT_CTL ignore MAC field

2023-01-28 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

Re: [PATCH] pci: add enforce_slot_reserved_mask_manual property

2023-01-28 Thread Michael S. Tsirkin
On Sat, Jan 28, 2023 at 08:20:55AM -0500, Chuck Zmudzinski wrote: > On 1/28/23 5:26 AM, Michael S. Tsirkin wrote: > > On Fri, Jan 27, 2023 at 10:39:28PM -0500, Chuck Zmudzinski wrote: > >> On 1/27/2023 8:28 AM, Michael S. Tsirkin wrote: > >> > On Sun, Jan 15, 2023 at 07:49:51PM -0500, Chuck

Re: [PATCH 06/23] target/arm: Make HSTR_EL2 traps take priority over UNDEF-at-EL1

2023-01-28 Thread Peter Maydell
On Sat, 28 Jan 2023 at 01:47, Richard Henderson wrote: > > On 1/27/23 07:54, Peter Maydell wrote: > > +void HELPER(hstr_trap_check)(CPUARMState *env, uint32_t mask, uint32_t > > syndrome) > > +{ > > +if (env->cp15.hstr_el2 & mask) { > > +raise_exception(env, EXCP_UDEF, syndrome, 2);

Re: [PATCH v10 9/9] KVM: Enable and expose KVM_MEM_PRIVATE

2023-01-28 Thread Chao Peng
On Sat, Jan 14, 2023 at 12:01:01AM +, Sean Christopherson wrote: > On Fri, Dec 02, 2022, Chao Peng wrote: ... > Strongly prefer to use similar logic to existing code that detects wraps: > > mem->restricted_offset + mem->memory_size < > mem->restricted_offset > > This is also

Re: [PATCH v10 7/9] KVM: Update lpage info when private/shared memory are mixed

2023-01-28 Thread Chao Peng
On Fri, Jan 13, 2023 at 11:16:27PM +, Sean Christopherson wrote: > On Fri, Dec 02, 2022, Chao Peng wrote: > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > > index 9a07380f8d3c..5aefcff614d2 100644 > > --- a/arch/x86/kvm/x86.c > > +++ b/arch/x86/kvm/x86.c > > @@ -12362,6 +12362,8 @@

Re: [PATCH] pci: add enforce_slot_reserved_mask_manual property

2023-01-28 Thread Chuck Zmudzinski
On 1/28/23 5:26 AM, Michael S. Tsirkin wrote: > On Fri, Jan 27, 2023 at 10:39:28PM -0500, Chuck Zmudzinski wrote: >> On 1/27/2023 8:28 AM, Michael S. Tsirkin wrote: >> > On Sun, Jan 15, 2023 at 07:49:51PM -0500, Chuck Zmudzinski wrote: >> > > The current reserved slot check in

Re: [PATCH v5] Emulate dip switch language layout settings on SUN keyboard

2023-01-28 Thread Henrik Carlqvist
On Sun, 22 Jan 2023 18:07:47 + Mark Cave-Ayland wrote: > Did you see my comments re: OpenBIOS for the earlier version of this patch? Sorry again for missing that comment, I sent a reply ( https://lists.nongnu.org/archive/html/qemu-devel/2023-01/msg05134.html ) I have now unsubscribed from

Re: Re: [PATCH v3 05/12] cryptodev: Introduce 'query-cryptodev' QMP command

2023-01-28 Thread zhenwei pi
On 1/28/23 19:30, Michael S. Tsirkin wrote: On Sat, Jan 28, 2023 at 11:56:26AM +0800, zhenwei pi wrote: Now we have a QMP command to query crypto devices: virsh qemu-monitor-command vm '{"execute": "query-cryptodev"}' | jq { "return": [ { "service": [ "akcipher",

Re: Re: [PATCH v3 00/12] Refactor cryptodev

2023-01-28 Thread zhenwei pi
On 1/28/23 19:30, Michael S. Tsirkin wrote: On Sat, Jan 28, 2023 at 11:56:21AM +0800, zhenwei pi wrote: v3 -> v4: - a small change in '0005-cryptodev-Introduce-query-cryptodev-QMP-command.patch': use 'uint32' instead of 'int' to describe CryptodevBackendClient:queue what was the

Re: [PATCH v3 00/12] Refactor cryptodev

2023-01-28 Thread Michael S. Tsirkin
On Sat, Jan 28, 2023 at 11:56:21AM +0800, zhenwei pi wrote: > v3 -> v4: > - a small change in > '0005-cryptodev-Introduce-query-cryptodev-QMP-command.patch': > use 'uint32' instead of 'int' to describe CryptodevBackendClient:queue what was the motivation for this change? we generally just use

Re: [PATCH v3 05/12] cryptodev: Introduce 'query-cryptodev' QMP command

2023-01-28 Thread Michael S. Tsirkin
On Sat, Jan 28, 2023 at 11:56:26AM +0800, zhenwei pi wrote: > Now we have a QMP command to query crypto devices: > virsh qemu-monitor-command vm '{"execute": "query-cryptodev"}' | jq > { > "return": [ > { > "service": [ > "akcipher", > "mac", > "hash", >

Re: [PATCH 2/3] virtio: struct VirtQueue introduce reset

2023-01-28 Thread Michael S. Tsirkin
On Sat, Jan 28, 2023 at 06:41:09PM +0800, Xuan Zhuo wrote: > On Sat, 28 Jan 2023 05:22:05 -0500, "Michael S. Tsirkin" > wrote: > > On Sat, Jan 28, 2023 at 03:17:23PM +0800, Xuan Zhuo wrote: > > > In the current design, we stop the device from operating on the vring > > > during per-queue reset

Re: [PATCH qemu v3] x86: don't let decompressed kernel image clobber setup_data

2023-01-28 Thread Michael S. Tsirkin
On Mon, Jan 23, 2023 at 06:37:21AM -0600, Jason A. Donenfeld wrote: > On Mon, Jan 23, 2023 at 6:12 AM Michael S. Tsirkin wrote: > > > > On Sun, Jan 22, 2023 at 08:21:30PM -0800, Eric Biggers wrote: > > > Hi Michael, > > > > > > On Tue, Jan 10, 2023 at 12:50:42PM -0500, Michael S. Tsirkin wrote: >

Re: [PATCH 2/3] virtio: struct VirtQueue introduce reset

2023-01-28 Thread Xuan Zhuo
On Sat, 28 Jan 2023 05:22:05 -0500, "Michael S. Tsirkin" wrote: > On Sat, Jan 28, 2023 at 03:17:23PM +0800, Xuan Zhuo wrote: > > In the current design, we stop the device from operating on the vring > > during per-queue reset by resetting the structure VirtQueue. > > > > But before the reset

Re: [PATCH 1/3] virtio: move struct VirtQueue to include file

2023-01-28 Thread Xuan Zhuo
On Sat, 28 Jan 2023 05:23:46 -0500, "Michael S. Tsirkin" wrote: > On Sat, Jan 28, 2023 at 03:17:22PM +0800, Xuan Zhuo wrote: > > This patch move struct VirtQueue into virtio.h. > > > > In order to implement Queue Reset, we have to record the queue reset > > status of in struct VirtQueue and

Re: [PATCH v4 04/19] bsd-user: Clean up includes

2023-01-28 Thread Michael S. Tsirkin
On Fri, Jan 27, 2023 at 10:01:57AM -0500, Michael S. Tsirkin wrote: > On Fri, Jan 27, 2023 at 02:54:30PM +, Peter Maydell wrote: > > On Thu, 19 Jan 2023 at 14:42, Warner Losh wrote: > > > > > > Also, why didn't you move sys/resource.h and other such files > > > to os-dep.h? I'm struggling to

Re: [PATCH v4 01/19] scripts/clean-includes: Fully skip / ignore files

2023-01-28 Thread Michael S. Tsirkin
On Thu, Jan 19, 2023 at 07:59:41AM +0100, Markus Armbruster wrote: > When clean-includes claims to skip or ignore a file, only the part > that sanitizes use of qemu/osdep.h skips the file. The part that > looks for duplicate #include does not, and neither does committing to > Git. > > The latter

Re: [PATCH] pci: add enforce_slot_reserved_mask_manual property

2023-01-28 Thread Michael S. Tsirkin
On Fri, Jan 27, 2023 at 10:39:28PM -0500, Chuck Zmudzinski wrote: > On 1/27/2023 8:28 AM, Michael S. Tsirkin wrote: > > On Sun, Jan 15, 2023 at 07:49:51PM -0500, Chuck Zmudzinski wrote: > > > The current reserved slot check in do_pci_register_device(), added with > > > commit 8b8849844fd6 > > > >

Re: [PATCH 1/3] virtio: move struct VirtQueue to include file

2023-01-28 Thread Michael S. Tsirkin
On Sat, Jan 28, 2023 at 03:17:22PM +0800, Xuan Zhuo wrote: > This patch move struct VirtQueue into virtio.h. > > In order to implement Queue Reset, we have to record the queue reset > status of in struct VirtQueue and provide it to device. > > Signed-off-by: Xuan Zhuo So add an API please, no

Re: [PATCH 2/3] virtio: struct VirtQueue introduce reset

2023-01-28 Thread Michael S. Tsirkin
On Sat, Jan 28, 2023 at 03:17:23PM +0800, Xuan Zhuo wrote: > In the current design, we stop the device from operating on the vring > during per-queue reset by resetting the structure VirtQueue. > > But before the reset operation, when recycling some resources, we should > stop referencing new

Re: [PATCH 00/17] audio: improve callback interface for audio frontends

2023-01-28 Thread Volker Rümelin
Am 22.01.23 um 19:13 schrieb Mark Cave-Ayland: On 15/01/2023 13:45, Volker Rümelin wrote: Am 15.01.23 um 14:08 schrieb Volker Rümelin: Ccing a few more people who might be interested in this patch series. @Mark: After this patch series, the code in your out of tree ASC audio device (and a

[PATCH v9 52/58] hw/xen: Automatically add xen-platform PCI device for emulated Xen guests

2023-01-28 Thread David Woodhouse
From: David Woodhouse It isn't strictly mandatory but Linux guests at least will only map their grant tables over the dummy BAR that it provides, and don't sufficient wit to map them in any other unused part of their guest address space. So include it by default for minimal surprise factor. As

[PATCH v9 17/58] i386/xen: implement XENMEM_add_to_physmap_batch

2023-01-28 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- target/i386/kvm/xen-compat.h | 24 + target/i386/kvm/xen-emu.c| 69 2 files changed, 93 insertions(+) diff --git a/target/i386/kvm/xen-compat.h

[PATCH v9 34/58] hw/xen: Implement EVTCHNOP_alloc_unbound

2023-01-28 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- hw/i386/kvm/xen_evtchn.c | 32 hw/i386/kvm/xen_evtchn.h | 2 ++ target/i386/kvm/xen-emu.c | 15 +++ 3 files changed, 49 insertions(+) diff --git a/hw/i386/kvm/xen_evtchn.c

[PATCH v9 03/58] xen: Add XEN_DISABLED mode and make it default

2023-01-28 Thread David Woodhouse
From: David Woodhouse Also set XEN_ATTACH mode in xen_init() to reflect the truth; not that anyone ever cared before. It was *only* ever checked in xen_init_pv() before. Suggested-by: Paolo Bonzini Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- accel/xen/xen-all.c | 2 ++

[PATCH v9 20/58] i386/xen: handle VCPUOP_register_vcpu_info

2023-01-28 Thread David Woodhouse
From: Joao Martins Handle the hypercall to set a per vcpu info, and also wire up the default vcpu_info in the shared_info page for the first 32 vCPUs. To avoid deadlock within KVM a vCPU thread must set its *own* vcpu_info rather than it being set from the context in which the hypercall is

[PATCH v9 53/58] i386/xen: Document Xen HVM emulation

2023-01-28 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- docs/system/i386/xen.rst| 50 + docs/system/target-i386.rst | 1 + 2 files changed, 51 insertions(+) create mode 100644 docs/system/i386/xen.rst diff --git a/docs/system/i386/xen.rst

[PATCH v9 13/58] hw/xen: Add xen_overlay device for emulating shared xenheap pages

2023-01-28 Thread David Woodhouse
From: David Woodhouse For the shared info page and for grant tables, Xen shares its own pages from the "Xen heap" to the guest. The guest requests that a given page from a certain address space (XENMAPSPACE_shared_info, etc.) be mapped to a given GPA using the XENMEM_add_to_physmap hypercall.

[PATCH v9 26/58] hw/xen: Add xen_evtchn device for event channel emulation

2023-01-28 Thread David Woodhouse
From: David Woodhouse Include basic support for setting HVM_PARAM_CALLBACK_IRQ to the global vector method HVM_PARAM_CALLBACK_TYPE_VECTOR, which is handled in-kernel by raising the vector whenever the vCPU's vcpu_info->evtchn_upcall_pending flag is set. Signed-off-by: David Woodhouse

[PATCH v9 21/58] i386/xen: handle VCPUOP_register_vcpu_time_info

2023-01-28 Thread David Woodhouse
From: Joao Martins In order to support Linux vdso in Xen. Signed-off-by: Joao Martins Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- target/i386/cpu.h | 1 + target/i386/kvm/xen-emu.c | 100 +- target/i386/machine.c | 1 + 3

[PATCH v9 28/58] hw/xen: Implement EVTCHNOP_status

2023-01-28 Thread David Woodhouse
From: David Woodhouse This adds the basic structure for maintaining the port table and reporting the status of ports therein. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/i386/kvm/xen_evtchn.c | 104 ++ hw/i386/kvm/xen_evtchn.h | 3

  1   2   >