Re: [PATCH v3 5/6] Move tcg implementation of x86 get_physical_address into common helper code.

2024-06-15 Thread Don Porter
On 6/7/24 1:03 PM, Richard Henderson wrote: On 6/6/24 07:02, Don Porter wrote: Signed-off-by: Don Porter ---   target/i386/cpu.h    |  42 ++   target/i386/helper.c | 515 +   target/i386/tcg/sysemu/excp_helper.c | 555 +-

[PATCH] hmp-commands-info.hx: Add missing info command for stats subcommand

2024-06-15 Thread Martin Joerg
Signed-off-by: Martin Joerg --- hmp-commands-info.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx index 20a9835ea8..f5639af517 100644 --- a/hmp-commands-info.hx +++ b/hmp-commands-info.hx @@ -892,7 +892,7 @@ ERST }, SRST -

Re: [PATCH v3 1/6] Add an "info pg" command that prints the current page tables

2024-06-15 Thread Richard Henderson
On 6/14/24 14:14, Don Porter wrote: On 6/7/24 1:43 PM, Richard Henderson wrote: On 6/6/24 07:02, Don Porter wrote: +/** + * get_pte - Copy the contents of the page table entry at node[i] into pt_entry. + *   Optionally, add the relevant bits to the virtual address in + *   vadd

Re: [PULL 00/19] aspeed queue

2024-06-15 Thread Richard Henderson
On 6/14/24 00:26, Cédric Le Goater wrote: The following changes since commit 046a64b9801343e2e89eef10c7a48eec8d8c0d4f: Merge tag 'pull-request-2024-06-12' of https://gitlab.com/thuth/qemu into staging (2024-06-13 07:51:58 -0700) are available in the Git repository at: https://github.com

[PATCH] target/arm/helper: Fix timer interrupt masking when HCR_EL2.E2H == 0

2024-06-15 Thread Florian Lugou
CNTHCTL_EL2 based masking of timer interrupts was introduced in f6fc36deef6abcee406211f3e2f11ff894b87fa4. This masking was however effective no matter whether EL2 was enabled in the current security state or not, contrary to arm specification. Signed-off-by: Florian Lugou --- target/arm/helper.c

Re: [PULL 00/19] aspeed queue

2024-06-15 Thread Cédric Le Goater
On 6/15/24 6:14 PM, Richard Henderson wrote: On 6/14/24 00:26, Cédric Le Goater wrote: The following changes since commit 046a64b9801343e2e89eef10c7a48eec8d8c0d4f:    Merge tag 'pull-request-2024-06-12' of https://gitlab.com/thuth/qemu into staging (2024-06-13 07:51:58 -0700) are available in

Re: [PATCH v13 03/13] virtio-gpu: Handle virtio_gpu_virgl_init() failure

2024-06-15 Thread Dmitry Osipenko
On 6/10/24 06:38, Akihiko Odaki wrote: > On 2024/06/10 4:02, Dmitry Osipenko wrote: >> On 6/3/24 08:44, Akihiko Odaki wrote: >>> On 2024/06/03 14:26, Dmitry Osipenko wrote: On 6/2/24 08:34, Akihiko Odaki wrote: >> +typedef enum { >> +    RS_START,   /* starting state */ >> +   

Re: [PATCH 1/1] i386/tcg: Allow IRET from user mode to user mode for dotnet runtime

2024-06-15 Thread Richard Henderson
On 6/11/24 09:20, Robert R. Henry wrote: This fixes a bug wherein i386/tcg assumed an interrupt return using the IRET instruction was always returning from kernel mode to either kernel mode or user mode. This assumption is violated when IRET is used as a clever way to restore thread state, as for

Re: [PATCH] hmp-commands-info.hx: Add missing info command for stats subcommand

2024-06-15 Thread Dr. David Alan Gilbert
* Martin Joerg (martin.jo...@gmail.com) wrote: > Signed-off-by: Martin Joerg Thanks! (Trivial please take that). Reviewed-by: Dr. David Alan Gilbert > --- > hmp-commands-info.hx | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hmp-commands-info.hx b/hmp-commands-info.

Re: [PATCH] Make TARGET_PAGE_MASK typed as target_ulong

2024-06-15 Thread Richard Henderson
On 6/14/24 12:29, Roman Kiryanov wrote: this fixes the build warnings like accel/tcg/cputlb.c:416:13: warning: shifting a negative signed value is undefined [-Wshift-negative-value] mask &= TARGET_PAGE_MASK | TLB_INVALID_MASK; ^~~~ include/exec/cpu-all.h:169:45: no

[PATCH v14 11/14] virtio-gpu: Support suspension of commands processing

2024-06-15 Thread Dmitry Osipenko
Check whether command processing has been finished; otherwise, stop processing commands and retry the command again next time. This allows us to support asynchronous execution of non-fenced commands needed for unmapping host blobs safely. Suggested-by: Akihiko Odaki Signed-off-by: Dmitry Osipenko

[PATCH v14 12/14] virtio-gpu: Handle resource blob commands

2024-06-15 Thread Dmitry Osipenko
From: Antonio Caggiano Support BLOB resources creation, mapping and unmapping by calling the new stable virglrenderer 0.10 interface. Only enabled when available and via the blob config. E.g. -device virtio-vga-gl,blob=true Signed-off-by: Antonio Caggiano Signed-off-by: Xenia Ragiadakou Signed

[PATCH v14 10/14] virtio-gpu: Support blob scanout using dmabuf fd

2024-06-15 Thread Dmitry Osipenko
From: Robert Beckett Support displaying blob resources by handling SET_SCANOUT_BLOB command. Signed-by: Antonio Caggiano Signed-off-by: Robert Beckett Signed-off-by: Huang Rui Reviewed-by: Antonio Caggiano Signed-off-by: Dmitry Osipenko --- hw/display/virtio-gpu-virgl.c | 109

[PATCH v14 09/14] virtio-gpu: Add virgl resource management

2024-06-15 Thread Dmitry Osipenko
From: Huang Rui In a preparation to adding host blobs support to virtio-gpu, add virgl resource management that allows to retrieve resource based on its ID and virgl resource wrapper on top of simple resource that will be contain fields specific to virgl. Signed-off-by: Huang Rui Reviewed-by: A

[PATCH v14 05/14] virtio-gpu: Unrealize GL device

2024-06-15 Thread Dmitry Osipenko
Even though GL GPU doesn't support hotplugging today, free virgl resources when GL device is unrealized. For consistency. Signed-off-by: Dmitry Osipenko --- hw/display/virtio-gpu-gl.c | 17 + 1 file changed, 17 insertions(+) diff --git a/hw/display/virtio-gpu-gl.c b/hw/display/v

[PATCH v14 03/14] virtio-gpu: Move print_stats timer to VirtIOGPUGL

2024-06-15 Thread Dmitry Osipenko
Move print_stats timer to VirtIOGPUGL for consistency with cmdq_resume_bh and fence_poll that are used only by GL device. Signed-off-by: Dmitry Osipenko --- hw/display/virtio-gpu-virgl.c | 10 ++ include/hw/virtio/virtio-gpu.h | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) d

[PATCH v14 02/14] virtio-gpu: Move fence_poll timer to VirtIOGPUGL

2024-06-15 Thread Dmitry Osipenko
Move fence_poll timer to VirtIOGPUGL for consistency with cmdq_resume_bh that are used only by GL device. Signed-off-by: Dmitry Osipenko --- hw/display/virtio-gpu-virgl.c | 8 +--- include/hw/virtio/virtio-gpu.h | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/disp

[PATCH v14 06/14] virtio-gpu: Use pkgconfig version to decide which virgl features are available

2024-06-15 Thread Dmitry Osipenko
New virglrerenderer features were stabilized with release of v1.0.0. Presence of symbols in virglrenderer.h doesn't guarantee ABI compatibility with pre-release development versions of libvirglerender. Use virglrenderer version to decide reliably which virgl features are available. Reviewed-by: Al

[PATCH v14 14/14] virtio-gpu: Support Venus context

2024-06-15 Thread Dmitry Osipenko
From: Antonio Caggiano Request Venus when initializing VirGL and if venus=true flag is set for virtio-gpu-gl device. Signed-off-by: Antonio Caggiano Signed-off-by: Huang Rui Signed-off-by: Dmitry Osipenko --- hw/display/virtio-gpu-gl.c | 2 ++ hw/display/virtio-gpu-virgl.c | 22 +++

[PATCH v14 00/14] Support blob memory and venus on qemu

2024-06-15 Thread Dmitry Osipenko
Hello, This series enables Vulkan Venus context support on virtio-gpu. All virglrender and almost all Linux kernel prerequisite changes needed by Venus are already in upstream. For kernel there is a pending KVM patchset that fixes mapping of compound pages needed for DRM drivers using TTM [1], ot

[PATCH v14 07/14] virtio-gpu: Support context-init feature with virglrenderer

2024-06-15 Thread Dmitry Osipenko
From: Huang Rui Patch "virtio-gpu: CONTEXT_INIT feature" has added the context_init feature flags. Expose this feature and support creating virglrenderer context with flags using context_id if libvirglrenderer is new enough. Originally-by: Antonio Caggiano Signed-off-by: Huang Rui Reviewed-by:

[PATCH v14 04/14] virtio-gpu: Handle virtio_gpu_virgl_init() failure

2024-06-15 Thread Dmitry Osipenko
virtio_gpu_virgl_init() may fail, leading to a further Qemu crash because Qemu assumes it never fails. Check virtio_gpu_virgl_init() return code and don't execute virtio commands on error. Failed virtio_gpu_virgl_init() will result in a timed out virtio commands for a guest OS. Signed-off-by: Dmit

[PATCH v14 13/14] virtio-gpu: Register capsets dynamically

2024-06-15 Thread Dmitry Osipenko
From: Pierre-Eric Pelloux-Prayer virtio_gpu_virgl_get_num_capsets will return "num_capsets", but we can't assume that capset_index 1 is always VIRGL2 once we'll support more capsets, like Venus and DRM capsets. Register capsets dynamically to avoid that problem. Reviewed-by: Manos Pitsidianakis

[PATCH v14 01/14] virtio-gpu: Use trace events for tracking number of in-flight fences

2024-06-15 Thread Dmitry Osipenko
Replace printf's used for tracking of in-flight fence inc/dec events with tracing, for consistency with the rest of virtio-gpu code that uses tracing. Suggested-by: Marc-André Lureau Signed-off-by: Dmitry Osipenko --- hw/display/trace-events | 2 ++ hw/display/virtio-gpu-virgl.c | 2 +- h

[PATCH v14 08/14] virtio-gpu: Don't require udmabuf when blobs and virgl are enabled

2024-06-15 Thread Dmitry Osipenko
The udmabuf usage is mandatory when virgl is disabled and blobs feature enabled in the Qemu machine configuration. If virgl and blobs are enabled, then udmabuf requirement is optional. Since udmabuf isn't widely supported by a popular Linux distros today, let's relax the udmabuf requirement for blo

[PATCH v2 0/6] Introduce extension implied rules

2024-06-15 Thread frank . chang
From: Frank Chang Currently, the implied extensions are enabled and checked in riscv_cpu_validate_set_extensions(). However, the order of enabling the implied extensions must follow a strict sequence, which is error-prone. This patchset introduce extension implied rule helpers to enable the impl

[PATCH v2 4/6] target/riscv: Add standard extension implied rules

2024-06-15 Thread frank . chang
From: Frank Chang Add standard extension implied rules to enable the implied extensions of the standard extension recursively. Signed-off-by: Frank Chang Reviewed-by: Jerry Zhang Jian Tested-by: Max Chou Acked-by: Alistair Francis --- target/riscv/cpu.c | 340 +++

[PATCH v2 5/6] target/riscv: Add Zc extension implied rule

2024-06-15 Thread frank . chang
From: Frank Chang Zc extension has special implied rules that need to be handled separately. Signed-off-by: Frank Chang Reviewed-by: Jerry Zhang Jian Tested-by: Max Chou --- target/riscv/tcg/tcg-cpu.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/tar

[PATCH v2 2/6] target/riscv: Introduce extension implied rule helpers

2024-06-15 Thread frank . chang
From: Frank Chang Introduce helpers to enable the extensions based on the implied rules. The implied extensions are enabled recursively, so we don't have to expand all of them manually. This also eliminates the old-fashioned ordering requirement. For example, Zvksg implies Zvks, Zvks implies Zvks

[PATCH v2 3/6] target/riscv: Add MISA implied rules

2024-06-15 Thread frank . chang
From: Frank Chang Add MISA extension implied rules to enable the implied extensions of MISA recursively. Signed-off-by: Frank Chang Reviewed-by: Jerry Zhang Jian Tested-by: Max Chou Reviewed-by: Alistair Francis --- target/riscv/cpu.c | 50 +- 1 f

[PATCH v2 6/6] target/riscv: Remove extension auto-update check statements

2024-06-15 Thread frank . chang
From: Frank Chang Remove the old-fashioned extension auto-update check statements as they are replaced by the extension implied rules. Signed-off-by: Frank Chang Reviewed-by: Jerry Zhang Jian Tested-by: Max Chou --- target/riscv/tcg/tcg-cpu.c | 119 - 1 fi

[PATCH v2 1/6] target/riscv: Introduce extension implied rules definition

2024-06-15 Thread frank . chang
From: Frank Chang RISCVCPUImpliedExtsRule is created to store the implied rules. 'is_misa' flag is used to distinguish whether the rule is derived from the MISA or other extensions. 'ext' stores the MISA bit if 'is_misa' is true. Otherwise, it stores the offset of the extension defined in RISCVCP

Re: [PULL 00/18] Migration patches for 2024-06-14

2024-06-15 Thread Richard Henderson
On 6/14/24 10:17, Fabiano Rosas wrote: The following changes since commit 046a64b9801343e2e89eef10c7a48eec8d8c0d4f: Merge tag 'pull-request-2024-06-12' ofhttps://gitlab.com/thuth/qemu into staging (2024-06-13 07:51:58 -0700) are available in the Git repository at: https://gitlab.com/fa