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

2023-09-12 Thread Akihiko Odaki
Some subclasses overwrite gdb_core_xml_file member but others don't. Always initialize the member in the subclasses for consistency. This especially helps for AArch64; in a following change, the file specified by gdb_core_xml_file is always looked up even if it's going to be overwritten later. Loo

[PATCH v2 11/11] gdbstub: Replace gdb_regs with an array

2023-09-12 Thread Akihiko Odaki
An array is a more appropriate data structure than a list for gdb_regs since it is initialized only with append operation and read-only after initialization. Signed-off-by: Akihiko Odaki --- include/hw/core/cpu.h | 2 +- gdbstub/gdbstub.c | 34 -- 2 files cha

Re: [PATCH v1 2/2] target/s390x: flag te and cte as deprecated

2023-09-12 Thread David Hildenbrand
On 11.09.23 22:52, Collin Walling wrote: Add the CONSTRAINT_TRANSACTIONAL_EXE (cte) and TRANSACTIONAL_EXE (te) under the list of deprecated features. Signed-off-by: Collin Walling --- target/s390x/cpu_features.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/s390x/cpu_features

Re: [PATCH v2 04/10] Introduce the CPU address space destruction function

2023-09-12 Thread David Hildenbrand
On 12.09.23 04:11, xianglai li wrote: Introduce new function to destroy CPU address space resources for cpu hot-(un)plug. How do other archs handle that? Or how are they able to get away without destroying? -- Cheers, David / dhildenb

[PATCH v2 09/11] target/ppc: Remove references to gdb_has_xml

2023-09-12 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 | 18 -- 1 file changed, 18 deletions(-) diff --git a/target/ppc/gdbstub.c b/target/ppc/gdbstub.c

[PATCH v2 08/11] target/arm: Remove references to gdb_has_xml

2023-09-12 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 Acked-by: Alex Bennée --- target/arm/gdbstub.c | 32 ++-- 1 file changed, 2 insertions(+), 30 deletions(-) di

[PATCH v2 06/11] hw/core/cpu: Return static value with gdb_arch_name()

2023-09-12 Thread Akihiko Odaki
All implementations of gdb_arch_name() returns dynamic duplicates of static strings. It's also unlikely that there will be an implementation of gdb_arch_name() that returns a truly dynamic value due to the nature of the function returning a well-known identifiers. Qualify the value gdb_arch_name()

[PATCH v2 10/11] gdbstub: Remove gdb_has_xml variable

2023-09-12 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 --- gdbstub/internals.h| 2 -- include/exec/gdbstub.h | 8 gdbstub/gdbstub.c | 15 --- 3 files changed, 25

Re: [PATCH v2 2/2] ui: add precondition for dpy_get_ui_info()

2023-09-12 Thread Albert Esteve
On Tue, Sep 12, 2023 at 8:28 AM wrote: > From: Marc-André Lureau > > Ensure that it only get called when dpy_ui_info_supported(). The > function should always return a result. There should be a non-null > console or active_console. > > Modify the argument to be const as well. > > Signed-off-by:

[PATCH v7 04/18] gdbstub: Introduce GDBFeatureBuilder

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

[PATCH v7 02/18] gdbstub: Introduce gdb_find_static_feature()

2023-09-12 Thread Akihiko Odaki
This function is useful to determine the number of registers exposed to GDB from the XML name. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson --- include/exec/gdbstub.h | 2 ++ gdbstub/gdbstub.c | 13 +

[PATCH v7 00/18] plugins: Allow to read registers

2023-09-12 Thread Akihiko Odaki
Based-on: <20230912065811.27796-1-akihiko.od...@daynix.com> ("[PATCH v2 00/11] gdbstub and TCG plugin improvements") I and other people in the University of Tokyo, where I research processor design, found TCG plugins are very useful for processor design exploration. The feature we find missing is

[PATCH v7 18/18] contrib/plugins: Add cc plugin

2023-09-12 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 v7 12/18] gdbstub: Add members to identify registers to GDBFeature

2023-09-12 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 | 10 -- target/riscv/g

[PATCH v7 15/18] plugins: Allow to read registers

2023-09-12 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-plugin

[PATCH v7 05/18] target/arm: Use GDBFeature for dynamic XML

2023-09-12 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 Acked-by: Richard Henderson --- target/arm/cpu.h | 20 +++--- target/arm/internals

[PATCH v7 06/18] target/ppc: Use GDBFeature for dynamic XML

2023-09-12 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 Reviewed-by: Richard Henderson --- target/ppc/cpu-qom.h | 3 +-- target/ppc/cpu.h

[PATCH v7 03/18] hw/core/cpu: Replace gdb_core_xml_file with gdb_core_feature

2023-09-12 Thread Akihiko Odaki
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 where applicable to remove magic numbers. A following change will u

[PATCH v7 09/18] gdbstub: Use GDBFeature for GDBRegisterState

2023-09-12 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 a30ffdd6b8.

[PATCH v7 16/18] contrib/plugins: Allow to log registers

2023-09-12 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 | 120 +++-- 2 files changed, 97 insertions(+), 33 deletions(-) diff --git a/docs/devel/tcg-plugins.rst

[PATCH v7 17/18] plugins: Support C++

2023-09-12 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 40aae8db68..55f514ca6c 100644 --- a/include/qemu/qemu-plugin.h +++ b/i

[PATCH v7 07/18] target/riscv: Use GDBFeature for dynamic XML

2023-09-12 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/gdbstub

[PATCH v7 01/18] gdbstub: Add num_regs member to GDBFeature

2023-09-12 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 --- include

[PATCH v7 13/18] gdbstub: Expose functions to read registers

2023-09-12 Thread Akihiko Odaki
gdb_find_feature() and gdb_find_feature_register() find registers. gdb_read_register() actually reads registers. Signed-off-by: Akihiko Odaki --- include/exec/gdbstub.h | 5 + gdbstub/gdbstub.c | 50 +- 2 files changed, 54 insertions(+), 1 deleti

[PATCH v7 14/18] cpu: Call plugin hooks only when ready

2023-09-12 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 v7 08/18] gdbstub: Use GDBFeature for gdb_register_coprocessor

2023-09-12 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 --- inclu

[PATCH v7 11/18] hw/core/cpu: Remove gdb_get_dynamic_xml member

2023-09-12 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 v7 10/18] gdbstub: Simplify XML lookup

2023-09-12 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 | 23 +-- 1 file changed, 9 insertions(+), 14 deletio

Re: [PATCH qemu 2/2] dump: Only use the makedumpfile flattened format when necessary

2023-09-12 Thread Thomas Huth
On Tue, 2023-09-12 at 10:34 +0400, Marc-André Lureau wrote: > Hi > > On Wed, Aug 23, 2023 at 2:03 PM Marc-André Lureau > wrote: > > > > Hi > > > > On Wed, Aug 23, 2023 at 4:31 AM Stephen Brennan > > wrote: > > > > > > Stephen Brennan writes: > > > > Marc-André Lureau writes: > > > > > I am

Re: [PATCH v3 5/5] vhost-user-scsi: start vhost when guest kicks

2023-09-12 Thread Li Feng
> On 1 Sep 2023, at 7:44 PM, Markus Armbruster wrote: > > Li Feng mailto:fen...@smartx.com>> writes: > >> Let's keep the same behavior as vhost-user-blk. >> >> Some old guests kick virtqueue before setting VIRTIO_CONFIG_S_DRIVER_OK. >> >> Signed-off-by: Li Feng >> --- >> hw/scsi/vhost-user-

Re: [PATCH v2 03/10] make qdev_disconnect_gpio_out_named() public

2023-09-12 Thread Philippe Mathieu-Daudé
Hi, On 12/9/23 04:11, xianglai li wrote: It will be reused in loongarch/virt.c for unwiring the vcpu<->exioi interrupts for the vcpu hot-(un)plug cases. Since we never had to use this, I'm surprised we really need it. QEMU IRQs/GPIOs are similar to hardware ones, and aren't expected to be rew

Re: [PATCH qemu 2/2] dump: Only use the makedumpfile flattened format when necessary

2023-09-12 Thread Daniel P . Berrangé
On Tue, Sep 12, 2023 at 10:34:04AM +0400, Marc-André Lureau wrote: > Hi > > On Wed, Aug 23, 2023 at 2:03 PM Marc-André Lureau > wrote: > > > > Hi > > > > On Wed, Aug 23, 2023 at 4:31 AM Stephen Brennan > > wrote: > > > > > > Stephen Brennan writes: > > > > Marc-André Lureau writes: > > > >> I

Re: [PATCH v3 4/5] vhost-user-scsi: support reconnect to backend

2023-09-12 Thread Li Feng
> On 1 Sep 2023, at 8:00 PM, Markus Armbruster wrote: > > Li Feng mailto:fen...@smartx.com>> writes: > >> If the backend crashes and restarts, the device is broken. >> This patch adds reconnect for vhost-user-scsi. >> >> Tested with spdk backend. >> >> Signed-off-by: Li Feng >> --- >> hw/sc

Re: [PATCH v3 2/2] vhost: Add Error parameter to vhost_scsi_common_start()

2023-09-12 Thread Li Feng
> On 1 Sep 2023, at 8:00 PM, Markus Armbruster wrote: > > Li Feng mailto:fen...@smartx.com>> writes: > >> Add a Error parameter to report the real error, like vhost-user-blk. >> >> Signed-off-by: Li Feng >> --- >> hw/scsi/vhost-scsi-common.c | 16 +--- >> hw/scsi/vhost-s

Re: riscv64 virt board crash upon startup

2023-09-12 Thread Laszlo Ersek
On 9/11/23 15:12, Laszlo Ersek wrote: > On 9/11/23 10:53, Gerd Hoffmann wrote: >> On Mon, Sep 11, 2023 at 12:12:43PM +0400, Marc-André Lureau wrote: Gerd, here's the question for you: why are "device" and "head" QOM properties in the first place? What are they needed for? >>> >>> Yo

Re: [PATCH v7 14/18] cpu: Call plugin hooks only when ready

2023-09-12 Thread Philippe Mathieu-Daudé
Hi Akihiko, On 12/9/23 09:12, Akihiko Odaki wrote: The initialization and exit hooks will not affect the state of vCPU, What about: qemu_plugin_vcpu_init_hook() -> plugin_cpu_update__locked() -> plugin_cpu_update__async() -> bitmap_copy(cpu->plugin_mask, ...) tc

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

2023-09-12 Thread Alyssa Ross
Gurchetan Singh writes: > On Fri, Aug 25, 2023 at 12:37 PM Alyssa Ross wrote: > >> Alyssa Ross writes: >> >> > Gurchetan Singh writes: >> > >> >> On Fri, Aug 25, 2023 at 12:11 AM Alyssa Ross wrote: >> >> >> >>> Gurchetan Singh writes: >> >>> >> >>> > On Wed, Aug 23, 2023 at 4:07 AM Alyssa Ro

[PATCH v4 3/5] vhost-user-scsi: support reconnect to backend

2023-09-12 Thread Li Feng
If the backend crashes and restarts, the device is broken. This patch adds reconnect for vhost-user-scsi. This patch also improves the error messages, and reports some silent errors. Tested with spdk backend. Signed-off-by: Li Feng --- hw/scsi/vhost-scsi-common.c | 16 +- hw/scsi/vh

[PATCH v4 1/5] vhost-user-common: send get_inflight_fd once

2023-09-12 Thread Li Feng
Currently the get_inflight_fd will be sent every time the device is started, and the backend will allocate shared memory to save the inflight state. If the backend finds that it receives the second get_inflight_fd, it will release the previous shared memory, which breaks inflight working logic. Th

[PATCH v4 5/5] vhost-user: fix lost reconnect

2023-09-12 Thread Li Feng
When the vhost-user is reconnecting to the backend, and if the vhost-user fails at the get_features in vhost_dev_init(), then the reconnect will fail and it will not be retriggered forever. The reason is: When the vhost-user fails at get_features, the vhost_dev_cleanup will be called immediately.

[PATCH v4 2/5] vhost: move and rename the conn retry times

2023-09-12 Thread Li Feng
Multiple devices need this macro, move it to a common header. Signed-off-by: Li Feng Reviewed-by: Raphael Norwitz --- hw/block/vhost-user-blk.c | 4 +--- hw/virtio/vhost-user-gpio.c | 3 +-- include/hw/virtio/vhost.h | 2 ++ 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/

[PATCH v4 0/5] Implement reconnect for vhost-user-scsi

2023-09-12 Thread Li Feng
This patchset adds reconnect support for vhost-user-scsi. At the same time, improve the error messages and silent errors are now reported. And fix a lost reconnect issue for all vhost-user backend. Changes for v4: - Merge https://lore.kernel.org/all/20230830045722.611224-1-fen...@smartx.com/ to

[PATCH v4 4/5] vhost-user-scsi: start vhost when guest kicks

2023-09-12 Thread Li Feng
Let's keep the same behavior as vhost-user-blk. Some old guests kick virtqueue before setting VIRTIO_CONFIG_S_DRIVER_OK. Signed-off-by: Li Feng --- hw/scsi/vhost-user-scsi.c | 51 +++ 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/hw/scsi/vhos

Re: [PATCH RESEND v5 51/57] target/loongarch: Implement xvinsgr2vr xvpickve2gr

2023-09-12 Thread gaosong
在 2023/9/12 上午6:27, Richard Henderson 写道: On 9/7/23 01:31, Song Gao wrote: +static bool trans_xvinsgr2vr_w(DisasContext *ctx, arg_vr_i *a) +{ +    if (!avail_LASX(ctx)) { +    return false; +    } +    return trans_vinsgr2vr_w(ctx, a); +} Using the other translator doesn't help. static b

RE: [PATCH v2 00/10] Adds CPU hot-plug support to Loongarch

2023-09-12 Thread Salil Mehta via
Hi Xianglai, > From: qemu-devel-bounces+salil.mehta=huawei@nongnu.org bounces+salil.mehta=huawei@nongnu.org> On Behalf Of xianglai li > Sent: Tuesday, September 12, 2023 3:12 AM > To: qemu-devel@nongnu.org > Cc: Salil Mehta ; Xiaojuan Yang > ; Song Gao ; Michael S. > Tsirkin ; Igor Mammed

Re: [PATCH 02/11] hw/i386/pc: Use qdev_prop_set_array()

2023-09-12 Thread Peter Maydell
On Mon, 11 Sept 2023 at 17:42, Kevin Wolf wrote: > > Am 11.09.2023 um 17:42 hat Peter Maydell geschrieben: > > On Fri, 8 Sept 2023 at 15:37, Kevin Wolf wrote: > > > > > > Instead of manually setting "foo-len" and "foo[i]" properties, build a > > > QList and use the new qdev_prop_set_array() helpe

[PATCH] linux-headers: Update to Linux v6.6-rc1

2023-09-12 Thread Thomas Huth
This update contains the required header changes for the "target/s390x: AP-passthrough for PV guests" patch from Steffen Eiden. Signed-off-by: Thomas Huth --- See https://lore.kernel.org/qemu-devel/20230823142219.1046522-1-sei...@linux.ibm.com/ I'll add this patch to my next pull request (unle

Re: [PATCH v4 00/10] linux-user: Detect and report host crashes

2023-09-12 Thread Helge Deller
On 9/9/23 21:12, Richard Henderson wrote: On 8/22/23 22:16, Richard Henderson wrote: More signal cleanups.  Mostly tested by temporarily adding an abort, divide by zero, undefined instruction, null dereference, within the implementation of a guest syscall to induce an error. Applied on top of

Re: [PULL v2 38/45] hw/riscv/virt.c: fix non-KVM --enable-debug build

2023-09-12 Thread Andrew Jones
On Tue, Sep 12, 2023 at 09:05:41AM +0300, Michael Tokarev wrote: > 12.09.2023 00:43, Daniel Henrique Barboza: > > On 9/11/23 16:54, Michael Tokarev wrote: > ... > > > >   /* KVM AIA only has one APLIC instance */ > > > > -    if (virt_use_kvm_aia(s)) { > > > > +    if (kvm_enabled() && virt_use

Re: [PULL v2 00/45] riscv-to-apply queue

2023-09-12 Thread Michael Tokarev
11.09.2023 09:42, Alistair Francis:>target/riscv: don't read CSR in riscv_csrrw_do64 (2023-09-11 11:45:55 +1000) 2 more questions about this pull-req and -stable. commit 50f9464962fb41f04fd5f42e7ee2cb60942aba89 Author: Daniel Henrique Barboza Date: Thu Jul 20 10:24:23 2023 -0300 tar

Re: [PATCH v4 00/10] linux-user: Detect and report host crashes

2023-09-12 Thread Michael Tokarev
12.09.2023 12:45, Helge Deller: /usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/13/../../../../lib64/libc.a(abort.o): in function `abort': (.text.unlikely+0x0): multiple definition of `abort'; libqemu-aarch64-linux-user.fa.p/linux-user_signal.c.o:/srv/_build/../../home/cvs/qemu/qemu/linux-user/

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-12 Thread Ani Sinha
> On 08-Sep-2023, at 9:32 PM, David Hildenbrand wrote: > > On 08.09.23 17:13, Ani Sinha wrote: >>> On 08-Sep-2023, at 7:46 PM, David Hildenbrand wrote: >>> >>> On 08.09.23 16:12, Ani Sinha wrote: > On 08-Sep-2023, at 3:58 PM, David Hildenbrand wrote: > > On 08.09.23 11:50, Ani

Re: [SeaBIOS] Re: new release tag?

2023-09-12 Thread Gerd Hoffmann
Hi, > > Cc'ing qemu-devel: Are there any qemu changes pending or > > planned for 8.2 which need changes in seabios? /me notes that nobody raised his hand. > Hello Gerd, > > The QEMU 8.2 devel cycle has started. > > I do not want to stress you, but if we want to get additional fixes in, > tha

Re: [PULL v2 38/45] hw/riscv/virt.c: fix non-KVM --enable-debug build

2023-09-12 Thread Daniel Henrique Barboza
On 9/12/23 03:05, Michael Tokarev wrote: 12.09.2023 00:43, Daniel Henrique Barboza: On 9/11/23 16:54, Michael Tokarev wrote: ...   /* KVM AIA only has one APLIC instance */ -    if (virt_use_kvm_aia(s)) { +    if (kvm_enabled() && virt_use_kvm_aia(s)) {   create_fdt_socket_aplic

[PULL 05/14] vmmouse: use explicit code

2023-09-12 Thread marcandre . lureau
From: Marc-André Lureau It's weird to shift x & y without obvious reason. Let's make this more explicit and future-proof. Signed-off-by: Marc-André Lureau --- hw/i386/vmmouse.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/i386/vmmouse.c b/hw/i386/vmmous

Re: [virtio-dev] [RESEND VIRTIO GPU PATCH v3 1/1] virtio-gpu: Add new feature flag VIRTIO_GPU_F_FREEZE_S3

2023-09-12 Thread Chen, Jiqian
Hi Mikhail Golubev-Ciuchea, On 2023/9/12 00:33, Mikhail Golubev-Ciuchea wrote: > Hi Jiqian, > > Thanks for the proposal. > > Some time ago I was working on the same issue with suspending the gpu device > (on arm). Additionally, I had troubles with virtio-video device as well, see > https://lore

[PULL 00/14] Ui patches

2023-09-12 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 9ef497755afc252fb8e060c9ea6b0987abfd20b6: Merge tag 'pull-vfio-20230911' of https://github.com/legoater/qemu into staging (2023-09-11 09:13:08 -0400) are available in the Git repository at: https://gitlab.com/marcandre.lureau/qemu

[PULL 14/14] ui: add precondition for dpy_get_ui_info()

2023-09-12 Thread marcandre . lureau
From: Marc-André Lureau Ensure that it only get called when dpy_ui_info_supported(). The function should always return a result. There should be a non-null console or active_console. Modify the argument to be const as well. Signed-off-by: Marc-André Lureau Reviewed-by: Albert Esteve --- incl

[PULL 02/14] contrib/vhost-user-gpu: add support for sending dmabuf modifiers

2023-09-12 Thread marcandre . lureau
From: Erico Nunes virglrenderer recently added virgl_renderer_resource_get_info_ext as a new api, which gets resource information, including dmabuf modifiers. We have to support dmabuf modifiers since the driver may choose to allocate buffers with these modifiers for efficiency, and importing bu

[PULL 01/14] docs: vhost-user-gpu: add protocol changes for dmabuf modifiers

2023-09-12 Thread marcandre . lureau
From: Erico Nunes VHOST_USER_GPU_DMABUF_SCANOUT2 is defined as a message with all the contents of VHOST_USER_GPU_DMABUF_SCANOUT plus the dmabuf modifiers which were ommitted. The VHOST_USER_GPU_PROTOCOL_F_DMABUF2 protocol feature is defined as a way to check whether this new message is supported

[PULL 10/14] ui/vc: split off the VC part from console.c

2023-09-12 Thread marcandre . lureau
From: Marc-André Lureau Move common declarations to console-priv.h, and add a new unit console-vc.c which will handle VC/chardev rendering, when pixman is available. (if necessary, the move could be done chunk by chunks) Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- ui

[PULL 07/14] ui/vc: rename kbd_put to qemu_text_console functions

2023-09-12 Thread marcandre . lureau
From: Marc-André Lureau They are QemuTextConsole functions, let's make it clear. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- include/ui/console.h | 6 ++--- ui/console.c | 10 ui/curses.c | 2 +- ui/gtk.c | 6 ++--- ui/sdl2-inp

[PULL 04/14] vmmouse: replace DPRINTF with tracing

2023-09-12 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/vmmouse.c| 29 ++--- hw/i386/trace-events | 10 ++ 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/hw/i386/vmmouse.c b/hw/i386/vmmouse.c

[PULL 13/14] ui: fix crash when there are no active_console

2023-09-12 Thread marcandre . lureau
From: Marc-André Lureau Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault. 0x55888630 in dpy_ui_info_supported (con=0x0) at ../ui/console.c:812 812 return con->hw_ops->ui_info != NULL; (gdb) bt #0 0x55888630 in dpy_ui_info_supported (con=0x0) at ../ui

[PULL 09/14] ui/vc: preliminary QemuTextConsole changes before split

2023-09-12 Thread marcandre . lureau
From: Marc-André Lureau Those changes will help to split console.c unit in the following commit. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- ui/console.c | 52 +++- 1 file changed, 35 insertions(+), 17 deletions(-) diff

[PULL 03/14] vhost-user-gpu: support dmabuf modifiers

2023-09-12 Thread marcandre . lureau
From: Erico Nunes When the backend sends VHOST_USER_GPU_DMABUF_SCANOUT2, handle it by getting the modifiers information which is now available. Signed-off-by: Erico Nunes Reviewed-by: Marc-André Lureau Reviewed-by: Sergio Lopez Message-Id: <20230714153900.475857-4-ernu...@redhat.com> --- hw/

[PULL 06/14] ui/vc: remove kbd_put_keysym() and update function calls

2023-09-12 Thread marcandre . lureau
From: Marc-André Lureau The function calls to `kbd_put_keysym` have been updated to now call `kbd_put_keysym_console` with a NULL console parameter. Like most console functions, NULL argument is now for the active console. This will allow to rename the text console functions in a consistent man

[PULL 12/14] virtio-gpu/win32: set the destroy function on load

2023-09-12 Thread marcandre . lureau
From: Marc-André Lureau Don't forget to unmap the resource memory. Fixes: commit 9462ff469 ("virtio-gpu/win32: allocate shareable 2d resources/images") Signed-off-by: Marc-André Lureau --- hw/display/virtio-gpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/displ

[PULL 11/14] ui/console: move DisplaySurface to its own header

2023-09-12 Thread marcandre . lureau
From: Marc-André Lureau Mostly for readability reasons. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- include/ui/console.h | 84 +-- include/ui/surface.h | 95 2 files changed, 96 insertion

Re: [PATCH] vdpa: fix gcc cvq_isolated uninitialized variable warning

2023-09-12 Thread Stefan Hajnoczi
On Tue, 12 Sept 2023 at 02:19, Philippe Mathieu-Daudé wrote: > > On 11/9/23 23:54, Stefan Hajnoczi wrote: > > gcc 13.2.1 emits the following warning: > > > >net/vhost-vdpa.c: In function ‘net_vhost_vdpa_init.constprop’: > >net/vhost-vdpa.c:1394:25: error: ‘cvq_isolated’ may be used > > un

[PULL 08/14] ui/console: remove redundant format field

2023-09-12 Thread marcandre . lureau
From: Marc-André Lureau It's already part of PIXMAN image. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- include/ui/console.h | 15 +++ ui/console-gl.c | 2 +- ui/console.c | 4 +--- ui/gtk.c | 2 +- ui/spice-display.c | 2 +-

Re: [PATCH v2 10/19] target/riscv: remove kvm-stub.c

2023-09-12 Thread Daniel Henrique Barboza
On 9/11/23 09:23, Daniel Henrique Barboza wrote: On 9/11/23 06:04, Andrew Jones wrote: On Mon, Sep 11, 2023 at 09:49:06AM +0200, Andrew Jones wrote: On Wed, Sep 06, 2023 at 12:23:19PM +0200, Philippe Mathieu-Daudé wrote: On 6/9/23 11:16, Daniel Henrique Barboza wrote: This file is not ne

[PULL 1/3] seabios: update submodule to git snapshot

2023-09-12 Thread Gerd Hoffmann
git shortlog Gerd Hoffmann (7): disable array bounds warning better kvm detection detect physical address space size move 64bit pci window to end of address space be less conservative with the 64bit pci io window qemu: log reservations in fw_cfg e82

[PULL 0/3] Firmware/seabios 20230912 patches

2023-09-12 Thread Gerd Hoffmann
The following changes since commit c5ea91da443b458352c1b629b490ee6631775cb4: Merge tag 'pull-trivial-patches' of https://gitlab.com/mjt0k/qemu into staging (2023-09-08 10:06:25 -0400) are available in the Git repository at: https://gitlab.com/kraxel/qemu.git tags/firmware/seabio

[PULL 2/3] seabios: turn off CONFIG_APMBIOS for 128k build

2023-09-12 Thread Gerd Hoffmann
Needed to make the build fit into 128k. Signed-off-by: Gerd Hoffmann --- roms/config.seabios-128k | 1 + 1 file changed, 1 insertion(+) diff --git a/roms/config.seabios-128k b/roms/config.seabios-128k index d18c802c46e9..bc3ba7f65bcd 100644 --- a/roms/config.seabios-128k +++ b/roms/config.seabi

Re: [PULL 13/14] ui: fix crash when there are no active_console

2023-09-12 Thread Michael Tokarev
12.09.2023 13:46, marcandre.lur...@redhat.com пишет: From: Marc-André Lureau Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault. 0x55888630 in dpy_ui_info_supported (con=0x0) at ../ui/console.c:812 812 return con->hw_ops->ui_info != NULL; (gdb) bt #0 0x5

Re: [PULL 13/14] ui: fix crash when there are no active_console

2023-09-12 Thread Marc-André Lureau
Hi On Tue, Sep 12, 2023 at 3:01 PM Michael Tokarev wrote: > > 12.09.2023 13:46, marcandre.lur...@redhat.com пишет: > > From: Marc-André Lureau > > > > Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault. > > 0x55888630 in dpy_ui_info_supported (con=0x0) at ../ui/consol

Re: [PULL 13/14] ui: fix crash when there are no active_console

2023-09-12 Thread Daniel P . Berrangé
On Tue, Sep 12, 2023 at 02:00:46PM +0300, Michael Tokarev wrote: > 12.09.2023 13:46, marcandre.lur...@redhat.com пишет: > > From: Marc-André Lureau > > > > Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault. > > 0x55888630 in dpy_ui_info_supported (con=0x0) at ../ui/co

Re: [PULL 13/14] ui: fix crash when there are no active_console

2023-09-12 Thread Daniel P . Berrangé
On Tue, Sep 12, 2023 at 03:09:29PM +0400, Marc-André Lureau wrote: > Hi > > On Tue, Sep 12, 2023 at 3:01 PM Michael Tokarev wrote: > > > > 12.09.2023 13:46, marcandre.lur...@redhat.com пишет: > > > From: Marc-André Lureau > > > > > > Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentati

Re: [PATCH v2 10/19] target/riscv: remove kvm-stub.c

2023-09-12 Thread Philippe Mathieu-Daudé
On 12/9/23 12:48, Daniel Henrique Barboza wrote: On 9/11/23 09:23, Daniel Henrique Barboza wrote: On 9/11/23 06:04, Andrew Jones wrote: On Mon, Sep 11, 2023 at 09:49:06AM +0200, Andrew Jones wrote: On Wed, Sep 06, 2023 at 12:23:19PM +0200, Philippe Mathieu-Daudé wrote: On 6/9/23 11:16, Daniel

Re: [PATCH] vdpa: fix gcc cvq_isolated uninitialized variable warning

2023-09-12 Thread Philippe Mathieu-Daudé
On 12/9/23 12:48, Stefan Hajnoczi wrote: On Tue, 12 Sept 2023 at 02:19, Philippe Mathieu-Daudé wrote: On 11/9/23 23:54, Stefan Hajnoczi wrote: gcc 13.2.1 emits the following warning: net/vhost-vdpa.c: In function ‘net_vhost_vdpa_init.constprop’: net/vhost-vdpa.c:1394:25: error: ‘cvq_

[PULL 1/5] edk2: update build script

2023-09-12 Thread Gerd Hoffmann
Sync with latest version from gitlab.com/kraxel/edk2-build-config Signed-off-by: Gerd Hoffmann --- roms/edk2-build.py | 202 - 1 file changed, 128 insertions(+), 74 deletions(-) diff --git a/roms/edk2-build.py b/roms/edk2-build.py index 870893f7c8e3..

[PULL 2/5] edk2: update build config

2023-09-12 Thread Gerd Hoffmann
risc-v switched to use split code/vars images like the other archs. Signed-off-by: Gerd Hoffmann --- roms/edk2-build.config | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/roms/edk2-build.config b/roms/edk2-build.config index 66ef9ffcb91f..ffe0d12d0cb7 100644 --- a/roms

[PULL 4/5] edk2: workaround edk-stable202308 bug

2023-09-12 Thread Gerd Hoffmann
Set PCD to workaround two fixes missing the release. https://github.com/tianocore/edk2/commit/8b66f9df1bb0fd5ebb743944d41cb33178cf2fdd https://github.com/tianocore/edk2/commit/020cc9e2e7053bb62247b0babbbe80cb855592e5 Signed-off-by: Gerd Hoffmann --- roms/edk2-build.config | 6 ++ 1 file chan

[PULL 3/5] edk2: update submodule to edk2-stable202308

2023-09-12 Thread Gerd Hoffmann
New stable release was tagged in August 2023, update the edk2 submodule to it. Signed-off-by: Gerd Hoffmann --- roms/edk2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roms/edk2 b/roms/edk2 index f80f052277c8..819cfc6b42a6 16 --- a/roms/edk2 +++ b/roms/edk2 @@ -1 +1 @@

[PULL 0/5] Firmware/edk2 20230912 patches

2023-09-12 Thread Gerd Hoffmann
The following changes since commit c5ea91da443b458352c1b629b490ee6631775cb4: Merge tag 'pull-trivial-patches' of https://gitlab.com/mjt0k/qemu into staging (2023-09-08 10:06:25 -0400) are available in the Git repository at: https://gitlab.com/kraxel/qemu.git tags/firmware/edk

[PATCH 3/4] hw/ppc/e500: Restrict ppce500_init_mpic_kvm() to KVM

2023-09-12 Thread Philippe Mathieu-Daudé
Inline and guard the single call to kvm_openpic_connect_vcpu() allows to remove kvm-stub.c. While it seems some code churn, it allows forbidding user emulation to include "kvm_ppc.h" in the next commit. Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/e500.c | 4 target/ppc/kvm-st

[PATCH 1/4] sysemu/kvm: Restrict kvmppc_get_radix_page_info() to ppc targets

2023-09-12 Thread Philippe Mathieu-Daudé
kvm_get_radix_page_info() is only defined for ppc targets (in target/ppc/kvm.c). The declaration is not useful in other targets. Rename using the 'kvmppc_' prefix following other declarations from target/ppc/kvm_ppc.h. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/kvm.h | 1 - target/

[PATCH 4/4] target/ppc: Prohibit target specific KVM prototypes on user emulation

2023-09-12 Thread Philippe Mathieu-Daudé
None of these target-specific prototypes should be used by user emulation. Remove their declaration there, so we get a compile failure if ever used (instead of having to deal with linker and its possible optimizations, such dead code removal). Suggested-by: Kevin Wolf Signed-off-by: Philippe Math

[PATCH 2/4] target/ppc: Restrict KVM objects to system emulation

2023-09-12 Thread Philippe Mathieu-Daudé
kvm-stub.c only defines kvm_openpic_connect_vcpu(), which is clearly not used by user emulation. Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ppc/meson.build b/target/ppc/meson.build index 4c2635039e..

[PATCH 0/4] target/ppc: Prohibit target specific KVM prototypes on user emulation

2023-09-12 Thread Philippe Mathieu-Daudé
Implement Kevin's suggestion to remove KVM declarations for user emulation builds, so if KVM prototype are used we directly get a compile failure. Philippe Mathieu-Daudé (4): sysemu/kvm: Restrict kvmppc_get_radix_page_info() to ppc targets target/ppc: Restrict KVM objects to system emulation

[PULL 0/7] s390x (and one qtest) patches

2023-09-12 Thread Thomas Huth
The following changes since commit 9ef497755afc252fb8e060c9ea6b0987abfd20b6: Merge tag 'pull-vfio-20230911' of https://github.com/legoater/qemu into staging (2023-09-11 09:13:08 -0400) are available in the Git repository at: https://gitlab.com/thuth/qemu.git tags/pull-request-2023-09-12 fo

[PULL 3/7] linux-headers: Update to Linux v6.6-rc1

2023-09-12 Thread Thomas Huth
This update contains the required header changes for the "target/s390x: AP-passthrough for PV guests" patch from Steffen Eiden. Message-ID: <20230912093432.180041-1-th...@redhat.com> Signed-off-by: Thomas Huth --- include/standard-headers/linux/fuse.h| 63 +++- include/standard-head

[PULL 6/7] kconfig: Add NVME to s390x machines

2023-09-12 Thread Thomas Huth
From: Cédric Le Goater We recently had issues with nvme devices on big endian platforms. Include their compilation on s390x to ease tests. Signed-off-by: Cédric Le Goater Message-ID: <20230828150148.120031-1-...@kaod.org> Reviewed-by: Thomas Huth Acked-by: Klaus Jensen Signed-off-by: Thomas H

[PULL 7/7] tests/qtest/pflash: Clean up local variable shadowing

2023-09-12 Thread Thomas Huth
From: Philippe Mathieu-Daudé Fix: tests/qtest/pflash-cfi02-test.c: In function ‘test_geometry’: tests/qtest/pflash-cfi02-test.c:409:22: warning: declaration of ‘byte_addr’ shadows a previous local [-Wshadow=compatible-local] 409 | uint64_t byte_addr = (uint64_t)i * c->sector

[PULL 5/7] target/s390x: AP-passthrough for PV guests

2023-09-12 Thread Thomas Huth
From: Steffen Eiden Enabling AP-passthrough(AP-pt) for PV-guest by using the new CPU features for PV-AP-pt of KVM. As usual QEMU first checks which CPU features are available and then sets them if available and selected by user. An additional check is done to verify that PV-AP can only be enable

[PULL 4/7] target/s390x/kvm: Refactor AP functionalities

2023-09-12 Thread Thomas Huth
From: Steffen Eiden kvm_s390_set_attr() is a misleading name as it only sets attributes for the KVM_S390_VM_CRYPTO group. Therefore, rename it to kvm_s390_set_crypto_attr(). Add new functions ap_available() and ap_enabled() to avoid code duplication later. Reviewed-by: Thomas Huth Reviewed-by:

[PULL 1/7] s390x/ap: fix missing subsystem reset registration

2023-09-12 Thread Thomas Huth
From: Janosch Frank A subsystem reset contains a reset of AP resources which has been missing. Adding the AP bridge to the list of device types that need reset fixes this issue. Reviewed-by: Jason J. Herne Reviewed-by: Tony Krowiak Signed-off-by: Janosch Frank Fixes: a51b3153 ("s390x/ap: bas

[PULL 2/7] s390x: do a subsystem reset before the unprotect on reboot

2023-09-12 Thread Thomas Huth
From: Janosch Frank Bound APQNs have to be reset before tearing down the secure config via s390_machine_unprotect(). Otherwise the Ultravisor will return a error code. So let's do a subsystem_reset() which includes a AP reset before the unprotect call. We'll do a full device_reset() afterwards w

Re: [PATCH v2 10/19] target/riscv: remove kvm-stub.c

2023-09-12 Thread Daniel Henrique Barboza
On 9/12/23 08:15, Philippe Mathieu-Daudé wrote: On 12/9/23 12:48, Daniel Henrique Barboza wrote: On 9/11/23 09:23, Daniel Henrique Barboza wrote: On 9/11/23 06:04, Andrew Jones wrote: On Mon, Sep 11, 2023 at 09:49:06AM +0200, Andrew Jones wrote: On Wed, Sep 06, 2023 at 12:23:19PM +0200, Ph

  1   2   3   4   >