Re: [PATCH 1/4] hw/dma: Enhance error handling in loading description

2024-06-04 Thread Frank Chang
Reviewed-by: Frank Chang Fea.Wang 於 2024年6月3日 週一 下午1:48寫道: > > Loading a description from memory may cause a bus-error. In this > case, the DMA should stop working, set the error flag, and return > the error value. > > Signed-off-by: Fea.Wang > --- > hw/dma/xilinx_axidma.c | 16 ++-

Re: [PATCH 2/4] hw/dma: Break the loop when loading descriptions fails

2024-06-04 Thread Frank Chang
Reviewed-by: Frank Chang Fea.Wang 於 2024年6月3日 週一 下午1:48寫道: > > When calling the loading a description function, it should be noticed > that the function may return a failure value. Breaking the loop is one > of the possible ways to handle it. > > Signed-off-by: Fea.Wang > --- > hw/dma/xilinx_a

Re: [PATCH 3/4] hw/dma: Add a trace log for a description loading failure

2024-06-04 Thread Frank Chang
Reviewed-by: Frank Chang Fea.Wang 於 2024年6月3日 週一 下午1:49寫道: > > Due to a description loading failure, adding a trace log makes observing > the DMA behavior easy. > > Signed-off-by: Fea.Wang > --- > hw/dma/trace-events| 3 +++ > hw/dma/xilinx_axidma.c | 3 +++ > 2 files changed, 6 insertions

Re: [PATCH 4/4] hw/net: Fix the transmission return size

2024-06-04 Thread Frank Chang
Reviewed-by: Frank Chang Fea.Wang 於 2024年6月3日 週一 下午1:48寫道: > > Fix the transmission return size because not all bytes could be > transmitted successfully. So, return a successful length instead of a > constant value. > > Signed-off-by: Fea.Wang > --- > hw/net/xilinx_axienet.c | 2 +- > 1 file

Re: [PATCH v2 00/12] Add support for RISC-V ACPI tests

2024-06-04 Thread Michael S. Tsirkin
On Tue, Jun 04, 2024 at 01:29:28PM +1000, Alistair Francis wrote: > On Fri, May 24, 2024 at 4:14 PM Sunil V L wrote: > > > > Currently, bios-table-test doesn't support RISC-V. This series enables > > the framework changes required and basic testing. Things like NUMA > > related test cases will be

[PATCH v2 1/3] hw/dma: Enhance error handling in loading description

2024-06-04 Thread Fea.Wang
Loading a description from memory may cause a bus-error. In this case, the DMA should stop working, set the error flag, and return the failure value. When calling the loading a description function, it should be noticed that the function may return a failure value. Breaking the loop in this case i

[PATCH v2 3/3] hw/net: Fix the transmission return size

2024-06-04 Thread Fea.Wang
Fix the transmission return size because not all bytes could be transmitted successfully. So, return a successful length instead of a constant value. Signed-off-by: Fea.Wang Reviewed-by: Edgar E. Iglesias Reviewed-by: Frank Chang --- hw/net/xilinx_axienet.c | 2 +- 1 file changed, 1 insertion(

[PATCH v2 0/3] hw/dma: Add error handling for loading descriptions failing

2024-06-04 Thread Fea.Wang
The original code assumes that memory transmission is always successful, but in some cases, it gets bus-error. Add error handling for DMA reading description failures. Do some reasonable settings, and return the corrected transmission size. Finally, return the error status. * Add DMASR_DECERR cas

[PATCH v2 2/3] hw/dma: Add a trace log for a description loading failure

2024-06-04 Thread Fea.Wang
Due to a description loading failure, adding a trace log makes observing the DMA behavior easy. Signed-off-by: Fea.Wang Reviewed-by: Edgar E. Iglesias Reviewed-by: Frank Chang --- hw/dma/trace-events| 3 +++ hw/dma/xilinx_axidma.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/hw/

Re: [PATCH v8 11/14] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-06-04 Thread Markus Armbruster
nifan@gmail.com writes: > From: Fan Ni > > To simulate FM functionalities for initiating Dynamic Capacity Add > (Opcode 5604h) and Dynamic Capacity Release (Opcode 5605h) as in CXL spec > r3.1 7.6.7.6.5 and 7.6.7.6.6, we implemented two QMP interfaces to issue > add/release dynamic capacity e

Re: [PATCH V1 17/26] machine: memfd-alloc option

2024-06-04 Thread Daniel P . Berrangé
On Mon, Jun 03, 2024 at 05:48:32PM -0400, Peter Xu wrote: > That property, irrelevant of what it is called (and I doubt whether Dan's > suggestion on "shared-ram" is good, e.g. mmap(MAP_SHARED) doesn't have user > visible fd but it's shared-ram for sure..), is yet another way to specify > guest mem

[PATCH 00/11] target/i386: fixes for INHIBIT_IRQ, TF and RF

2024-06-04 Thread Paolo Bonzini
While Richard pointed out that there _are_ good reasons to use DISAS_NORETURN in the TCG x86 frontend, most instructions that use it (VMRUN, HLT, MWAIT, PAUSE) are broken because they do not do the work that gen_eob() does on INHIBIT_IRQ, EFLAGS.TF and EFLAGS.RF. This series tackles this, plus it

[PATCH 04/11] target/i386: cleanup PAUSE helpers

2024-06-04 Thread Paolo Bonzini
Use decode.c's support for intercepts, doing the check in TCG-generated code rather than the helper. This is cleaner because it allows removing the eip_addend argument to helper_pause(), even though it adds a bit of bloat for opcode 0x90's new decoding function. Signed-off-by: Paolo Bonzini ---

[PATCH 03/11] target/i386: cleanup HLT helpers

2024-06-04 Thread Paolo Bonzini
Use decode.c's support for intercepts, doing the check in TCG-generated code rather than the helper. This is cleaner because it allows removing the eip_addend argument to helper_hlt(). Signed-off-by: Paolo Bonzini --- target/i386/helper.h | 2 +- target/i386/tcg/sysemu/misc_hel

[PATCH 07/11] target/i386: fix INHIBIT_IRQ/TF/RF handling for VMRUN

2024-06-04 Thread Paolo Bonzini
>From vm entry to exit, VMRUN is handled as a single instruction. It uses DISAS_NORETURN in order to avoid processing TF or RF before the first instruction executes in the guest. However, the corresponding handling is missing in vmexit. Add it, and at the same time reorganize the comments with q

[PATCH 01/11] target/i386: fix pushed value of EFLAGS.RF

2024-06-04 Thread Paolo Bonzini
When preparing an exception stack frame for a fault exception, the value pushed for RF is 1. Take that into account. The same should be true of interrupts for repeated string instructions, but the situation there is complicated. Signed-off-by: Paolo Bonzini --- target/i386/tcg/seg_helper.c | 4

[PATCH 06/11] target/i386: disable/enable breakpoints on vmentry/vmexit

2024-06-04 Thread Paolo Bonzini
If the required DR7 (either from the VMCB or from the host save area) disables a breakpoint that was enabled prior to vmentry or vmexit, it is left enabled and will trigger EXCP_DEBUG. This causes a spurious #DB on the next crossing of the breakpoint. To disable it, vmentry/vmexit must use cpu_x86

[PATCH 11/11] target/i386: document use of DISAS_NORETURN

2024-06-04 Thread Paolo Bonzini
DISAS_NORETURN suppresses the work normally done by gen_eob(), and therefore must be used in special cases only. Document them. Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/target/i386/tcg/translate.c b/target/i386

[PATCH 02/11] target/i386: fix implementation of ICEBP

2024-06-04 Thread Paolo Bonzini
ICEBP generates a trap-like exception, while gen_exception() produces a fault. Resurrect gen_update_eip_next() to implement the desired semantics. Signed-off-by: Paolo Bonzini --- target/i386/helper.h | 1 + target/i386/tcg/helper-tcg.h | 3 +++ target/i386/tcg/bpt_helper.c | 6 ++

Re: [PATCH v5 12/17] aspeed/intc: Add AST2700 support

2024-06-04 Thread Cédric Le Goater
On 6/4/24 07:44, Jamin Lin wrote: AST2700 interrupt controller(INTC) provides hardware interrupt interfaces to interrupt of processors PSP, SSP and TSP. In INTC, each interrupt of INT 128 to INT136 combines 32 interrupts. Introduce a new aspeed_intc class with instance_init and realize handlers.

[PATCH 05/11] target/i386: implement DR7.GD

2024-06-04 Thread Paolo Bonzini
DR7.GD triggers a #DB exception on any access to debug registers. The GD bit is cleared so that the #DB handler itself can access the debug registers. Signed-off-by: Paolo Bonzini --- target/i386/tcg/sysemu/bpt_helper.c | 12 1 file changed, 12 insertions(+) diff --git a/target/i38

[PATCH 10/11] target/i386: document incorrect semantics of watchpoint following MOV/POP SS

2024-06-04 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- target/i386/tcg/sysemu/bpt_helper.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target/i386/tcg/sysemu/bpt_helper.c b/target/i386/tcg/sysemu/bpt_helper.c index c1d5fce250c..b29acf41c38 100644 --- a/target/i386/tcg/sysemu/bpt_helper.c +++ b/target/i3

[PATCH 08/11] target/i386: fix INHIBIT_IRQ/TF/RF handling for PAUSE

2024-06-04 Thread Paolo Bonzini
PAUSE uses DISAS_NORETURN because the corresponding helper calls cpu_loop_exit(). However, while HLT clear HF_INHIBIT_IRQ_MASK to correctly handle "STI; HLT", the same is missing from PAUSE. And also gen_eob() clears HF_RF_MASK and synthesizes a #DB exception if single-step is active; none of this

[PATCH 09/11] target/i386: fix TF/RF handling for HLT

2024-06-04 Thread Paolo Bonzini
HLT uses DISAS_NORETURN because the corresponding helper calls cpu_loop_exit(). However, while gen_eob() clears HF_RF_MASK and synthesizes a #DB exception if single-step is active, none of this is done by HLT. Note that the single-step trap is generated after the halt is finished. Signed-off-by:

Re: [PATCH 0/6] target/riscv: Add support for Control Transfer Records Ext.

2024-06-04 Thread Jason Chien
Smctr depends on the Smcsrind extension, Ssctr depends on the Sscsrind extension, and both Smctr and Ssctr depend upon implementation of S-mode. There should be a dependency check in riscv_cpu_validate_set_extensions(). Rajnesh Kanwal 於 2024/5/30 上午 12:09 寫道: This series enables Control Transfe

Re: [PATCH v6 09/19] vfio/iommufd: Implement HostIOMMUDeviceClass::realize() handler

2024-06-04 Thread Eric Auger
On 6/4/24 04:58, Duan, Zhenzhong wrote: > >> -Original Message- >> From: Eric Auger >> Subject: Re: [PATCH v6 09/19] vfio/iommufd: Implement >> HostIOMMUDeviceClass::realize() handler >> >> Hi Zhenzhong, >> >> On 6/3/24 08:10, Zhenzhong Duan wrote: >>> It calls iommufd_backend_get_devic

[PULL 00/20] Net patches

2024-06-04 Thread Jason Wang
The following changes since commit 3ab42e46acf867c45bc929fcc37693e327a35a24: Merge tag 'pull-ufs-20240603' of https://gitlab.com/jeuk20.kim/qemu into staging (2024-06-03 08:18:14 -0500) are available in the Git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for y

[PULL 06/20] tap: Shrink zeroed virtio-net header

2024-06-04 Thread Jason Wang
From: Akihiko Odaki tap prepends a zeroed virtio-net header when writing a packet to a tap with virtio-net header enabled but not in use. This only happens when s->host_vnet_hdr_len == sizeof(struct virtio_net_hdr). Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- net/tap.c | 2 +-

[PULL 01/20] tap: Remove tap_probe_vnet_hdr_len()

2024-06-04 Thread Jason Wang
From: Akihiko Odaki It was necessary since an Linux older than 2.6.35 may implement the virtio-net header but may not allow to change its length. Remove it since such an old Linux is no longer supported. Signed-off-by: Akihiko Odaki Acked-by: Michael S. Tsirkin Signed-off-by: Jason Wang ---

[PULL 20/20] ebpf: Added traces back. Changed source set for eBPF to 'system'.

2024-06-04 Thread Jason Wang
From: Andrew Melnychenko There was an issue with Qemu build with "--disable-system". The traces could be generated and the build fails. The traces were 'cut out' for previous patches, and overall, the 'system' source set should be used like in pre-'eBPF blob' patches. Signed-off-by: Andrew Melny

[PULL 07/20] virtio-net: Do not propagate ebpf-rss-fds errors

2024-06-04 Thread Jason Wang
From: Akihiko Odaki Propagating ebpf-rss-fds errors has several problems. First, it makes device realization fail and disables the fallback to the conventional eBPF loading. Second, it leaks memory by making device realization fail without freeing memory already allocated. Third, the conventio

[PULL 08/20] virtio-net: Add only one queue pair when realizing

2024-06-04 Thread Jason Wang
From: Akihiko Odaki Multiqueue usage is not negotiated yet when realizing. If more than one queue is added and the guest never requests to enable multiqueue, the extra queues will not be deleted when unrealizing and leak. Fixes: f9d6dbf0bf6e ("virtio-net: remove virtio queues if the guest doesn'

[PULL 14/20] virtio-net: Do not write hashes to peer buffer

2024-06-04 Thread Jason Wang
From: Akihiko Odaki The peer buffer is qualified with const and not meant to be modified. Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- hw/net/virtio-net.c | 36 +--- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/hw/net/virtio-net

[PULL 03/20] net: Move virtio-net header length assertion

2024-06-04 Thread Jason Wang
From: Akihiko Odaki The virtio-net header length assertion should happen for any clients. Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- net/net.c | 5 + net/tap.c | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/net/net.c b/net/net.c index bd51037ebf..d

[PULL 18/20] ebpf: Add a separate target for skeleton

2024-06-04 Thread Jason Wang
From: Akihiko Odaki This generalizes the rule to generate the skeleton and allows to add another. Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- tools/ebpf/Makefile.ebpf | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tools/ebpf/Makefile.ebpf b/

[PULL 10/20] virtio-net: Shrink header byte swapping buffer

2024-06-04 Thread Jason Wang
From: Akihiko Odaki Byte swapping is only performed for the part of header shared with the legacy standard and the buffer only needs to cover it. Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- hw/net/virtio-net.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletion

[PULL 16/20] ebpf: Return 0 when configuration fails

2024-06-04 Thread Jason Wang
From: Akihiko Odaki The kernel interprets the returned value as an unsigned 32-bit so -1 will mean queue 4294967295, which is awkward. Return 0 instead. Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- ebpf/rss.bpf.skeleton.h | 1532 +++ tools/ebp

[PULL 17/20] ebpf: Refactor tun_rss_steering_prog()

2024-06-04 Thread Jason Wang
From: Akihiko Odaki This saves branches and makes later BPF program changes easier. Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- tools/ebpf/rss.bpf.c | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/tools/ebpf/rss.bpf.c b/tools/ebp

[PULL 12/20] virtio-net: Unify the logic to update NIC state for RSS

2024-06-04 Thread Jason Wang
From: Akihiko Odaki The code to attach or detach the eBPF program to RSS were duplicated so unify them into one function to save some code. Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- hw/net/virtio-net.c | 90 ++--- 1 file changed, 36 ins

[PULL 11/20] virtio-net: Disable RSS on reset

2024-06-04 Thread Jason Wang
From: Akihiko Odaki RSS is disabled by default. Fixes: 590790297c ("virtio-net: implement RSS configuration command") Signed-off-by: Akihiko Odaki Reviewed-by: Michael Tokarev Signed-off-by: Jason Wang --- hw/net/virtio-net.c | 70 +++-- 1 file changed

[PULL 04/20] net: Remove receive_raw()

2024-06-04 Thread Jason Wang
From: Akihiko Odaki While netmap implements virtio-net header, it does not implement receive_raw(). Instead of implementing receive_raw for netmap, add virtio-net headers in the common code and use receive_iov()/receive() instead. This also fixes the buffer size for the virtio-net header. Fixes:

[PULL 05/20] tap: Call tap_receive_iov() from tap_receive()

2024-06-04 Thread Jason Wang
From: Akihiko Odaki This will save duplicate logic found in both of tap_receive_iov() and tap_receive(). Suggested-by: "Zhang, Chen" Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- net/tap.c | 35 +-- 1 file changed, 5 insertions(+), 30 deletions(-)

[PULL 09/20] virtio-net: Copy header only when necessary

2024-06-04 Thread Jason Wang
From: Akihiko Odaki The copied header is only used for byte swapping. Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- hw/net/virtio-net.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index

[PULL 15/20] ebpf: Fix RSS error handling

2024-06-04 Thread Jason Wang
From: Akihiko Odaki calculate_rss_hash() was using hash value 0 to tell if it calculated a hash, but the hash value may be 0 on a rare occasion. Have a distinct bool value for correctness. Fixes: f3fa412de2 ("ebpf: Added eBPF RSS program.") Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang

[PULL 19/20] virtio-net: drop too short packets early

2024-06-04 Thread Jason Wang
From: Alexey Dobriyan Reproducer from https://gitlab.com/qemu-project/qemu/-/issues/1451 creates small packet (1 segment, len = 10 == n->guest_hdr_len), then destroys queue. "if (n->host_hdr_len != n->guest_hdr_len)" is triggered, if body creates zero length/zero segment packet as there is nothi

[PULL 13/20] virtio-net: Always set populate_hash

2024-06-04 Thread Jason Wang
From: Akihiko Odaki The member is not cleared during reset so may have a stale value. Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- hw/net/virtio-net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 8464eb4082..b423169a48 10064

Re: [PATCH v6 07/19] vfio/container: Implement HostIOMMUDeviceClass::realize() handler

2024-06-04 Thread Eric Auger
Hi Zhenzhong, On 6/4/24 04:45, Duan, Zhenzhong wrote: > Hi Eric, > >> -Original Message- >> From: Eric Auger >> Subject: Re: [PATCH v6 07/19] vfio/container: Implement >> HostIOMMUDeviceClass::realize() handler >> >> Hi Zhenzhong, >> >> On 6/3/24 08:10, Zhenzhong Duan wrote: >>> Utilize r

[PULL 02/20] tap: Remove qemu_using_vnet_hdr()

2024-06-04 Thread Jason Wang
From: Akihiko Odaki Since qemu_set_vnet_hdr_len() is always called when qemu_using_vnet_hdr() is called, we can merge them and save some code. For consistency, express that the virtio-net header is not in use by returning 0 with qemu_get_vnet_hdr_len() instead of having a dedicated function, qem

RE: [PATCH v6 09/19] vfio/iommufd: Implement HostIOMMUDeviceClass::realize() handler

2024-06-04 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [PATCH v6 09/19] vfio/iommufd: Implement >HostIOMMUDeviceClass::realize() handler > > > >On 6/4/24 04:58, Duan, Zhenzhong wrote: >> >>> -Original Message- >>> From: Eric Auger >>> Subject: Re: [PATCH v6 09/19] vfio/iommufd: Imp

Re: [PATCH v3 2/4] block-backend: fix edge case in bdrv_next() where BDS associated to BB changes

2024-06-04 Thread Fiona Ebner
Am 03.06.24 um 18:21 schrieb Kevin Wolf: > Am 03.06.2024 um 16:17 hat Fiona Ebner geschrieben: >> Am 26.03.24 um 13:44 schrieb Kevin Wolf: >>> >>> The fix for bdrv_flush_all() is probably to make it bdrv_co_flush_all() >>> with a coroutine wrapper so that the graph lock is held for the whole >>> fu

RE: [PATCH v6 07/19] vfio/container: Implement HostIOMMUDeviceClass::realize() handler

2024-06-04 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [PATCH v6 07/19] vfio/container: Implement >HostIOMMUDeviceClass::realize() handler > >Hi Zhenzhong, > >On 6/4/24 04:45, Duan, Zhenzhong wrote: >> Hi Eric, >> >>> -Original Message- >>> From: Eric Auger >>> Subject: Re: [PATCH

Re: [PATCH v2 4/4] vga/cirrus: deprecate, don't build by default

2024-06-04 Thread Daniel P . Berrangé
On Tue, Jun 04, 2024 at 07:50:38AM +0100, Mark Cave-Ayland wrote: > On 03/06/2024 12:40, Daniel P. Berrangé wrote: > > > On Thu, May 30, 2024 at 01:22:11PM +0100, Mark Cave-Ayland wrote: > > > On 30/05/2024 12:40, BALATON Zoltan wrote: > > > > > > > On Thu, 30 May 2024, Gerd Hoffmann wrote: > > >

Re: [PATCH] target/riscv: Use get_address() to get address with Zicbom extensions

2024-06-04 Thread Philippe Mathieu-Daudé
On 4/6/24 02:20, Alistair Francis wrote: On Wed, May 29, 2024 at 2:56 PM Philippe Mathieu-Daudé wrote: ping? I originally missed this patch somehow and it has then been fixed separately as part of https://patchew.org/QEMU/20240514023910.301766-1-alistair.fran...@wdc.com/ I see (I also miss

Re: [PATCH v6 09/19] vfio/iommufd: Implement HostIOMMUDeviceClass::realize() handler

2024-06-04 Thread Eric Auger
Hi, On 6/4/24 09:51, Duan, Zhenzhong wrote: > >> -Original Message- >> From: Eric Auger >> Subject: Re: [PATCH v6 09/19] vfio/iommufd: Implement >> HostIOMMUDeviceClass::realize() handler >> >> >> >> On 6/4/24 04:58, Duan, Zhenzhong wrote: -Original Message- From: Eric

Re: [PATCH v6 11/19] backends/iommufd: Implement HostIOMMUDeviceClass::get_cap() handler

2024-06-04 Thread Eric Auger
On 6/4/24 05:23, Duan, Zhenzhong wrote: > Hi Cédric, Eric, > >> -Original Message- >> From: Cédric Le Goater >> Subject: Re: [PATCH v6 11/19] backends/iommufd: Implement >> HostIOMMUDeviceClass::get_cap() handler >> >> On 6/3/24 13:32, Eric Auger wrote: >>> >>> On 6/3/24 08:10, Zhenzhon

Re: [PATCH v6 18/19] intel_iommu: Implement [set|unset]_iommu_device() callbacks

2024-06-04 Thread Eric Auger
On 6/4/24 07:40, Duan, Zhenzhong wrote: > >> -Original Message- >> From: Eric Auger >> Subject: Re: [PATCH v6 18/19] intel_iommu: Implement >> [set|unset]_iommu_device() callbacks >> >> Hi Zhenzhong, >> >> On 6/3/24 08:10, Zhenzhong Duan wrote: >>> From: Yi Liu >>> >>> Implement [set|u

Re: [PATCH v6 18/19] intel_iommu: Implement [set|unset]_iommu_device() callbacks

2024-06-04 Thread Eric Auger
On 6/4/24 07:46, Duan, Zhenzhong wrote: > >> -Original Message- >> From: Eric Auger >> Subject: Re: [PATCH v6 18/19] intel_iommu: Implement >> [set|unset]_iommu_device() callbacks >> >> >> >> On 6/3/24 08:10, Zhenzhong Duan wrote: >>> From: Yi Liu >>> >>> Implement [set|unset]_iommu_de

Re: [RFC v2 1/7] hw/core: Make CPU topology enumeration arch-agnostic

2024-06-04 Thread Zhao Liu
Hi Markus, On Mon, Jun 03, 2024 at 02:25:36PM +0200, Markus Armbruster wrote: > Date: Mon, 03 Jun 2024 14:25:36 +0200 > From: Markus Armbruster > Subject: Re: [RFC v2 1/7] hw/core: Make CPU topology enumeration > arch-agnostic > > Zhao Liu writes: > > > Cache topology needs to be defined base

Re: [RFC v2 1/7] hw/core: Make CPU topology enumeration arch-agnostic

2024-06-04 Thread Zhao Liu
[snip] > > +CPUTopoInfo cpu_topo_descriptors[] = { > > +[CPU_TOPO_LEVEL_INVALID] = { .name = "invalid", }, > > +[CPU_TOPO_LEVEL_THREAD] = { .name = "thread", }, > > +[CPU_TOPO_LEVEL_CORE]= { .name = "core",}, > > +[CPU_TOPO_LEVEL_MODULE] = { .name = "module", }, > > +

Re: [PATCH 0/4] update-linux-headers: prepare for updating to 6.9+ and for SNP patches

2024-06-04 Thread Cornelia Huck
On Mon, Jun 03 2024, Paolo Bonzini wrote: > This series contains a few cleanups and fixes to update-linux-headers.sh, > which I needed or found in order to pass CI for the SEV-SNP patches. > > First, updating linux-headers/ fails due to the lack of > arch/loongarch/include/uapi/asm/bitsperlong.h.

Re: [PATCH] target/riscv: rvzicbo: Fixup CBO extension register calculation

2024-06-04 Thread Philippe Mathieu-Daudé
On 16/5/24 07:09, Alistair Francis wrote: On Tue, May 14, 2024 at 7:11 PM Daniel Henrique Barboza wrote: On 5/13/24 23:39, Alistair Francis wrote: When running the instruction ``` cbo.flush 0(x0) ``` QEMU would segfault. The issue was in cpu_gpr[a->rs1] as QEMU does not have cpu_gp

Re: [PATCH] hw/core: Rename CpuTopology to CPUTopology

2024-06-04 Thread Markus Armbruster
Zhao Liu writes: > On Tue, Jun 04, 2024 at 07:29:15AM +0200, Markus Armbruster wrote: >> Date: Tue, 04 Jun 2024 07:29:15 +0200 >> From: Markus Armbruster >> Subject: Re: [PATCH] hw/core: Rename CpuTopology to CPUTopology >> >> Zhao Liu writes: >> >> > On Mon, Jun 03, 2024 at 01:54:15PM +0200,

Re: [PATCH-for-9.0?] docs: i386: pc: Update maximum CPU numbers for PC Q35

2024-06-04 Thread Zhao Liu
On Mon, Jun 03, 2024 at 07:31:47PM +0200, Philippe Mathieu-Daudé wrote: > Date: Mon, 3 Jun 2024 19:31:47 +0200 > From: Philippe Mathieu-Daudé > Subject: Re: [PATCH-for-9.0?] docs: i386: pc: Update maximum CPU numbers > for PC Q35 > > Hi Michael, > > On 2/6/24 15:30, Michael S. Tsirkin wrote: >

RE: [PATCH v6 09/19] vfio/iommufd: Implement HostIOMMUDeviceClass::realize() handler

2024-06-04 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [PATCH v6 09/19] vfio/iommufd: Implement >HostIOMMUDeviceClass::realize() handler > > >Hi, >On 6/4/24 09:51, Duan, Zhenzhong wrote: >> >>> -Original Message- >>> From: Eric Auger >>> Subject: Re: [PATCH v6 09/19] vfio/iommufd:

Re: [RFC v2 1/7] hw/core: Make CPU topology enumeration arch-agnostic

2024-06-04 Thread Markus Armbruster
Zhao Liu writes: [...] >> > +## >> > +# @CPUTopoLevel: >> > +# >> > +# An enumeration of CPU topology levels. >> > +# >> > +# @invalid: Invalid topology level, used as a placeholder. >> >> Placeholder for what? > > I was trying to express that when no specific topology level is > specified, it

Re: [PATCH-for-9.0?] docs: i386: pc: Update maximum CPU numbers for PC Q35

2024-06-04 Thread Zhao Liu
Hi Michael, Daniel, and Philippe, On Mon, Jun 03, 2024 at 06:39:19PM +0100, Daniel P. Berrangé wrote: > Date: Mon, 3 Jun 2024 18:39:19 +0100 > From: "Daniel P. Berrangé" > Subject: Re: [PATCH-for-9.0?] docs: i386: pc: Update maximum CPU numbers > for PC Q35 > > On Mon, Jun 03, 2024 at 07:31:47P

RE: [PATCH v6 11/19] backends/iommufd: Implement HostIOMMUDeviceClass::get_cap() handler

2024-06-04 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [PATCH v6 11/19] backends/iommufd: Implement >HostIOMMUDeviceClass::get_cap() handler > > > >On 6/4/24 05:23, Duan, Zhenzhong wrote: >> Hi Cédric, Eric, >> >>> -Original Message- >>> From: Cédric Le Goater >>> Subject: Re: [PAT

Re: [RFC v2 1/7] hw/core: Make CPU topology enumeration arch-agnostic

2024-06-04 Thread Markus Armbruster
Zhao Liu writes: > Hi Markus, > > On Mon, Jun 03, 2024 at 02:25:36PM +0200, Markus Armbruster wrote: >> Date: Mon, 03 Jun 2024 14:25:36 +0200 >> From: Markus Armbruster >> Subject: Re: [RFC v2 1/7] hw/core: Make CPU topology enumeration >> arch-agnostic >> >> Zhao Liu writes: >> >> > Cache t

RE: [PATCH v6 18/19] intel_iommu: Implement [set|unset]_iommu_device() callbacks

2024-06-04 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [PATCH v6 18/19] intel_iommu: Implement >[set|unset]_iommu_device() callbacks > > > >On 6/4/24 07:40, Duan, Zhenzhong wrote: >> >>> -Original Message- >>> From: Eric Auger >>> Subject: Re: [PATCH v6 18/19] intel_iommu: Implemen

Re: [PATCH-for-9.0?] docs: i386: pc: Update maximum CPU numbers for PC Q35

2024-06-04 Thread Daniel P . Berrangé
On Tue, Jun 04, 2024 at 04:59:49PM +0800, Zhao Liu wrote: > Hi Michael, Daniel, and Philippe, > > On Mon, Jun 03, 2024 at 06:39:19PM +0100, Daniel P. Berrangé wrote: > > Date: Mon, 3 Jun 2024 18:39:19 +0100 > > From: "Daniel P. Berrangé" > > Subject: Re: [PATCH-for-9.0?] docs: i386: pc: Update ma

Re: [RFC v2 1/7] hw/core: Make CPU topology enumeration arch-agnostic

2024-06-04 Thread Zhao Liu
On Tue, Jun 04, 2024 at 10:47:44AM +0200, Markus Armbruster wrote: > Date: Tue, 04 Jun 2024 10:47:44 +0200 > From: Markus Armbruster > Subject: Re: [RFC v2 1/7] hw/core: Make CPU topology enumeration > arch-agnostic > > Zhao Liu writes: > > > Hi Markus, > > > > On Mon, Jun 03, 2024 at 02:25:36

Re: [RFC v2 3/7] hw/core: Add cache topology options in -smp

2024-06-04 Thread Markus Armbruster
Zhao Liu writes: > Add "l1d-cache", "l1i-cache". "l2-cache", and "l3-cache" options in > -smp to define the cache topology for SMP system. > > Signed-off-by: Zhao Liu [...] > diff --git a/qapi/machine.json b/qapi/machine.json > index 7ac5a05bb9c9..8fa5af69b1bf 100644 > --- a/qapi/machine.json

Re: [PATCH v4 29/31] hw/i386/sev: Allow use of pflash in conjunction with -bios

2024-06-04 Thread Hoffmann, Gerd
On Mon, Jun 03, 2024 at 03:38:05PM GMT, Paolo Bonzini wrote: > On Mon, Jun 3, 2024 at 1:55 PM Daniel P. Berrangé wrote: > > I really wish we didn't have to introduce this though - is there really > > no way to make it possible to use pflash for both CODE & VARS with SNP, > > as is done with tradit

[RFC PATCH] block-coroutine-wrapper: support generating wrappers for functions without arguments

2024-06-04 Thread Fiona Ebner
Signed-off-by: Fiona Ebner --- An alternative would be to detect whether the argument list is 'void' in FuncDecl's __init__, assign the empty list to self.args there and special case based on that in the rest of the code. Not super happy about the introduction of the 'void_value' parameter, but

[PATCH v4] target/riscv: raise an exception when CSRRS/CSRRC writes a read-only CSR

2024-06-04 Thread Yu-Ming Chang via
Both CSRRS and CSRRC always read the addressed CSR and cause any read side effects regardless of rs1 and rd fields. Note that if rs1 specifies a register holding a zero value other than x0, the instruction will still attempt to write the unmodified value back to the CSR and will cause any attendant

Re: [PATCH v7 09/12] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-06-04 Thread Markus Armbruster
I finally got around to read this slowly. Thank you, Fan and Jonathan! I'm getting some "incomplete" vibes: "if we ever implement", "patches for this on list", "we aren't emulating this yet at all", and ... Jonathan Cameron writes: [...] > Only thing I'd add is that for now (because we don't

Re: [PATCH] qtest/x86/numa-test: do not use the obsolete 'pentium' cpu

2024-06-04 Thread Thomas Huth
On 04/06/2024 08.21, Ani Sinha wrote: 'pentium' cpu is old and obsolete and should be avoided for running tests if its not strictly needed. Use 'max' cpu instead for generic non-cpu specific numa test. CC: th...@redhat.com Signed-off-by: Ani Sinha --- tests/qtest/numa-test.c | 3 ++- 1 file

Re: [PATCH v2] i386/cpu: fixup number of addressable IDs for processor cores in the physical package

2024-06-04 Thread Zhao Liu
Hi Chuang, On Mon, Jun 03, 2024 at 04:36:41PM +0800, Chuang Xu wrote: > Date: Mon, 3 Jun 2024 16:36:41 +0800 > From: Chuang Xu > Subject: [PATCH v2] i386/cpu: fixup number of addressable IDs for processor > cores in the physical package > X-Mailer: git-send-email 2.24.3 (Apple Git-128) > > Whe

Re: [RFC v2 0/7] Introduce SMP Cache Topology

2024-06-04 Thread Daniel P . Berrangé
On Thu, May 30, 2024 at 06:15:32PM +0800, Zhao Liu wrote: > Hi, > > Now that the i386 cache model has been able to define the topology > clearly, it's time to move on to discussing/advancing this feature about > configuring the cache topology with -smp as the following example: > > -smp 32,socket

Re: [PATCH-for-9.0?] docs: i386: pc: Update maximum CPU numbers for PC Q35

2024-06-04 Thread Philippe Mathieu-Daudé
On 4/6/24 10:54, Zhao Liu wrote: On Mon, Jun 03, 2024 at 07:31:47PM +0200, Philippe Mathieu-Daudé wrote: Date: Mon, 3 Jun 2024 19:31:47 +0200 From: Philippe Mathieu-Daudé Subject: Re: [PATCH-for-9.0?] docs: i386: pc: Update maximum CPU numbers for PC Q35 Hi Michael, On 2/6/24 15:30, Michael

Re: [RFC v2 3/7] hw/core: Add cache topology options in -smp

2024-06-04 Thread Daniel P . Berrangé
On Tue, Jun 04, 2024 at 10:54:51AM +0200, Markus Armbruster wrote: > Zhao Liu writes: > > > Add "l1d-cache", "l1i-cache". "l2-cache", and "l3-cache" options in > > -smp to define the cache topology for SMP system. > > > > Signed-off-by: Zhao Liu > > [...] > > > diff --git a/qapi/machine.json b

Re: [PATCH v6 11/19] backends/iommufd: Implement HostIOMMUDeviceClass::get_cap() handler

2024-06-04 Thread Eric Auger
On 6/4/24 10:46, Duan, Zhenzhong wrote: > >> -Original Message- >> From: Eric Auger >> Subject: Re: [PATCH v6 11/19] backends/iommufd: Implement >> HostIOMMUDeviceClass::get_cap() handler >> >> >> >> On 6/4/24 05:23, Duan, Zhenzhong wrote: >>> Hi Cédric, Eric, >>> -Original Mes

Re: [PATCH v6 18/19] intel_iommu: Implement [set|unset]_iommu_device() callbacks

2024-06-04 Thread Eric Auger
On 6/4/24 10:48, Duan, Zhenzhong wrote: > >> -Original Message- >> From: Eric Auger >> Subject: Re: [PATCH v6 18/19] intel_iommu: Implement >> [set|unset]_iommu_device() callbacks >> >> >> >> On 6/4/24 07:40, Duan, Zhenzhong wrote: -Original Message- From: Eric Auger

Re: [PATCH] target/i386: fix SSE and SSE2 featue check

2024-06-04 Thread Fiona Ebner
Am 02.06.24 um 12:48 schrieb Zhao Liu: > On Sun, Jun 02, 2024 at 06:09:04PM +0800, lixinyu...@ict.ac.cn wrote: >> Date: Sun, 2 Jun 2024 18:09:04 +0800 >> From: lixinyu...@ict.ac.cn >> Subject: [PATCH] target/i386: fix SSE and SSE2 featue check >> X-Mailer: git-send-email 2.34.1 >> >> From: Xinyu L

Re: [PATCH 0/4] hw/s390x: Alias @dump-skeys -> @dump-s390-skey and deprecate

2024-06-04 Thread Philippe Mathieu-Daudé
Hi Daniel, Dave, Markus & Thomas. On 4/6/24 06:58, Markus Armbruster wrote: "Dr. David Alan Gilbert" writes: * Daniel P. Berrangé (berra...@redhat.com) wrote: On Fri, May 31, 2024 at 06:47:45AM +0200, Thomas Huth wrote: On 30/05/2024 09.45, Philippe Mathieu-Daudé wrote: We are trying to uni

[PULL 03/32] target/riscv: Restrict riscv_cpu_do_interrupt() to sysemu

2024-06-04 Thread Philippe Mathieu-Daudé
riscv_cpu_do_interrupt() is not reachable on user emulation. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Message-Id: <20230626232007.8933-7-phi...@linaro.org> --- target/riscv/cpu.h| 5 +++-- target/riscv/cpu_helper.c | 7 ++-

[PULL 01/32] target/riscv: Remove unused 'instmap.h' header in translate.c

2024-06-04 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza Acked-by: Alistair Francis Message-Id: <20230626232007.8933-2-phi...@linaro.org> --- target/riscv/translate.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 2

[PULL 06/32] target/i386/kvm: Improve KVM_EXIT_NOTIFY warnings

2024-06-04 Thread Philippe Mathieu-Daudé
From: Richard Henderson Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu Message-ID: <20240412073346.458116-28-richard.hender...@linaro.org> [PMD: Fixed typo reported by Peter Maydell] Signed-off-by: Philippe Mathieu-Daudé --- target/i386/kvm/kvm.c |

[PULL 07/32] disas/m68k: Replace sprintf() by snprintf()

2024-06-04 Thread Philippe Mathieu-Daudé
sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developper experience. Use snprintf() instead. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Peter Maydell Message-Id: <20240411104340.6617-2-phi...@linaro.org> Signed-off-b

[PULL 12/32] system/runstate: Remove unused 'qemu/plugin.h' header

2024-06-04 Thread Philippe Mathieu-Daudé
system/runstate.c never required "qemu/plugin.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Pierrick Bouvier Message-Id: <20240528145953.65398-2-phi...@linaro.org> --- system/runstate.c | 1 - 1 file changed, 1 deletion(-) diff --git a/system/runstate.c

[PULL 13/32] accel/tcg: Move common declarations to 'internal-common.h'

2024-06-04 Thread Philippe Mathieu-Daudé
'internal-target.h' is meant for target-specific declarations, while 'internal-common.h' for common ones. Move common declarations to it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Pierrick Bouvier Message-Id: <20240528145953.65398-3-phi...@linaro.org> ---

[PULL 11/32] MAINTAINERS: drop usb maintainership

2024-06-04 Thread Philippe Mathieu-Daudé
From: Gerd Hoffmann Remove myself from usb entries. Flip status to "Orphan" for entries which have nobody else listed. Signed-off-by: Gerd Hoffmann Reviewed-by: Manos Pitsidianakis Message-ID: <20240528083858.836262-3-kra...@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS |

[PULL 02/32] target/riscv: Restrict 'rv128' machine to TCG accelerator

2024-06-04 Thread Philippe Mathieu-Daudé
We only build for 32/64-bit hosts, so TCG is required for 128-bit targets. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza Acked-by: Alistair Francis Message-Id: <20230626232007.8933-5-phi...@linaro.org> --- target/riscv/cpu.c | 10 -- 1 file changed, 8 inser

[PULL 00/32] Misc HW / accel patches

2024-06-04 Thread Philippe Mathieu-Daudé
The following changes since commit 3ab42e46acf867c45bc929fcc37693e327a35a24: Merge tag 'pull-ufs-20240603' of https://gitlab.com/jeuk20.kim/qemu into staging (2024-06-03 08:18:14 -0500) are available in the Git repository at: https://github.com/philmd/qemu.git tags/hw-misc-acce

[PULL 08/32] disas/microblaze: Replace sprintf() by snprintf()

2024-06-04 Thread Philippe Mathieu-Daudé
sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developper experience. Use snprintf() instead. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Edgar E. Iglesias Message-Id: <20240411104340.6617-3-phi...@linaro.org> Signed-off-by: Richard Henderson --- d

[PULL 17/32] cpu-target: don't set cpu->thread_id to bogus value

2024-06-04 Thread Philippe Mathieu-Daudé
From: Alex Bennée The thread_id isn't valid until the threads are created. There is no point setting it here. The only thing that cares about the thread_id is qmp_query_cpus_fast. Signed-off-by: Alex Bennée Reviewed-by: Pierrick Bouvier Message-ID: <20240530194250.1801701-4-alex.ben...@linaro.

[PULL 10/32] util/hexdump: Remove ascii parameter from qemu_hexdump_line

2024-06-04 Thread Philippe Mathieu-Daudé
From: Richard Henderson Split out asciidump_line as a separate function, local to hexdump.c, for use by qemu_hexdump. Use "%-*s" to generate the alignment between the hex and the ascii, rather than explicit spaces. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-I

[PULL 19/32] core/cpu-common: initialise plugin state before thread creation

2024-06-04 Thread Philippe Mathieu-Daudé
From: Alex Bennée Originally I tried to move where vCPU thread initialisation to later in realize. However pulling that thread (sic) got gnarly really quickly. It turns out some steps of CPU realization need values that can only be determined from the running vCPU thread. However having moved en

[PULL 16/32] cpu: move Qemu[Thread|Cond] setup into common code

2024-06-04 Thread Philippe Mathieu-Daudé
From: Alex Bennée Aside from the round robin threads this is all common code. By moving the halt_cond setup we also no longer need hacks to work around the race between QOM object creation and thread creation. It is a little ugly to free stuff up for the round robin thread but better it deal wit

[PULL 15/32] hw/core: expand on the alignment of CPUState

2024-06-04 Thread Philippe Mathieu-Daudé
From: Alex Bennée Make the relationship between CPUState, ArchCPU and cpu_env a bit clearer in the kdoc comments. Signed-off-by: Alex Bennée Reviewed-by: Pierrick Bouvier Message-ID: <20240530194250.1801701-2-alex.ben...@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/c

  1   2   3   4   5   >