[RFC PATCH 5/7] migration/multifd: Isolate ram pages packet data

2024-06-20 Thread Fabiano Rosas
While we cannot yet disentangle the multifd packet from page data, we can make the code a bit cleaner by setting the page-related fields in a separate function. Signed-off-by: Fabiano Rosas --- migration/multifd.c | 104 +--- 1 file changed, 68 insertions(

[RFC PATCH 7/7] migration/multifd: Hide multifd slots implementation

2024-06-20 Thread Fabiano Rosas
The only two things the multifd client needs to access are the active slot and the active slot size: The active slot itself is obviously needed because it's where the data is put. The slot size is needed only by the ram pages code, because it does not fill the data slot and sends it in one go, it

[RFC PATCH 2/7] migration/multifd: Pass in MultiFDPages_t to file_write_ramblock_iov

2024-06-20 Thread Fabiano Rosas
We want to stop dereferencing 'pages' so it can be replaced by an opaque pointer in the next patches. Signed-off-by: Fabiano Rosas --- migration/file.c| 3 ++- migration/file.h| 2 +- migration/multifd.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/migration/fil

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

2024-06-20 Thread Fabiano Rosas
Hi folks, First of all, apologies for the roughness of the series. I'm off for the next couple of weeks and wanted to put something together early for your consideration. This series is a refactoring (based on an earlier, off-list attempt[0]), aimed to remove the usage of the MultiFDPages_t type

standardizing i2c device ids

2024-06-20 Thread Patrick Leis
Corey and Peter, My team builds lots of configurations for Qemu boards, and one pain point has been that the qom path for a device depends on the device insertion order, child[0], child[1] and the like. I noticed that the qdev paths for devices also exist by their device id property. By default,

[RFC PATCH 4/4] ui/gtk-gl-draw: Start rendering of guest blob scanout if render_sync is off

2024-06-20 Thread dongwon . kim
From: Dongwon Kim Draw (executing glBlitFramebuffer) immediately as soon as the frame is flushed instead of getting it done in the next draw event if render_sync flag is reset. With this, the fence will be signaled way ealier so the guest can be working on the next frame right away. Cc: Marc-And

[RFC PATCH 2/4] ui/egl-helpers: Consolidates create-sync and create-fence

2024-06-20 Thread dongwon . kim
From: Dongwon Kim There is no reason to split those two operations so combining two functions - egl_dmabuf_create_sync and egl_dmabuf_create_fence. Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- include/ui/egl-helpers.h | 3 +-- ui/egl-helpers.c

[RFC PATCH 1/4] hw/display/virtio-gpu: Introducing render_sync param

2024-06-20 Thread dongwon . kim
From: Dongwon Kim Introducing new virtio-gpu param, 'render_sync' when guest scanout blob is used (blob=true). The new param is used to specify when to start rendering a guest scanout frame. By default (and so far) rendering of the guest frame is started in the draw event to make sure guest disp

[RFC PATCH 3/4] ui/gtk-egl: Start rendering of guest blob scanout if render_sync is off

2024-06-20 Thread dongwon . kim
From: Dongwon Kim Draw (executing glBlitFramebuffer) immediately as soon as the frame is flushed instead of getting it done in the next draw event if render_sync flag is reset. With this, the fence will be signaled way ealier so the guest can be working on the next frame right away. Cc: Gerd Hof

[RFC PATCH 0/4] hw/display/virtio-gpu: Introducing asynchronous guest display render

2024-06-20 Thread dongwon . kim
From: Dongwon Kim Introducing new virtio-gpu param, 'render_sync' when guest scanout blob is used (blob=true). The new param is used to specify when to start rendering a guest scanout frame. By default (and so far) rendering of the guest frame is started in the draw event to make sure guest disp

[PATCH] mips: pass code of conditional trap

2024-06-20 Thread YunQiang Su
Linux and We use the code of conditional trap instructions to emit signals other than simple SIGTRAP. Currently, code 6 (overflow), 7 (div by zero) are supported. It means that if code 7 is used with a conditional trap instruction, a SIGFPE instead of SIGTRAP will emit. But when `gen_trap` we did

Re: [PATCH v4] hw/gpio/aspeed: Add reg_table_count to AspeedGPIOClass

2024-06-20 Thread Andrew Jeffery
On Thu, 2024-06-20 at 16:02 +0200, Zheyu Ma wrote: > ASan detected a global-buffer-overflow error in the aspeed_gpio_read() > function. This issue occurred when reading beyond the bounds of the > reg_table. > > To enhance the safety and maintainability of the Aspeed GPIO code, this commit > introd

Re: [PATCH] mips: pass code of conditional trap

2024-06-20 Thread Maciej W. Rozycki
On Fri, 21 Jun 2024, YunQiang Su wrote: > Linux and We use the code of conditional trap instructions to emit > signals other than simple SIGTRAP. Currently, code 6 (overflow), > 7 (div by zero) are supported. It means that if code 7 is used with > a conditional trap instruction, a SIGFPE instead

Re: [PATCH v3 1/9] gdbstub: Clean up process_string_cmd

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

Re: [PATCH] mips: pass code of conditional trap

2024-06-20 Thread YunQiang Su
Maciej W. Rozycki 于2024年6月21日周五 08:41写道: > > On Fri, 21 Jun 2024, YunQiang Su wrote: > > > Linux and We use the code of conditional trap instructions to emit > > signals other than simple SIGTRAP. Currently, code 6 (overflow), > > 7 (div by zero) are supported. It means that if code 7 is used wit

Re: [PATCH] hw/riscv/virt.c: Make block devices default to virtio

2024-06-20 Thread Alistair Francis
On Thu, Jun 20, 2024 at 4:48 PM Sunil V L wrote: > > RISC-V virt is currently missing default type for block devices. Without > this being set, proper backend is not created when option like -cdrom > is used. So, make the virt board's default block device type be > IF_VIRTIO similar to other archi

Re: [PATCH] hw/riscv/virt.c: Make block devices default to virtio

2024-06-20 Thread Alistair Francis
On Thu, Jun 20, 2024 at 4:48 PM Sunil V L wrote: > > RISC-V virt is currently missing default type for block devices. Without > this being set, proper backend is not created when option like -cdrom > is used. So, make the virt board's default block device type be > IF_VIRTIO similar to other archi

Re: Failed to hot-plug device to pxb bridge

2024-06-20 Thread Gao,Shiyuan
Sorry for not replying earlier, I have been busy with other things. > > Hi Igor, Daniel and all: > > > > > > https://lore.kernel.org/all/20220422135101.65796...@redhat.com/t/#r831d589f243c24334a09995620b74408847a87a0 > > > > This message discuss hotplug device to pxb bridge. At the end, Igor >

Re: [PATCH v3 qemu 00/11] acpi: NUMA nodes for CXL HB as GP + complex NUMA test

2024-06-20 Thread Huang, Ying
Hi, Jonathan, Jonathan Cameron writes: > v3: Thanks to Richard for help debugging BE issue and to Igor for > finding a bunch of other thing to improve via the context in > the fix patch. > > - Fix the big endian host/little endian guest issue in the HID being > written to the Gene

Re: [PATCH v2 2/6] target/riscv: Introduce extension implied rule helpers

2024-06-20 Thread Alistair Francis
On Sun, Jun 16, 2024 at 12:48 PM wrote: > > From: Frank Chang > > Introduce helpers to enable the extensions based on the implied rules. > The implied extensions are enabled recursively, so we don't have to > expand all of them manually. This also eliminates the old-fashioned > ordering requireme

Re: [PATCH] target/riscv: Fix froundnx.h nanbox check

2024-06-20 Thread Alistair Francis
On Sun, Jun 9, 2024 at 3:32 PM Branislav Brzak wrote: > > helper_froundnx_h function mistakenly uses single percision nanbox > check instead of the half percision one. This patch fixes the issue. > > Signed-off-by: Branislav Brzak Reviewed-by: Alistair Francis Alistair > --- > target/riscv/f

Re: [PATCH] mips: pass code of conditional trap

2024-06-20 Thread Richard Henderson
On 6/20/24 16:46, YunQiang Su wrote: @@ -4553,7 +4559,7 @@ static void gen_trap(DisasContext *ctx, uint32_t opc, if (ctx->hflags != ctx->saved_hflags) { tcg_gen_movi_i32(hflags, ctx->hflags); } -generate_exception(ctx, EXCP_TRAP); +generate_except

Re: [PATCH] target/riscv: Fix froundnx.h nanbox check

2024-06-20 Thread Richard Henderson
On 6/8/24 14:45, Branislav Brzak wrote: t/riscv/fpu_helper.c b/target/riscv/fpu_helper.c index 871a70a316..91b1a56d10 100644 --- a/target/riscv/fpu_helper.c +++ b/target/riscv/fpu_helper.c @@ -676,7 +676,7 @@ uint64_t helper_fround_h(CPURISCVState *env, uint64_t rs1) uint64_t helper_froundnx

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

2024-06-20 Thread Richard Henderson
On 6/16/24 23:28, Gustavo Romero wrote: +static char *extended_qsupported_features; +void gdb_extend_qsupported_features(char *qsupported_features) +{ +extended_qsupported_features = qsupported_features; +} Assert these functions aren't called twice. That should be good enough until we need

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

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

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

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

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

2024-06-20 Thread Richard Henderson
On 6/16/24 23:28, Gustavo Romero wrote: Factor out the code used for setting the MTE TCF0 field from the prctl code into a convenient function. Other subsystems, like gdbstub, need to set this field as well, so keep it as a separate function to avoid duplication and ensure consistency in how this

Re: [PATCH] mips: pass code of conditional trap

2024-06-20 Thread YunQiang Su
Richard Henderson 于2024年6月21日周五 12:21写道: > > On 6/20/24 16:46, YunQiang Su wrote: > > @@ -4553,7 +4559,7 @@ static void gen_trap(DisasContext *ctx, uint32_t opc, > > if (ctx->hflags != ctx->saved_hflags) { > > tcg_gen_movi_i32(hflags, ctx->hflags); > > } > > -

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

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

Re: [PATCH] target/riscv: Fix froundnx.h nanbox check

2024-06-20 Thread Alistair Francis
On Sun, Jun 9, 2024 at 3:32 PM Branislav Brzak wrote: > > helper_froundnx_h function mistakenly uses single percision nanbox > check instead of the half percision one. This patch fixes the issue. > > Signed-off-by: Branislav Brzak Thanks! Applied to riscv-to-apply.next Alistair > --- > targe

[PATCH v1] memory tier: consolidate the initialization of memory tiers

2024-06-20 Thread Ho-Ren (Jack) Chuang
If we simply move the set_node_memory_tier() from memory_tier_init() to late_initcall(), it will result in HMAT not registering the mt_adistance_algorithm callback function, because set_node_memory_tier() is not performed during the memory tiering initialization phase, leading to a lack of correct

Re: [PATCH v4] hw/gpio/aspeed: Add reg_table_count to AspeedGPIOClass

2024-06-20 Thread Cédric Le Goater
On 6/20/24 4:02 PM, Zheyu Ma wrote: ASan detected a global-buffer-overflow error in the aspeed_gpio_read() function. This issue occurred when reading beyond the bounds of the reg_table. To enhance the safety and maintainability of the Aspeed GPIO code, this commit introduces a reg_table_count me

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

2024-06-20 Thread Alistair Francis
On Wed, Jun 12, 2024 at 1:25 PM Ethan Chen via wrote: > > If a requestor device is connected to the IOPMP device, its memory access will > be checked by the IOPMP rule. > > - Add 'iopmp=on' option to add an iopmp device and make the Generic PCI > Express > Bridge connect to IOPMP. I have only

Re: standardizing i2c device ids

2024-06-20 Thread Philippe Mathieu-Daudé
Hi Patrick, On 21/6/24 00:03, Patrick Leis wrote: Corey and Peter, My team builds lots of configurations for Qemu boards, and one pain point has been that the qom path for a device depends on the device insertion order, child[0], child[1] and the like.  I noticed that the qdev paths for devi

Re: [PATCH v2] exec: use char* for pointer arithmetic

2024-06-20 Thread Philippe Mathieu-Daudé
On 19/6/24 02:04, Roman Kiryanov wrote: void* pointer arithmetic is not in the C standard. This change allows using the QEMU headers with a C++ compiler. Google-Bug-Id: 331190993 Change-Id: I5a064853429f627c17a9213910811dea4ced6174 Signed-off-by: Roman Kiryanov --- v2: change `char*` into `char

Re: [PATCH 04/13] qapi/parser: preserve indentation in QAPIDoc sections

2024-06-20 Thread Markus Armbruster
John Snow writes: > On Thu, Jun 20, 2024, 11:07 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > On Wed, Jun 19, 2024, 8:03 AM Markus Armbruster wrote: >> > >> >> John Snow writes: >> >> >> >> > Change get_doc_indented() to preserve indentation on all subsequent text >> >> > lines,

Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST

2024-06-20 Thread Markus Armbruster
John Snow writes: > Apologies, I meant to do this but forgot there were two cases and only > nabbed one. > > Fixing. No problem at all!

Re: [PATCH v2] exec: don't use void* in pointer arithmetic in headers

2024-06-20 Thread Philippe Mathieu-Daudé
Hi Roman, On 20/6/24 22:16, Roman Kiryanov wrote: void* pointer arithmetic is a GCC extentension which could not be available in other build tools (e.g. C++). This changes removes this assumption. Google-Bug-Id: 331190993 Again [*] I'm trying to figure what this tag is, no hit on https://issu

Re: [PATCH v2 2/6] target/riscv: Introduce extension implied rule helpers

2024-06-20 Thread Frank Chang
On Fri, Jun 21, 2024 at 12:15 PM Alistair Francis wrote: > On Sun, Jun 16, 2024 at 12:48 PM wrote: > > > > From: Frank Chang > > > > Introduce helpers to enable the extensions based on the implied rules. > > The implied extensions are enabled recursively, so we don't have to > > expand all of t

<    1   2   3