[PULL 10/52] ui/console: new_console() cannot fail

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau There is no code path that could allow a NULL return there. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-11-marcandre.lur...@redhat.com> --- ui/console.c | 5 - 1 file changed, 5 deletions(-) diff --git a/ui/

[PULL 16/52] ui/vc: move VCCharDev specific fields out of QemuConsole

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-17-marcandre.lur...@redhat.com> --- ui/console.c | 147 +-- 1 file changed, 73 insertions(+), 74 deletions(-) diff --git

[PULL 13/52] ui/vc: replace variable with static text attributes default

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-14-marcandre.lur...@redhat.com> --- ui/console.c | 30 +- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/ui/console.c b/ui/c

[PULL 04/52] ui/vc: replace vc_chr_write() with generic qemu_chr_write()

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau We shouldn't call the callback directly, but use the chardev API, unless there is a clear reason. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230830093843.3531473-5-marcandre.lur...@redhat.com> ---

[PULL 17/52] ui/console: use OBJECT_DEFINE_TYPE for QemuConsole

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau The following patch will move some object initialization to the corresponding handlers. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-18-marcandre.lur...@redhat.com> --- ui/console.c | 31 +-

[PULL 00/52] UI patches

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 17780edd81d27fcfdb7a802efc870a99788bd2fc: Merge tag 'quick-fix-pull-request' of https://gitlab.com/bsdimp/qemu into staging (2023-08-31 10:06:29 -0400) are available in the Git repository at: https://gitlab.com/marcandre.lureau/qe

[PULL 15/52] ui/vc: pass VCCharDev to VC-specific functions

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau Even though they actually use more of QemuConsole at this point, it makes it clearer those functions are only used from the chardev implementation. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-16-marcandre.lur...@r

[PULL 05/52] ui/vc: drop have_text

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau If there are no "text" listener, the callback will simply be ignored. The rest of text handling can be done cheaply. This allows to remove some dependency on DisplayState from VC implementation. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-I

[PULL 22/52] ui/console: remove new_console()

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau The constructor helper isn't of much used now. "head" is only specified for graphic console (and default to 0), and we are going to move it to QemuGraphicConsole next. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-

[PULL 11/52] ui/vc: VC always has a DisplayState now

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-12-marcandre.lur...@redhat.com> --- ui/console.c | 4 1 file changed, 4 deletions(-) diff --git a/ui/console.c b/ui/console.c index ddec68feb7..f97db295f6 100644 -

[PULL 18/52] ui/console: change new_console() to use object initialization

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau Object construction should be done in respective object instance and class handlers. Introduce qemu_console_register() to split out the registration logic. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-19-marcandre

[PULL 20/52] ui/console: instantiate a specific console type

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau This will allow to move code/data to the specific console types. Replace console_type_t with object type check. QemuConsole can be abstract. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-21-marcandre.lur...@redhat

[PULL 21/52] ui/console: register the console from qemu_console_init()

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-22-marcandre.lur...@redhat.com> --- ui/console.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/console.c b/ui/console.c index dd8e8db525..02a2

[PULL 06/52] ui/console: console_select() regardless of have_gfx

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau Even if we don't have a gfx listener, we should call displaychangelistener_display_console() which handle that case correctly. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-7-marcandre.lur...@redhat.com> --- ui/con

[PULL 38/52] ui/console: assert(surface) where appropriate

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau The QemuTextConsole code paths assume a surface is being used as scanout, let's make this more explicit. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-39-marcandre.lur...@redhat.com> --- ui/console.c | 4 1 fi

[PULL 08/52] ui/console: drop have_gfx

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau All usages have been removed. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-9-marcandre.lur...@redhat.com> --- ui/console.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/ui/console.c b/ui/console.c inde

[PULL 02/52] ui: remove qemu_pixman_linebuf_copy()

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau Since commit 43c7d8bd449 ("console: add qemu_pixman_linebuf_copy"), it seems it was never used. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-3-marcandre.lur...@redhat.com> --- include/ui/qemu-pixman.h | 2 -- ui/q

[PULL 43/52] ui/vc: do not parse VC-specific options in Spice and GTK

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau In commit 6f974c843c ("gtk: overwrite the console.c char driver"), I shared the VC console parse handler with GTK. And later on in commit d8aec9d9 ("display: add -display spice-app launching a Spice client"), I also used it to handle spice-app VC. This is not necessary, t

[PULL 03/52] ui/qmp: move screendump to ui-qmp-cmds.c

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau console.c unit is over-crowded. This code is specific to the handling of the QMP screendump command, so move it in ui-qmp-cmds. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-4-marcandre.lur...@redhat.com> --- inclu

[PULL 46/52] ui/vnc-enc-hextile: Use static rather than dynamic length stack array

2023-09-04 Thread marcandre . lureau
From: Peter Maydell In the send_hextile_tile_* function we create a variable length array data[]. In fact we know that the client_pf.bytes_per_pixel is at most 4 (enforced by set_pixel_format()), so we can make the array a compile-time fixed length of 1536 bytes. The codebase has very few VLAs,

[PULL 40/52] ui/vc: skip text console resize when possible

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau This function is called on invalidate, on each cursor blink. Avoid the extra copy when the console size didn't change. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-41-marcandre.lur...@redhat.com> --- ui/console.c

[PULL 23/52] ui/console: specialize console_lookup_unused()

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau graphics_console_init() is expected to return a graphic console. The function doesn't need to be exported. We are going to specialize further QemuGraphicConsole & QemuTextConsole. The two will not be interchangeable anymore. Signed-off-by: Marc-André Lureau Reviewed-by

[PULL 19/52] ui/console: introduce different console objects

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau Boilerplate code to introduce different object types for the different console types. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-20-marcandre.lur...@redhat.com> --- ui/console.c | 84

[PULL 30/52] ui/vc: fold text_console_do_init() in vc_chr_open()

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Message-Id: <20230830093843.3531473-31-marcandre.lur...@redhat.com> --- ui/console.c | 80 1 file changed, 31 insertions(+), 49 deletions(-) diff --git a/ui/console.c b/ui/console.c in

[PULL 14/52] ui/vc: fold text_update_xy()

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-15-marcandre.lur...@redhat.com> --- ui/console.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/ui/console.c b/ui/console.c index d185

[PULL 29/52] ui/console: move graphic fields to QemuGraphicConsole

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau Move fields specific to graphic console to the console subclass. qemu_console_get_head() is adapated to accomodate QemuTextConsole, and always returns 0. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-30-marcandre.l

[PULL 42/52] ui/vc: move text console invalidate in helper

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau This will allow to split the VC code in a separate unit more easily. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-43-marcandre.lur...@redhat.com> --- include/ui/console.h | 1 + ui/console.c | 13

[PULL 41/52] ui/console: minor stylistic changes

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-42-marcandre.lur...@redhat.com> --- ui/console.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ui/console.c b/ui/console.c index 4ee3b77

[PULL 25/52] ui/console: allocate ui_timer in QemuConsole

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau Although at this point only QemuGraphicConsole have hw_ops that implements ui_info() callback, it makes sense to keep the code in the base QemuConsole, to simplify conditions for the caller. As of now, the code didn't reach a NULL timer because dpy_set_ui_info() checks if

[PULL 34/52] ui/vc: use common text console surface creation

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-35-marcandre.lur...@redhat.com> --- ui/console.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/ui/console.c b/ui/console.c index a3fd1c505

[PULL 51/52] ui/vdagent: Unregister input handler of mouse during finalization

2023-09-04 Thread marcandre . lureau
From: Guoyi Tu Input handler resource should be released when VDAgentChardev object finalize Signed-off-by: Guoyi Tu Signed-off-by: dengpengcheng Reviewed-by: Marc-André Lureau Message-Id: --- ui/vdagent.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/vdagent.c b/ui/vdagent.c i

[PULL 44/52] ui/vc: change the argument for QemuTextConsole

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau Those functions are specifc to text/vc console, make that explicit from the argument type. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-45-marcandre.lur...@redhat.com> --- include/ui/console.h | 6 +++--- ui/cons

[PULL 47/52] ui/vnc-enc-tight: Avoid dynamic stack allocation

2023-09-04 Thread marcandre . lureau
From: Philippe Mathieu-Daudé Use autofree heap allocation instead of variable-length array on the stack. The codebase has very few VLAs, and if we can get rid of them all we can make the compiler error on new additions. This is a defensive measure against security bugs where an on-stack dynamic

[PULL 37/52] ui/console: rename vga_ functions with qemu_console_

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau They are not specific to VGA. Let's use the object type name as prefix instead, to avoid confusion. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230830093843.3531473-38-marcandre.lur...@redhat.com>

[PULL 24/52] ui/console: update the head from unused QemuConsole

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau When recycling unused QemuConsole, we should still set the associated head number for correct information and lookups. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-25-marcandre.lur...@redhat.com> --- ui/console.c

[PULL 27/52] ui/console: free more QemuConsole resources

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau This code path is probably not executed at this point, since console aren't being released. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-28-marcandre.lur...@redhat.com> --- ui/console.c | 5 - 1 file changed,

[PULL 48/52] ui/dbus: Properly dispose touch/mouse dbus objects

2023-09-04 Thread marcandre . lureau
From: Bilal Elmoussaoui Fixes: 142ca628a7 ("ui: add a D-Bus display backend") Fixes: de9f844ce2 ("ui/dbus: Expose a touch device interface") Signed-off-by: Bilal Elmoussaoui Reviewed-by: Marc-André Lureau Message-Id: <20230901124507.94087-1-belmo...@redhat.com> --- ui/dbus-console.c | 2 ++ 1

[PULL 52/52] ui/gtk: fix leaks found wtih fuzzing

2023-09-04 Thread marcandre . lureau
From: Dmitry Frolov It is true, that there is no problem during runtime from the first sight, because the memory is lost just before qemu exits. Nevertheless, this change is necessary, because AddressSanitizer is not able to recognize this situation and produces crash-report (which is false-posit

[PULL 33/52] ui/console: remove need for g_width/g_height

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-34-marcandre.lur...@redhat.com> --- ui/console.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ui/console.c b/ui/console.c index 70e11f924d

[PULL 26/52] ui/vc: move cursor_timer initialization to QemuTextConsole class

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau The timer is only relevant when a text console exists. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-27-marcandre.lur...@redhat.com> --- ui/console.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) dif

[PULL 50/52] ui/vdagent: call vdagent_disconnect() when agent connection is lost

2023-09-04 Thread marcandre . lureau
From: Guoyi Tu when the agent connection is lost, the input handler of the mouse doesn't deactivate, which results in unresponsive mouse events in VNC windows. To fix this issue, call vdagent_disconnect() to reset the state each time the frontend disconncect Signed-off-by: Guoyi Tu Signed-off-

[PULL 12/52] ui/vc: move VCChardev declaration at the top

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau To allow easier refactoring in following patches. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-13-marcandre.lur...@redhat.com> --- ui/console.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) d

[PULL 39/52] ui/console: fold text_console_update_cursor_timer

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230830093843.3531473-40-marcandre.lur...@redhat.com> --- ui/console.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ui/c

[PULL 49/52] ui/dbus: implement damage regions for GL

2023-09-04 Thread marcandre . lureau
From: Bilal Elmoussaoui Currently, when using `-display dbus,gl=on` all updates to the client become "full scanout" updates, meaning there is no way for the client to limit damage regions to the display server. Instead of using an "update count", this patch tracks the damage region and propagate

Re: [PATCH] migrate/ram: let ram_save_target_page_legacy() return if qemu file got error

2023-09-04 Thread Guoyi Tu
Hi Juan, what do you think of this patch? Can it be merged into the upstream? On 2023/8/15 15:21, Guoyi Tu wrote: When the migration process of a virtual machine using huge pages is cancelled, QEMU will continue to complete the processing of the current huge page through the qemu file object go

[PULL 45/52] ui/spice-display: Avoid dynamic stack allocation

2023-09-04 Thread marcandre . lureau
From: Peter Maydell Use an autofree heap allocation instead of a variable-length array on the stack in qemu_spice_create_update(). The codebase has very few VLAs, and if we can get rid of them all we can make the compiler error on new additions. This is a defensive measure against security bugs

[PULL 32/52] ui/console: simplify getting active_console size

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau We can get the active console dimension regardless of its kind, by simply giving NULL as argument. It will fallback with the given value when the dimensions aren't known. This will also allow to move the code in a separate unit more easily. Signed-off-by: Marc-André Lure

[PULL 35/52] ui/console: declare console types in console.h

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau We are going to split the console.c unit next, and implement separately. But we need to check the underlying type in various places. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-36-marcandre.lur...@redhat.com> ---

Re: [PATCH v8 03/12] virtio-sound: handle control messages and streams

2023-09-04 Thread Manos Pitsidianakis
On Mon, 04 Sep 2023 14:30, Philippe Mathieu-Daudé wrote: On 4/9/23 13:00, Manos Pitsidianakis wrote: On Mon, 04 Sep 2023 13:46, Philippe Mathieu-Daudé wrote: +    size_t sz = iov_to_buf(cmd->elem->out_sg, +   cmd->elem->out_num, +   0, +

[PULL 07/52] ui/console: call dpy_gfx_update() regardless of have_gfx

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau The function will handle the case when no listeners are gfx, without extra meaningful cost. This allows to get rid of DisplayState dependency in VC implementation. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-8-ma

Re: [PATCH] arm64: Restore trapless ptimer access

2023-09-04 Thread Claudio Fontana
On 9/4/23 13:07, Andrew Jones wrote: > On Mon, Sep 04, 2023 at 10:18:05AM +0200, Claudio Fontana wrote: >> Hi, >> >> I think this discussion from ~2015 could potentially be be historically >> relevant for context, >> at the time we had the problem with CNTVOFF IIRC so KVM_REG_ARM_TIMER_CNT >> bei

[PULL 28/52] ui/vc: move text fields to QemuTextConsole

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau Now we can instantiate the specific console with its own fields. Pass the most appropriate type to the various functions, and cast up to QEMU_CONSOLE as necessary. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-29-ma

[PULL 36/52] ui/console: use QEMU_PIXMAN_COLOR helpers

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau QEMU_RGB macro is actually defining a pixman color. Make this explicit in the macro name. Move it to qemu-pixman.h so it can be used elsewhere, as done in the following patch. Finally, define QEMU_PIXMAN_COLOR_{BLACK,GRAY}, to avoid need to look up the VGA color table from

[PULL 31/52] ui/vc: move some text console initialization to qom handlers

2023-09-04 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-32-marcandre.lur...@redhat.com> --- ui/console.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/ui/console.c b/ui/console.c

Re: [PATCH v8 00/12] Add VIRTIO sound card

2023-09-04 Thread Alex Bennée
Manos Pitsidianakis writes: > Hello Volker :) > > On Mon, 04 Sep 2023 10:20, Volker Rümelin wrote: >>All qemu_log_mask() format strings need a trailing \n. > > Thank you, will fix it! > >> I still hear a lot of playback dropouts. I had planned to look at >> the playback code, but I didn't have

Re: [PATCH v8 03/12] virtio-sound: handle control messages and streams

2023-09-04 Thread Philippe Mathieu-Daudé
On 4/9/23 13:46, Manos Pitsidianakis wrote: On Mon, 04 Sep 2023 14:30, Philippe Mathieu-Daudé wrote: On 4/9/23 13:00, Manos Pitsidianakis wrote: On Mon, 04 Sep 2023 13:46, Philippe Mathieu-Daudé wrote: +    size_t sz = iov_to_buf(cmd->elem->out_sg, +   cmd->elem->out_

Re: [PATCH] roms: Support compile the efi bios for loongarch

2023-09-04 Thread lixianglai
On 9/4/23 7:42 PM, Gerd Hoffmann wrote: Hi, The loongarch cross-compilation tool on the fedora38 operating system is a bit old, The gcc 12 -> 13 update for the cross compilers landed meanwhile, right now we have: binutils-loongarch64-linux-gnu.x86_64 2.39-4.fc38@updates gcc

Re: [PATCH 45/67] ui/vc: remove kby_put_keysym() and update function calls

2023-09-04 Thread Marc-André Lureau
Hi On Thu, Aug 31, 2023 at 12:59 AM Akihiko Odaki wrote: > > On 2023/08/30 18:38, marcandre.lur...@redhat.com wrote: > > 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 m

[PATCH 02/13] hw/i386/pc: Include missing 'cpu.h' header

2023-09-04 Thread Philippe Mathieu-Daudé
Both pc_piix.c and pc_q35.c files use CPU_VERSION_LEGACY which is defined in "target/i386/cpu.h". Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 1 + hw/i386/pc_q35.c | 1 + 2 files changed, 2 insertions(+) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index ce1ac95274..f0d

[PATCH 00/13] target/i386: Cleanups around KVM declarations

2023-09-04 Thread Philippe Mathieu-Daudé
Hi, Mostly trivial cleanups. We want to have QEMU core code accel-agnostic. (In particular, removing the KVM specific fields from CPUState). This serie contains the x86 specific patches before starting with the generic KVM code. FWIW, I couldn't test the 'HVF only' configuration since I don't h

[PATCH 03/13] hw/i386/fw_cfg: Include missing 'cpu.h' header

2023-09-04 Thread Philippe Mathieu-Daudé
fw_cfg_build_feature_control() uses CPUID_EXT_VMX which is defined in "target/i386/cpu.h". Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/fw_cfg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c index 72a42f3c66..7362daa45a 100644 --- a/hw/i386/fw_cfg.c

[PATCH 01/13] hw/i386/pc: Include missing 'sysemu/tcg.h' header

2023-09-04 Thread Philippe Mathieu-Daudé
Since commit 6f529b7534 ("target/i386: move FERR handling to target/i386") pc_q35_init() calls tcg_enabled() which is declared in "sysemu/tcg.h". Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_q35.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c ind

[PATCH 04/13] target/i386/helper: Restrict KVM declarations to system emulation

2023-09-04 Thread Philippe Mathieu-Daudé
User emulation doesn't need any KVM declarations. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/helper.c b/target/i386/helper.c index 89aa696c6d..2070dd0dda 100644 --- a/target/i386/helper.c +++ b/ta

[PATCH 06/13] target/i386: Remove unused KVM stubs

2023-09-04 Thread Philippe Mathieu-Daudé
All these functions: - kvm_arch_get_supported_cpuid() - kvm_has_smm(() - kvm_hyperv_expand_features() - kvm_set_max_apic_id() are called after checking for kvm_enabled(), which is false when KVM is not built. Since the compiler elides these functions, their stubs are not used and can be remov

[PATCH 05/13] target/i386/cpu-sysemu: Inline kvm_apic_in_kernel()

2023-09-04 Thread Philippe Mathieu-Daudé
In order to have cpu-sysemu.c become accelerator-agnostic, inline kvm_apic_in_kernel() -- which is a simple wrapper to kvm_irqchip_in_kernel() -- and use the generic "sysemu/kvm.h" header. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/kvm/kvm_i386.h | 2 -- target/i386/cpu-sysemu.c | 4

[PATCH 10/13] sysemu/kvm: Restrict kvm_arch_get_supported_cpuid/msr() to x86 targets

2023-09-04 Thread Philippe Mathieu-Daudé
kvm_arch_get_supported_cpuid() / kvm_arch_get_supported_msr_feature() are only defined for x86 targets (in target/i386/kvm/kvm.c). Their declarations are pointless on other targets. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/kvm.h | 5 - target/i386/kvm/kvm_i386.h | 3 +++

[PATCH 13/13] sysemu/kvm: Restrict kvm_pc_setup_irq_routing() to x86 targets

2023-09-04 Thread Philippe Mathieu-Daudé
kvm_pc_setup_irq_routing() is only defined for x86 targets (in hw/i386/kvm/apic.c). Its declaration is pointless on all other targets. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/kvm.h | 1 - target/i386/kvm/kvm_i386.h | 2 ++ hw/i386/kvm/ioapic.c | 1 + 3 files changed,

[PATCH 09/13] target/i386: Restrict declarations specific to CONFIG_KVM

2023-09-04 Thread Philippe Mathieu-Daudé
Keep the function accessed by target/i386/ and hw/i386/ exposed, restrict the ones accessed by target/i386/kvm/. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/kvm/kvm_i386.h | 29 + 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/target/i386/kv

Re: CXL Namespaces of ACPI disappearing in Qemu demo

2023-09-04 Thread Jonathan Cameron via
On Mon, 4 Sep 2023 18:27:10 +0800 Yuquan Wang wrote: > Hi, Jonathan > Hi Yuquan Given this question isn't just ARM specific included qemu-devel in the cc list as that gets much wider reading than qemu-arm. > Due to my poor experience and knowledge on cxl development history, I am > sorry to

[PATCH 12/13] sysemu/kvm: Restrict kvm_has_pit_state2() to x86 targets

2023-09-04 Thread Philippe Mathieu-Daudé
kvm_has_pit_state2() is only defined for x86 targets (in target/i386/kvm/kvm.c). Its declaration is pointless on all other targets. Have it return a boolean. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/kvm.h | 1 - target/i386/kvm/kvm_i386.h | 1 + hw/i386/kvm/i8254.c|

[PATCH 11/13] sysemu/kvm: Restrict kvm_get_apic_state() to x86 targets

2023-09-04 Thread Philippe Mathieu-Daudé
kvm_get_apic_state() is only defined for x86 targets (in hw/i386/kvm/apic.c). Its declaration is pointless on all other targets. Since we include "linux-headers/asm-x86/kvm.h", no need to forward-declare 'struct kvm_lapic_state'. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/kvm.h

[PATCH 07/13] target/i386: Allow elision of kvm_enable_x2apic()

2023-09-04 Thread Philippe Mathieu-Daudé
Call kvm_enabled() before kvm_enable_x2apic() to let the compiler elide its call. Suggested-by: Daniel Henrique Barboza Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/intel_iommu.c | 2 +- hw/i386/x86.c | 2 +- target/i386/kvm/kvm-stub.c | 7 --- 3 files changed, 2 inse

[PATCH 08/13] target/i386: Allow elision of kvm_hv_vpindex_settable()

2023-09-04 Thread Philippe Mathieu-Daudé
Call kvm_enabled() before kvm_hv_vpindex_settable() to let the compiler elide its call. kvm-stub.c is now empty, remove it. Suggested-by: Daniel Henrique Barboza Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/x86.c | 2 +- target/i386/kvm/kvm-stub.c | 18 --

Re: [PATCH v2 3/3] gdbstub: replace exit(0) with proper shutdown

2023-09-04 Thread Clément Chigot
On Mon, Sep 4, 2023 at 11:42 AM Peter Maydell wrote: > > On Mon, 4 Sept 2023 at 10:36, Clément Chigot wrote: > > > > On Mon, Sep 4, 2023 at 11:23 AM Peter Maydell > > wrote: > > > > > > On Wed, 23 Aug 2023 at 08:07, Clément Chigot wrote: > > > > > > > > This replaces the exit(0) call by a shut

Re: [PATCH 45/67] ui/vc: remove kby_put_keysym() and update function calls

2023-09-04 Thread Akihiko Odaki
On 2023/09/04 21:42, Marc-André Lureau wrote: Hi On Thu, Aug 31, 2023 at 12:59 AM Akihiko Odaki wrote: On 2023/08/30 18:38, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau The function calls to `kbd_put_keysym` have been updated to now call `kbd_put_keysym_console` with a NULL c

Re: [PATCH 01/11] tcg: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
On 1/9/23 02:38, Richard Henderson wrote: On 8/31/23 15:55, Philippe Mathieu-Daudé wrote: -    MemOp op = get_memop(oi); +    MemOp o = get_memop(oi); mop would be a more descriptive replacement. I went with that first, but then noticed 'MemOpIdx oi' and renam

Re: [PATCH v2,1/1] memory: avoid updating ioeventfds for some address_space

2023-09-04 Thread hongmainquan
Friendly ping... Hello, this patch has already received a R-b from PeterXu. Could you please help me review it as well and see if there are any issues? If everything is fine, could you please consider merging it? Thank you! 在 2023/8/30 11:29 上午, hongmianquan 写道: When updating ioeventfds, we

Re: [PATCH 10/11] net/eth: Clean up local variable shadowing

2023-09-04 Thread Philippe Mathieu-Daudé
On 1/9/23 09:07, Akihiko Odaki wrote: On 2023/09/01 7:56, Philippe Mathieu-Daudé wrote: Fix:    net/eth.c:435:20: error: declaration shadows a local variable [-Werror,-Wshadow] size_t input_size = iov_size(pkt, pkt_frags);     ^    net/eth.c:413:16: note: previous

Re: [PATCH 49/67] ui/vc: split off the VC part from console.c

2023-09-04 Thread Marc-André Lureau
Hi On Fri, Sep 1, 2023 at 9:23 PM Daniel P. Berrangé wrote: > > On Wed, Aug 30, 2023 at 01:38:23PM +0400, marcandre.lur...@redhat.com wrote: > > 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,

Re: [PATCH 50/67] ui/console: move DisplaySurface to its own header

2023-09-04 Thread Marc-André Lureau
Hi On Fri, Sep 1, 2023 at 9:24 PM Daniel P. Berrangé wrote: > > On Wed, Aug 30, 2023 at 01:38:24PM +0400, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > Mostly for readability reasons. > > > > Signed-off-by: Marc-André Lureau > > --- > > include/ui/console.h | 84 +-

Re: [PATCH 50/67] ui/console: move DisplaySurface to its own header

2023-09-04 Thread Daniel P . Berrangé
On Mon, Sep 04, 2023 at 04:59:31PM +0400, Marc-André Lureau wrote: > Hi > > On Fri, Sep 1, 2023 at 9:24 PM Daniel P. Berrangé wrote: > > > > On Wed, Aug 30, 2023 at 01:38:24PM +0400, marcandre.lur...@redhat.com wrote: > > > From: Marc-André Lureau > > > > > > Mostly for readability reasons. > >

Re: [PATCH 49/67] ui/vc: split off the VC part from console.c

2023-09-04 Thread Daniel P . Berrangé
On Mon, Sep 04, 2023 at 04:57:45PM +0400, Marc-André Lureau wrote: > Hi > > On Fri, Sep 1, 2023 at 9:23 PM Daniel P. Berrangé wrote: > > > > On Wed, Aug 30, 2023 at 01:38:23PM +0400, marcandre.lur...@redhat.com wrote: > > > From: Marc-André Lureau > > > > > > Move common declarations to console-

Re: [PATCH v2 05/19] host-utils: Add muldiv64_round_up

2023-09-04 Thread Nicholas Piggin
On Sat Sep 2, 2023 at 3:02 AM AEST, Richard Henderson wrote: > On 9/1/23 04:51, Cédric Le Goater wrote: > > Adding more reviewers since this patch is modifying a common service. > > > > Thanks, > > > > C. > > > > > > On 8/8/23 06:19, Nicholas Piggin wrote: > >> This will be used for converting

Re: [PATCH v2 08/19] target/ppc: Sign-extend large decrementer to 64-bits

2023-09-04 Thread Nicholas Piggin
On Fri Sep 1, 2023 at 10:25 PM AEST, Cédric Le Goater wrote: > Nick, > > On 8/8/23 06:19, Nicholas Piggin wrote: > > When storing a large decrementer value with the most significant > > implemented bit set, it is to be treated as a negative and sign > > extended. > > > > This isn't hit for book3s

Re: [PATCH v5 00/20] linux-user: Implement VDSOs

2023-09-04 Thread Alex Bennée
Helge Deller writes: > On 8/31/23 09:57, Alex Bennée wrote: >> >> Richard Henderson writes: >> >>> On 8/30/23 07:52, Helge Deller wrote: On 8/30/23 00:02, Richard Henderson wrote: > Changes for v5: >    * Integrated cross-compile, via new build-vdso.sh and meson rules. >    

[PATCH 0/4] hw/cxl: Minor CXL emulation fixes and cleanup

2023-09-04 Thread Jonathan Cameron via
A small set gathering patches that have been posted and reviewed on list over the last few months. Looking to get these upstream before making any significant changes to the CXL emulation for this cycle. More wide spread cleanup will follow later this cycle (reference updates to available spec and

[PATCH 1/4] hw/cxl: Fix CFMW config memory leak

2023-09-04 Thread Jonathan Cameron via
From: Li Zhijian Allocate targets and targets[n] resources when all sanity checks are passed to avoid memory leaks. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Li Zhijian Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jonathan Cameron --- hw/cxl/cxl-host.c | 12 ++-- 1 f

[PATCH 2/4] hw/pci-bridge/cxl_upstream: Fix bandwidth entry base unit for SSLBIS

2023-09-04 Thread Jonathan Cameron via
From: Dave Jiang According to ACPI spec 6.5 5.2.28.4 System Locality Latency and Bandwidth Information Structure, if the "Entry Base Unit" is 1024 for BW and the matrix entry has the value of 100, the BW is 100 GB/s. So the entry_base_unit should be changed from 1000 to 1024 given the comment not

Re: [PATCH] softmmu/dirtylimit: Fix usleep early return on signal

2023-09-04 Thread Yong Huang
On Fri, Sep 1, 2023 at 10:19 AM wrote: > From: alloc > > Timeout functions like usleep can return early on signal, which reduces > more dirty pages than expected. In dirtylimit case, dirtyrate meter > thread needs to kick all vcpus out to sync. The callchain: > > vcpu_calculate_dirtyrate > g

[PATCH 3/4] hw/cxl/cxl_device: Replace magic number in CXLError definition

2023-09-04 Thread Jonathan Cameron via
From: Fan Ni Replace the magic number 32 with CXL_RAS_ERR_HEADER_NUM for better code readability and maintainability. Signed-off-by: Fan Ni Reviewed-by: Davidlohr Bueso Reviewed-by: Dave Jiang Signed-off-by: Jonathan Cameron --- include/hw/cxl/cxl_device.h | 2 +- 1 file changed, 1 insertio

[PATCH 4/4] docs/cxl: Change to lowercase as others

2023-09-04 Thread Jonathan Cameron via
From: Li Zhijian Using the same style as elsewhere for topology / topo Signed-off-by: Li Zhijian Link: https://lore.kernel.org/r/20230519085802.2106900-2-lizhij...@cn.fujitsu.com Signed-off-by: Jonathan Cameron --- docs/system/devices/cxl.rst | 8 1 file changed, 4 insertions(+), 4

Re: [PATCH v2 05/19] host-utils: Add muldiv64_round_up

2023-09-04 Thread Cédric Le Goater
On 9/4/23 15:07, Nicholas Piggin wrote: On Sat Sep 2, 2023 at 3:02 AM AEST, Richard Henderson wrote: On 9/1/23 04:51, Cédric Le Goater wrote: Adding more reviewers since this patch is modifying a common service. Thanks, C. On 8/8/23 06:19, Nicholas Piggin wrote: This will be used for conve

Re: [PATCH 07/13] target/i386: Allow elision of kvm_enable_x2apic()

2023-09-04 Thread Paolo Bonzini
On 9/4/23 14:43, Philippe Mathieu-Daudé wrote: Call kvm_enabled() before kvm_enable_x2apic() to let the compiler elide its call. Suggested-by: Daniel Henrique Barboza Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/intel_iommu.c | 2 +- hw/i386/x86.c | 2 +- target/i386

Re: [PATCH 54/67] ui/vc: console-vc requires PIXMAN

2023-09-04 Thread Marc-André Lureau
Hi On Fri, Sep 1, 2023 at 9:28 PM Daniel P. Berrangé wrote: > > On Wed, Aug 30, 2023 at 01:38:28PM +0400, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > Add stubs for the fallback paths. > > > > Signed-off-by: Marc-André Lureau > > --- > > ui/console-vc-stubs.c | 59 +++

Re: [PATCH 07/13] target/i386: Allow elision of kvm_enable_x2apic()

2023-09-04 Thread Philippe Mathieu-Daudé
On 4/9/23 15:40, Paolo Bonzini wrote: On 9/4/23 14:43, Philippe Mathieu-Daudé wrote: Call kvm_enabled() before kvm_enable_x2apic() to let the compiler elide its call. Suggested-by: Daniel Henrique Barboza Signed-off-by: Philippe Mathieu-Daudé ---   hw/i386/intel_iommu.c  | 2 +-   hw/i386/

Re: [PATCH 54/67] ui/vc: console-vc requires PIXMAN

2023-09-04 Thread Daniel P . Berrangé
On Mon, Sep 04, 2023 at 05:41:23PM +0400, Marc-André Lureau wrote: > Hi > > On Fri, Sep 1, 2023 at 9:28 PM Daniel P. Berrangé wrote: > > > > On Wed, Aug 30, 2023 at 01:38:28PM +0400, marcandre.lur...@redhat.com wrote: > > > From: Marc-André Lureau > > > > > > Add stubs for the fallback paths. >

Re: [PATCH 2/4] hw/pci-bridge/cxl_upstream: Fix bandwidth entry base unit for SSLBIS

2023-09-04 Thread Philippe Mathieu-Daudé
On 4/9/23 15:28, Jonathan Cameron wrote: From: Dave Jiang According to ACPI spec 6.5 5.2.28.4 System Locality Latency and Bandwidth Information Structure, if the "Entry Base Unit" is 1024 for BW and the matrix entry has the value of 100, the BW is 100 GB/s. So the entry_base_unit should be chan

Re: [PATCH 3/4] hw/cxl/cxl_device: Replace magic number in CXLError definition

2023-09-04 Thread Philippe Mathieu-Daudé
On 4/9/23 15:28, Jonathan Cameron wrote: From: Fan Ni Replace the magic number 32 with CXL_RAS_ERR_HEADER_NUM for better code readability and maintainability. Thanks :) Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Fan Ni Reviewed-by: Davidlohr Bueso Reviewed-by: Dave Jiang Signed

Re: [PATCH 4/4] docs/cxl: Change to lowercase as others

2023-09-04 Thread Philippe Mathieu-Daudé
On 4/9/23 15:28, Jonathan Cameron wrote: From: Li Zhijian Using the same style as elsewhere for topology / topo Signed-off-by: Li Zhijian Link: https://lore.kernel.org/r/20230519085802.2106900-2-lizhij...@cn.fujitsu.com Signed-off-by: Jonathan Cameron --- docs/system/devices/cxl.rst | 8 +

[risu PATCH 3/4] s390x: Add basic risugen perl module for s390x

2023-09-04 Thread Thomas Huth
This implements support for simple 16-bit and 32-bit instructions. Support for 48-bit instructions and support for load/store memory instructions is not implemented yet. Signed-off-by: Thomas Huth --- risugen_s390x.pm | 194 +++ 1 file changed, 194 ins

  1   2   3   4   >