Re: [PATCH 3/4] virtio-gpu: use a VMState variant for the scanout field

2024-05-10 Thread Marc-André Lureau
Hi Peter On Fri, May 10, 2024 at 9:33 PM Peter Xu wrote: > > Hi, Marc-André, > > On Fri, May 10, 2024 at 12:39:34PM +0400, Marc-André Lureau wrote: > > Since we don't have per VMSD version information on the wire, nested > > struct versioning is quite limited and cumbersome. I am not sure it > >

Re: [PATCH] target/riscv/cpu.c: fix Zvkb extension config

2024-05-10 Thread LIU Zhiwei
On 2024/5/11 12:58, Yangyu Chen wrote: This code has a typo that writes zvkb to zvkg, causing users can't enable zvkb through the config. This patch gets this fixed. Signed-off-by: Yangyu Chen Fixes: ea61ef7097d0 ("target/riscv: Move vector crypto extensions to riscv_cpu_extensions") --- t

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-05-10 Thread Jason Wang
On Fri, May 10, 2024 at 3:16 PM Eugenio Perez Martin wrote: > > On Fri, May 10, 2024 at 6:29 AM Jason Wang wrote: > > > > On Thu, May 9, 2024 at 3:10 PM Eugenio Perez Martin > > wrote: > > > > > > On Thu, May 9, 2024 at 8:27 AM Jason Wang wrote: > > > > > > > > On Thu, May 9, 2024 at 1:16 AM E

[PATCH v5 0/3] Add migration test for loongarch64

2024-05-10 Thread Bibo Mao
Migration test case is added for loongarch64 here. Since compat machine type is required for migration test case, also compat machine qemu 9.1 is added for loongarch virt machine. Migration test case passes to run in both tcg and kvm mode with the patch, 54 migration subtests passes in 188 seconds

[PATCH v5 3/3] tests: Add migration test for loongarch64

2024-05-10 Thread Bibo Mao
This patch adds migration test support for loongarch64. The test code comes from aarch64 mostly, only that it booted as bios in qemu since kernel requires elf format and bios uses binary format. In addition to providing the binary, this patch also includes the source code and the build script in t

[PATCH v5 2/3] hw/loongarch: Remove minimum and default memory size

2024-05-10 Thread Bibo Mao
Some qtest test cases such as numa use default memory size of generic machine class, which is 128M by fault. Here generic default memory size is used, and also remove minimum memory size which is 1G originally. Signed-off-by: Bibo Mao --- hw/loongarch/virt.c | 5 - 1 file changed, 5 deletio

[PATCH v5 1/3] hw/loongarch: Add compat machine for 9.1

2024-05-10 Thread Bibo Mao
Since migration test case requires compat machine type support, compat machine is added for qemu 9.1 here. Signed-off-by: Bibo Mao --- hw/loongarch/virt.c | 61 +++-- 1 file changed, 48 insertions(+), 13 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/

RE: [PATCH 1/3] migration/colo: Minor fix for colo error message

2024-05-10 Thread Zhang, Chen
> -Original Message- > From: Li Zhijian > Sent: Thursday, May 9, 2024 11:31 AM > To: Peter Xu ; Fabiano Rosas > Cc: Zhang, Hailiang ; qemu- > de...@nongnu.org; Zhang, Chen ; Li Zhijian > > Subject: [PATCH 1/3] migration/colo: Minor fix for colo error message > > - Explicitly show the

RE: [PATCH 3/3] migration/colo: Tidy up bql_unlock() around bdrv_activate_all()

2024-05-10 Thread Zhang, Chen
> -Original Message- > From: Li Zhijian > Sent: Thursday, May 9, 2024 11:31 AM > To: Peter Xu ; Fabiano Rosas > Cc: Zhang, Hailiang ; qemu- > de...@nongnu.org; Zhang, Chen ; Li Zhijian > ; Michael Tokarev > Subject: [PATCH 3/3] migration/colo: Tidy up bql_unlock() around > bdrv_activa

RE: [PATCH 2/3] migration/colo: make colo_incoming_co() return void

2024-05-10 Thread Zhang, Chen
> -Original Message- > From: Li Zhijian > Sent: Thursday, May 9, 2024 11:31 AM > To: Peter Xu ; Fabiano Rosas > Cc: Zhang, Hailiang ; qemu- > de...@nongnu.org; Zhang, Chen ; Li Zhijian > > Subject: [PATCH 2/3] migration/colo: make colo_incoming_co() return void > > Currently, it alwa

Re: [RFC QEMU PATCH v9 1/2] virtio-pci: only reset pm state during resetting

2024-05-10 Thread Chen, Jiqian
On 2024/5/10 18:18, Michael S. Tsirkin wrote: > On Tue, Apr 16, 2024 at 03:01:26PM +0800, Jiqian Chen wrote: >> Fix bug imported by 27ce0f3afc9dd25d21b43bbce505157afd93d111 >> (fix Power Management Control Register for PCI Express virtio devices) > > > should be: > > 27ce0f3afc9dd ("fix Power Ma

[PATCH v6 13/48] target/ppc/mmu_common.c: Inline and remove check_physical()

2024-05-10 Thread BALATON Zoltan
This function just does two assignments and and unnecessary check that is always true so inline it in the only caller left and remove it. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin --- target/ppc/mmu_common.c | 26 +++--- 1 file changed, 3 insertions(+), 23 d

[PATCH v6 17/48] target/ppc/mmu_common.c: Don't use mmu_ctx_t for mmu40x_get_physical_address()

2024-05-10 Thread BALATON Zoltan
mmu40x_get_physical_address() only uses the raddr and prot fields from mmu_ctx_t. Pass these directly instead of using a ctx struct. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin --- target/ppc/mmu_common.c | 37 +++-- 1 file changed, 15 insertions(+

[PATCH v6 45/48] target/ppc/mmu_common.c: Remove nx field from mmu_ctx_t

2024-05-10 Thread BALATON Zoltan
Pass it as a parameter instead. Also use constant instead of hex value when extracting bit from SR. Signed-off-by: BALATON Zoltan --- target/ppc/mmu_common.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_comm

[PATCH v6 22/48] target/ppc/mmu_common.c: Split off BookE handling from ppc_jumbo_xlate()

2024-05-10 Thread BALATON Zoltan
Introduce ppc_booke_xlate() to handle BookE and BookE 2.06 cases to reduce ppc_jumbo_xlate() further. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin --- target/ppc/mmu_common.c | 146 ++-- 1 file changed, 96 insertions(+), 50 deletions(-) diff --

[PATCH v6 35/48] target/ppc: Move out BookE and related MMU functions from mmu_common.c

2024-05-10 Thread BALATON Zoltan
Add a new mmu-booke.c file for BookE and related MMU bits from mmu_common.c. Signed-off-by: BALATON Zoltan Acked-by: Nicholas Piggin --- target/ppc/cpu.h| 4 - target/ppc/meson.build | 1 + target/ppc/mmu-booke.c | 531 target/ppc/mmu-booke

[PATCH v6 07/48] target/ppc/mmu_common.c: Introduce mmu6xx_get_physical_address()

2024-05-10 Thread BALATON Zoltan
Repurpose get_segment_6xx_tlb() to do the whole address translation for POWERPC_MMU_SOFT_6xx MMU model by moving the BAT check there and renaming it to match other similar functions. These are only called once together so no need to keep these separate functions and combining them simplifies the ca

[PATCH v6 38/48] target/ppc/mmu_common.c: Remove single use local variable

2024-05-10 Thread BALATON Zoltan
The ptev variable in ppc6xx_tlb_pte_check() is used only once and just obfuscates an otherwise clear value. Get rid of it. Signed-off-by: BALATON Zoltan --- target/ppc/mmu_common.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_c

[PATCH v6 11/48] target/ppc/mmu_common.c: Split out BookE cases before checking real mode

2024-05-10 Thread BALATON Zoltan
BookE does not have real mode so split off and handle it first in get_physical_address_wtlb() before checking for real mode for other MMU models. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin --- target/ppc/mmu_common.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deleti

[PATCH v6 40/48] target/ppc/mmu_common.c: Remove yet another single use local

2024-05-10 Thread BALATON Zoltan
In ppc6xx_tlb_pte_check() the pp variable is used only once to pass it to a function parameter with the same name. Remove the local and inline the value. Also use named constant for the hex value to make it clearer. Signed-off-by: BALATON Zoltan --- target/ppc/mmu_common.c | 6 +++--- 1 file cha

[PATCH v6 10/48] target/ppc/mmu_common.c: Eliminate ret from mmu6xx_get_physical_address()

2024-05-10 Thread BALATON Zoltan
Return directly, which is simpler than dragging a return value through multpile if and else blocks. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin --- target/ppc/mmu_common.c | 84 +++-- 1 file changed, 39 insertions(+), 45 deletions(-) diff --gi

[PATCH v6 18/48] target/ppc/mmu_common.c: Don't use mmu_ctx_t in mmubooke_get_physical_address()

2024-05-10 Thread BALATON Zoltan
mmubooke_get_physical_address() only uses the raddr and prot fields from mmu_ctx_t. Pass these directly instead of using a ctx struct. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin --- target/ppc/mmu_common.c | 30 ++ 1 file changed, 10 insertions(+), 20

[PATCH v6 46/48] target/ppc/mmu_common.c: Convert local variable to bool

2024-05-10 Thread BALATON Zoltan
In mmu6xx_get_physical_address() ds is used as bool, declare it as such. Also use constant instead of hex value. Signed-off-by: BALATON Zoltan --- target/ppc/mmu_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c i

[PATCH v6 09/48] target/ppc/mmu_common.c: Move some debug logging

2024-05-10 Thread BALATON Zoltan
Move the debug logging within ppc6xx_tlb_check() from after its only call to simplify the caller. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin --- target/ppc/mmu_common.c | 54 ++--- 1 file changed, 24 insertions(+), 30 deletions(-) diff --git

[PATCH v6 23/48] target/ppc/mmu_common.c: Simplify ppc_booke_xlate() part 1

2024-05-10 Thread BALATON Zoltan
Move setting error_code that appears in every case out in front and hoist the common fall through case for BOOKE206 as well which allows removing the nested switches. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin --- target/ppc/mmu_common.c | 41

[PATCH v6 32/48] target/ppc/mmu-hash32.c: Drop a local variable

2024-05-10 Thread BALATON Zoltan
In ppc_hash32_xlate() the value of need_prop is checked in two places but precalculating it does not help because when we reach the first check we always return and not reach the second place so the value will only be used once. We can drop the local variable and calculate it when needed, which mak

[PATCH v6 47/48] target/ppc/mmu_common.c: Remove single use local variable

2024-05-10 Thread BALATON Zoltan
In mmu6xx_get_physical_address() tagtet_page_bits local is declared to use TARGET_PAGE_BITS only once. Drop the unneeded variable. Signed-off-by: BALATON Zoltan --- target/ppc/mmu_common.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/ppc/mmu_common.c b/target/ppc

[PATCH v6 31/48] target/ppc: Split off common embedded TLB init

2024-05-10 Thread BALATON Zoltan
Several 4xx CPUs and e200 share the same TLB settings enclosed in an ifdef. Split it off in a common function to reduce code duplication and the number of ifdefs. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin --- target/ppc/cpu_init.c | 46 --

[PATCH v6 25/48] target/ppc/mmu_common.c: Split off real mode handling from get_physical_address_wtlb()

2024-05-10 Thread BALATON Zoltan
Add ppc_real_mode_xlate() to handle real mode translation and allow removing this case from ppc_jumbo_xlate(). Signed-off-by: BALATON Zoltan --- target/ppc/mmu_common.c | 46 - 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/target/ppc/mmu_

[PATCH v6 42/48] target/ppc/mmu_common.c: Simplify ppc6xx_tlb_pte_check()

2024-05-10 Thread BALATON Zoltan
Invert conditions to avoid deep nested ifs and return early instead. Remove some obvious comments that don't add more clarity. Signed-off-by: BALATON Zoltan --- target/ppc/mmu_common.c | 44 ++--- 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a

[PATCH v6 28/48] target/ppc/mmu_common.c: Move mmu_ctx_t type to mmu_common.c

2024-05-10 Thread BALATON Zoltan
Remove mmu_ctx_t definition from internal.h as this type is only used within mmu_common.c. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin --- target/ppc/internal.h | 12 target/ppc/mmu_common.c | 11 +++ 2 files changed, 11 insertions(+), 12 deletions(-) diff

[PATCH v6 34/48] target/ppc: Add a function to check for page protection bit

2024-05-10 Thread BALATON Zoltan
Checking if a page protection bit is set for a given access type is a common operation. Add a function to avoid repeating the same check at multiple places. As this relies on access type and page protection bit values having certain relation also add an assert to ensure that this assumption holds.

[PATCH v6 19/48] target/ppc/mmu_common.c: Don't use mmu_ctx_t in mmubooke206_get_physical_address()

2024-05-10 Thread BALATON Zoltan
mmubooke206_get_physical_address() only uses the raddr and prot fields from mmu_ctx_t. Pass these directly instead of using a ctx struct. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin --- target/ppc/mmu_common.c | 32 ++-- 1 file changed, 10 insertions(+

[PATCH v6 33/48] target/ppc/mmu-radix64.c: Drop a local variable

2024-05-10 Thread BALATON Zoltan
The value is only used once so no need to introduce a local variable for it. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin --- target/ppc/mmu-radix64.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/ppc/mmu-radix64.c b/target/ppc/mmu-radix64.c index

[PATCH v6 43/48] target/ppc/mmu_common.c: Remove unused field from mmu_ctx_t

2024-05-10 Thread BALATON Zoltan
The eaddr field of mmu_ctx_t is set once but never used so can be removed. Signed-off-by: BALATON Zoltan --- target/ppc/mmu_common.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c index 564fcc7cfb..07c127d673 100644 --- a/target/ppc/mmu_com

[PATCH v6 27/48] target/ppc/mmu_common.c: Transform ppc_jumbo_xlate() into ppc_6xx_xlate()

2024-05-10 Thread BALATON Zoltan
Now that only 6xx cases left in ppc_jumbo_xlate() we can change it to ppc_6xx_xlate() also removing get_physical_address_wtlb(). Signed-off-by: BALATON Zoltan --- target/ppc/internal.h | 5 + target/ppc/mmu_common.c | 38 -- 2 files changed, 13 insertio

[PATCH v6 41/48] target/ppc/mmu_common.c: Return directly in ppc6xx_tlb_pte_check()

2024-05-10 Thread BALATON Zoltan
Instead of using a local ret variable return directly and remove the local. Signed-off-by: BALATON Zoltan --- target/ppc/mmu_common.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c index 0c7cbab2bc..a035cefcad 1006

[PATCH v6 30/48] target/ppc: Remove id_tlbs flag from CPU env

2024-05-10 Thread BALATON Zoltan
This flag for split instruction/data TLBs is only set for 6xx soft TLB MMU model and not used otherwise so no need to have a separate flag for that. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin --- hw/ppc/pegasos2.c| 2 +- target/ppc/cpu.h | 5 - target/ppc/c

[PATCH v6 12/48] target/ppc/mmu_common.c: Split off real mode cases in get_physical_address_wtlb()

2024-05-10 Thread BALATON Zoltan
The real mode handling is identical in the remaining switch cases. Split off these common real mode cases into a separate conditional to leave only the else branches in the switch that are different. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin --- target/ppc/mmu_common.c | 34 +++

[PATCH v6 26/48] target/ppc/mmu_common.c: Split off 40x cases from ppc_jumbo_xlate()

2024-05-10 Thread BALATON Zoltan
Introduce ppc_40x_xlate() to split off 40x handlning leaving only 6xx in ppc_jumbo_xlate() now. Signed-off-by: BALATON Zoltan --- target/ppc/mmu_common.c | 150 +--- 1 file changed, 93 insertions(+), 57 deletions(-) diff --git a/target/ppc/mmu_common.c b/targ

[PATCH v6 24/48] target/ppc/mmu_common.c: Simplify ppc_booke_xlate() part 2

2024-05-10 Thread BALATON Zoltan
Merge the code fetch and data access cases in a common switch. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin --- target/ppc/mmu_common.c | 52 - 1 file changed, 20 insertions(+), 32 deletions(-) diff --git a/target/ppc/mmu_common.c b/target/

[PATCH v6 16/48] target/ppc/mmu_common.c: Replace hard coded constants in ppc_jumbo_xlate()

2024-05-10 Thread BALATON Zoltan
The "2" in booke206_update_mas_tlb_miss() call corresponds to MMU_INST_FETCH which is the value of access_type in this branch; mmubooke206_esr() only checks for MMU_DATA_STORE and it's called from code access so using MMU_DATA_LOAD here seems wrong so replace it with access_type here as well that y

[PATCH v6 37/48] target/ppc/mmu_common.c: Remove single use local variable

2024-05-10 Thread BALATON Zoltan
The ptem variable in ppc6xx_tlb_pte_check() is used only once, simplify by removing it as the value is already clear itself without adding a local name for it. Signed-off-by: BALATON Zoltan --- target/ppc/mmu_common.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/

[PATCH v6 36/48] target/ppc/mmu_common.c: Remove local name for a constant

2024-05-10 Thread BALATON Zoltan
The mmask local variable is a less descriptive local name for a constant. Drop it and use the constant directly in the two places it is needed. Signed-off-by: BALATON Zoltan --- target/ppc/mmu_common.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/ppc/mmu_common

[PATCH v6 44/48] target/ppc/mmu_common.c: Remove hash field from mmu_ctx_t

2024-05-10 Thread BALATON Zoltan
Return hash value via a parameter and remove it from mmu_ctx.t. Signed-off-by: BALATON Zoltan --- target/ppc/mmu_common.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c index 07c127d673..ccacc70ba6 100644

[PATCH v6 48/48] target/ppc/mmu_common.c: Simplify a switch statement

2024-05-10 Thread BALATON Zoltan
In mmu6xx_get_physical_address() the switch handles all cases so the default is never reached and can be dropped. Also group together cases which just return -4. Signed-off-by: BALATON Zoltan --- target/ppc/mmu_common.c | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-)

[PATCH v6 08/48] target/ppc/mmu_common.c: Move else branch to avoid large if block

2024-05-10 Thread BALATON Zoltan
In mmu6xx_get_physical_address() we have a large if block with a two line else branch that effectively returns. Invert the condition and move the else there to allow deindenting the large if block to make the flow easier to follow. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin ---

[PATCH v6 14/48] target/ppc/mmu_common.c: Fix misindented qemu_log_mask() calls

2024-05-10 Thread BALATON Zoltan
Fix several qemu_log_mask() calls that are misindented. Signed-off-by: BALATON Zoltan Acked-by: Nicholas Piggin --- target/ppc/mmu_common.c | 42 - 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_co

[PATCH v6 00/48] Misc PPC exception and BookE MMU clean ups

2024-05-10 Thread BALATON Zoltan
This series does some further clean up mostly around BookE MMU to untangle it from other MMU models. It also contains some other changes that I've come up with while working on this. The Simplify ppc_booke_xlate() part 1 and part 2 patches could be squashed together but left them separate for easie

[PATCH v6 20/48] target/ppc: Remove pp_check() and reuse ppc_hash32_pp_prot()

2024-05-10 Thread BALATON Zoltan
The ppc_hash32_pp_prot() function in mmu-hash32.c is the same as pp_check() in mmu_common.c, merge these to remove duplicated code. Define the common function in internal.h as static lnline otherwise exporting the function from mmu-hash32.c would stop the compiler inlining it which results in sligh

[PATCH v6 39/48] target/ppc/mmu_common.c: Remove another single use local

2024-05-10 Thread BALATON Zoltan
In ppc6xx_tlb_pte_check() the pteh variable is used only once to compare to the h parameter of the function. Inline its value and use pteh name for the function parameter which is more descriptive. Signed-off-by: BALATON Zoltan --- target/ppc/mmu_common.c | 7 +++ 1 file changed, 3 insertion

[PATCH v6 21/48] target/ppc/mmu_common.c: Remove BookE from direct store handling

2024-05-10 Thread BALATON Zoltan
As BookE never returns -4 we can drop BookE from the direct store case in ppc_jumbo_xlate(). Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin --- target/ppc/mmu_common.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_

[PATCH v6 15/48] target/ppc/mmu_common.c: Deindent ppc_jumbo_xlate()

2024-05-10 Thread BALATON Zoltan
Instead of putting a large block of code in an if, invert the condition and return early to be able to deindent the code block. Signed-off-by: BALATON Zoltan Acked-by: Nicholas Piggin --- target/ppc/mmu_common.c | 319 1 file changed, 159 insertions(+),

[PATCH v6 04/48] target/ppc/mmu_common.c: Remove unneeded local variable

2024-05-10 Thread BALATON Zoltan
In mmubooke_check_tlb() and mmubooke206_check_tlb() we can assign the value of prot2 directly to the destination, no need to have a separate local variable for it. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin --- target/ppc/mmu_common.c | 30 +- 1 file

[PATCH v6 01/48] target/ppc: Remove unused struct 'mmu_ctx_hash32'

2024-05-10 Thread BALATON Zoltan
From: "Dr. David Alan Gilbert" I think it's use was removed by Commit 5883d8b296 ("mmu-hash*: Don't use full ppc_hash{32, 64}_translate() path for get_phys_page_debug()") Signed-off-by: Dr. David Alan Gilbert Reviewed-by: BALATON Zoltan Signed-off-by: BALATON Zoltan --- target/ppc/mmu-hash32

[PATCH v6 05/48] target/ppc/mmu_common.c: Simplify checking for real mode

2024-05-10 Thread BALATON Zoltan
In get_physical_address_wtlb() the real_mode flag depends on either the MSR[IR] or MSR[DR] bit depending on access_type. Extract just the needed bit in a more straight forward way instead of doing unnecessary computation. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin --- target/ppc

[PATCH v6 29/48] target/ppc/mmu_common.c: Remove pte_update_flags()

2024-05-10 Thread BALATON Zoltan
This function is used only once, its return value is ignored and one of its parameter is a return value from a previous call. It is better to inline it in the caller and remove it. Signed-off-by: BALATON Zoltan --- target/ppc/mmu_common.c | 41 + 1 file ch

[PATCH v6 03/48] target/ppc/mmu_common.c: Move calculation of a value closer to its usage

2024-05-10 Thread BALATON Zoltan
In mmubooke_check_tlb() and mmubooke206_check_tlb() prot2 is calculated first but only used after an unrelated check that can return before tha value is used. Move the calculation after the check, closer to where it is used, to keep them together and avoid computing it when not needed. Signed-off-

[PATCH v6 06/48] target/ppc/mmu_common.c: Drop cases for unimplemented MPC8xx MMU

2024-05-10 Thread BALATON Zoltan
Drop MPC8xx cases from get_physical_address_wtlb() and ppc_jumbo_xlate(). The default case would still catch this and abort the same way and there is still a warning about it in ppc_tlb_invalidate_all() which is called in ppc_cpu_reset_hold() so likely we never get here but to make sure add a case

[PATCH v6 02/48] target/ppc: Remove unused helper

2024-05-10 Thread BALATON Zoltan
The helper_rac function is defined but not used, remove it. Fixes: 005b69fdcc (target/ppc: Remove PowerPC 601 CPUs) Signed-off-by: BALATON Zoltan Reviwed-by: Nicholas Piggin --- target/ppc/helper.h | 2 -- target/ppc/mmu_helper.c | 24 2 files changed, 26 deletions

Re: [PATCH v6 5/7] migration/multifd: implement initialization of qpl compression

2024-05-10 Thread Fabiano Rosas
Yuan Liu writes: > the qpl initialization includes memory allocation for compressed > data and the qpl job initialization. > > the qpl job initialization will check if the In-Memory Analytics > Accelerator(IAA) device is available and use the IAA device first. > If the platform does not have IAA

Re: [PATCH v6 5/7] migration/multifd: implement initialization of qpl compression

2024-05-10 Thread Fabiano Rosas
Yuan Liu writes: > the qpl initialization includes memory allocation for compressed > data and the qpl job initialization. > > the qpl job initialization will check if the In-Memory Analytics > Accelerator(IAA) device is available and use the IAA device first. > If the platform does not have IAA

Re: [PATCH v6 2/7] migration/multifd: put IOV initialization into compression method

2024-05-10 Thread Fabiano Rosas
Yuan Liu writes: > Different compression methods may require different numbers of IOVs. > Based on streaming compression of zlib and zstd, all pages will be > compressed to a data block, so two IOVs are needed for packet header > and compressed data block. > > Signed-off-by: Yuan Liu > Reviewed-

Re: [PATCH v3] target/i386: Fix CPUID encoding of Fn8000001E_ECX

2024-05-10 Thread Moger, Babu
Hi Daniel, On 5/10/2024 3:10 AM, Daniel P. Berrangé wrote: On Fri, May 10, 2024 at 11:05:44AM +0300, Michael Tokarev wrote: 09.05.2024 17:11, Daniel P. Berrangé wrote: On Thu, May 09, 2024 at 04:54:16PM +0300, Michael Tokarev wrote: 03.05.2024 20:46, Babu Moger wrote: diff --git a/hw/i386/

Re: [BUG, RFC] Base node is in RW after making external snapshot

2024-05-10 Thread Andrey Drobyshev
On 4/24/24 21:00, Andrey Drobyshev wrote: > Hi everyone, > > When making an external snapshot, we end up in a situation when 2 block > graph nodes related to the same image file (format and storage nodes) > have different RO flags set on them. > > E.g. > > # ls -la /proc/PID/fd > lrwx-- 1 ro

Re: [PATCH 3/4] virtio-gpu: use a VMState variant for the scanout field

2024-05-10 Thread Peter Xu
Hi, Marc-André, On Fri, May 10, 2024 at 12:39:34PM +0400, Marc-André Lureau wrote: > Since we don't have per VMSD version information on the wire, nested > struct versioning is quite limited and cumbersome. I am not sure it > can be changed without breaking the stream format, and whether it's > wo

Re: [PATCH 41/41] target/sparc: Enable VIS4 feature bit

2024-05-10 Thread Philippe Mathieu-Daudé
On 10/5/24 19:16, Philippe Mathieu-Daudé wrote: On 2/3/24 06:16, Richard Henderson wrote: Signed-off-by: Richard Henderson ---   target/sparc/cpu.c | 3 +++   1 file changed, 3 insertions(+) @@ -882,6 +883,8 @@ static Property sparc_cpu_properties[] = {   CPU_FEATURE_BIT_

Re: [PATCH 28/41] target/sparc: Implement PDISTN

2024-05-10 Thread Philippe Mathieu-Daudé
On 2/3/24 06:15, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/sparc/translate.c | 11 +++ target/sparc/insns.decode | 1 + 2 files changed, 12 insertions(+) +static void gen_op_pdistn(TCGv dst, TCGv_i64 src1, TCGv_i64 src2) +{ +#ifdef TARGET_SPARC64 +

Re: [PATCH 26/41] target/sparc: Implement LZCNT

2024-05-10 Thread Philippe Mathieu-Daudé
On 2/3/24 06:15, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/sparc/translate.c | 18 ++ target/sparc/insns.decode | 1 + 2 files changed, 19 insertions(+) Reviewed-by: Philippe Mathieu-Daudé

Re: CXL numa error on arm64 qemu virt machine

2024-05-10 Thread Jonathan Cameron via
On Thu, 9 May 2024 16:35:34 +0800 Yuquan Wang wrote: > On Wed, May 08, 2024 at 01:02:52PM +0100, Jonathan Cameron wrote: > > > > > [0.00] ACPI: SRAT: Node 0 PXM 0 [mem 0x4000-0xbfff] > > > [0.00] ACPI: SRAT: Node 1 PXM 1 [mem 0xc000-0x13fff] > > > [0.00]

Re: [PATCH 41/41] target/sparc: Enable VIS4 feature bit

2024-05-10 Thread Philippe Mathieu-Daudé
On 2/3/24 06:16, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/sparc/cpu.c | 3 +++ 1 file changed, 3 insertions(+) @@ -882,6 +883,8 @@ static Property sparc_cpu_properties[] = { CPU_FEATURE_BIT_VIS3, false), DEFINE_PROP_BIT("ima", S

Re: [PATCH 37/41] target/sparc: Implement FPMIN, FPMAX

2024-05-10 Thread Philippe Mathieu-Daudé
On 2/3/24 06:15, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/sparc/translate.c | 14 ++ target/sparc/insns.decode | 14 ++ 2 files changed, 28 insertions(+) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 5f1982cecc..8

Re: [PATCH 32/41] target/sparc: Implement IMA extension

2024-05-10 Thread Philippe Mathieu-Daudé
On 2/3/24 06:15, Richard Henderson wrote: Signed-off-by: Richard Henderson --- linux-user/elfload.c | 1 + target/sparc/cpu.c | 3 +++ target/sparc/translate.c | 24 target/sparc/cpu-feature.h.inc | 1 + target/sparc/insns.decode

Re: [PATCH 13/41] target/sparc: Add feature bits for VIS 3

2024-05-10 Thread Philippe Mathieu-Daudé
On 2/3/24 06:15, Richard Henderson wrote: The manual separates VIS 3 and VIS 3B, even though they are both present in all extant cpus. For clarity, let the translator match the manual but otherwise leave them on the same feature bit. Signed-off-by: Richard Henderson --- target/sparc/translat

Re: [PATCH 33/41] target/sparc: Add feature bit for VIS4

2024-05-10 Thread Philippe Mathieu-Daudé
On 2/3/24 06:15, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/sparc/translate.c | 2 ++ target/sparc/cpu-feature.h.inc | 1 + 2 files changed, 3 insertions(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 40/41] target/sparc: Implement monitor asis

2024-05-10 Thread Philippe Mathieu-Daudé
On 2/3/24 06:16, Richard Henderson wrote: Ignore the "monitor" portion and treat them the same as their base asis. s/asis/ASIs/ Signed-off-by: Richard Henderson --- target/sparc/asi.h | 4 target/sparc/ldst_helper.c | 4 target/sparc/translate.c | 8 3 files

Re: [PATCH v8 07/11] virtio-gpu: Support suspension of commands processing

2024-05-10 Thread Dmitry Osipenko
On 5/10/24 19:12, Dmitry Osipenko wrote: > On 5/10/24 13:56, Akihiko Odaki wrote: >> On 2024/05/09 21:39, Dmitry Osipenko wrote: >>> On 5/5/24 09:37, Akihiko Odaki wrote: On 2024/05/02 4:02, Dmitry Osipenko wrote: > On 4/27/24 08:48, Akihiko Odaki wrote: >>> >>> The VIRTIO_GPU_FILL

Re: [PATCH v8 01/11] linux-headers: Update to Linux v6.9-rc3

2024-05-10 Thread Dmitry Osipenko
On 5/10/24 13:46, Alex Bennée wrote: ... >> cp_portable "$tmpdir/include/asm/kvm_para.h" >> "$output/include/standard-headers/asm-$arch" >> +cp_portable "$tmpdir/include/asm/setup_data.h" >> "$output/include/standard-headers/asm-$arch" > > is there a portable setup_data.h? why i

Re: [PATCH 38/41] target/sparc: Implement SUBXC, SUBXCcc

2024-05-10 Thread Philippe Mathieu-Daudé
On 2/3/24 06:15, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/sparc/translate.c | 14 ++ target/sparc/insns.decode | 2 ++ 2 files changed, 16 insertions(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 35/41] target/sparc: Implement 8-bit FPADD, FPADDS, and FPADDUS

2024-05-10 Thread Philippe Mathieu-Daudé
On 2/3/24 06:15, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/sparc/translate.c | 11 +++ target/sparc/insns.decode | 9 + 2 files changed, 20 insertions(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 21/41] target/sparc: Implement FPADD64 FPSUB64

2024-05-10 Thread Philippe Mathieu-Daudé
On 2/3/24 06:15, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/sparc/translate.c | 3 +++ target/sparc/insns.decode | 2 ++ 2 files changed, 5 insertions(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 14/41] target/sparc: Implement ADDXC, ADDXCcc

2024-05-10 Thread Philippe Mathieu-Daudé
On 2/3/24 06:15, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/sparc/translate.c | 14 ++ target/sparc/insns.decode | 3 +++ 2 files changed, 17 insertions(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v8 07/11] virtio-gpu: Support suspension of commands processing

2024-05-10 Thread Dmitry Osipenko
On 5/10/24 13:56, Akihiko Odaki wrote: > On 2024/05/09 21:39, Dmitry Osipenko wrote: >> On 5/5/24 09:37, Akihiko Odaki wrote: >>> On 2024/05/02 4:02, Dmitry Osipenko wrote: On 4/27/24 08:48, Akihiko Odaki wrote: >> >> The VIRTIO_GPU_FILL_CMD() macro returns void and this macro is >

Re: [PATCH 11/41] target/sparc: Use gvec for VIS1 parallel add/sub

2024-05-10 Thread Philippe Mathieu-Daudé
On 2/3/24 06:15, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/sparc/translate.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 09/41] target/sparc: Remove gen_dest_fpr_D

2024-05-10 Thread Philippe Mathieu-Daudé
On 2/3/24 06:15, Richard Henderson wrote: Replace with tcg_temp_new_i64. Signed-off-by: Richard Henderson --- target/sparc/translate.c | 27 +++ 1 file changed, 11 insertions(+), 16 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 08/41] target/sparc: Perform DFPREG/QFPREG in decodetree

2024-05-10 Thread Philippe Mathieu-Daudé
On 2/3/24 06:15, Richard Henderson wrote: Form the proper register decoding from the start. Because we're removing the translation from the inner-most gen_load_fpr_* and gen_store_fpr_* routines, this must be done for all insns at once. Signed-off-by: Richard Henderson --- target/sparc/trans

Re: [Stable-8.2.4 00/16] Patch Round-up for stable 8.2.4 (planned for 2024-05-10)

2024-05-10 Thread Michael Tokarev
07.05.2024 11:45, Michael Tokarev wrote: 07.05.2024 11:41, Michael Tokarev wrote: The following patches are queued for QEMU stable v8.2.4:    https://gitlab.com/qemu-project/qemu/-/commits/staging-8.2 The release is planned for 2024-05-12, to address a few issues encountered with v8.2.3 releas

[PATCH v2 1/4] target/hexagon: idef-parser remove unused defines

2024-05-10 Thread Anton Johansson via
Before switching to GArray/g_string_printf we used fixed size arrays for output buffers and instructions arguments among other things. Macros defining the sizes of these buffers were left behind, remove them. Signed-off-by: Anton Johansson Reviewed-by: Taylor Simpson --- target/hexagon/idef-pa

[PATCH v2 0/4] target/hexagon: Minor idef-parser cleanup

2024-05-10 Thread Anton Johansson via
Was running idef-parser with valgrind and noticed we were leaking the init_list GArray, which is used to hold instruction arguments that may need initialization. This patchset fixes the leak, removes unused macros and undefined functions, and simplifies gen_inst_init_args() to only handle predicat

[PATCH v2 4/4] target/hexagon: idef-parser simplify predicate init

2024-05-10 Thread Anton Johansson via
Only predicate instruction arguments need to be initialized by idef-parser. This commit removes registers from the init_list and simplifies gen_inst_init_args() slightly. Signed-off-by: Anton Johansson --- target/hexagon/idef-parser/idef-parser.y| 2 -- target/hexagon/idef-parser/parser-hel

[PATCH v2 2/4] target/hexagon: idef-parser remove undefined functions

2024-05-10 Thread Anton Johansson via
Signed-off-by: Anton Johansson Reviewed-by: Taylor Simpson --- target/hexagon/idef-parser/parser-helpers.h | 13 - 1 file changed, 13 deletions(-) diff --git a/target/hexagon/idef-parser/parser-helpers.h b/target/hexagon/idef-parser/parser-helpers.h index 7c58087169..2087d534a9 100

[PATCH v2 3/4] target/hexagon: idef-parser fix leak of init_list

2024-05-10 Thread Anton Johansson via
gen_inst_init_args() is called for instructions using a predicate as an rvalue. Upon first call, the list of arguments which might need initialization init_list is freed to indicate that they have been processed. For instructions without an rvalue predicate, gen_inst_init_args() isn't called and in

Re: [PATCH 00/45] target/hppa: Misc improvements

2024-05-10 Thread Philippe Mathieu-Daudé
Cc'ing Helge & Sven as I'm going to skip this series. Suggestion: -- >8 -- diff --git a/MAINTAINERS b/MAINTAINERS index 1b79767d61..be7535b55e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -254,6 +254,8 @@ F: target/hexagon/gen_idef_parser_funcs.py HPPA (PA-RISC) TCG CPUs M: Richard Henderson

Re: [PATCH V8 1/8] accel/kvm: Extract common KVM vCPU {creation,parking} code

2024-05-10 Thread Philippe Mathieu-Daudé
On 8/5/24 12:46, Salil Mehta wrote: Hi Phillipe, Sorry, I missed this mail earlier. From: Philippe Mathieu-Daudé Sent: Friday, May 3, 2024 7:23 PM To: Salil Mehta ; qemu-devel@nongnu.org; qemu-...@nongnu.org On 3/5/24 17:57, Salil Mehta wrote: > Hi Philippe, > >> From: P

[PATCH] ppc/pnv: Implement POWER9 LPC PSI serirq outputs and auto-clear function

2024-05-10 Thread Nicholas Piggin
The POWER8 LPC ISA device irqs all get combined and reported to the line connected the PSI LPCHC irq. POWER9 changed this so only internal LPC host controller irqs use that line, and the device irqs get routed to 4 new lines connected to PSI SERIRQ0-3. POWER9 also introduced a new feature that aut

RE: [PATCH v6 4/7] migration/multifd: add qpl compression method

2024-05-10 Thread Liu, Yuan1
> -Original Message- > From: Fabiano Rosas > Sent: Friday, May 10, 2024 10:12 PM > To: Liu, Yuan1 ; pet...@redhat.com > Cc: qemu-devel@nongnu.org; Liu, Yuan1 ; Zou, Nanhai > > Subject: Re: [PATCH v6 4/7] migration/multifd: add qpl compression method > > Yuan Liu writes: > > > add the Q

[PATCH 3/3] hw/misc: Implement mailbox properties for customer OTP and device specific private keys

2024-05-10 Thread Rayhan Faizel
Four mailbox properties are implemented as follows: 1. Customer OTP: GET_CUSTOMER_OTP and SET_CUSTOMER_OTP 2. Device-specific private key: GET_PRIVATE_KEY and SET_PRIVATE_KEY. The customer OTP is located in the rows 36-43. The device-specific private key is located in the rows 56-63. The customer

[PATCH 0/3] Initial support for One-Time Programmable Memory (OTP) in BCM2835

2024-05-10 Thread Rayhan Faizel
All BCM2835 boards have on-board OTP memory with 66 32-bit rows. Usually, its contents are accessible via mailbox commands. Rayhan Faizel (3): hw/nvram: Add BCM2835 OTP device hw/arm: Connect OTP device to BCM2835 hw/misc: Implement mailbox properties for customer OTP and device specific

[PATCH 1/3] hw/nvram: Add BCM2835 OTP device

2024-05-10 Thread Rayhan Faizel
The OTP device registers are currently stubbed. For now, the device houses the OTP rows which will be accessed directly by other peripherals. Signed-off-by: Rayhan Faizel --- hw/nvram/bcm2835_otp.c | 187 + hw/nvram/meson.build | 1 + include/h

[PATCH 2/3] hw/arm: Connect OTP device to BCM2835

2024-05-10 Thread Rayhan Faizel
Signed-off-by: Rayhan Faizel --- hw/arm/bcm2835_peripherals.c | 13 - include/hw/arm/bcm2835_peripherals.h | 3 ++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/hw/arm/bcm2835_peripherals.c b/hw/arm/bcm2835_peripherals.c index 1695d8b453..7d735bb56c 100644

  1   2   >