Re: [PATCH v2 1/1] migration/dirtyrate: Fix segmentation fault

2024-04-23 Thread mii
On 2024/04/24 10:28, Yong Huang wrote: On Tue, Apr 23, 2024 at 9:35 PM Peter Xu wrote: On Tue, Apr 23, 2024 at 09:13:08AM +, Masato Imai wrote: > When the KVM acceleration parameter is not set, executing calc_dirty_rate > with the -r or -b option results in a

Re: [PULL 00/63] First batch of i386 and build system patch for QEMU 9.1

2024-04-23 Thread Richard Henderson
On 4/23/24 08:08, Paolo Bonzini wrote: The following changes since commit 62dbe54c24dbf77051bafe1039c31ddc8f37602d: Update version for v9.0.0-rc4 release (2024-04-16 18:06:15 +0100) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you

RE: [PATCH v10 2/6] ui/console: new dmabuf.h and dmabuf.c for QemuDmaBuf struct and helpers

2024-04-23 Thread Kim, Dongwon
Hi Daniel, > -Original Message- > From: Daniel P. Berrangé > Sent: Tuesday, April 23, 2024 7:07 AM > To: Kim, Dongwon > Cc: qemu-devel@nongnu.org; marcandre.lur...@redhat.com; > phi...@linaro.org > Subject: Re: [PATCH v10 2/6] ui/console: new dmabuf.h and dmabuf.c for > QemuDmaBuf

Re: Problems (timeouts) when testing usb-ohci with qemu

2024-04-23 Thread Alan Stern
On Tue, Apr 23, 2024 at 02:10:13PM -0700, Guenter Roeck wrote: > Hi Alan, > > On 4/23/24 10:30, Alan Stern wrote: > > On Tue, Apr 23, 2024 at 10:04:17AM -0700, Guenter Roeck wrote: > > > Hi, > > > > > > when testing usb-ohci > > > > What is usb-ohci? Do you mean ohci-hcd? > > > > > with

RE: [PATCH v2] mem/cxl_type3: support 3, 6, 12 and 16 interleave ways

2024-04-23 Thread Xingtao Yao (Fujitsu)
ping. > -Original Message- > From: Yao Xingtao > Sent: Sunday, April 7, 2024 11:07 AM > To: jonathan.came...@huawei.com; fan...@samsung.com > Cc: qemu-devel@nongnu.org; Yao, Xingtao/姚 幸涛 > Subject: [PATCH v2] mem/cxl_type3: support 3, 6, 12 and 16 interleave ways > > Since the kernel

Re: [PATCH v2 1/1] migration/dirtyrate: Fix segmentation fault

2024-04-23 Thread Yong Huang
On Tue, Apr 23, 2024 at 9:35 PM Peter Xu wrote: > On Tue, Apr 23, 2024 at 09:13:08AM +, Masato Imai wrote: > > When the KVM acceleration parameter is not set, executing calc_dirty_rate > > with the -r or -b option results in a segmentation fault due to accessing > > a null kvm_state pointer

Re: [PATCH] target/riscv/kvm: Fix exposure of Zkr

2024-04-23 Thread Alistair Francis
On Mon, Apr 22, 2024 at 11:47 PM Andrew Jones wrote: > > The Zkr extension may only be exposed to KVM guests if the VMM > implements the SEED CSR. Use the same implementation as TCG. > > Without this patch, running with a KVM which does not forward the > SEED CSR access to QEMU will result in an

Re: [PATCH v3 48/49] hw/i386/sev: Use guest_memfd for legacy ROMs

2024-04-23 Thread Michael Roth
On Thu, Mar 28, 2024 at 08:45:03AM +0800, Xiaoyao Li wrote: > On 3/21/2024 2:12 AM, Isaku Yamahata wrote: > > On Wed, Mar 20, 2024 at 03:39:44AM -0500, > > Michael Roth wrote: > > > > > TODO: make this SNP-specific if TDX disables legacy ROMs in general > > > > TDX disables pc.rom, not disable

[PATCH v11 2/6] ui/console: new dmabuf.h and dmabuf.c for QemuDmaBuf struct and helpers

2024-04-23 Thread dongwon . kim
From: Dongwon Kim New header and source files are added for containing QemuDmaBuf struct definition and newly introduced helpers for creating/freeing the struct and accessing its data. v10: Change the license type for both dmabuf.h and dmabuf.c from MIT to GPL to be in line with QEMU's

[PATCH v11 6/6] ui/console: move QemuDmaBuf struct def to dmabuf.c

2024-04-23 Thread dongwon . kim
From: Dongwon Kim To complete privatizing process of QemuDmaBuf, QemuDmaBuf struct def is moved to dmabuf.c Suggested-by: Marc-André Lureau Cc: Philippe Mathieu-Daudé Cc: Daniel P. Berrangé Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- include/ui/dmabuf.h | 19 +--

[PATCH v11 5/6] ui/console: Use qemu_dmabuf_new() and free() helpers instead

2024-04-23 Thread dongwon . kim
From: Dongwon Kim This commit introduces utility functions for the creation and deallocation of QemuDmaBuf instances. Additionally, it updates all relevant sections of the codebase to utilize these new utility functions. v7: remove prefix, "dpy_gl_" from all helpers qemu_dmabuf_free()

[PATCH v11 3/6] ui/console: Use qemu_dmabuf_get_..() helpers instead

2024-04-23 Thread dongwon . kim
From: Dongwon Kim This commit updates all instances where fields within the QemuDmaBuf struct are directly accessed, replacing them with calls to these new helper functions. v6: fix typos in helper names in ui/spice-display.c v7: removed prefix, "dpy_gl_" from all helpers v8: Introduction of

[PATCH v11 1/6] ui/gtk: Check if fence_fd is equal to or greater than 0

2024-04-23 Thread dongwon . kim
From: Dongwon Kim 'fence_fd' needs to be validated always before being referenced And the passing condition should include '== 0' as 0 is a valid value for the file descriptor. Suggested-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Cc: Philippe Mathieu-Daudé Cc: Daniel P. Berrangé

[PATCH v11 4/6] ui/console: Use qemu_dmabuf_set_..() helpers instead

2024-04-23 Thread dongwon . kim
From: Dongwon Kim This commit updates all occurrences where these fields were set directly have been updated to utilize helper functions. v7: removed prefix, "dpy_gl_" from all helpers v8: Introduction of helpers was removed as those were already added by the previous commit Suggested-by:

[PATCH v11 0/6] ui/console: Private QemuDmaBuf struct

2024-04-23 Thread dongwon . kim
From: Dongwon Kim This series introduces privacy enhancements to the QemuDmaBuf struct and its contained data to bolster security. it accomplishes this by introducing of helper functions for allocating, deallocating, and accessing individual fields within the struct and replacing all direct

Re: [PATCH 16/22] riscv: switch boards to "default y"

2024-04-23 Thread Alistair Francis
On Tue, Apr 23, 2024 at 11:20 PM Paolo Bonzini wrote: > > Some targets use "default y" for boards to filter out those that require > TCG. For consistency we are switching all other targets to do the same. > Continue with RISC-V. > > No changes to generated config-devices.mak file. > >

[ANNOUNCE] QEMU 9.0.0 is now available

2024-04-23 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the QEMU 9.0.0 release. This release contains 2700+ commits from 220 authors. You can grab the tarball from our download page here: https://www.qemu.org/download/#source The full list of changes are available at:

[PULL 26/26] migration/colo: Fix bdrv_graph_rdlock_main_loop: Assertion `!qemu_in_coroutine()' failed.

2024-04-23 Thread Peter Xu
From: Li Zhijian bdrv_activate_all() should not be called from the coroutine context, move it to the QEMU thread colo_process_incoming_thread() with the bql_lock protected. The backtrace is as follows: #4 0x561af7948362 in bdrv_graph_rdlock_main_loop () at ../block/graph-lock.c:260 #5

[PULL 11/26] vfio: Always report an error in vfio_save_setup()

2024-04-23 Thread Peter Xu
From: Cédric Le Goater This will prepare ground for future changes adding an Error** argument to the save_setup() handler. We need to make sure that on failure, vfio_save_setup() always sets a new error. Reviewed-by: Fabiano Rosas Reviewed-by: Eric Auger Signed-off-by: Cédric Le Goater Link:

[PULL 23/26] migration: Modify ram_init_bitmaps() to report dirty tracking errors

2024-04-23 Thread Peter Xu
From: Cédric Le Goater The .save_setup() handler has now an Error** argument that we can use to propagate errors reported by the .log_global_start() handler. Do that for the RAM. The caller qemu_savevm_state_setup() will store the error under the migration stream for later detection in the

[PULL 24/26] migration: Add Error** argument to add_bitmaps_to_list()

2024-04-23 Thread Peter Xu
From: Cédric Le Goater This allows to report more precise errors in the migration handler dirty_bitmap_save_setup(). Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Cédric Le Goater Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Vladimir Sementsov-Ogievskiy Link:

[PULL 14/26] migration: Add Error** argument to vmstate_save()

2024-04-23 Thread Peter Xu
From: Cédric Le Goater This will prepare ground for future changes adding an Error** argument to qemu_savevm_state_setup(). Reviewed-by: Prasad Pandit Signed-off-by: Cédric Le Goater Link: https://lore.kernel.org/r/20240320064911.545001-6-...@redhat.com Signed-off-by: Peter Xu ---

[PULL 10/26] s390/stattrib: Add Error** argument to set_migrationmode() handler

2024-04-23 Thread Peter Xu
From: Cédric Le Goater This will prepare ground for future changes adding an Error** argument to the save_setup() handler. We need to make sure that on failure, set_migrationmode() always sets a new error. See the Rules section in qapi/error.h. Cc: Halil Pasic Cc: Christian Borntraeger Cc:

[PULL 16/26] migration: Add Error** argument to .save_setup() handler

2024-04-23 Thread Peter Xu
From: Cédric Le Goater The purpose is to record a potential error in the migration stream if qemu_savevm_state_setup() fails. Most of the current .save_setup() handlers can be modified to use the Error argument instead of managing their own and calling locally error_report(). Cc: Nicholas

[PULL 17/26] migration: Add Error** argument to .load_setup() handler

2024-04-23 Thread Peter Xu
From: Cédric Le Goater This will be useful to report errors at a higher level, mostly in VFIO today. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Xu Signed-off-by: Cédric Le Goater Link: https://lore.kernel.org/r/20240320064911.545001-9-...@redhat.com [peterx: drop comment for

[PULL 03/26] tests/qtest/migration: Replace migrate_get_connect_uri inplace of migrate_get_socket_address

2024-04-23 Thread Peter Xu
From: Het Gala Refactor migrate_get_socket_address to internally utilize 'socket-address' parameter, reducing redundancy in the function definition. migrate_get_socket_address implicitly converts SocketAddress into str. Move migrate_get_socket_address inside migrate_get_connect_uri which should

[PULL 13/26] migration: Always report an error in ram_save_setup()

2024-04-23 Thread Peter Xu
From: Cédric Le Goater This will prepare ground for future changes adding an Error** argument to the save_setup() handler. We need to make sure that on failure, ram_save_setup() sets a new error. Reviewed-by: Fabiano Rosas Signed-off-by: Cédric Le Goater Link:

[PULL 05/26] tests/qtest/migration: Add migrate_set_ports into migrate_qmp to update migration port value

2024-04-23 Thread Peter Xu
From: Het Gala migrate_get_connect_qdict gets qdict with the dst QEMU parameters. migrate_set_ports() from list of channels reads each QDict for port, and fills the port with correct value in case it was 0 in the test. Signed-off-by: Het Gala Suggested-by: Fabiano Rosas Reviewed-by: Fabiano

[PULL 18/26] memory: Add Error** argument to .log_global_start() handler

2024-04-23 Thread Peter Xu
From: Cédric Le Goater Modify all .log_global_start() handlers to take an Error** parameter and return a bool. Adapt memory_global_dirty_log_start() to interrupt on the first error the loop on handlers. In such case, a rollback is performed to stop dirty logging on all listeners where it was

[PULL 07/26] tests/qtest/migration: Add multifd_tcp_plain test using list of channels instead of uri

2024-04-23 Thread Peter Xu
From: Het Gala Add a positive test to check multifd live migration but this time using list of channels (restricted to 1) as the starting point instead of simple uri string. Signed-off-by: Het Gala Suggested-by: Fabiano Rosas Reviewed-by: Fabiano Rosas Link:

[PULL 20/26] memory: Add Error** argument to the global_dirty_log routines

2024-04-23 Thread Peter Xu
From: Cédric Le Goater Now that the log_global*() handlers take an Error** parameter and return a bool, do the same for memory_global_dirty_log_start() and memory_global_dirty_log_stop(). The error is reported in the callers for now and it will be propagated in the call stack in the next

[PULL 19/26] migration: Introduce ram_bitmaps_destroy()

2024-04-23 Thread Peter Xu
From: Cédric Le Goater We will use it in ram_init_bitmaps() to clear the allocated bitmaps when support for error reporting is added to memory_global_dirty_log_start(). Signed-off-by: Cédric Le Goater Reviewed-by: Peter Xu Reviewed-by: Fabiano Rosas Link:

[PULL 08/26] tests/qtest/migration: Add negative tests to validate migration QAPIs

2024-04-23 Thread Peter Xu
From: Het Gala Migration QAPI arguments - uri and channels are mutually exhaustive. Add negative validation tests, one with both arguments present and one with none present. Signed-off-by: Het Gala Suggested-by: Fabiano Rosas Reviewed-by: Fabiano Rosas Link:

[PULL 12/26] migration: Always report an error in block_save_setup()

2024-04-23 Thread Peter Xu
From: Cédric Le Goater This will prepare ground for future changes adding an Error** argument to the save_setup() handler. We need to make sure that on failure, block_save_setup() always sets a new error. Cc: Stefan Hajnoczi Reviewed-by: Fabiano Rosas Signed-off-by: Cédric Le Goater Link:

[PULL 02/26] tests/qtest/migration: Replace connect_uri and move migrate_get_socket_address inside migrate_qmp

2024-04-23 Thread Peter Xu
From: Het Gala Move the calls to migrate_get_socket_address() into migrate_qmp(). Get rid of connect_uri and replace it with args->connect_uri only because 'to' object will help to generate connect_uri with the correct port number. Signed-off-by: Het Gala Suggested-by: Fabiano Rosas

[PULL 21/26] migration: Add Error** argument to ram_state_init()

2024-04-23 Thread Peter Xu
From: Cédric Le Goater Since the return value not exploited, follow the recommendations of qapi/error.h and change it to a bool Signed-off-by: Cédric Le Goater Reviewed-by: Fabiano Rosas Link: https://lore.kernel.org/r/20240320064911.545001-13-...@redhat.com Signed-off-by: Peter Xu ---

[PULL 25/26] migration/multifd: solve zero page causing multiple page faults

2024-04-23 Thread Peter Xu
From: Yuan Liu Implemented recvbitmap tracking of received pages in multifd. If the zero page appears for the first time in the recvbitmap, this page is not checked and set. If the zero page has already appeared in the recvbitmap, there is no need to check the data but directly set the data to

[PULL 09/26] tests/qtest/migration: Fix typo for vsock in SocketAddress_to_str

2024-04-23 Thread Peter Xu
From: Het Gala Signed-off-by: Het Gala Link: https://lore.kernel.org/r/20240319204840.211632-2-het.g...@nutanix.com Signed-off-by: Peter Xu --- tests/qtest/migration-helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/migration-helpers.c

[PULL 06/26] tests/qtest/migration: Add channels parameter in migrate_qmp

2024-04-23 Thread Peter Xu
From: Het Gala Alter migrate_qmp() to allow use of channels parameter, but only fill the uri with correct port number if there are no channels. Here we don't want to allow the wrong cases of having both or none (ex: migrate_qmp_fail). Signed-off-by: Het Gala Suggested-by: Fabiano Rosas

[PULL 15/26] migration: Add Error** argument to qemu_savevm_state_setup()

2024-04-23 Thread Peter Xu
From: Cédric Le Goater This prepares ground for the changes coming next which add an Error** argument to the .save_setup() handler. Callers of qemu_savevm_state_setup() now handle the error and fail earlier setting the migration state from MIGRATION_STATUS_SETUP to MIGRATION_STATUS_FAILED. In

[PULL 04/26] tests/qtest/migration: Add channels parameter in migrate_qmp_fail

2024-04-23 Thread Peter Xu
From: Het Gala Alter migrate_qmp_fail() to allow both uri and channels independently. For channels, convert string to a Dict. No dealing with migrate_get_socket_address() here because we will fail before starting the migration anyway. Signed-off-by: Het Gala Suggested-by: Fabiano Rosas

[PULL 22/26] migration: Add Error** argument to xbzrle_init()

2024-04-23 Thread Peter Xu
From: Cédric Le Goater Since the return value (-ENOMEM) is not exploited, follow the recommendations of qapi/error.h and change it to a bool Signed-off-by: Cédric Le Goater Reviewed-by: Fabiano Rosas Link: https://lore.kernel.org/r/20240320064911.545001-14-...@redhat.com Signed-off-by: Peter

[PULL 01/26] tests/qtest/migration: Add 'to' object into migrate_qmp()

2024-04-23 Thread Peter Xu
From: Het Gala Add the 'to' object into migrate_qmp(), so we can use migrate_get_socket_address() inside migrate_qmp() to get the port value. This is not applied to other migrate_qmp* because they don't need the port. Signed-off-by: Het Gala Suggested-by: Fabiano Rosas Reviewed-by: Fabiano

[PULL 00/26] Migration 20240423 patches

2024-04-23 Thread Peter Xu
The following changes since commit c25df57ae8f9fe1c72eee2dab37d76d904ac382e: Update version for 9.0.0 release (2024-04-23 14:19:21 +0100) are available in the Git repository at: https://gitlab.com/peterx/qemu.git tags/migration-20240423-pull-request for you to fetch changes up

Re: [PATCH RFC 00/26] Multifd  device state transfer support with VFIO consumer

2024-04-23 Thread Peter Xu
On Wed, Apr 24, 2024 at 12:25:08AM +0200, Maciej S. Szmigiero wrote: > On 24.04.2024 00:20, Peter Xu wrote: > > On Tue, Apr 23, 2024 at 06:15:35PM +0200, Maciej S. Szmigiero wrote: > > > On 19.04.2024 17:31, Peter Xu wrote: > > > > On Fri, Apr 19, 2024 at 11:07:21AM +0100, Daniel P. Berrangé

[PATCH 01/24] target/ppc: Fix gen_sc to use correct nip

2024-04-23 Thread BALATON Zoltan
Most exceptions are raised with nip pointing to the faulting instruction but the sc instruction generating a syscall exception leaves nip pointing to next instruction. Fix gen_sc to not use gen_exception_err() which sets nip back but correctly set nip to pc_next so we don't have to patch this in

[PATCH 06/24] target/ppc/mmu_common.c: Simplify checking for real mode

2024-04-23 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 --- target/ppc/mmu_common.c | 6 -- 1

[PATCH 15/24] target/ppc/mmu_common.c: Fix misindented qemu_log_mask() calls

2024-04-23 Thread BALATON Zoltan
Fix several qemu_log_mask() calls that are misindented. Signed-off-by: BALATON Zoltan --- 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_common.c index

[PATCH 07/24] target/ppc/mmu_common.c: Drop cases for unimplemented MPC8xx MMU

2024-04-23 Thread BALATON Zoltan
The default case will catch this and abort the same way and there is still a warning about it in ppc_tlb_invalidate_all() so drop these from mmu_common.c to simplify this code. Signed-off-by: BALATON Zoltan --- target/ppc/mmu_common.c | 9 - 1 file changed, 9 deletions(-) diff --git

[PATCH 10/24] target/ppc/mmu_common.c: Split out BookE cases before checking real mode

2024-04-23 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 --- target/ppc/mmu_common.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

[PATCH 19/24] target/ppc: Move mmu_ctx_t definition to mmu_common.c

2024-04-23 Thread BALATON Zoltan
This type is only used within mmu_common.c. Move its definition from internal.h to there. Signed-off-by: BALATON Zoltan --- target/ppc/internal.h | 12 target/ppc/mmu_common.c | 11 +++ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/target/ppc/internal.h

[PATCH 03/24] target/ppc: Simplify syscall exception handlers

2024-04-23 Thread BALATON Zoltan
After previous changes the hypercall handling in 7xx and 74xx exception handlers can be folded into one if statement to simplify this code. Also add "unlikely" to mark the less frequently used branch for the compiler. Signed-off-by: BALATON Zoltan Reviewed-by: Harsh Prateek Bora ---

[PATCH 17/24] target/ppc/mmu_common.c: Replace hard coded constants in ppc_jumbo_xlate()

2024-04-23 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

[PATCH 09/24] target/ppc/mmu_common.c: Rename get_bat_6xx_tlb()

2024-04-23 Thread BALATON Zoltan
Rename to ppc6xx_tlb_get_bat() to match other similar names in the same file. 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 index 47346adb88..1fbf5a1bb0 100644

[PATCH 12/24] target/ppc/mmu_common.c: Inline and remove check_physical()

2024-04-23 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 --- target/ppc/mmu_common.c | 26 +++--- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git

[PATCH 21/24] target/ppc/mmu_common.c: Split off BookE handling from ppc_jumbo_xlate()

2024-04-23 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 --- target/ppc/mmu_common.c | 180 ++-- 1 file changed, 138 insertions(+), 42 deletions(-) diff --git

[PATCH 14/24] target/ppc/mmu_common.c: Simplify mmubooke206_get_physical_address()

2024-04-23 Thread BALATON Zoltan
This function is similar to mmubooke_get_physical_address() and can be simplified the same way. Signed-off-by: BALATON Zoltan --- target/ppc/mmu_common.c | 28 ++-- 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/target/ppc/mmu_common.c

[PATCH 16/24] target/ppc/mmu_common.c: Deindent ppc_jumbo_xlate()

2024-04-23 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 --- target/ppc/mmu_common.c | 319 1 file changed, 159 insertions(+), 160 deletions(-) diff

[PATCH 23/24] target/ppc/mmu_common.c: Simplify ppc_booke_xlate()

2024-04-23 Thread BALATON Zoltan
Signed-off-by: BALATON Zoltan --- target/ppc/mmu_common.c | 147 +++- 1 file changed, 56 insertions(+), 91 deletions(-) diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c index ce1cf5cb77..ad64ec1647 100644 --- a/target/ppc/mmu_common.c +++

[PATCH 20/24] target/ppc: Remove ppc_hash32_pp_prot() and reuse common function

2024-04-23 Thread BALATON Zoltan
The ppc_hash32_pp_prot() function in mmu-hash32.c is the same as pp_check() in mmu_common.c. Rename the latter to ppc_pte_prot() and merge with ppc_hash32_pp_prot() to remove duplicated code. Signed-off-by: BALATON Zoltan --- target/ppc/internal.h | 2 +- target/ppc/mmu-hash32.c | 47

[PATCH 18/24] target/ppc/mmu_common.c: Make get_physical_address_wtlb() static

2024-04-23 Thread BALATON Zoltan
This function is not used from any other files so make it static and fix the maybe used uninitialised warnings this has uncovered. Signed-off-by: BALATON Zoltan --- target/ppc/internal.h | 5 + target/ppc/mmu_common.c | 5 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH 08/24] target/ppc/mmu_common.c: Introduce mmu6xx_get_physical_address()

2024-04-23 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

[PATCH 04/24] target/ppc: Remove unused helper

2024-04-23 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 --- target/ppc/helper.h | 2 -- target/ppc/mmu_helper.c | 24 2 files changed, 26 deletions(-) diff --git

[PATCH 05/24] target/ppc/mmu_common.c: Move calculation of a value closer to its usage

2024-04-23 Thread BALATON Zoltan
In mmubooke_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-by: BALATON Zoltan ---

[PATCH 13/24] target/ppc/mmu_common.c: Simplify mmubooke_get_physical_address()

2024-04-23 Thread BALATON Zoltan
Signed-off-by: BALATON Zoltan --- target/ppc/mmu_common.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c index 843f909619..d40ddb6fc3 100644 --- a/target/ppc/mmu_common.c +++

[PATCH 24/24] target/ppc/mmu_common.c: Move BookE MMU functions together

2024-04-23 Thread BALATON Zoltan
Signed-off-by: BALATON Zoltan --- target/ppc/mmu_common.c | 300 1 file changed, 150 insertions(+), 150 deletions(-) diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c index ad64ec1647..18e49aa2f1 100644 --- a/target/ppc/mmu_common.c +++

[PATCH 02/24] target/ppc: Move patching nip from exception handler to helper_scv

2024-04-23 Thread BALATON Zoltan
From: Nicholas Piggin Unlike sc, for scv a facility unavailable interrupt must be generated if FSCR[SCV]=0 so we can't raise the exception with nip set to next instruction but we can move advancing nip if the FSCR check passes to helper_scv so the exception handler does not need to change it.

[PATCH 22/24] target/ppc/mmu_common.c: Remove BookE handling from get_physical_address_wtlb()

2024-04-23 Thread BALATON Zoltan
This function is no longer called for BookE MMU model so remove parts related to it. This has uncovered a few may be used uninitialised warnings that are also fixed. Signed-off-by: BALATON Zoltan --- target/ppc/mmu_common.c | 25 + 1 file changed, 5 insertions(+), 20

[PATCH 11/24] target/ppc/mmu_common.c: Split off real mode cases in get_physical_address_wtlb()

2024-04-23 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 --- target/ppc/mmu_common.c | 34

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

2024-04-23 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 first 3 patches are from the last exception handling clean up series that were dropped due to some error on CI

Re: [PATCH RFC 00/26] Multifd  device state transfer support with VFIO consumer

2024-04-23 Thread Peter Xu
On Tue, Apr 23, 2024 at 06:14:18PM +0200, Maciej S. Szmigiero wrote: > We don't lose any genericity since by default the transfer is done via > mixed RAM / device state multifd channels from a shared pool. > > It's only when x-multifd-channels-device-state is set to value > 0 then > the requested

Re: [PATCH RFC 00/26] Multifd  device state transfer support with VFIO consumer

2024-04-23 Thread Maciej S. Szmigiero
On 24.04.2024 00:20, Peter Xu wrote: On Tue, Apr 23, 2024 at 06:15:35PM +0200, Maciej S. Szmigiero wrote: On 19.04.2024 17:31, Peter Xu wrote: On Fri, Apr 19, 2024 at 11:07:21AM +0100, Daniel P. Berrangé wrote: On Thu, Apr 18, 2024 at 04:02:49PM -0400, Peter Xu wrote: On Thu, Apr 18, 2024 at

Re: [RFC 1/2] iova_tree: add an id member to DMAMap

2024-04-23 Thread Si-Wei Liu
On 4/22/2024 1:49 AM, Eugenio Perez Martin wrote: On Sat, Apr 20, 2024 at 1:50 AM Si-Wei Liu wrote: On 4/19/2024 1:29 AM, Eugenio Perez Martin wrote: On Thu, Apr 18, 2024 at 10:46 PM Si-Wei Liu wrote: On 4/10/2024 3:03 AM, Eugenio Pérez wrote: IOVA tree is also used to track the

Re: [PATCH RFC 00/26] Multifd  device state transfer support with VFIO consumer

2024-04-23 Thread Peter Xu
On Tue, Apr 23, 2024 at 06:15:35PM +0200, Maciej S. Szmigiero wrote: > On 19.04.2024 17:31, Peter Xu wrote: > > On Fri, Apr 19, 2024 at 11:07:21AM +0100, Daniel P. Berrangé wrote: > > > On Thu, Apr 18, 2024 at 04:02:49PM -0400, Peter Xu wrote: > > > > On Thu, Apr 18, 2024 at 08:14:15PM +0200,

[PATCH 6.6 152/158] virtio_net: Do not send RSS key if it is not supported

2024-04-23 Thread Greg Kroah-Hartman
6.6-stable review patch. If anyone has any objections, please let me know. -- From: Breno Leitao commit 059a49aa2e25c58f90b50151f109dd3c4cdb3a47 upstream. There is a bug when setting the RSS options in virtio_net that can break the whole machine, getting the kernel into an

Re: [PATCH v5 1/5] hw/display : Add device DM163

2024-04-23 Thread Philippe Mathieu-Daudé
Hi Inès, On 21/4/24 16:02, Inès Varhol wrote: This device implements the IM120417002 colors shield v1.1 for Arduino (which relies on the DM163 8x3-channel led driving logic) and features a simple display of an 8x8 RGB matrix. The columns of the matrix are driven by the DM163 and the rows are

[PATCH v2 2/3] target/s390x: add support for "disable-deprecated-feats" expansion option

2024-04-23 Thread Collin Walling
Retain a list of deprecated features disjoint from any particular CPU model. When a query-cpu-model-expansion is provided with the "disable-deprecated-feats" option set, the resulting properties list will include all deprecated features paired with false. Example: { ... "bpb": false,

[PATCH v2 3/3] target/s390x: flag te and cte as deprecated

2024-04-23 Thread Collin Walling
Add the CONSTRAINT_TRANSACTIONAL_EXE (cte) and TRANSACTIONAL_EXE (te) to the list of deprecated features. Signed-off-by: Collin Walling --- target/s390x/cpu_features.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c index

Re: Problems (timeouts) when testing usb-ohci with qemu

2024-04-23 Thread Guenter Roeck
Hi Alan, On 4/23/24 10:30, Alan Stern wrote: On Tue, Apr 23, 2024 at 10:04:17AM -0700, Guenter Roeck wrote: Hi, when testing usb-ohci What is usb-ohci? Do you mean ohci-hcd? with qemu's pci-ohci emulation, I keep getting random usb interface timeouts. Sometimes the usb_hub_wq times

[PATCH v2 0/3] query-cpu-model-expansion: add disable-deprecated-feats arg

2024-04-23 Thread Collin Walling
The current implementation of query-cpu-model-expansion is lacking a way to conditionally retrieve CPU models with properties (i.e. features) that are flagged as deprecated set to disabled. To remedy this, a new optional boolean "disable-deprecated-feats" argument has been added to the query.

[PATCH v2 1/3] cpu-models: add "disable-deprecated-feats" option to cpu model expansion

2024-04-23 Thread Collin Walling
This optional parameter for query-cpu-model-expansion enables CPU model features flagged as deprecated to appear in the resulting list of properties. This commit does not add support beyond adding a new argument to the query. All queries with this option present will result in an error claiming

Re: [PATCH v3 1/2] cxl/core: correct length of DPA field masks

2024-04-23 Thread Ira Weiny
Alison Schofield wrote: > On Wed, Apr 17, 2024 at 03:50:52PM +0800, Shiyang Ruan wrote: [snip] > > diff --git a/drivers/cxl/core/trace.h b/drivers/cxl/core/trace.h > > index e5f13260fc52..cdfce932d5b1 100644 > > --- a/drivers/cxl/core/trace.h > > +++ b/drivers/cxl/core/trace.h > > @@ -253,7

Re: [PATCH 3/3] target/arm: Default to 1GHz cntfrq for 'max' and new CPUs

2024-04-23 Thread Philippe Mathieu-Daudé
(+Markus for qdev properties; one inlined comment) On 19/4/24 20:46, Peter Maydell wrote: In previous versions of the Arm architecture, the frequency of the generic timers as reported in CNTFRQ_EL0 could be any IMPDEF value, and for QEMU we picked 62.5MHz, giving a timer tick period of 16ns. In

Re: [PATCH] target/i386/translate.c: always write 32-bits for SGDT and SIDT

2024-04-23 Thread Mark Cave-Ayland
On 23/04/2024 10:18, Paolo Bonzini wrote: On Mon, Apr 22, 2024 at 9:10 PM Volker Rümelin wrote: Am 20.04.24 um 07:40 schrieb Mark Cave-Ayland: Current documentation agrees that all 32 bits are written, so I don't think you need this comment: Ah that's good to know the docs are now

Re: [PATCH] Kconfig: kvm: allow building without any board

2024-04-23 Thread Philippe Mathieu-Daudé
On 23/4/24 21:17, Paolo Bonzini wrote: KVM code might have to call functions on the PCIDevice that is passed to kvm_arch_fixup_msi_route(). This fails in the case where --without-default-devices is used and no board is configured. While this is not really a useful configuration, and therefore

Re: [PATCH 11/22] meson: make target endianneess available to Kconfig

2024-04-23 Thread Fabiano Rosas
Paolo Bonzini writes: > Some targets use "default y" for boards to filter out those that require > TCG. For consistency we are switching all other targets to do the same. > MIPS boards may only be available for big-endian or only for > little-endian emulators, add a symbol so that this can be

[PATCH] Kconfig: kvm: allow building without any board

2024-04-23 Thread Paolo Bonzini
KVM code might have to call functions on the PCIDevice that is passed to kvm_arch_fixup_msi_route(). This fails in the case where --without-default-devices is used and no board is configured. While this is not really a useful configuration, and therefore setting up stubs for CONFIG_PCI is

Re: [PATCH v10 2/6] ui/console: new dmabuf.h and dmabuf.c for QemuDmaBuf struct and helpers

2024-04-23 Thread Daniel P . Berrangé
On Tue, Apr 23, 2024 at 07:05:20PM +, Kim, Dongwon wrote: > Hi Daniel, > > > -Original Message- > > From: Daniel P. Berrangé > > Sent: Tuesday, April 23, 2024 7:07 AM > > To: Kim, Dongwon > > Cc: qemu-devel@nongnu.org; marcandre.lur...@redhat.com; > > phi...@linaro.org > > Subject:

Re: [PATCH 03/22] arm: switch boards to "default y"

2024-04-23 Thread Fabiano Rosas
Paolo Bonzini writes: > Il mar 23 apr 2024, 20:12 Philippe Mathieu-Daudé ha > scritto: > >> Hi Fabiano, >> >> On 23/4/24 20:02, Fabiano Rosas wrote: >> > Paolo Bonzini writes: >> > >> >> For ARM targets, boards that require TCG are already using "default y". >> >> Switch ARM_VIRT to the same

RE: [PATCH v10 2/6] ui/console: new dmabuf.h and dmabuf.c for QemuDmaBuf struct and helpers

2024-04-23 Thread Kim, Dongwon
Hi Daniel, > -Original Message- > From: Daniel P. Berrangé > Sent: Tuesday, April 23, 2024 7:07 AM > To: Kim, Dongwon > Cc: qemu-devel@nongnu.org; marcandre.lur...@redhat.com; > phi...@linaro.org > Subject: Re: [PATCH v10 2/6] ui/console: new dmabuf.h and dmabuf.c for > QemuDmaBuf

Re: hppa-firmware.img missing build-id

2024-04-23 Thread Helge Deller
On 4/23/24 17:10, Daniel P. Berrangé wrote: On Tue, Apr 23, 2024 at 05:07:17PM +0200, Helge Deller wrote: On 4/23/24 16:58, Cole Robinson wrote: On 4/23/24 10:11 AM, Cole Robinson wrote: Hi, hppa-firmware.img and hppa-firmware64.img in qemu.git are missing ELF build-id annotations. rpm

Re: [PATCH v3 2/2] cxl/core: add poison creation event handler

2024-04-23 Thread Dan Williams
Shiyang Ruan wrote: > Currently driver only traces cxl events, poison creation (for both vmem > and pmem type) on cxl memdev is silent. As it should be. > OS needs to be notified then it could handle poison pages in time. No, it was always the case that latent poison is an "action optional"

Re: [PATCH 00/27] Add qapi-domain Sphinx extension

2024-04-23 Thread John Snow
On Tue, Apr 23, 2024, 3:48 AM Markus Armbruster wrote: > John Snow writes: > > > On Mon, Apr 22, 2024 at 12:38 PM John Snow wrote: > >> > >> On Mon, Apr 22, 2024 at 5:20 AM Markus Armbruster > wrote: > >> > > >> > John Snow writes: > >> > > >> > > On Fri, Apr 19, 2024, 10:45 AM Markus

Re: [PATCH 03/22] arm: switch boards to "default y"

2024-04-23 Thread Paolo Bonzini
Il mar 23 apr 2024, 20:12 Philippe Mathieu-Daudé ha scritto: > Hi Fabiano, > > On 23/4/24 20:02, Fabiano Rosas wrote: > > Paolo Bonzini writes: > > > >> For ARM targets, boards that require TCG are already using "default y". > >> Switch ARM_VIRT to the same selection mechanism. > >> > >> No

Re: [PATCH 03/22] arm: switch boards to "default y"

2024-04-23 Thread Fabiano Rosas
Philippe Mathieu-Daudé writes: > Hi Fabiano, > > On 23/4/24 20:02, Fabiano Rosas wrote: >> Paolo Bonzini writes: >> >>> For ARM targets, boards that require TCG are already using "default y". >>> Switch ARM_VIRT to the same selection mechanism. >>> >>> No changes to generated

Re: [PATCH] Add zh_TW Traditional Chinese translation

2024-04-23 Thread Peter Dave Hello
Hi PMM, Zhao & Daniel, Thank you for all your help; I wonder if the copyright can just belong to this project because the copyright to me personally in the open source world just to deal with somebody violets the license. Otherwise, I'm more copyleft. What do you think? Best, Peter On

Re: [PATCH 03/22] arm: switch boards to "default y"

2024-04-23 Thread Philippe Mathieu-Daudé
Hi Fabiano, On 23/4/24 20:02, Fabiano Rosas wrote: Paolo Bonzini writes: For ARM targets, boards that require TCG are already using "default y". Switch ARM_VIRT to the same selection mechanism. No changes to generated config-devices.mak file. Signed-off-by: Paolo Bonzini ---

Re: [PATCH 00/22] configs: switch boards to "default y"

2024-04-23 Thread Paolo Bonzini
Il mar 23 apr 2024, 19:57 Fabiano Rosas ha scritto: > > There is an important difference in that Kconfig symbols for boards > > have to be enabled in a --without-default-devices build, similar to > > devices. > > And how do we make that happen? > Before building you edit configs/devices/ to set

Re: [PATCH 03/22] arm: switch boards to "default y"

2024-04-23 Thread Fabiano Rosas
Paolo Bonzini writes: > For ARM targets, boards that require TCG are already using "default y". > Switch ARM_VIRT to the same selection mechanism. > > No changes to generated config-devices.mak file. > > Signed-off-by: Paolo Bonzini > --- > configs/devices/arm-softmmu/default.mak | 3 ++- >

Re: [PATCH v3 2/2] cxl/core: add poison creation event handler

2024-04-23 Thread Ira Weiny
Shiyang Ruan wrote: > Currently driver only traces cxl events, poison creation (for both vmem > and pmem type) on cxl memdev is silent. OS needs to be notified then it > could handle poison pages in time. Per CXL spec, the device error event > could be signaled through FW-First and OS-First

  1   2   3   >