Re: [RFC PATCH v4 4/5] target/riscv: rvv: Provide group continuous ld/st flow for unit-stride ld/st instructions

2024-06-23 Thread Max Chou
On 2024/6/20 12:38 PM, Richard Henderson wrote: On 6/13/24 10:51, Max Chou wrote: The vector unmasked unit-stride and whole register load/store instructions will load/store continuous memory. If the endian of both the host and guest architecture are the same, then we can group the element load/

Re: [PATCH 0/2] arch_dump: fix prstatus pid on s390x and ppc

2024-06-23 Thread Thomas Huth
On 19/06/2024 07.00, Omar Sandoval wrote: Hello, I maintain drgn [1], a debugger for the Linux kernel. I ran into a quirk of the NT_PRSTATUS note in kernel core dumps [2], so I looked into how QEMU's dump-guest-memory command generates NT_PRSTATUS. I noticed that on most architectures, the note'

Re: [PATCH v3 06/15] tests/qtest/bios-tables-test.c: Set "arch" for aarch64 tests

2024-06-23 Thread Alistair Francis
On Fri, Jun 21, 2024 at 9:59 PM Sunil V L wrote: > > To search for expected AML files under ${arch}/${machine} path, set this > field for AARCH64 related test cases. > > Signed-off-by: Sunil V L Acked-by: Alistair Francis Alistair > --- > tests/qtest/bios-tables-test.c | 8 > 1 file

Re: [PATCH v3 05/15] tests/qtest/bios-tables-test.c: Add support for arch in path

2024-06-23 Thread Alistair Francis
On Fri, Jun 21, 2024 at 9:59 PM Sunil V L wrote: > > Since machine name can be common for multiple architectures (ex: virt), > add "arch" in the path to search for expected AML files. Since the AML > files are still under old path, add support for searching with and > without arch in the path. > >

Re: [PATCH 1/2] target/m68k: implement do_unaligned_access callback for m68k CPUs

2024-06-23 Thread Mark Cave-Ayland
On 23/06/2024 20:47, Richard Henderson wrote: On 6/23/24 04:57, Mark Cave-Ayland wrote: +G_NORETURN void m68k_cpu_do_unaligned_access(CPUState *cs, vaddr addr, + MMUAccessType access_type, + int mmu_idx, uin

Re: [PATCH 0/7] pc-bios/s390-ccw: Merge the netboot loader into s390-ccw.img

2024-06-23 Thread Thomas Huth
On 21/06/2024 22.51, Eric Farman wrote: On Fri, 2024-06-21 at 10:24 +0200, Thomas Huth wrote: We originally built a separate binary for the netboot code since it was considered as experimental and we could not be sure that the necessary SLOF module had been checked out. Time passed, the netboot

Re: [PATCH 2/2] target/m68k: pass alignment into TCG memory load/store routines

2024-06-23 Thread Mark Cave-Ayland
On 23/06/2024 16:23, BALATON Zoltan wrote: On Sun, 23 Jun 2024, Mark Cave-Ayland wrote: Now that do_unaligned_access has been implemented for 68k CPUs, pass the required alignment into the TCG memory load/store routines. This allows the TCG memory core to generate an Address Error exception f

Re: [PATCH 1/2] target/m68k: implement do_unaligned_access callback for m68k CPUs

2024-06-23 Thread Mark Cave-Ayland
On 23/06/2024 16:11, BALATON Zoltan wrote: On Sun, 23 Jun 2024, Mark Cave-Ayland wrote: For m68k CPUs that do not support unaligned accesses, any such access should cause the CPU to raise an Address Error exception. Signed-off-by: Mark Cave-Ayland --- target/m68k/cpu.c   |  1 + target/m68

Re: [PATCH v2 0/9] Add MTE stubs for aarch64 user mode

2024-06-23 Thread Gustavo Romero
Hi Alex, On 6/17/24 6:50 AM, Alex Bennée wrote: Gustavo Romero writes: Hi Alex, On 6/14/24 12:49 PM, Alex Bennée wrote: Gustavo Romero writes: This patchset adds the stubs necessary to support GDB memory tagging commands on QEMU aarch64 user mode. These new stubs handle the qIsAddressTa

Re: [PATCH v16 13/13] virtio-gpu: Support Venus context

2024-06-23 Thread Akihiko Odaki
On 2024/06/24 0:23, Dmitry Osipenko wrote: 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 Reviewed-by: Akihiko Odaki

Re: [PATCH v16 12/13] virtio-gpu: Register capsets dynamically

2024-06-23 Thread Akihiko Odaki
On 2024/06/24 0:23, Dmitry Osipenko wrote: 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 tha

Re: [PATCH v16 11/13] virtio-gpu: Handle resource blob commands

2024-06-23 Thread Akihiko Odaki
On 2024/06/24 0:23, Dmitry Osipenko wrote: From: Robert Beckett Support BLOB resources creation, mapping, unmapping and set-scanout 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: A

Re: [PATCH v3 6/9] target/arm: Factor out code for setting MTE TCF0 field

2024-06-23 Thread Gustavo Romero
Hi Richard, On 6/21/24 1:35 AM, Richard Henderson wrote: On 6/16/24 23:28, Gustavo Romero wrote: Factor out the code used for setting the MTE TCF0 field from the prctl code into a convenient function. Other subsystems, like gdbstub, need to set this field as well, so keep it as a separate funct

Re: [PATCH v16 10/13] virtio-gpu: Support suspension of commands processing

2024-06-23 Thread Akihiko Odaki
On 2024/06/24 0:23, Dmitry Osipenko wrote: 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:

Re: [PATCH v16 09/13] virtio-gpu: Add virgl resource management

2024-06-23 Thread Akihiko Odaki
On 2024/06/24 0:23, Dmitry Osipenko wrote: 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 vir

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

2024-06-23 Thread Akihiko Odaki
On 2024/06/24 0:23, Dmitry Osipenko wrote: 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

Re: [PATCH v16 07/13] virtio-gpu: Support context-init feature with virglrenderer

2024-06-23 Thread Akihiko Odaki
On 2024/06/24 0:23, Dmitry Osipenko wrote: 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 Cag

Re: [PATCH v16 06/13] virtio-gpu: Use pkgconfig version to decide which virgl features are available

2024-06-23 Thread Akihiko Odaki
On 2024/06/24 0:23, Dmitry Osipenko wrote: 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 v

Re: [PATCH v3 5/9] target/arm: Make some MTE helpers widely available

2024-06-23 Thread Gustavo Romero
Hi Richard, On 6/21/24 1:31 AM, Richard Henderson wrote: On 6/16/24 23:28, Gustavo Romero wrote: @@ -287,7 +256,7 @@ uint64_t HELPER(addsubg)(CPUARMState *env, uint64_t ptr,   return address_with_allocation_tag(ptr + offset, rtag);   } -static int load_tag1(uint64_t ptr, uint8_t *mem) +inli

Re: [PATCH v16 05/13] virtio-gpu: Unrealize GL device

2024-06-23 Thread Akihiko Odaki
On 2024/06/24 0:23, Dmitry Osipenko wrote: Even though GL GPU doesn't support hotplugging today, free virgl resources when GL device is unrealized. For consistency. Signed-off-by: Dmitry Osipenko Reviewed-by: Akihiko Odaki

Re: [PATCH v16 04/13] virtio-gpu: Handle virtio_gpu_virgl_init() failure

2024-06-23 Thread Akihiko Odaki
On 2024/06/24 0:23, Dmitry Osipenko wrote: 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

Re: [PATCH v16 02/13] virtio-gpu: Move fence_poll timer to VirtIOGPUGL

2024-06-23 Thread Akihiko Odaki
On 2024/06/24 0:23, Dmitry Osipenko wrote: Move fence_poll timer to VirtIOGPUGL for consistency with cmdq_resume_bh that are used only by GL device. Signed-off-by: Dmitry Osipenko Reviewed-by: Akihiko Odaki

Re: [PATCH v16 01/13] virtio-gpu: Use trace events for tracking number of in-flight fences

2024-06-23 Thread Akihiko Odaki
On 2024/06/24 0:23, Dmitry Osipenko wrote: 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 Reviewed-by: Akihiko Odaki

Re: [PATCH v16 03/13] virtio-gpu: Move print_stats timer to VirtIOGPUGL

2024-06-23 Thread Akihiko Odaki
On 2024/06/24 0:23, Dmitry Osipenko wrote: 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 Reviewed-by: Akihiko Odaki

Re: [PATCH v3 3/9] gdbstub: Add support for target-specific stubs

2024-06-23 Thread Gustavo Romero
Hi Alex, On 6/21/24 5:11 AM, Alex Bennée wrote: Gustavo Romero writes: Currently, it's not possible to have stubs specific to a given target, even though there are GDB features which are target-specific, like, for instance, memory tagging. This commit introduces gdb_extend_qsupported_feature

[PATCH v4 2/9] gdbstub: Move GdbCmdParseEntry into a new header file

2024-06-23 Thread Gustavo Romero
Move GdbCmdParseEntry and its associated types into a separate header file to allow the use of GdbCmdParseEntry and other gdbstub command functions outside of gdbstub.c. Since GdbCmdParseEntry and get_param are now public, kdoc GdbCmdParseEntry and rename get_param to gdb_get_cmd_param. This comm

[PATCH v4 6/9] target/arm: Factor out code for setting MTE TCF0 field

2024-06-23 Thread Gustavo Romero
Factor out the code used for setting the MTE TCF0 field from the prctl code into a convenient function. Other subsystems, like gdbstub, need to set this field as well, so keep it as a separate function to avoid duplication and ensure consistency in how this field is set across the board. Signed-of

[PATCH v4 7/9] gdbstub: Make get cpu and hex conversion functions non-internal

2024-06-23 Thread Gustavo Romero
Make the gdb_first_attached_cpu and gdb_hextomem non-internal so they are not confined to use only in gdbstub.c. Signed-off-by: Gustavo Romero Reviewed-by: Richard Henderson --- gdbstub/internals.h| 2 -- include/exec/gdbstub.h | 5 + include/gdbstub/commands.h | 6 ++ 3 fil

[PATCH v4 3/9] gdbstub: Add support for target-specific stubs

2024-06-23 Thread Gustavo Romero
Currently, it's not possible to have stubs specific to a given target, even though there are GDB features which are target-specific, like, for instance, memory tagging. This commit introduces gdb_extend_qsupported_features, gdb_extend_query_table, and gdb_extend_set_table functions as interfaces t

[PATCH v4 8/9] gdbstub: Add support for MTE in user mode

2024-06-23 Thread Gustavo Romero
This commit implements the stubs to handle the qIsAddressTagged, qMemTag, and QMemTag GDB packets, allowing all GDB 'memory-tag' subcommands to work with QEMU gdbstub on aarch64 user mode. It also implements the get/set functions for the special GDB MTE register 'tag_ctl', used to control the MTE f

[PATCH v4 5/9] target/arm: Make some MTE helpers widely available

2024-06-23 Thread Gustavo Romero
Make the MTE helpers allocation_tag_mem_probe, load_tag1, and store_tag1 available to other subsystems. Signed-off-by: Gustavo Romero Reviewed-by: Richard Henderson --- target/arm/tcg/mte_helper.c | 54 +++ target/arm/tcg/mte_helper.h | 74 +++

[PATCH v4 9/9] tests/tcg/aarch64: Add MTE gdbstub tests

2024-06-23 Thread Gustavo Romero
Add tests to exercise the MTE stubs. The tests will only run if a version of GDB that supports MTE is available in the test environment. Signed-off-by: Gustavo Romero --- configure | 11 +++ tests/tcg/aarch64/Makefile.target | 14 +++- tests/tcg/aarch64/gdbstub/te

[PATCH v4 1/9] gdbstub: Clean up process_string_cmd

2024-06-23 Thread Gustavo Romero
Change 'process_string_cmd' to return true on success and false on failure, instead of 0 and -1. Signed-off-by: Gustavo Romero Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson --- gdbstub/gdbstub.c | 40 1 file changed, 20 insertions(+), 20 delet

[PATCH v4 0/9] Add MTE stubs for aarch64 user mode

2024-06-23 Thread Gustavo Romero
This patchset adds the stubs necessary to support GDB memory tagging commands on QEMU aarch64 user mode. These new stubs handle the qIsAddressTagged, qMemTag, and QMemTag packets, which allow GDB memory tagging subcommands 'check', 'print-allocation-tag', and 'set-allocation-tag' to work. The rema

[PATCH v4 4/9] target/arm: Fix exception case in allocation_tag_mem_probe

2024-06-23 Thread Gustavo Romero
If page in 'ptr_access' is inaccessible and probe is 'true' allocation_tag_mem_probe should not throw an exception, but currently it does, so fix it. Signed-off-by: Gustavo Romero Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson --- target/arm/tcg/mte_helper.c | 3 +++ 1 file changed, 3

[PATCH] hw/loongarch: Modify flash block size to 256K

2024-06-23 Thread Xianglai Li
loongarch added a common library for edk2 to parse flash base addresses through fdt. For compatibility with other architectures, the flash block size in qemu is now changed to 256k. Signed-off-by: Xianglai Li --- Cc: Bibo Mao Cc: Song Gao include/hw/loongarch/virt.h | 2 +- 1 file changed, 1

[PATCH] hw/loongarch: Change the tpm support by default

2024-06-23 Thread Xianglai Li
Add devices that support tpm by default, Fixed incomplete tpm acpi table information. Signed-off-by: Xianglai Li --- Cc: Bibo Mao Cc: Paolo Bonzini Cc: Song Gao hw/loongarch/Kconfig | 1 + hw/loongarch/acpi-build.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/hw/loongarch/Kco

Re: [PATCH] target/ppc/mem_helper.c: Remove a conditional from dcbz_common()

2024-06-23 Thread Richard Henderson
On 6/23/24 15:24, BALATON Zoltan wrote: On Sun, 23 Jun 2024, Richard Henderson wrote: On 6/22/24 13:48, BALATON Zoltan wrote: Instead of passing a bool and select a value within dcbz_common() let the callers pass in the right value to avoid this conditional statement. On PPC dcbz is often used

Failed to hot-plug device to pxb bridge

2024-06-23 Thread Gao,Shiyuan
> I checked the guest dmesg and found that failed load shpc driver. > [0.98] shpchp :00:05.0: Requesting control of SHPC hotplug via > OSHP (\_SB_.PCI0.S28_) > [0.968238] shpchp :00:05.0: Requesting control of SHPC hotplug via > OSHP (\_SB_.PCI0) > [0.969160] shpchp

Re: [PATCH v7 2/2] hw/riscv/virt: Add IOPMP support

2024-06-23 Thread Ethan Chen via
Hi Alistair, IOPMP can applies all device. In this patch series, PCI devices on the bridge can connect to IOPMP by pci_setup_iommu(), but other devices need change their memory access address space from system memory to IOPMP by themself. Thanks, Ethan On Fri, Jun 21, 2024 at 03:54:15PM +1000,

Re: [PATCH 0/7] pc-bios/s390-ccw: Merge the netboot loader into s390-ccw.img

2024-06-23 Thread Jared Rossi
On 6/21/24 4:24 AM, Thomas Huth wrote: We originally built a separate binary for the netboot code since it was considered as experimental and we could not be sure that the necessary SLOF module had been checked out. Time passed, the netboot code proved its usefulness, and the build system nowa

RE: [PATCH v3] mem/cxl_type3: support 3, 6, 12 and 16 interleave ways

2024-06-23 Thread Xingtao Yao (Fujitsu)
> -Original Message- > From: Jonathan Cameron > Sent: Friday, June 21, 2024 11:02 PM > To: Yao, Xingtao/姚 幸涛 > Cc: fan...@samsung.com; qemu-devel@nongnu.org > Subject: Re: [PATCH v3] mem/cxl_type3: support 3, 6, 12 and 16 interleave ways > > On Thu, 6 Jun 2024 08:07:27 + > "Xingta

Re: [PATCH 12/23] Add ability to get rval2

2024-06-23 Thread Warner Losh
On Tue, Jun 18, 2024 at 4:17 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 6/17/24 11:57, Ajeet Singh wrote: > > From: Warner Losh > > > > Function accesses the x1 register which holds the value > > > > Signed-off-by: Warner Losh > > Signed-off-by: Ajeet Singh > > --- > > b

[not for merge PATCH v2] target/ppc/mem_helper.c: Remove a conditional from dcbz_common()

2024-06-23 Thread BALATON Zoltan
This is an updated version of this patch as suggested by Richard but it runs slower and only gets 5.9 seconds instead of 5.83-5.81 with v1 so this is not for merge, only for reference in case it can be useful for further optimisation or can be fixed in some way. Signed-off-by: BALATON Zoltan ---

Re: [PATCH] target/ppc/mem_helper.c: Remove a conditional from dcbz_common()

2024-06-23 Thread BALATON Zoltan
On Sun, 23 Jun 2024, Richard Henderson wrote: On 6/22/24 13:48, BALATON Zoltan wrote: Instead of passing a bool and select a value within dcbz_common() let the callers pass in the right value to avoid this conditional statement. On PPC dcbz is often used to zero memory and some code uses it a lo

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-23 Thread Richard Henderson
On 6/23/24 14:27, Alexander Monakov wrote: Hello, On Wed, 12 Jun 2024, Paolo Bonzini wrote: I didn't do this because of RHEL9, I did it because it's silly that QEMU cannot use POPCNT and has to waste 2% of the L1 d-cache to compute the x86 parity flag (and POPCNT was introduced at the same tim

Re: [PATCH] util/cpuinfo-aarch64: Add OpenBSD support

2024-06-23 Thread Richard Henderson
On 6/23/24 10:55, Richard Henderson wrote: On 6/22/24 19:12, Brad Smith wrote: +    if (sysctl(mib, 2, &isar0, &len, NULL, 0) != -1) { +  if (ID_AA64ISAR0_ATOMIC(isar0) >= ID_AA64ISAR0_ATOMIC_IMPL) +    info |= CPUINFO_LSE; +  if (ID_AA64ISAR0_AES(isar0) >= ID_AA64ISAR0_AES_BASE) +  

Re: [PATCH] util: fix building on OpenBSD/powerpc

2024-06-23 Thread Richard Henderson
On 6/23/24 10:53, Richard Henderson wrote: On 6/22/24 19:03, Brad Smith wrote: util: fix building on OpenBSD/powerpc Signed-off-by: Brad Smith ---   util/cpuinfo-ppc.c | 20   1 file changed, 12 insertions(+), 8 deletions(-) Reviewed-by: Richard Henderson r~ Queued to

Deleting the timer data without racing with its callback

2024-06-23 Thread Roman Kiryanov
Hi QEMU, we got a report that our code (a wrapper around the QEMU timer API) has a race condition. I tried to fix it, but unfortunately can't figure out how to do this properly. Please see the `timerlist_run_timers` code below: bool timerlist_run_timers(QEMUTimerList *timer_list) { ... q

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-23 Thread Alexander Monakov
Hello, On Wed, 12 Jun 2024, Paolo Bonzini wrote: > I didn't do this because of RHEL9, I did it because it's silly that > QEMU cannot use POPCNT and has to waste 2% of the L1 d-cache to > compute the x86 parity flag (and POPCNT was introduced at the same > time as SSE4.2). I do not see where the

Re: [RFC PATCH 0/7] migration/multifd: Introduce storage slots

2024-06-23 Thread Peter Xu
On Sun, Jun 23, 2024 at 10:25:05PM +0200, Maciej S. Szmigiero wrote: > > I appreciated a lot you worked out VFIO on top of multifd, because IMHO > > that's really the right direction. However even with that, I don't think > > the whole design is yet fully settled, not to mention the details. And t

Re: [PATCH 06/23] Add Aarch64 register handling

2024-06-23 Thread Warner Losh
On Mon, Jun 17, 2024 at 10:35 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 6/17/24 11:57, Ajeet Singh wrote: > > From: Stacey Son > > > > Header file for managing CPU register states in > > FreeBSD user mode > > > > Signed-off-by: Stacey Son > > Signed-off-by: Ajeet Singh >

Re: [PATCH v1 00/13] Multifd 🔀 device state transfer support with VFIO consumer

2024-06-23 Thread Peter Xu
On Tue, Jun 18, 2024 at 06:12:18PM +0200, Maciej S. Szmigiero wrote: > From: "Maciej S. Szmigiero" > > This is an updated v1 patch series of the RFC (v0) series located here: > https://lore.kernel.org/qemu-devel/cover.1713269378.git.maciej.szmigi...@oracle.com/ OK I took some hours thinking abou

Re: [RFC PATCH 0/7] migration/multifd: Introduce storage slots

2024-06-23 Thread Maciej S. Szmigiero
On 21.06.2024 22:54, Peter Xu wrote: On Fri, Jun 21, 2024 at 07:40:01PM +0200, Maciej S. Szmigiero wrote: On 21.06.2024 17:56, Peter Xu wrote: On Fri, Jun 21, 2024 at 05:31:54PM +0200, Maciej S. Szmigiero wrote: On 21.06.2024 17:04, Fabiano Rosas wrote: "Maciej S. Szmigiero" writes: Hi Fab

Re: [PATCH 2/2] target/m68k: pass alignment into TCG memory load/store routines

2024-06-23 Thread Richard Henderson
On 6/23/24 08:23, BALATON Zoltan wrote: On Sun, 23 Jun 2024, Mark Cave-Ayland wrote: Now that do_unaligned_access has been implemented for 68k CPUs, pass the required alignment into the TCG memory load/store routines. This allows the TCG memory core to generate an Address Error exception for u

Re: [PATCH 1/2] target/m68k: implement do_unaligned_access callback for m68k CPUs

2024-06-23 Thread Richard Henderson
On 6/23/24 04:57, Mark Cave-Ayland wrote: +G_NORETURN void m68k_cpu_do_unaligned_access(CPUState *cs, vaddr addr, + MMUAccessType access_type, + int mmu_idx, uintptr_t retaddr) +{ +CPUM68KState *env = cpu_

Re: [PATCH] util/cpuinfo-aarch64: Add OpenBSD support

2024-06-23 Thread Richard Henderson
On 6/22/24 19:12, Brad Smith wrote: +if (sysctl(mib, 2, &isar0, &len, NULL, 0) != -1) { + if (ID_AA64ISAR0_ATOMIC(isar0) >= ID_AA64ISAR0_ATOMIC_IMPL) +info |= CPUINFO_LSE; + if (ID_AA64ISAR0_AES(isar0) >= ID_AA64ISAR0_AES_BASE) +info |= CPUINFO_AES; + if (ID_AA6

Re: [PATCH] util: fix building on OpenBSD/powerpc

2024-06-23 Thread Richard Henderson
On 6/22/24 19:03, Brad Smith wrote: util: fix building on OpenBSD/powerpc Signed-off-by: Brad Smith --- util/cpuinfo-ppc.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH] target/ppc/mem_helper.c: Remove a conditional from dcbz_common()

2024-06-23 Thread Richard Henderson
On 6/22/24 13:48, BALATON Zoltan wrote: Instead of passing a bool and select a value within dcbz_common() let the callers pass in the right value to avoid this conditional statement. On PPC dcbz is often used to zero memory and some code uses it a lot. This change improves the run time of a test

Re: [PATCH 22/23] Add set_mcontext function for ARM AArch64 in bsd-user

2024-06-23 Thread Richard Henderson
On 6/23/24 08:54, Warner Losh wrote: On Tue, Jun 18, 2024 at 4:51 PM Richard Henderson > wrote: On 6/17/24 11:58, Ajeet Singh wrote: > From: Stacey Son > > The function copies register values from the provided target_mcontext_t > s

Re: [PULL 00/18] target-arm queue

2024-06-23 Thread Richard Henderson
On 6/22/24 05:06, Peter Maydell wrote: Hi; here's the latest target-arm pullreq; this is pretty much just various bugfixes. -- PMM The following changes since commit 02d9c38236cf8c9826e5c5be61780ccb4ae0: Merge tag 'pull-tcg-20240619' ofhttps://gitlab.com/rth7680/qemu into staging (202

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

2024-06-23 Thread Alex Bennée
Dmitry Osipenko writes: > On 6/21/24 11:59, Alex Bennée wrote: >> Dmitry Osipenko writes: >> >>> On 6/19/24 20:37, Alex Bennée wrote: So I've been experimenting with Aarch64 TCG with an Intel backend like this: ./qemu-system-aarch64 \ -M virt -cpu cortex-a76

Re: [PATCH 02/23] Added CPU loop function

2024-06-23 Thread Richard Henderson
On 6/22/24 11:49, Warner Losh wrote: On Mon, Jun 17, 2024 at 10:24 PM Richard Henderson > wrote: On 6/17/24 11:57, Ajeet Singh wrote: > +            /* > +             * The carry bit is cleared for no error; set for error. > +         

Re: [PATCH 23/23] Add get_ucontext_sigreturn function

2024-06-23 Thread Warner Losh
On Tue, Jun 18, 2024 at 4:56 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 6/17/24 11:58, Ajeet Singh wrote: > > From: Stacey Son > > > > Function checks the processor state to ensure that the current > > execution mode is EL0 and no flags indicating interrupts or > > exception

Re: [PATCH 22/23] Add set_mcontext function for ARM AArch64 in bsd-user

2024-06-23 Thread Warner Losh
On Tue, Jun 18, 2024 at 4:51 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 6/17/24 11:58, Ajeet Singh wrote: > > From: Stacey Son > > > > The function copies register values from the provided target_mcontext_t > > structure to the CPUARMState registers > > > > Signed-off-by: St

Re: [PATCH v3 02/16] migration: Fix file migration with fdset

2024-06-23 Thread Peter Xu
On Sat, Jun 22, 2024 at 07:21:52AM +0300, Michael Tokarev wrote: > 17.06.2024 21:57, Fabiano Rosas wrote: > > When the "file:" migration support was added we missed the special > > case in the qemu_open_old implementation that allows for a particular > > file name format to be used to refer to a se

[PATCH v16 12/13] virtio-gpu: Register capsets dynamically

2024-06-23 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 v16 01/13] virtio-gpu: Use trace events for tracking number of in-flight fences

2024-06-23 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 v16 10/13] virtio-gpu: Support suspension of commands processing

2024-06-23 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 v16 09/13] virtio-gpu: Add virgl resource management

2024-06-23 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 v16 08/13] virtio-gpu: Don't require udmabuf when blobs and virgl are enabled

2024-06-23 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 v16 00/13] Support blob memory and venus on qemu

2024-06-23 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 v16 06/13] virtio-gpu: Use pkgconfig version to decide which virgl features are available

2024-06-23 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 v16 04/13] virtio-gpu: Handle virtio_gpu_virgl_init() failure

2024-06-23 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 v16 02/13] virtio-gpu: Move fence_poll timer to VirtIOGPUGL

2024-06-23 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 v16 03/13] virtio-gpu: Move print_stats timer to VirtIOGPUGL

2024-06-23 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 v16 11/13] virtio-gpu: Handle resource blob commands

2024-06-23 Thread Dmitry Osipenko
From: Robert Beckett Support BLOB resources creation, mapping, unmapping and set-scanout 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: Robert Becket

[PATCH v16 13/13] virtio-gpu: Support Venus context

2024-06-23 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 --- docs/system/devices/virtio-gpu.rst | 11 +++ hw/display/virtio-gpu-gl.c

[PATCH v16 07/13] virtio-gpu: Support context-init feature with virglrenderer

2024-06-23 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 v16 05/13] virtio-gpu: Unrealize GL device

2024-06-23 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

Re: [PATCH 2/2] target/m68k: pass alignment into TCG memory load/store routines

2024-06-23 Thread BALATON Zoltan
On Sun, 23 Jun 2024, Mark Cave-Ayland wrote: Now that do_unaligned_access has been implemented for 68k CPUs, pass the required alignment into the TCG memory load/store routines. This allows the TCG memory core to generate an Address Error exception for unaligned memory accesses if required. S

Re: [PATCH 1/2] target/m68k: implement do_unaligned_access callback for m68k CPUs

2024-06-23 Thread BALATON Zoltan
On Sun, 23 Jun 2024, Mark Cave-Ayland wrote: For m68k CPUs that do not support unaligned accesses, any such access should cause the CPU to raise an Address Error exception. Signed-off-by: Mark Cave-Ayland --- target/m68k/cpu.c | 1 + target/m68k/cpu.h | 4 target/m68k/op_helper

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

2024-06-23 Thread Dmitry Osipenko
On 6/23/24 08:44, Akihiko Odaki wrote: > On 2024/06/23 6:55, Dmitry Osipenko wrote: >> 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

[PATCH 1/2] target/m68k: implement do_unaligned_access callback for m68k CPUs

2024-06-23 Thread Mark Cave-Ayland
For m68k CPUs that do not support unaligned accesses, any such access should cause the CPU to raise an Address Error exception. Signed-off-by: Mark Cave-Ayland --- target/m68k/cpu.c | 1 + target/m68k/cpu.h | 4 target/m68k/op_helper.c | 11 +++ 3 files changed, 16 ins

[PATCH 0/2] target/m68k: implement unaligned accesses for m68k CPUs

2024-06-23 Thread Mark Cave-Ayland
This series implements unaligned accesses for early m68k CPUs that do not support word/long accesses at byte granularity. Patch 1 implements the do_unaligned_access function for m68k CPUs, whilst patch 2 is based upon a prototype patch developed by Laurent as part of Gitlab Issue #2165. Signed-off

[PATCH 2/2] target/m68k: pass alignment into TCG memory load/store routines

2024-06-23 Thread Mark Cave-Ayland
Now that do_unaligned_access has been implemented for 68k CPUs, pass the required alignment into the TCG memory load/store routines. This allows the TCG memory core to generate an Address Error exception for unaligned memory accesses if required. Suggested-by: Laurent Vivier Signed-off-by: Mar