[PATCH] target/loongarch: Put cpucfg operation before CSR register

2024-04-27 Thread Bibo Mao
On Loongarch, cpucfg is register for cpu feature, some other registers depend on cpucfg feature such as perf CSR registers. Here put cpucfg read/write operations before CSR register, so that KVM knows how many perf CSR registers are valid from pre-set cpucfg feature information. Signed-off-by:

Re: [PULL 0/1] target/sparc late fix

2024-04-27 Thread M Bazz
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/9.0 for any user-visible changes. The 9.0 Changelog was never updated. Could someone with the permissions please add the following to the SPARC section: sparc32: Fixed a longstanding softmmu bug that caused kernel

Re: [PATCH v4 1/1] hw/arm/sbsa-ref: Enable CPU cluster on ARM sbsa machine

2024-04-27 Thread xiongyining1...@phytium.com.cn
xiongyining1...@phytium.com.cn From: Richard Henderson Date: 2024-04-27 00:06 To: Xiong Yining; qemu-arm; qemu-devel CC: rad; peter.maydell; quic_llindhol; marcin.juszkiewicz Subject: Re: [PATCH v4 1/1] hw/arm/sbsa-ref: Enable CPU cluster on ARM sbsa machine On 4/26/24 00:35, Xiong Yining

Re: [PATCH v7 06/17] hw/loongarch: Init efi_boot_memmap table

2024-04-27 Thread maobibo
On 2024/4/26 下午5:15, Song Gao wrote: Message test is also missing there :( Signed-off-by: Song Gao Message-Id: <20240307164835.300412-7-gaos...@loongson.cn> --- include/hw/loongarch/boot.h | 27 + include/hw/loongarch/virt.h | 10 ++ hw/loongarch/boot.c

Re: [PATCH v7 03/17] hw/loongarch: Add slave cpu boot_code

2024-04-27 Thread maobibo
On 2024/4/26 下午5:15, Song Gao wrote: Message text is missing here :( Signed-off-by: Song Gao Message-Id: <20240307164835.300412-4-gaos...@loongson.cn> It is strange that there is "Message-Id:" string. Is it required here? The others look good to me, especially when bootrom for AP is put

Re: [PATCH v2 1/1] target/riscv/kvm: fix timebase-frequency when using KVM acceleration

2024-04-27 Thread Michael Tokarev
27.04.2024 18:17, Andrew Jones : I wrote instructions [2] for how to cross-compile without a full environment/container once. It might be better for quick, local testing. [2] https://lore.kernel.org/qemu-riscv/20230726120706.335340-2-ajo...@ventanamicro.com/ I just extracted a few packages

[RFC PATCH 09/14] exec/cpu: Restrict user-specific page definitions

2024-04-27 Thread Philippe Mathieu-Daudé
User-specific PAGE definitions shouldn't be used on system emulation. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/page-prot-common.h | 8 1 file changed, 8 insertions(+) diff --git a/include/exec/page-prot-common.h b/include/exec/page-prot-common.h index

[PATCH 06/14] exec/cpu: Remove obsolete PAGE_RESERVED definition

2024-04-27 Thread Philippe Mathieu-Daudé
We stopped using the PAGE_RESERVED definition in commit 50d25c8aec ("accel/tcg: Drop PAGE_RESERVED for CONFIG_BSD"). This completes commit 2e9a5713f0 ("Remove PAGE_RESERVED"). Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu-all.h | 4 1 file changed, 4 deletions(-) diff --git

[PATCH 14/14] accel/tcg: Access tcg_cflags with getter / setter

2024-04-27 Thread Philippe Mathieu-Daudé
Access the CPUState::tcg_cflags via tcg_cflags_has() and tcg_cflags_set() helpers. Mechanical change using the following Coccinelle spatch script: @@ expression cpu; expression flags; @@ - cpu->tcg_cflags & flags + tcg_cflags_has(cpu, flags) @@ expression cpu;

[PATCH 07/14] exec/cpu: Remove duplicated PAGE_PASSTHROUGH definition

2024-04-27 Thread Philippe Mathieu-Daudé
Missed in commit 58771921af ("include/exec: Move PAGE_* macros to common header"), PAGE_PASSTHROUGH ended being defined twice. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu-all.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/include/exec/cpu-all.h

[PATCH 11/14] accel/tcg: Use cpu_loop_exit_requested() in cpu_loop_exec_tb()

2024-04-27 Thread Philippe Mathieu-Daudé
Do not open-code cpu_loop_exit_requested(). Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/cpu-exec.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 225e5fbd3e..0329c6423e 100644 --- a/accel/tcg/cpu-exec.c +++

[PATCH 12/14] accel/tcg: Remove pointless initialization of cflags_next_tb

2024-04-27 Thread Philippe Mathieu-Daudé
cflags_next_tb is always re-initialized in the CPU Reset() handler in cpu_common_reset_hold(), no need to initialize it in cpu_common_initfn(). Signed-off-by: Philippe Mathieu-Daudé --- hw/core/cpu-common.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/core/cpu-common.c

[PATCH 03/14] plugins/api: Only include 'exec/ram_addr.h' with system emulation

2024-04-27 Thread Philippe Mathieu-Daudé
"exec/ram_addr.h" shouldn't be used with user emulation. Signed-off-by: Philippe Mathieu-Daudé --- plugins/api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/api.c b/plugins/api.c index 8fa5a600ac..eaee344d8e 100644 --- a/plugins/api.c +++ b/plugins/api.c @@

[PATCH 08/14] exec/cpu: Extract page-protection definitions to page-prot-common.h

2024-04-27 Thread Philippe Mathieu-Daudé
Extract page-protection definitions from "exec/cpu-all.h" to "exec/page-prot-common.h". The list of files requiring the new header was generated using: $ git grep -wE \ 'PAGE_(READ|WRITE|EXEC|BITS|VALID|ANON|RESERVED|TARGET_.|PASSTHROUGH)' Signed-off-by: Philippe Mathieu-Daudé Acked-by:

[PATCH 10/14] exec/user: Restrict 'syscall-trace.h' to user emulation

2024-04-27 Thread Philippe Mathieu-Daudé
System emulation shouldn't use "user/syscall-trace.h". Signed-off-by: Philippe Mathieu-Daudé --- include/user/syscall-trace.h | 4 1 file changed, 4 insertions(+) diff --git a/include/user/syscall-trace.h b/include/user/syscall-trace.h index b48b2b2d0a..6926434d9a 100644 ---

[PATCH 04/14] exec: Include missing license in 'exec/cpu-common.h'

2024-04-27 Thread Philippe Mathieu-Daudé
Commit 1ad2134f91 ("Hardware convenience library") extracted "cpu-common.h" from "cpu-all.h", which uses the LGPL-2.1+ license. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu-common.h | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git

[PATCH 13/14] accel/tcg: Reset TCG specific fields in tcg_cpu_reset_hold()

2024-04-27 Thread Philippe Mathieu-Daudé
Rather than resetting TCG specific fields in the common cpu_common_reset_hold(), do it in tcg_cpu_reset_hold(). Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/tcg-accel-ops.c | 3 +++ hw/core/cpu-common.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH 01/14] target/i386: Simplify get_memio_eip()

2024-04-27 Thread Philippe Mathieu-Daudé
The single call to get_memio_eip(), in cpu_report_tpr_access(), is protected by a check on tcg_enabled(). Since the call only exists when CONFIG_TCG is defined, we can slightly simplify. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/helper.c | 6 ++ 1 file changed, 2 insertions(+),

[PATCH 00/14] exec: Rework around CPUState user fields

2024-04-27 Thread Philippe Mathieu-Daudé
Hi, First batch of patches (I expect them to be non controversial) related to extracting user specific fields from CPUState. Regards, Phil. Philippe Mathieu-Daudé (14): target/i386: Simplify get_memio_eip() plugins: Update stale comment plugins/api: Only include 'exec/ram_addr.h' with

[PATCH 05/14] exec/cpu: Indent TARGET_PAGE_foo definitions

2024-04-27 Thread Philippe Mathieu-Daudé
The TARGET_PAGE_foo definitions are defined with multiple level of #ifdef'ry. Indent it a bit for clarity. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu-all.h | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/include/exec/cpu-all.h

[PATCH 02/14] plugins: Update stale comment

2024-04-27 Thread Philippe Mathieu-Daudé
"plugin_mask" was renamed as "event_mask" in commit c006147122 ("plugins: create CPUPluginState and migrate plugin_mask"). Signed-off-by: Philippe Mathieu-Daudé --- plugins/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/core.c b/plugins/core.c index

Re: [PATCH v2 1/1] target/riscv/kvm: fix timebase-frequency when using KVM acceleration

2024-04-27 Thread Andrew Jones
On April 27, 2024 9:24:04 AM GMT+02:00, Michael Tokarev wrote: >27.04.2024 09:59, Michael Tokarev wrote: >> 27.04.2024 09:23, Andrew Jones wrote: >... >>> It's possible to cross-compile qemu, so it'd be good to add that to the CI >>> for riscv until we can add native compiling. >> >> Yes,

Re: [PATCH] Hexagon: add PC alignment check and exception

2024-04-27 Thread Richard Henderson
On 4/26/24 11:15, Matheus Tavares Bernardino wrote: The Hexagon Programmer's Reference Manual says that the exception 0x1e should be raised upon an unaligned program counter. Let's implement that and also add tests for both the most common case as well as packets with multiple change-of-flow

Re: [PULL 00/38] Exec / accelerators patches

2024-04-27 Thread Richard Henderson
On 4/26/24 12:41, Philippe Mathieu-Daudé wrote: The following changes since commit a118c4aff4087eafb68f7132b233ad548cf16376: Merge tag 'hw-misc-20240425' ofhttps://github.com/philmd/qemu into staging (2024-04-25 09:43:29 -0700) are available in the Git repository at:

[PATCH v1] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-04-27 Thread Daniil Tatianin
This can be used to force-synchronize the time in guest after a long stop-cont pause, which can be useful for serverless-type workload. Also add a comment to highlight the fact that this (and one other QMP command) only works for the MC146818 RTC controller. Signed-off-by: Daniil Tatianin ---

Re: [PATCH v9 10/11] virtio-gpu: Support Venus context

2024-04-27 Thread Akihiko Odaki
On 2024/04/26 0:45, Dmitry Osipenko wrote: From: Antonio Caggiano Request Venus when initializing VirGL and if vulkan=true flag is set for virtio-gpu device. Naming it vulkan is a bit confusing as there is also GFXSTREAM_VULKAN capset though virgl does not support it. I think you can just

Re: [PATCH v9 11/11] migration/virtio: Add virtio-gpu section

2024-04-27 Thread Akihiko Odaki
On 2024/04/26 0:45, Dmitry Osipenko wrote: Document virtio-gpu migration specifics. Suggested-by: Akihiko Odaki Signed-off-by: Dmitry Osipenko --- docs/devel/migration/virtio.rst | 7 +++ 1 file changed, 7 insertions(+) diff --git a/docs/devel/migration/virtio.rst

Re: [PATCH v2 1/1] target/riscv/kvm: fix timebase-frequency when using KVM acceleration

2024-04-27 Thread Michael Tokarev
27.04.2024 09:59, Michael Tokarev wrote: 27.04.2024 09:23, Andrew Jones wrote: ... It's possible to cross-compile qemu, so it'd be good to add that to the CI for riscv until we can add native compiling. Yes, definitely.  Qemu is already being cross-compiled on all "other" architectures

Re: [PATCH v9 09/11] virtio-gpu: Register capsets dynamically

2024-04-27 Thread Akihiko Odaki
On 2024/04/26 0:45, 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

Re: [PATCH v9 08/11] virtio-gpu: Resource UUID

2024-04-27 Thread Akihiko Odaki
On 2024/04/26 0:45, Dmitry Osipenko wrote: From: Antonio Caggiano Enable resource UUID feature and implement command resource assign UUID. UUID feature availability is mandatory for Vulkan Venus context. UUID is intended for sharing dmabufs between virtio devices on host. Qemu doesn't have

Re: [PATCH v2 1/1] target/riscv/kvm: fix timebase-frequency when using KVM acceleration

2024-04-27 Thread Michael Tokarev
27.04.2024 09:23, Andrew Jones wrote: On April 27, 2024 1:44:42 AM GMT+02:00, Michael Tokarev wrote: 14.03.2024 09:15, Yong-Xuan Wang: The timebase-frequency of guest OS should be the same with host machine. The timebase-frequency value in DTS should be got from hypervisor when using KVM

Re: [PATCH v9 07/11] virtio-gpu: Handle resource blob commands

2024-04-27 Thread Akihiko Odaki
On 2024/04/26 0:45, Dmitry Osipenko wrote: 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

Re: [PATCH v2 1/1] target/riscv/kvm: fix timebase-frequency when using KVM acceleration

2024-04-27 Thread Andrew Jones
On April 27, 2024 1:44:42 AM GMT+02:00, Michael Tokarev wrote: >14.03.2024 09:15, Yong-Xuan Wang: >> The timebase-frequency of guest OS should be the same with host >> machine. The timebase-frequency value in DTS should be got from >> hypervisor when using KVM acceleration. > >This change ended