Re: [RFC PATCH 24/24] contrib/plugins: Add cc plugin

2023-08-16 Thread Akihiko Odaki
On 2023/08/15 0:23, Alex Bennée wrote: Akihiko Odaki writes: This demonstrates how to write a plugin in C++. Signed-off-by: Akihiko Odaki --- docs/devel/tcg-plugins.rst | 8 configure | 15 --- contrib/plugins/Makefile | 5 + contrib

[PATCH] target/riscv: Allocate itrigger timers only once

2023-08-16 Thread Akihiko Odaki
riscv_trigger_realize() and riscv_trigger_reset() and call them in appropriate timing. The timer allocation will happen only once for a CPU in riscv_trigger_realize(). Fixes: 5a4ae64cac ("target/riscv: Add itrigger support when icount is enabled") Signed-off-by: Akihiko Odaki --- target/ris

[PATCH v3 11/25] gdbstub: Use GDBFeature for gdb_register_coprocessor

2023-08-16 Thread Akihiko Odaki
This is a tree-wide change to introduce GDBFeature parameter to gdb_register_coprocessor(). The new parameter just replaces num_regs and xml parameters for now. GDBFeature will be utilized to simplify XML lookup in a following change. Signed-off-by: Akihiko Odaki Acked-by: Alex Bennée

[PATCH v3 20/25] gdbstub: Expose functions to read registers

2023-08-16 Thread Akihiko Odaki
gdb_foreach_feature() enumerates features that are useful to identify registers. gdb_read_register() actually reads registers. Signed-off-by: Akihiko Odaki --- include/exec/gdbstub.h | 6 ++ gdbstub/gdbstub.c | 38 ++ 2 files changed, 36 insertions

[PATCH v3 02/25] gdbstub: Introduce GDBFeature structure

2023-08-16 Thread Akihiko Odaki
Before this change, the information from a XML file was stored in an array that is not descriptive. Introduce a dedicated structure type to make it easier to understand and to extend with more fields. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée

[PATCH v4 00/25] plugins: Allow to read registers

2023-08-16 Thread Akihiko Odaki
dé) Renamed gdb_features to gdb_static_features (Philippe Mathieu-Daudé) Dropped RFC. Akihiko Odaki (25): contrib/plugins: Use GRWLock in execlog gdbstub: Introduce GDBFeature structure gdbstub: Add num_regs member to GDBFeature gdbstub: Introduce gdb_find_static_feature() target/arm:

[PATCH v4 05/25] target/arm: Move the reference to arm-core.xml

2023-08-16 Thread Akihiko Odaki
. Looking up arm-core.xml results in an error as it will not be embedded in the AArch64 build. Signed-off-by: Akihiko Odaki --- target/arm/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 93c28d50e5..d71a162070 100644 --- a/target

[PATCH v4 15/25] gdbstub: Simplify XML lookup

2023-08-16 Thread Akihiko Odaki
Now we know all instances of GDBFeature that is used in CPU so we can traverse them to find XML. This removes the need for a CPU-specific lookup function for dynamic XMLs. Signed-off-by: Akihiko Odaki --- gdbstub/gdbstub.c | 24 1 file changed, 8 insertions(+), 16

[PATCH v4 19/25] gdbstub: Hide gdb_has_xml

2023-08-16 Thread Akihiko Odaki
gdb_has_xml is no longer referenced by the other components. Signed-off-by: Akihiko Odaki --- gdbstub/internals.h| 8 include/exec/gdbstub.h | 8 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gdbstub/internals.h b/gdbstub/internals.h index 4876ebd74f

Re: [RFC PATCH 22/24] contrib/plugins: Allow to log registers

2023-08-16 Thread Akihiko Odaki
On 2023/08/15 0:21, Alex Bennée wrote: Akihiko Odaki writes: This demonstrates how a register can be read from a plugin. I think it would be a little more useful as a demo if it tracked changes to the register state rather than dumping it for every line executed. Signed-off-by: Akihiko

[PATCH v4 16/25] hw/core/cpu: Remove gdb_get_dynamic_xml member

2023-08-16 Thread Akihiko Odaki
This function is no longer used. Signed-off-by: Akihiko Odaki --- include/hw/core/cpu.h | 4 target/arm/cpu.h | 6 -- target/ppc/cpu.h | 1 - target/arm/cpu.c | 1 - target/arm/gdbstub.c | 18 -- target/ppc/cpu_init.c | 3 --- target/ppc/gdbstub.c

Re: [RFC PATCH 15/24] target/arm: Fill new members of GDBFeature

2023-08-16 Thread Akihiko Odaki
On 2023/08/17 0:03, Alex Bennée wrote: Akihiko Odaki writes: On 2023/08/14 23:56, Alex Bennée wrote: Akihiko Odaki writes: These members will be used to help plugins to identify registers. Signed-off-by: Akihiko Odaki --- target/arm/gdbstub.c | 46

Re: [RFC PATCH 06/24] hw/core/cpu: Replace gdb_core_xml_file with gdb_core_feature

2023-08-16 Thread Akihiko Odaki
On 2023/08/17 0:00, Alex Bennée wrote: Akihiko Odaki writes: On 2023/08/14 20:59, Alex Bennée wrote: Akihiko Odaki writes: This is a tree-wide change to replace gdb_core_xml_file, the path to GDB XML file with gdb_core_feature, the pointer to GDBFeature. This also replaces the values

Re: [PATCH v5 6/9] gfxstream + rutabaga: add initial support for gfxstream

2023-08-16 Thread Akihiko Odaki
On 2023/08/16 0:50, Gurchetan Singh wrote: On Tue, Aug 15, 2023 at 8:07 AM Akihiko Odaki <mailto:akihiko.od...@gmail.com>> wrote: On 2023/08/15 9:35, Gurchetan Singh wrote: > This adds initial support for gfxstream and cross-domain.  Both > features rely on

[PATCH v3 08/25] target/arm: Use GDBFeature for dynamic XML

2023-08-16 Thread Akihiko Odaki
In preparation for a change to use GDBFeature as a parameter of gdb_register_coprocessor(), convert the internal representation of dynamic feature from plain XML to GDBFeature. Signed-off-by: Akihiko Odaki --- target/arm/cpu.h | 20 +++--- target/arm/internals.h | 2 +- target/arm

[PATCH v3 00/25] plugins: Allow to read registers

2023-08-16 Thread Akihiko Odaki
anged (Alex Bennée) Dropped 0x prefixes for register value logs for conciseness V1 -> V2: Added SPDX-License-Identifier: GPL-2.0-or-later (Philippe Mathieu-Daudé) Split long lines. (Philippe Mathieu-Daudé) Renamed gdb_features to gdb_static_features (Philippe Mathieu-Daudé) Dropp

[PATCH v3 03/25] gdbstub: Add num_regs member to GDBFeature

2023-08-16 Thread Akihiko Odaki
Currently the number of registers exposed to GDB is written as magic numbers in code. Derive the number of registers GDB actually see from XML files to replace the magic numbers in code later. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée

[PATCH v3 01/25] contrib/plugins: Use GRWLock in execlog

2023-08-16 Thread Akihiko Odaki
he ptr array gets reallocated, the other threads may have a stale reference to the old buffer. This results in use-after-free. Use GRWLock to properly fix this issue. Fixes: 3d7caf145e ("contrib/plugins: add execlog to log instruction execution and memory access") Signed-off-by: Akihiko Od

Re: [RFC PATCH 12/24] gdbstub: Simplify XML lookup

2023-08-16 Thread Akihiko Odaki
On 2023/08/14 22:27, Alex Bennée wrote: Akihiko Odaki writes: Now we know all instances of GDBFeature that is used in CPU so we can traverse them to find XML. This removes the need for a CPU-specific lookup function for dynamic XMLs. Signed-off-by: Akihiko Odaki --- gdbstub/gdbstub.c

Re: [RFC PATCH 21/24] plugins: Allow to read registers

2023-08-16 Thread Akihiko Odaki
On 2023/08/15 0:05, Alex Bennée wrote: Akihiko Odaki writes: It is based on GDB protocol to ensure interface stability. See comments bellow. The timing of the vcpu init hook is also changed so that the hook will get called after GDB features are initialized. This might be worth

[PATCH v3 13/25] hw/core/cpu: Return static value with gdb_arch_name()

2023-08-16 Thread Akihiko Odaki
() with const and make all of its implementations return static strings. Signed-off-by: Akihiko Odaki --- include/hw/core/cpu.h | 2 +- target/ppc/internal.h | 2 +- gdbstub/gdbstub.c | 4 +--- target/arm/cpu.c | 6 +++--- target/arm/cpu64.c | 4 ++-- target/i386/cpu.c | 6

[PATCH v3 19/25] gdbstub: Hide gdb_has_xml

2023-08-16 Thread Akihiko Odaki
gdb_has_xml is no longer referenced by the other components. Signed-off-by: Akihiko Odaki --- gdbstub/internals.h| 8 include/exec/gdbstub.h | 8 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gdbstub/internals.h b/gdbstub/internals.h index 4876ebd74f

[PATCH v3 22/25] plugins: Allow to read registers

2023-08-16 Thread Akihiko Odaki
It is based on GDB protocol to ensure interface stability. The timing of the vcpu init hook is also changed so that the hook will get called after GDB features are initialized. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1706 Signed-off-by: Akihiko Odaki --- include/qemu/qemu

[PATCH v3 24/25] plugins: Support C++

2023-08-16 Thread Akihiko Odaki
Make qemu-plugin.h consumable for C++ platform. Signed-off-by: Akihiko Odaki --- include/qemu/qemu-plugin.h | 4 1 file changed, 4 insertions(+) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 214b12bfd6..8637e3d8cf 100644 --- a/include/qemu/qemu-plugin.h +++ b

[PATCH v3 14/25] gdbstub: Dynamically allocate target.xml buffer

2023-08-16 Thread Akihiko Odaki
There is no guarantee that target.xml fits in 1024 bytes, and the fixed buffer length requires tedious buffer overflow check. Dynamically allocate the target.xml buffer to resolve these problems. Suggested-by: Alex Bennée Signed-off-by: Akihiko Odaki --- gdbstub/internals.h | 2 +- gdbstub

[PATCH v3 21/25] cpu: Call plugin hooks only when ready

2023-08-16 Thread Akihiko Odaki
The initialization and exit hooks will not affect the state of vCPU, but they may depend on the state of vCPU. Therefore, it's better to call plugin hooks after the vCPU state is fully initialized and before it gets uninitialized. Signed-off-by: Akihiko Odaki --- cpu.c| 11

[PATCH v3 25/25] contrib/plugins: Add cc plugin

2023-08-16 Thread Akihiko Odaki
This demonstrates how to write a plugin in C++. Signed-off-by: Akihiko Odaki --- docs/devel/tcg-plugins.rst | 8 configure | 15 --- contrib/plugins/Makefile | 5 + contrib/plugins/cc.cc | 17 + tests/tcg/Makefile.target | 3

[PATCH v3 23/25] contrib/plugins: Allow to log registers

2023-08-16 Thread Akihiko Odaki
This demonstrates how a register can be read from a plugin. Signed-off-by: Akihiko Odaki --- docs/devel/tcg-plugins.rst | 10 ++- contrib/plugins/execlog.c | 140 + 2 files changed, 118 insertions(+), 32 deletions(-) diff --git a/docs/devel/tcg-plugins.rst

[PATCH v3 07/25] gdbstub: Introduce GDBFeatureBuilder

2023-08-16 Thread Akihiko Odaki
GDBFeatureBuilder unifies the logic to generate dynamic GDBFeature. Signed-off-by: Akihiko Odaki --- include/exec/gdbstub.h | 20 ++ gdbstub/gdbstub.c | 59 ++ 2 files changed, 79 insertions(+) diff --git a/include/exec/gdbstub.h b

[PATCH v4 17/25] gdbstub: Add members to identify registers to GDBFeature

2023-08-16 Thread Akihiko Odaki
These members will be used to help plugins to identify registers. The added members in instances of GDBFeature dynamically generated by CPUs will be filled in later changes. Signed-off-by: Akihiko Odaki --- include/exec/gdbstub.h | 3 +++ gdbstub/gdbstub.c | 8 ++-- target/arm

[PATCH v3 06/25] hw/core/cpu: Replace gdb_core_xml_file with gdb_core_feature

2023-08-16 Thread Akihiko Odaki
will utilize additional information provided by GDBFeature to simplify XML file lookup. Signed-off-by: Akihiko Odaki --- include/hw/core/cpu.h | 5 +++-- target/s390x/cpu.h | 2 -- gdbstub/gdbstub.c | 6 +++--- target/arm/cpu.c| 4 ++-- target/arm/cpu64.c | 4 ++-- target/arm

[PATCH v3 09/25] target/ppc: Use GDBFeature for dynamic XML

2023-08-16 Thread Akihiko Odaki
In preparation for a change to use GDBFeature as a parameter of gdb_register_coprocessor(), convert the internal representation of dynamic feature from plain XML to GDBFeature. Signed-off-by: Akihiko Odaki --- target/ppc/cpu-qom.h | 3 +-- target/ppc/cpu.h | 2 +- target/ppc/cpu_init.c

[PATCH v3 12/25] gdbstub: Use GDBFeature for GDBRegisterState

2023-08-16 Thread Akihiko Odaki
Simplify GDBRegisterState by replacing num_regs and xml members with one member that points to GDBFeature. Signed-off-by: Akihiko Odaki --- gdbstub/gdbstub.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index 7fa4b8b51f

[PATCH v3 05/25] target/arm: Move the reference to arm-core.xml

2023-08-16 Thread Akihiko Odaki
. Looking up arm-core.xml results in an error as it will not be embedded in the AArch64 build. Signed-off-by: Akihiko Odaki --- target/arm/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 93c28d50e5..d71a162070 100644 --- a/target

[PATCH v3 16/25] hw/core/cpu: Remove gdb_get_dynamic_xml member

2023-08-16 Thread Akihiko Odaki
This function is no longer used. Signed-off-by: Akihiko Odaki --- include/hw/core/cpu.h | 4 target/arm/cpu.h | 6 -- target/ppc/cpu.h | 1 - target/arm/cpu.c | 1 - target/arm/gdbstub.c | 18 -- target/ppc/cpu_init.c | 3 --- target/ppc/gdbstub.c

[PATCH v3 10/25] target/riscv: Use GDBFeature for dynamic XML

2023-08-16 Thread Akihiko Odaki
In preparation for a change to use GDBFeature as a parameter of gdb_register_coprocessor(), convert the internal representation of dynamic feature from plain XML to GDBFeature. Signed-off-by: Akihiko Odaki --- target/riscv/cpu.h | 4 +-- target/riscv/cpu.c | 4 +-- target/riscv

[PATCH v4 11/25] gdbstub: Use GDBFeature for gdb_register_coprocessor

2023-08-16 Thread Akihiko Odaki
This is a tree-wide change to introduce GDBFeature parameter to gdb_register_coprocessor(). The new parameter just replaces num_regs and xml parameters for now. GDBFeature will be utilized to simplify XML lookup in a following change. Signed-off-by: Akihiko Odaki Acked-by: Alex Bennée

[PATCH v4 10/25] target/riscv: Use GDBFeature for dynamic XML

2023-08-16 Thread Akihiko Odaki
In preparation for a change to use GDBFeature as a parameter of gdb_register_coprocessor(), convert the internal representation of dynamic feature from plain XML to GDBFeature. Signed-off-by: Akihiko Odaki --- target/riscv/cpu.h | 4 +-- target/riscv/cpu.c | 4 +-- target/riscv

[PATCH v4 14/25] gdbstub: Dynamically allocate target.xml buffer

2023-08-16 Thread Akihiko Odaki
There is no guarantee that target.xml fits in 1024 bytes, and the fixed buffer length requires tedious buffer overflow check. Dynamically allocate the target.xml buffer to resolve these problems. Suggested-by: Alex Bennée Signed-off-by: Akihiko Odaki --- gdbstub/internals.h | 2 +- gdbstub

Re: [PATCH v6 6/9] gfxstream + rutabaga: add initial support for gfxstream

2023-08-16 Thread Akihiko Odaki
Ross Tested-by: Emmanouil Pitsidianakis Reviewed-by: Emmanouil Pitsidianakis --- v1: Incorported various suggestions by Akihiko Odaki and Bernard Berschow - Removed GET_VIRTIO_GPU_GL / GET_RUTABAGA macros - Used error_report(..) - Used g_autofree to fix leaks on error paths

[PATCH v4 13/25] hw/core/cpu: Return static value with gdb_arch_name()

2023-08-16 Thread Akihiko Odaki
() with const and make all of its implementations return static strings. Signed-off-by: Akihiko Odaki --- include/hw/core/cpu.h | 2 +- target/ppc/internal.h | 2 +- gdbstub/gdbstub.c | 4 +--- target/arm/cpu.c | 6 +++--- target/arm/cpu64.c | 4 ++-- target/i386/cpu.c | 6

[PATCH v4 21/25] cpu: Call plugin hooks only when ready

2023-08-16 Thread Akihiko Odaki
The initialization and exit hooks will not affect the state of vCPU, but they may depend on the state of vCPU. Therefore, it's better to call plugin hooks after the vCPU state is fully initialized and before it gets uninitialized. Signed-off-by: Akihiko Odaki --- cpu.c| 11

Re: [PATCH v4 06/25] hw/core/cpu: Replace gdb_core_xml_file with gdb_core_feature

2023-08-16 Thread Akihiko Odaki
On 2023/08/17 0:58, Richard Henderson wrote: On 8/16/23 07:51, Akihiko Odaki wrote: diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index f155936289..b54162cbeb 100644 --- a/target/hexagon/cpu.c +++ b/target/hexagon/cpu.c @@ -391,7 +391,7 @@ static void hexagon_cpu_class_init

[PATCH v3 18/25] hw/core/cpu: Add a parameter to gdb_read_register/gdb_write_register

2023-08-16 Thread Akihiko Odaki
-by: Akihiko Odaki --- include/hw/core/cpu.h | 6 -- target/alpha/cpu.h| 6 -- target/arm/cpu.h | 13 + target/avr/cpu.h | 6 -- target/cris/cpu.h | 9 ++--- target/hexagon/internal.h | 6 -- target/hppa

[PATCH v3 17/25] gdbstub: Add members to identify registers to GDBFeature

2023-08-16 Thread Akihiko Odaki
These members will be used to help plugins to identify registers. The added members in instances of GDBFeature dynamically generated by CPUs will be filled in later changes. Signed-off-by: Akihiko Odaki --- include/exec/gdbstub.h | 3 +++ gdbstub/gdbstub.c | 8 ++-- target/arm

[PATCH v3 15/25] gdbstub: Simplify XML lookup

2023-08-16 Thread Akihiko Odaki
Now we know all instances of GDBFeature that is used in CPU so we can traverse them to find XML. This removes the need for a CPU-specific lookup function for dynamic XMLs. Signed-off-by: Akihiko Odaki --- gdbstub/gdbstub.c | 24 1 file changed, 8 insertions(+), 16

[PATCH v4 22/25] plugins: Allow to read registers

2023-08-16 Thread Akihiko Odaki
It is based on GDB protocol to ensure interface stability. The timing of the vcpu init hook is also changed so that the hook will get called after GDB features are initialized. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1706 Signed-off-by: Akihiko Odaki --- include/qemu/qemu

[PATCH v4 12/25] gdbstub: Use GDBFeature for GDBRegisterState

2023-08-16 Thread Akihiko Odaki
Simplify GDBRegisterState by replacing num_regs and xml members with one member that points to GDBFeature. Signed-off-by: Akihiko Odaki --- gdbstub/gdbstub.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index 7fa4b8b51f

Re: [PATCH v5 6/9] gfxstream + rutabaga: add initial support for gfxstream

2023-08-15 Thread Akihiko Odaki
Alyssa Ross --- v1: Incorported various suggestions by Akihiko Odaki and Bernard Berschow - Removed GET_VIRTIO_GPU_GL / GET_RUTABAGA macros - Used error_report(..) - Used g_autofree to fix leaks on error paths - Removed unnecessary casts - added virtio-gpu-pci-rutabaga.c + virt

[PATCH v4 06/25] hw/core/cpu: Replace gdb_core_xml_file with gdb_core_feature

2023-08-16 Thread Akihiko Odaki
will utilize additional information provided by GDBFeature to simplify XML file lookup. Signed-off-by: Akihiko Odaki --- include/hw/core/cpu.h | 5 +++-- target/s390x/cpu.h | 2 -- gdbstub/gdbstub.c | 6 +++--- target/arm/cpu.c| 4 ++-- target/arm/cpu64.c | 4 ++-- target/arm

[PATCH v5 00/26] plugins: Allow to read registers

2023-08-16 Thread Akihiko Odaki
e only when changed. (Alex Bennée) Dropped 0x prefixes for register value logs for conciseness. V1 -> V2: Added SPDX-License-Identifier: GPL-2.0-or-later. (Philippe Mathieu-Daudé) Split long lines. (Philippe Mathieu-Daudé) Renamed gdb_features to gdb_static_features (Philippe Mathieu-

[PATCH v5 02/26] gdbstub: Introduce GDBFeature structure

2023-08-16 Thread Akihiko Odaki
Before this change, the information from a XML file was stored in an array that is not descriptive. Introduce a dedicated structure type to make it easier to understand and to extend with more fields. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée

[PATCH v5 01/26] contrib/plugins: Use GRWLock in execlog

2023-08-16 Thread Akihiko Odaki
he ptr array gets reallocated, the other threads may have a stale reference to the old buffer. This results in use-after-free. Use GRWLock to properly fix this issue. Fixes: 3d7caf145e ("contrib/plugins: add execlog to log instruction execution and memory access") Signed-off-by: Akihiko Od

[PATCH v5 03/26] gdbstub: Add num_regs member to GDBFeature

2023-08-16 Thread Akihiko Odaki
Currently the number of registers exposed to GDB is written as magic numbers in code. Derive the number of registers GDB actually see from XML files to replace the magic numbers in code later. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée

Re: [PATCH v7 9/9] docs/system: add basic virtio-gpu documentation

2023-08-16 Thread Akihiko Odaki
On 2023/08/17 11:23, Gurchetan Singh wrote: From: Gurchetan Singh This adds basic documentation for virtio-gpu. Suggested-by: Akihiko Odaki Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Reviewed-by: Emmanouil Pitsidianakis --- v2: - Incorporated

Re: [PATCH v7 6/9] gfxstream + rutabaga: add initial support for gfxstream

2023-08-18 Thread Akihiko Odaki
an Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Reviewed-by: Emmanouil Pitsidianakis --- v1: Incorported various suggestions by Akihiko Odaki and Bernard Berschow - Removed GET_VIRTIO_GPU_GL / GET_RUTABAGA macros - Used error_report(..) - Used g_autofree to

Re: [PATCH v7 8/9] gfxstream + rutabaga: enable rutabaga

2023-08-18 Thread Akihiko Odaki
On 2023/08/17 11:23, Gurchetan Singh wrote: From: Gurchetan Singh This change enables rutabaga to receive virtio-gpu-3d hypercalls when it is active. Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Reviewed-by: Emmanouil Pitsidianakis --- v3:

Re: [PATCH v7 9/9] docs/system: add basic virtio-gpu documentation

2023-08-18 Thread Akihiko Odaki
On 2023/08/18 8:47, Gurchetan Singh wrote: On Wed, Aug 16, 2023 at 10:28 PM Akihiko Odaki <mailto:akihiko.od...@gmail.com>> wrote: On 2023/08/17 11:23, Gurchetan Singh wrote: > From: Gurchetan Singh mailto:gurchetansi...@chromium.org>> > > This

[PATCH RESEND v5 06/26] hw/core/cpu: Replace gdb_core_xml_file with gdb_core_feature

2023-08-17 Thread Akihiko Odaki
will utilize additional information provided by GDBFeature to simplify XML file lookup. Signed-off-by: Akihiko Odaki --- include/hw/core/cpu.h | 5 +++-- target/s390x/cpu.h | 2 -- gdbstub/gdbstub.c | 6 +++--- target/arm/cpu.c| 4 ++-- target/arm/cpu64.c | 4 ++-- target/arm

[PATCH RESEND v5 16/26] hw/core/cpu: Remove gdb_get_dynamic_xml member

2023-08-17 Thread Akihiko Odaki
This function is no longer used. Signed-off-by: Akihiko Odaki --- include/hw/core/cpu.h | 4 target/arm/cpu.h | 6 -- target/ppc/cpu.h | 1 - target/arm/cpu.c | 1 - target/arm/gdbstub.c | 18 -- target/ppc/cpu_init.c | 3 --- target/ppc/gdbstub.c

[PATCH RESEND v5 18/26] target/arm: Remove references to gdb_has_xml

2023-08-17 Thread Akihiko Odaki
GDB has XML support since 6.7 which was released in 2007. It's time to remove support for old GDB versions without XML support. Signed-off-by: Akihiko Odaki --- target/arm/gdbstub.c | 32 ++-- 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/target/arm

[PATCH RESEND v5 20/26] gdbstub: Remove gdb_has_xml variable

2023-08-17 Thread Akihiko Odaki
GDB has XML support since 6.7 which was released in 2007. It's time to remove support for old GDB versions without XML support. Signed-off-by: Akihiko Odaki --- include/exec/gdbstub.h | 8 gdbstub/gdbstub.c | 13 - gdbstub/softmmu.c | 1 - gdbstub/user.c

[PATCH RESEND v5 14/26] gdbstub: Dynamically allocate target.xml buffer

2023-08-17 Thread Akihiko Odaki
There is no guarantee that target.xml fits in 1024 bytes, and the fixed buffer length requires tedious buffer overflow check. Dynamically allocate the target.xml buffer to resolve these problems. Suggested-by: Alex Bennée Signed-off-by: Akihiko Odaki --- gdbstub/internals.h | 2 +- gdbstub

[PATCH RESEND v5 21/26] gdbstub: Expose functions to read registers

2023-08-17 Thread Akihiko Odaki
gdb_foreach_feature() enumerates features that are useful to identify registers. gdb_read_register() actually reads registers. Signed-off-by: Akihiko Odaki --- include/exec/gdbstub.h | 6 ++ gdbstub/gdbstub.c | 20 +++- 2 files changed, 25 insertions(+), 1 deletion

[PATCH RESEND v5 19/26] target/ppc: Remove references to gdb_has_xml

2023-08-17 Thread Akihiko Odaki
GDB has XML support since 6.7 which was released in 2007. It's time to remove support for old GDB versions without XML support. Signed-off-by: Akihiko Odaki --- target/ppc/gdbstub.c | 12 1 file changed, 12 deletions(-) diff --git a/target/ppc/gdbstub.c b/target/ppc/gdbstub.c

Re: [PATCH v7 9/9] docs/system: add basic virtio-gpu documentation

2023-08-19 Thread Akihiko Odaki
On 2023/08/19 10:17, Gurchetan Singh wrote: On Fri, Aug 18, 2023 at 5:08 AM Akihiko Odaki <mailto:akihiko.od...@gmail.com>> wrote: On 2023/08/18 8:47, Gurchetan Singh wrote: > > > On Wed, Aug 16, 2023 at 10:28 PM Akihiko Odaki mailto:akihi

Re: [PATCH v9 6/9] gfxstream + rutabaga: add initial support for gfxstream

2023-08-19 Thread Akihiko Odaki
Ross Tested-by: Emmanouil Pitsidianakis Reviewed-by: Emmanouil Pitsidianakis --- v1: Incorported various suggestions by Akihiko Odaki and Bernard Berschow - Removed GET_VIRTIO_GPU_GL / GET_RUTABAGA macros - Used error_report(..) - Used g_autofree to fix leaks on error paths

Re: [RFC PATCH 06/24] hw/core/cpu: Replace gdb_core_xml_file with gdb_core_feature

2023-08-16 Thread Akihiko Odaki
On 2023/08/14 20:59, Alex Bennée wrote: Akihiko Odaki writes: This is a tree-wide change to replace gdb_core_xml_file, the path to GDB XML file with gdb_core_feature, the pointer to GDBFeature. This also replaces the values assigned to gdb_num_core_regs with the num_regs member of GDBFeature

Re: [RFC PATCH 15/24] target/arm: Fill new members of GDBFeature

2023-08-16 Thread Akihiko Odaki
On 2023/08/14 23:56, Alex Bennée wrote: Akihiko Odaki writes: These members will be used to help plugins to identify registers. Signed-off-by: Akihiko Odaki --- target/arm/gdbstub.c | 46 +++--- target/arm/gdbstub64.c | 42

[PATCH v4 20/25] gdbstub: Expose functions to read registers

2023-08-16 Thread Akihiko Odaki
gdb_foreach_feature() enumerates features that are useful to identify registers. gdb_read_register() actually reads registers. Signed-off-by: Akihiko Odaki --- include/exec/gdbstub.h | 6 ++ gdbstub/gdbstub.c | 38 ++ 2 files changed, 36 insertions

[PATCH v4 02/25] gdbstub: Introduce GDBFeature structure

2023-08-16 Thread Akihiko Odaki
Before this change, the information from a XML file was stored in an array that is not descriptive. Introduce a dedicated structure type to make it easier to understand and to extend with more fields. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée

Re: [PATCH v5 00/26] plugins: Allow to read registers

2023-08-24 Thread Akihiko Odaki
On 2023/08/24 21:36, Alex Bennée wrote: Akihiko Odaki writes: I and other people in the University of Tokyo, where I research processor design, found TCG plugins are very useful for processor design exploration. This series didn't seem to complete getting to the mailing list. Can you re

Re: [PATCH v12 0/9] rutabaga_gfx + gfxstream

2023-08-24 Thread Akihiko Odaki
for keeping working on this. For the entire series: Reviewed-by: Akihiko Odaki Tested-by: Akihiko Odaki

Re: [PATCH v2 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-21 Thread Akihiko Odaki
m not sure if it is fine to have a time window between bind() and chmod(). Do you have some rationale? Regards, Akihiko Odaki +out: +close(fd); +return err; +} + int qemu_mknodat(int dirfd, const char *filename, mode_t mode, dev_t dev) { int preserved_errno, err; @@ -93,7 +114

Re: [PATCH 31/32] RFC: Simplify softmmu/main.c

2022-04-20 Thread Akihiko Odaki
uot;. Akihiko, do you have a patch ? Since you have reviewed this patch already, are you willing to rebase on top of this one? thanks -- Marc-André Lureau No, I don't have but I'm willing to author one if nobody else is going to. Regards, Akihiko Odaki

Re: [PATCH 1/5] 9pfs: fix qemu_mknodat(S_IFREG) on macOS

2022-04-19 Thread Akihiko Odaki
ccess. The inconsistency should be handled. Regards, Akihiko Odaki

Re: [PATCH v2 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-25 Thread Akihiko Odaki
tween bind() and chmod() and claim it secure. I need a review from someone who understands that part of the code, therefore. Regards, Akihiko Odaki

Re: [PATCH v2 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-26 Thread Akihiko Odaki
On 2022/04/26 21:38, Greg Kurz wrote: On Tue, 26 Apr 2022 12:57:37 +0900 Akihiko Odaki wrote: On 2022/04/25 3:45, Christian Schoenebeck wrote: +} +err = chmod(addr.sun_path, mode); I'm not sure if it is fine to have a time window between bind() and chmod(). Do you have some

[PATCH] 9pfs: local: Do not follow symlink in _nofollow

2022-04-26 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- hw/9pfs/9p-local.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c index d42ce6d8b82..def8afdb4d6 100644 --- a/hw/9pfs/9p-local.c +++ b/hw/9pfs/9p-local.c @@ -365,7 +365,7 @@ static int fchmodat_nofollow

Re: [PATCH v2 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-22 Thread Akihiko Odaki
On 2022/04/22 23:06, Christian Schoenebeck wrote: On Freitag, 22. April 2022 04:43:40 CEST Akihiko Odaki wrote: On 2022/04/22 0:07, Christian Schoenebeck wrote: mknod() on macOS does not support creating sockets, so divert to call sequence socket(), bind() and chmod() respectively if S_IFSOCK

Re: [PATCH v6 11/21] virtio-net: Return an error when vhost cannot enable RSS

2023-11-13 Thread Akihiko Odaki
On 2023/11/13 20:44, Yuri Benditovich wrote: On Sat, Nov 11, 2023 at 5:28 PM Akihiko Odaki <mailto:akihiko.od...@daynix.com>> wrote: On 2023/11/03 22:14, Yuri Benditovich wrote: > > > On Fri, Nov 3, 2023 at 11:55 AM Akihiko Odaki mailto:akihik

[PATCH] hvf: arm: Include target/arm/cpregs.h

2022-05-29 Thread Akihiko Odaki
hvf was missed when cpregs.h was split out. Signed-off-by: Akihiko Odaki --- target/arm/hvf/hvf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 86710509d20..e595da31b9e 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -25,6

[PATCH] build: Do not depend on pc-bios for config-host.mak

2022-06-24 Thread Akihiko Odaki
Commit 45f1eecdd63f9e4fa93fef01dd826e7706ac6d7b removed the dependency from configure to pc-bios Signed-off-by: Akihiko Odaki --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3c0d89057eb..2e95d473b3e 100644 --- a/Makefile +++ b/Makefile

[PATCH v8 2/4] cutils: Introduce bundle mechanism

2022-06-24 Thread Akihiko Odaki
system. Signed-off-by: Akihiko Odaki Suggested-by: Paolo Bonzini --- docs/about/build-platforms.rst | 2 +- include/qemu/cutils.h | 18 +++-- meson.build | 4 ++ scripts/symlink-install-tree.py | 37 ++ util/cutils.c | 68

[PATCH v8 0/4] cutils: Introduce bundle mechanism

2022-06-24 Thread Akihiko Odaki
including but not limited to datadir. (Peter Maydell) * Fix "bridge" typo (Philippe Mathieu-Daudé) v2: Rebased to the latest QEMU. Akihiko Odaki (3): cutils: Introduce bundle mechanism datadir: Use bundle mechanism module: Use bundle mechanism Paolo Bonzini (1): tests/vm: do not

Re: [PATCH v8 0/4] cutils: Introduce bundle mechanism

2022-06-24 Thread Akihiko Odaki
Actually I prepended qemu- to the directory because all executables of QEMU has the prefix. We can safely say QEMU installation will never collide if no file prefixed with qemu- exists in the bindir. If anyone has an idea what should follow "qemu-", please tell us. Regards, Akihiko Odaki

[PATCH v8 4/4] module: Use bundle mechanism

2022-06-24 Thread Akihiko Odaki
Before this change, the directory of the executable was being added to resolve modules in the build tree. However, get_relocated_path() can now resolve them with the new bundle mechanism. Signed-off-by: Akihiko Odaki --- util/module.c | 1 - 1 file changed, 1 deletion(-) diff --git a/util

[PATCH] meson: Prefix each element of firmware path

2022-06-24 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- configure | 23 +++ meson.build | 10 -- meson_options.txt | 2 +- scripts/meson-buildoptions.py | 7 +-- scripts/meson-buildoptions.sh | 6 +++--- softmmu/datadir.c

Re: [PATCH v6 0/7] cutils: Introduce bundle mechanism

2022-06-24 Thread Akihiko Odaki
d d2[1] == ':': +    return d1 + d2[2:] +    return d1 + d2 This is from Meson but buggy so I fixed it and opened a pull request for Meson: https://github.com/mesonbuild/meson/pull/10531 The script included in v8 has the fixed version of destdir_join. Regards, Akihiko Odaki

[PATCH v8 1/4] tests/vm: do not specify -bios option

2022-06-24 Thread Akihiko Odaki
for the installation. Just remove the -bios option, since it is unnecessary and in fact there are other x86 VM tests that do not bother specifying it. Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrangé Reviewed-by: Thomas Huth Signed-off-by: Akihiko Odaki Message-Id: <20220616083025.116902-1-pb

[PATCH v9 4/4] module: Use bundle mechanism

2022-06-24 Thread Akihiko Odaki
Before this change, the directory of the executable was being added to resolve modules in the build tree. However, get_relocated_path() can now resolve them with the new bundle mechanism. Signed-off-by: Akihiko Odaki --- util/module.c | 1 - 1 file changed, 1 deletion(-) diff --git a/util

[PATCH v9 3/4] datadir: Use bundle mechanism

2022-06-24 Thread Akihiko Odaki
softmmu/datadir.c had its own implementation to find files in the build tree, but now bundle mechanism provides the unified implementation which works for datadir and the other files. Signed-off-by: Akihiko Odaki --- .travis.yml | 2 +- pc-bios/keymaps/meson.build | 21

[PATCH v9 2/4] cutils: Introduce bundle mechanism

2022-06-24 Thread Akihiko Odaki
system. Signed-off-by: Akihiko Odaki Suggested-by: Paolo Bonzini --- docs/about/build-platforms.rst | 2 +- include/qemu/cutils.h | 18 +++-- include/qemu/osdep.h| 2 +- meson.build | 4 ++ scripts/symlink-install-tree.py | 37

[PATCH v8 3/4] datadir: Use bundle mechanism

2022-06-24 Thread Akihiko Odaki
softmmu/datadir.c had its own implementation to find files in the build tree, but now bundle mechanism provides the unified implementation which works for datadir and the other files. Signed-off-by: Akihiko Odaki --- .travis.yml | 2 +- pc-bios/keymaps/meson.build | 21

[PATCH] qga: Relocate a path emitted in the help text

2022-06-24 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- qga/main.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qga/main.c b/qga/main.c index c373fec3ee6..5f1efa23334 100644 --- a/qga/main.c +++ b/qga/main.c @@ -223,6 +223,10 @@ void reopen_fd_to_null(int fd) static void usage(const char

[PATCH v9 0/4] cutils: Introduce bundle mechanism

2022-06-24 Thread Akihiko Odaki
is for any files located relative to the installation tree including but not limited to datadir. (Peter Maydell) * Fix "bridge" typo (Philippe Mathieu-Daudé) v2: Rebased to the latest QEMU. Akihiko Odaki (3): cutils: Introduce bundle mechanism datadir: Use bundle mechanism module:

[PATCH v9 1/4] tests/vm: do not specify -bios option

2022-06-24 Thread Akihiko Odaki
for the installation. Just remove the -bios option, since it is unnecessary and in fact there are other x86 VM tests that do not bother specifying it. Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrangé Reviewed-by: Thomas Huth Signed-off-by: Akihiko Odaki Message-Id: <20220616083025.116902-1-pb

[PATCH 3/3] meson: Allow to enable gtk and sdl while cocoa is enabled

2022-07-05 Thread Akihiko Odaki
As ui/cocoa does no longer override main(), ui/gtk and ui/sdl can be enabled even ui/cocoa is enabled. Signed-off-by: Akihiko Odaki --- meson.build | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index 6e1c3eb2bc5..4714a0d5cf8 100644

[PATCH 1/3] ui/cocoa: Run qemu_init in the main thread

2022-07-05 Thread Akihiko Odaki
implementation of main() for builds with ui/cocoa and ones without ui/cocoa. Signed-off-by: Akihiko Odaki --- docs/devel/fuzzing.rst | 4 +- include/qemu-main.h | 3 +- include/sysemu/sysemu.h | 2 +- softmmu/main.c | 14 +-- softmmu/vl.c| 2 +- tests/qtest/fuzz

[PATCH 2/3] Revert "main-loop: Disable block backend global state assertion on Cocoa"

2022-07-05 Thread Akihiko Odaki
This reverts commit 47281859f66bdab1974fb122cab2cbb4a1c9af7f. Signed-off-by: Akihiko Odaki --- include/qemu/main-loop.h | 13 - 1 file changed, 13 deletions(-) diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h index 5518845299d..0aa36a4f17e 100644 --- a/include/qemu

<    5   6   7   8   9   10   11   12   13   14   >