[PULL v2 35/58] tcg/loongarch64: Set vector registers call clobbered

2024-02-02 Thread Richard Henderson
Because there are more call clobbered registers than call saved registers, we begin with all registers as call clobbered and then reset those that are saved. This was missed when we introduced the LSX support. Cc: qemu-sta...@nongnu.org Fixes: 16288ded944 ("tcg/loongarch64: Lower basic tcg vec op

[PULL v2 12/58] target/loongarch: Rename MMU_IDX_*

2024-02-02 Thread Richard Henderson
The expected form is MMU_FOO_IDX, not MMU_IDX_FOO. Rename to match generic code. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/loongarch/cpu.h | 8 target/loongarch/cpu.c | 2 +- target/lo

[PULL v2 58/58] linux-user/aarch64: Add padding before __kernel_rt_sigreturn

2024-02-02 Thread Richard Henderson
Without this padding, an unwind through the signal handler will pick up the unwind info for the preceding syscall. This fixes gcc's 30_threads/thread/native_handle/cancel.cc. Cc: qemu-sta...@nongnu.org Fixes: ee95fae075c6 ("linux-user/aarch64: Add vdso") Resolves: https://linaro.atlassian.net/bro

[PULL v2 00/58] tcg patch queue

2024-02-02 Thread Richard Henderson
v2: Rebase and resolve target/loongarch conflicts. Include linux-user/aarch64 vdso fix. r~ The following changes since commit 29b008927ef6e3fbb70e6607b25d3fcae26a5190: Merge tag 'pull-nic-config-2-20240202' of git://git.infradead.org/users/dwmw2/qemu into staging (2024-02-0

Re: [PATCH 30/33] target/tricore: Populate CPUClass.mmu_index

2024-02-02 Thread Bastian Koppelmann
On Tue, Jan 30, 2024 at 09:30:40AM +1000, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > target/tricore/cpu.c | 6 ++ > 1 file changed, 6 insertions(+) Reviewed-by: Bastian Koppelmann Cheers, Bastian

Re: [PATCH 0/3] monitor: only run coroutine commands in qemu_aio_context

2024-02-02 Thread YangHang Liu
It's easily for me to encounter " ../block/qcow2.c:5263: ImageInfoSpecific *qcow2_get_specific_info(BlockDriverState *, Error **): Assertion `false' failed" issue during 1Q vhost-user interface + RT VM + post-copy migration After applying this patch, the issue is still not reproduced even if I rep

Re: [PATCH v3 0/5] gdbstub: Implement catching syscalls

2024-02-02 Thread Alex Bennée
Ilya Leoshkevich writes: > v2: https://lists.gnu.org/archive/html/qemu-devel/2024-01/msg02980.html > v2 -> v3: Simplify the catchpoint state by making "don't catch" a > subset of "catch some". > Factor out several prep patches; > Don't use snprintf; > Add s

[PATCH v1 09/15] libvhost-user: Don't search for duplicates when removing memory regions

2024-02-02 Thread David Hildenbrand
We cannot have duplicate memory regions, something would be deeply flawed elsewhere. Let's just stop the search once we found an entry. We'll add more sanity checks when adding memory regions later. Signed-off-by: David Hildenbrand --- subprojects/libvhost-user/libvhost-user.c | 3 +-- 1 file c

[PATCH v1 12/15] libvhost-user: Use most of mmap_offset as fd_offset

2024-02-02 Thread David Hildenbrand
In the past, QEMU would create memory regions that could partially cover hugetlb pages, making mmap() fail if we would use the mmap_offset as an fd_offset. For that reason, we never used the mmap_offset as an offset into the fd and instead always mapped the fd from the very start. However, that ca

[PATCH v1 13/15] libvhost-user: Factor out vq usability check

2024-02-02 Thread David Hildenbrand
Let's factor it out to prepare for further changes. Signed-off-by: David Hildenbrand --- subprojects/libvhost-user/libvhost-user.c | 24 +++ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/

[PATCH v1 05/15] libvhost-user: Merge vu_set_mem_table_exec_postcopy() into vu_set_mem_table_exec()

2024-02-02 Thread David Hildenbrand
Let's reduce some code duplication and prepare for further changes. Signed-off-by: David Hildenbrand --- subprojects/libvhost-user/libvhost-user.c | 119 +++--- 1 file changed, 39 insertions(+), 80 deletions(-) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subproject

[PATCH v1 02/15] libvhost-user: Dynamically allocate memory for memory slots

2024-02-02 Thread David Hildenbrand
Let's prepare for increasing VHOST_USER_MAX_RAM_SLOTS by dynamically allocating dev->regions. We don't have any ABI guarantees (not dynamically linked), so we can simply change the layout of VuDev. Let's zero out the memory, just as we used to do. Signed-off-by: David Hildenbrand --- subproject

[PATCH v1 08/15] libvhost-user: Don't zero out memory for memory regions

2024-02-02 Thread David Hildenbrand
dev->nregions always covers only valid entries. Stop zeroing out other array elements that are unused. Signed-off-by: David Hildenbrand --- subprojects/libvhost-user/libvhost-user.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/subprojects/libvhost-user/libvhost-user.

[PATCH v1 11/15] libvhost-user: Speedup gpa_to_mem_region() and vu_gpa_to_va()

2024-02-02 Thread David Hildenbrand
Let's speed up GPA to memory region / virtual address lookup. Store the memory regions ordered by guest physical addresses, and use binary search for address translation, as well as when adding/removing memory regions. Most importantly, this will speed up GPA->VA address translation when we have m

[PATCH v1 07/15] libvhost-user: No need to check for NULL when unmapping

2024-02-02 Thread David Hildenbrand
We never add a memory region if mmap() failed. Therefore, no need to check for NULL. Signed-off-by: David Hildenbrand --- subprojects/libvhost-user/libvhost-user.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subproje

[PATCH v1 15/15] libvhost-user: Mark mmap'ed region memory as MADV_DONTDUMP

2024-02-02 Thread David Hildenbrand
We already use MADV_NORESERVE to deal with sparse memory regions. Let's also set madvise(MADV_DONTDUMP), otherwise a crash of the process can result in us allocating all memory in the mmap'ed region for dumping purposes. This change implies that the mmap'ed rings won't be included in a coredump. I

[PATCH v1 01/15] libvhost-user: Fix msg_region->userspace_addr computation

2024-02-02 Thread David Hildenbrand
We barely had mmap_offset set in the past. With virtio-mem and dynamic-memslots that will change. In vu_add_mem_reg() and vu_set_mem_table_exec_postcopy(), we are performing pointer arithmetics, which is wrong. Let's simply use dev_region->mmap_addr instead of "void *mmap_addr". Fixes: ec94c8e621

[PATCH v1 00/15] libvhost-user: support more memslots and cleanup memslot handling code

2024-02-02 Thread David Hildenbrand
This series adds support for more memslots (509) to libvhost-user, to make it fully compatible with virtio-mem that uses up to 256 memslots accross all memory devices in "dynamic-memslot" mode (more details in patch #3). One simple fix upfront. With that in place, this series optimizes and extens

[PATCH v1 03/15] libvhost-user: Bump up VHOST_USER_MAX_RAM_SLOTS to 509

2024-02-02 Thread David Hildenbrand
Let's support up to 509 mem slots, just like vhost in the kernel usually does and the rust vhost-user implementation recently [1] started doing. This is required to properly support memory hotplug, either using multiple DIMMs (ACPI supports up to 256) or using virtio-mem. The 509 used to be the KV

[PATCH v1 06/15] libvhost-user: Factor out adding a memory region

2024-02-02 Thread David Hildenbrand
Let's factor it out, reducing quite some code duplication and perparing for further changes. If we fail to mmap a region and panic, we now simply don't add that (broken) region. Note that we now increment dev->nregions as we are successfully adding memory regions, and don't increment dev->nregion

[PATCH v1 14/15] libvhost-user: Dynamically remap rings after (temporarily?) removing memory regions

2024-02-02 Thread David Hildenbrand
Currently, we try to remap all rings whenever we add a single new memory region. That doesn't quite make sense, because we already map rings when setting the ring address, and panic if that goes wrong. Likely, that handling was simply copied from set_mem_table code, where we actually have to remap

[PATCH v1 10/15] libvhost-user: Factor out search for memory region by GPA and simplify

2024-02-02 Thread David Hildenbrand
Memory regions cannot overlap, and if we ever hit that case something would be really flawed. For example, when vhost code in QEMU decides to increase the size of memory regions to cover full huge pages, it makes sure to never create overlaps, and if there would be overlaps, it would bail out. QE

[PATCH v1 04/15] libvhost-user: Factor out removing all mem regions

2024-02-02 Thread David Hildenbrand
Let's factor it out. Note that the check for MAP_FAILED was wrong as we never set mmap_addr if mmap() failed. We'll remove the NULL check separately. Signed-off-by: David Hildenbrand --- subprojects/libvhost-user/libvhost-user.c | 34 --- 1 file changed, 18 insertions(+), 16

Re: [PATCH v2 23/23] migration/multifd: Optimize sender side to be lockless

2024-02-02 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > When reviewing my attempt to refactor send_prepare(), Fabiano suggested we > try out with dropping the mutex in multifd code [1]. > > I thought about that before but I never tried to change the code. Now > maybe it's time to give it a stab. This on

Re: [PATCH v2 22/23] migration/multifd: Fix MultiFDSendParams.packet_num race

2024-02-02 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > As reported correctly by Fabiano [1], MultiFDSendParams.packet_num is buggy > to be assigned and stored. Consider two consequent operations of: (1) > queue a job into multifd send thread X, then (2) queue another sync request > to the same send thre

Re: [PATCH v2 21/23] migration/multifd: Stick with send/recv on function names

2024-02-02 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > Most of the multifd code uses send/recv to represent the two sides, but > some rare cases use save/load. > > Since send/recv is the majority, replacing the save/load use cases to use > send/recv globally. Now we reach a consensus on the naming. > >

Re: [PATCH v2 20/23] migration/multifd: Cleanup multifd_load_cleanup()

2024-02-02 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > Use similar logic to cleanup the recv side. > > Note that multifd_recv_terminate_threads() may need some similar rework > like the sender side, but let's leave that for later. > > Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas

Re: [PATCH v2 19/23] migration/multifd: Cleanup multifd_save_cleanup()

2024-02-02 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > Shrink the function by moving relevant works into helpers: move the thread > join()s into multifd_send_terminate_threads(), then create two more helpers > to cover channel/state cleanups. > > Add a TODO entry for the thread terminate process because

[PATCH v3 3/3] hw/i2c: smbus_slave: Reset state on reset

2024-02-02 Thread Joe Komlodi
If a reset comes while the SMBus device is not in its idle state, it's possible for it to get confused on valid transactions post-reset. Signed-off-by: Joe Komlodi --- hw/i2c/smbus_slave.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/i2c/smbus_slave.c b/hw/i2c/smbus_slave.c in

[PATCH v3 0/3] hw/i2c: smbus: Reset fixes

2024-02-02 Thread Joe Komlodi
Changelog: v2 -> v3 Patch 1 - Removed I3CBus class definition, since it was unneeded. - whitespace fixes - Changed enter_reset to hold_reset Patch 2 - Moved pointer returned by object_get_canonical_path outside of printf so it can be freed Patch 3 - Changed enter_reset to hold_reset v1 -> v2

[PATCH v3 1/3] hw/i2c: core: Add reset

2024-02-02 Thread Joe Komlodi
It's possible for a reset to come in the middle of a transaction, which causes the bus to be in an old state when a new transaction comes in. Signed-off-by: Joe Komlodi --- hw/i2c/core.c| 19 +++ include/hw/i2c/i2c.h | 2 +- 2 files changed, 20 insertions(+), 1 deletion(

[PATCH v3 2/3] hw/i2c/smbus_slave: Add object path on error prints

2024-02-02 Thread Joe Komlodi
The current logging doesn't tell us which specific smbus device is an error state. Signed-off-by: Joe Komlodi --- hw/i2c/smbus_slave.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/i2c/smbus_slave.c b/hw/i2c/smbus_slave.c index 1300c9ec72..9f9afc25a4 100644 --- a

Re: [PATCH v2 18/23] migration/multifd: Rewrite multifd_queue_page()

2024-02-02 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > The current multifd_queue_page() is not easy to read and follow. It is not > good with a few reasons: > > - No helper at all to show what exactly does a condition mean; in short, > readability is low. > > - Rely on pages->ramblock being cleare

Re: [PATCH v2 1/3] hw/i2c: core: Add reset

2024-02-02 Thread Joe Komlodi
Hi peter, On Thu, Feb 1, 2024 at 7:24 AM Peter Maydell wrote: > > On Fri, 26 Jan 2024 at 00:56, Joe Komlodi wrote: > > > > It's possible for a reset to come in the middle of a transaction, which > > causes the bus to be in an old state when a new transaction comes in. > > > > Signed-off-by: Joe

[PATCH] Hexagon (target/hexagon) Only pass env to generated helper when needed

2024-02-02 Thread Taylor Simpson
Currently, we pass env to every generated helper. When the semantics of the instruction only depend on the arguments, this is unnecessary and adds extra overhead to the helper call. The A2_nop and SA1_setin1 instructions end up with no arguments. This results in a "old-style function definition"

Re: [PATCH v2 17/23] migration/multifd: Change retval of multifd_send_pages()

2024-02-02 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > Using int is an overkill when there're only two options. Change it to a > boolean. > > Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas

Re: [PATCH v2 16/23] migration/multifd: Change retval of multifd_queue_page()

2024-02-02 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > Using int is an overkill when there're only two options. Change it to a > boolean. > > Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas

Re: [PATCH v2 15/23] migration/multifd: Split multifd_send_terminate_threads()

2024-02-02 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > Split multifd_send_terminate_threads() into two functions: > > - multifd_send_set_error(): used when an error happened on the sender > side, set error and quit state only > > - multifd_send_terminate_threads(): used only by the main thread to

Re: [PULL 02/10] hw/hppa/machine: Disable default devices with --nodefaults option

2024-02-02 Thread Helge Deller
On 2/2/24 19:04, Guenter Roeck wrote: On Fri, Feb 02, 2024 at 10:54:20AM +0100, Helge Deller wrote: Hi Guenter, On 2/2/24 05:22, Guenter Roeck wrote: On Sat, Jan 13, 2024 at 06:57:20AM +0100, del...@kernel.org wrote: From: Helge Deller Recognize the qemu --nodefaults option, which will disa

Re: [PATCH v2 13/23] migration/multifd: Move header prepare/fill into send_prepare()

2024-02-02 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > This patch redefines the interfacing of ->send_prepare(). It further > simplifies multifd_send_thread() especially on zero copy. > > Now with the new interface, we require the hook to do all the work for > preparing the IOVs to send. After it's com

Re: [PATCH v2 07/23] migration/multifd: Simplify locking in sender thread

2024-02-02 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > The sender thread will yield the p->mutex before IO starts, trying to not > block the requester thread. This may be unnecessary lock optimizations, > because the requester can already read pending_job safely even without the > lock, because the requ

Re: [PATCH v2 06/23] migration/multifd: Separate SYNC request with normal jobs

2024-02-02 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > Multifd provide a threaded model for processing jobs. On sender side, > there can be two kinds of job: (1) a list of pages to send, or (2) a sync > request. > > The sync request is a very special kind of job. It never contains a page > array, but o

Re: [PATCH v2 03/23] migration/multifd: Drop MultiFDSendParams.quit, cleanup error paths

2024-02-02 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > Multifd send side has two fields to indicate error quits: > > - MultiFDSendParams.quit > - &multifd_send_state->exiting > > Merge them into the global one. The replacement is done by changing all > p->quit checks into the global var check. The

[PATCH 2/5] migration/multifd: Remove p->running

2024-02-02 Thread Fabiano Rosas
We currently only need p->running to avoid calling qemu_thread_join() on a non existent thread if the thread has never been created. However, there are at least two bugs in this logic: 1) On the sending side, p->running is set too early and qemu_thread_create() can be skipped due to an error duri

[PATCH 4/5] migration/multifd: Move multifd_save_setup into migration thread

2024-02-02 Thread Fabiano Rosas
We currently have an unfavorable situation around multifd channels creation and the migration thread execution. We create the multifd channels with qio_channel_socket_connect_async -> qio_task_run_in_thread, but only connect them at the multifd_new_send_channel_async callback, called from qio_task

[PATCH 5/5] migration/multifd: Add a synchronization point for channel creation

2024-02-02 Thread Fabiano Rosas
It is possible that one of the multifd channels fails to be created at multifd_new_send_channel_async() while the rest of the channel creation tasks are still in flight. This could lead to multifd_save_cleanup() executing the qemu_thread_join() loop too early and not waiting for the threads which

[PATCH 0/5] migration/multifd: Fix channel creation vs. cleanup races

2024-02-02 Thread Fabiano Rosas
Hi, This contains 2 patches from my previous series addressing the p->running misuse and the TLS thread leak and 3 new patches to fix the cleanup-while-creating-threads race. For the p->running I'm keeping the idea from the other series to remove p->running and use a more narrow p->thread_created

[PATCH 3/5] migration/multifd: Move multifd_save_setup error handling in to the function

2024-02-02 Thread Fabiano Rosas
Hide the error handling inside multifd_save_setup to make it cleaner for the next patch to move the function around. Signed-off-by: Fabiano Rosas --- migration/migration.c | 6 +- migration/multifd.c | 24 +--- migration/multifd.h | 2 +- 3 files changed, 19 inserti

[PATCH 1/5] migration/multifd: Join the TLS thread

2024-02-02 Thread Fabiano Rosas
We're currently leaking the resources of the TLS thread by not joining it and also overwriting the p->thread pointer altogether. Signed-off-by: Fabiano Rosas --- migration/multifd.c | 8 +++- migration/multifd.h | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/migration/

Re: [PULL v2 00/47] nic-config-2 queue

2024-02-02 Thread Peter Maydell
:42:11 +) > > are available in the Git repository at: > > git://git.infradead.org/users/dwmw2/qemu.git tags/pull-nic-config-2-20240202 > > for you to fetch changes up to e8c5c4525cbbd7207c085732cfd1e67d8f3d662a: > > net: make nb_nics and nd_ta

Re: [PULL 02/10] hw/hppa/machine: Disable default devices with --nodefaults option

2024-02-02 Thread Guenter Roeck
On Fri, Feb 02, 2024 at 10:54:20AM +0100, Helge Deller wrote: > Hi Guenter, > > On 2/2/24 05:22, Guenter Roeck wrote: > > On Sat, Jan 13, 2024 at 06:57:20AM +0100, del...@kernel.org wrote: > > > From: Helge Deller > > > > > > Recognize the qemu --nodefaults option, which will disable the > > > f

Re: [RFC v1 3/3] hw/arm/virt-acpi-build.c: Enable CPU cache topology

2024-02-02 Thread Jonathan Cameron via
On Thu, 1 Feb 2024 16:06:55 + Peter Maydell wrote: > On Mon, 29 Jan 2024 at 11:08, Jonathan Cameron > wrote: > > > > On Mon, 29 Jan 2024 00:14:23 -0800 > > Sia Jee Heng wrote: > > > > > Introduced a 3-layer cache for the ARM virtual machine. > > > > > > Signed-off-by: Sia Jee Heng > >

Re: [PULL 00/47] nic-config.for-upstream queue

2024-02-02 Thread David Woodhouse
On Fri, 2024-02-02 at 16:15 +, Peter Maydell wrote: > On Fri, 2 Feb 2024 at 16:01, David Woodhouse wrote: > > > > What is the next step? Post the full series as a v5, or perhaps just > > the single fixed patch which is now at > > https://git.infradead.org/?p=users/dwmw2/qemu.git;a=commitdiff;

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-02 Thread Peter Maydell
On Fri, 2 Feb 2024 at 16:50, Gregory Price wrote: > > On Fri, Feb 02, 2024 at 04:33:20PM +, Peter Maydell wrote: > > Here we are trying to take an interrupt. This isn't related to the > > other can_do_io stuff, it's happening because do_ld_mmio_beN assumes > > it's called with the BQL not held

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-02 Thread Gregory Price
On Fri, Feb 02, 2024 at 04:33:20PM +, Peter Maydell wrote: > On Fri, 2 Feb 2024 at 16:26, Jonathan Cameron > wrote: > > #7 0x55ab1929 in bql_lock_impl (file=0x56049122 > > "../../accel/tcg/cputlb.c", line=2033) at ../../system/cpus.c:524 > > #8 bql_lock_impl (file=file@entry=0x5

Re: [PULL 00/57] tcg patch queue

2024-02-02 Thread Peter Maydell
ilable in the Git repository at: > > https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20240202 > > for you to fetch changes up to 73e095fc71dfeb8f5f767d9ac71078e562d935b0: > > target/sparc: Remove FSR_FTT_NMASK,

[PULL v2 38/47] hw/net/lasi_i82596: use qemu_create_nic_device()

2024-02-02 Thread David Woodhouse
From: David Woodhouse Create the device only if there is a corresponding NIC config for it. Remove the explicit check on nd_table[0].used from hw/hppa/machine.c which (since commit d8a3220005d7) tries to do the same thing. The lasi_82596 support has been disabled since it was first introduced, s

[PULL v2 00/47] nic-config-2 queue

2024-02-02 Thread David Woodhouse
sers/dwmw2/qemu.git tags/pull-nic-config-2-20240202 for you to fetch changes up to e8c5c4525cbbd7207c085732cfd1e67d8f3d662a: net: make nb_nics and nd_table[] static in net/net.c (2024-02-02 16:23:48 +) Rework matching of network

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-02 Thread Peter Maydell
On Fri, 2 Feb 2024 at 16:26, Jonathan Cameron wrote: > New exciting trace... > Thread 5 "qemu-system-x86" received signal SIGABRT, Aborted. > [Switching to Thread 0x74efe6c0 (LWP 16503)] > __pthread_kill_implementation (no_tid=0, signo=6, threadid=) > at ./nptl/pthread_kill.c:44 > Download fa

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-02 Thread Jonathan Cameron via
On Thu, 1 Feb 2024 13:56:09 -0500 Gregory Price wrote: > On Thu, Feb 01, 2024 at 06:04:26PM +, Peter Maydell wrote: > > On Thu, 1 Feb 2024 at 17:25, Alex Bennée wrote: > > > > > > Jonathan Cameron writes: > > > >> > #21 0x55ca3e5d in do_st8_mmu (cpu=0x578e0cb0, > > > >> > a

[PATCH v4.1 38/47] hw/net/lasi_i82596: use qemu_create_nic_device()

2024-02-02 Thread David Woodhouse
From: David Woodhouse Create the device only if there is a corresponding NIC config for it. Remove the explicit check on nd_table[0].used from hw/hppa/machine.c which (since commit d8a3220005d7) tries to do the same thing. The lasi_82596 support has been disabled since it was first introduced,

Re: [PULL 00/47] nic-config.for-upstream queue

2024-02-02 Thread Peter Maydell
On Fri, 2 Feb 2024 at 16:01, David Woodhouse wrote: > > On Fri, 2024-02-02 at 15:32 +, Peter Maydell wrote: > > > > $ ./build/all/qemu-system-hppa -M C3700 > > Segmentation fault (core dumped) > > Ah, got it. Some HPPA machine types don't have a lasi_dev. > > > --- a/hw/hppa/machine.c > +++ b/

Re: [PULL 00/47] nic-config.for-upstream queue

2024-02-02 Thread David Woodhouse
On Fri, 2024-02-02 at 15:32 +, Peter Maydell wrote: > > $ ./build/all/qemu-system-hppa -M C3700 > Segmentation fault (core dumped) Ah, got it. Some HPPA machine types don't have a lasi_dev. --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -362,9 +362,11 @@ static void machine_HP_common_in

KVM/QEMU Community Call 6th Feb Agenda Items

2024-02-02 Thread Alex Bennée
Hi, The KVM/QEMU community call is at: https://meet.jit.si/kvmcallmeeting @ 6/2/2024 14:00 UTC As I'll be away Philippe has volunteered to run the meeting. So far we have one agenda item which is to discuss next steps from Markus' post about dynamic modelling: Message-ID: <87o7d1i7ky..

Re: [PULL 00/47] nic-config.for-upstream queue

2024-02-02 Thread Peter Maydell
On Fri, 2 Feb 2024 at 15:36, David Woodhouse wrote: > > On Fri, 2024-02-02 at 15:32 +, Peter Maydell wrote: > > > > This fails "make check' because some of the qom-test and > > test-hmp checks fail when the QEMU binary segfaults. > > > > https://gitlab.com/qemu-project/qemu/-/jobs/6084552256 >

[PULL 28/36] hw/xen: convert stderr prints to error/warn reports

2024-02-02 Thread Peter Maydell
From: Manos Pitsidianakis According to the QEMU Coding Style document: > Do not use printf(), fprintf() or monitor_printf(). Instead, use > error_report() or error_vreport() from error-report.h. This ensures the > error is reported in the right place (current monitor or stderr), and in > a unifo

[PULL 27/36] hw/xen/xen-hvm-common.c: convert DPRINTF to tracepoints

2024-02-02 Thread Peter Maydell
From: Manos Pitsidianakis Tracing DPRINTFs to stderr might not be desired. A developer that relies on tracepoints should be able to opt-in to each tracepoint and rely on QEMU's log redirection, instead of stderr by default. This commit converts DPRINTFs in this file that are used for tracing int

[PULL 04/36] adb: Switch bus reset to 3-phase-reset

2024-02-02 Thread Peter Maydell
Switch the ADB bus from using BusClass::reset to the Resettable interface. This has no behavioural change, because the BusClass code to support subclasses that use the legacy BusClass::reset will call that method in the hold phase of 3-phase reset. Signed-off-by: Peter Maydell Acked-by: Michael

[PULL 09/36] target/arm: Add ID_AA64ZFR0_EL1.B16B16 to the exposed-to-userspace set

2024-02-02 Thread Peter Maydell
In kernel commit 5d5b4e8c2d9ec ("arm64/sve: Report FEAT_SVE_B16B16 to userspace") Linux added ID_AA64ZFR0_el1.B16B16 to the set of ID register fields which it exposes to userspace. Update our exported_bits mask to include this. (This doesn't yet change any behaviour for us, because we don't yet h

[PULL 03/36] vmbus: Switch bus reset to 3-phase-reset

2024-02-02 Thread Peter Maydell
Switch vmbus from using BusClass::reset to the Resettable interface. This has no behavioural change, because the BusClass code to support subclasses that use the legacy BusClass::reset will call that method in the hold phase of 3-phase reset. Signed-off-by: Peter Maydell Acked-by: Michael S. Tsi

[PULL 14/36] hw/arm/exynos: Check for CPU types in machine_run_board_init()

2024-02-02 Thread Peter Maydell
From: Philippe Mathieu-Daudé Restrict MachineClass::valid_cpu_types[] to the single valid CPU type. Instead of ignoring invalid CPU type requested by the user: $ qemu-system-arm -M nuri -cpu cortex-a7 -S -monitor stdio QEMU 8.2.50 monitor - type 'help' for more information (qemu) info qom

[PULL 15/36] hw/arm/highbank: Add missing QOM parent for CPU cores

2024-02-02 Thread Peter Maydell
From: Philippe Mathieu-Daudé QDev objects created with qdev_new() need to manually add their parent relationship with object_property_add_child(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Gavin Shan Message-id: 20240129151828.59544-4-phi...@linaro.org

[PULL 34/36] tests/qtest: Adding PCS Module test to GMAC Qtest

2024-02-02 Thread Peter Maydell
From: Nabih Estefan Diaz - Add PCS Register check to npcm_gmac-test Change-Id: I34821beb5e0b1e89e2be576ab58eabe41545af12 Signed-off-by: Nabih Estefan Reviewed-by: Tyrone Ting Message-id: 20240131002800.989285-7-nabiheste...@google.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell

[PULL 24/36] hw/arm/z2: convert DPRINTF to trace events and guest errors

2024-02-02 Thread Peter Maydell
From: Manos Pitsidianakis Tracing DPRINTFs to stderr might not be desired. A developer that relies on trace events should be able to opt-in to each trace event and rely on QEMU's log redirection, instead of stderr by default. This commit converts DPRINTFs in this file that are used for tracing i

[PULL 35/36] hw/ssi: Implement BCM2835 SPI Controller

2024-02-02 Thread Peter Maydell
From: Rayhan Faizel This patch adds the SPI controller for the BCM2835. Polling and interrupt modes of transfer are supported. DMA and LoSSI modes are currently unimplemented. Signed-off-by: Rayhan Faizel Message-id: 20240129221807.2983148-2-rayhan.fai...@gmail.com Reviewed-by: Peter Maydell S

[PULL 36/36] hw/arm: Connect SPI Controller to BCM2835

2024-02-02 Thread Peter Maydell
From: Rayhan Faizel This patch will allow the SPI controller to be accessible from BCM2835 based boards as SPI0. SPI driver is usually disabled by default and config.txt does not work. Instead, dtmerge can be used to apply spi=on on a bcm2835 dtb file. Signed-off-by: Rayhan Faizel Message-id:

[PULL 21/36] hw/arm/zynq: Check for CPU types in machine_run_board_init()

2024-02-02 Thread Peter Maydell
From: Philippe Mathieu-Daudé Leverage the common code introduced in commit c9cf636d48 ("machine: Add a valid_cpu_types property") to check for the single valid CPU type. Remove the now unused MachineClass::default_cpu_type field. Reviewed-by: Richard Henderson Reviewed-by: Gavin Shan Signed-of

[PULL 12/36] doc/sphinx/hxtool.py: add optional label argument to SRST directive

2024-02-02 Thread Peter Maydell
From: David Woodhouse We can't just embed labels directly into files like qemu-options.hx which are included from multiple top-level rST files, because Sphinx sees the labels as duplicate: https://github.com/sphinx-doc/sphinx/issues/9707 So add an optional argument to the SRST directive which ca

[PULL 26/36] hw/xen/xen-mapcache.c: convert DPRINTF to tracepoints

2024-02-02 Thread Peter Maydell
From: Manos Pitsidianakis Tracing DPRINTFs to stderr might not be desired. A developer that relies on tracepoints should be able to opt-in to each tracepoint and rely on QEMU's log redirection, instead of stderr by default. This commit converts DPRINTFs in this file that are used for tracing int

[PULL 07/36] system/vl.c: Fix handling of '-serial none -serial something'

2024-02-02 Thread Peter Maydell
Currently if the user passes multiple -serial options on the command line, we mostly treat those as applying to the different serial devices in order, so that for example -serial stdio -serial file:filename will connect the first serial port to stdio and the second to the named file. The exceptio

[PULL 10/36] tests/qtest/xlnx-versal-trng-test.c: Drop use of variable length array

2024-02-02 Thread Peter Maydell
This test program is the last use of any variable length array in the codebase. If we can get rid of all uses of VLAs we can make the compiler error on new additions. This is a defensive measure against security bugs where an on-stack dynamic allocation isn't correctly size-checked (e.g. CVE-202

[PULL 01/36] target/arm: fix exception syndrome for AArch32 bkpt insn

2024-02-02 Thread Peter Maydell
From: Jan Klötzke Debug exceptions that target AArch32 Hyp mode are reported differently than on AAarch64. Internally, Qemu uses the AArch64 syndromes. Therefore such exceptions need to be either converted to a prefetch abort (breakpoints, vector catch) or a data abort (watchpoints). Cc: qemu-st

[PULL 22/36] pci-host: designware: Limit value range of iATU viewport register

2024-02-02 Thread Peter Maydell
From: Guenter Roeck The latest version of qemu (v8.2.0-869-g7a1dc45af5) crashes when booting the mcimx7d-sabre emulation with Linux v5.11 and later. qemu-system-arm: ../system/memory.c:2750: memory_region_set_alias_offset: Assertion `mr->alias' failed. Problem is that the Designware PCIe emula

[PULL 16/36] hw/arm/highbank: Check for CPU types in machine_run_board_init()

2024-02-02 Thread Peter Maydell
From: Philippe Mathieu-Daudé Restrict MachineClass::valid_cpu_types[] to the single valid CPU types. Instead of ignoring invalid CPU type requested by the user: $ qemu-system-arm -M midway -cpu cortex-a7 -S -monitor stdio QEMU 8.2.50 monitor - type 'help' for more information (qemu) info

[PULL 31/36] tests/qtest: Creating qtest for GMAC Module

2024-02-02 Thread Peter Maydell
From: Nabih Estefan Diaz - Created qtest to check initialization of registers in GMAC Module. - Implemented test into Build File. Change-Id: I8b2fe152d3987a7eec4cf6a1d25ba92e75a5391d Signed-off-by: Nabih Estefan Reviewed-by: Tyrone Ting Message-id: 20240131002800.989285-4-nabiheste...@google

[PULL 00/36] target-arm queue

2024-02-02 Thread Peter Maydell
tags/pull-target-arm-20240202 for you to fetch changes up to f09c2b7ba9908714a3e2f1decd989462536cf731: hw/arm: Connect SPI Controller to BCM2835 (2024-02-02 13:51:59 +) target/arm: fix exception syndrome for AArch32 bkpt insn

[PULL 17/36] hw/arm/msf2: Simplify setting MachineClass::valid_cpu_types[]

2024-02-02 Thread Peter Maydell
From: Philippe Mathieu-Daudé The M2Sxxx SoC family can only be used with Cortex-M3. Propagating the CPU type from the board level is pointless. Hard-code the CPU type at the SoC level. Remove the now ignored MachineClass::default_cpu_type field. Use the common code introduced in commit c9cf636d

[PULL 02/36] pci: Switch bus reset to 3-phase-reset

2024-02-02 Thread Peter Maydell
Switch the PCI bus from using BusClass::reset to the Resettable interface. This has no behavioural change, because the BusClass code to support subclasses that use the legacy BusClass::reset will call that method in the hold phase of 3-phase reset. Signed-off-by: Peter Maydell Acked-by: Michael

[PULL 32/36] hw/net: GMAC Rx Implementation

2024-02-02 Thread Peter Maydell
From: Nabih Estefan Diaz - Implementation of Receive function for packets - Implementation for reading and writing from and to descriptors in memory for Rx When RX starts, we need to flush the queued packets so that they can be received by the GMAC device. Without this it won't work with TAP N

[PULL 11/36] target/arm: Reinstate "vfp" property on AArch32 CPUs

2024-02-02 Thread Peter Maydell
In commit 4315f7c614743 we restructured the logic for creating the VFP related properties to avoid testing the aa32_simd_r32 feature on AArch64 CPUs. However in the process we accidentally stopped exposing the "vfp" QOM property on AArch32 TCG CPUs. This mostly hasn't had any ill effects because

[PULL 33/36] hw/net: GMAC Tx Implementation

2024-02-02 Thread Peter Maydell
From: Nabih Estefan Diaz - Implementation of Transmit function for packets - Implementation for reading and writing from and to descriptors in memory for Tx Added relevant trace-events NOTE: This function implements the steps detailed in the datasheet for transmitting messages from the GMAC.

[PULL 25/36] hw/arm/xen_arm.c: convert DPRINTF to trace events and error/warn reports

2024-02-02 Thread Peter Maydell
From: Manos Pitsidianakis Tracing DPRINTFs to stderr might not be desired. A developer that relies on trace events should be able to opt-in to each trace event and rely on QEMU's log redirection, instead of stderr by default. This commit converts DPRINTFs in this file that are used for tracing i

[PULL 29/36] hw/net: Add NPCMXXX GMAC device

2024-02-02 Thread Peter Maydell
From: Hao Wu This patch implements the basic registers of GMAC device and sets registers for networking functionalities. Squashed IRQ Implementation patch into this one for compliation. Tested: The following message shows up with the change: Broadcom BCM54612E stmmac-0:00: attached PHY driver [Br

[PULL 18/36] hw/arm/musca: Simplify setting MachineClass::valid_cpu_types[]

2024-02-02 Thread Peter Maydell
From: Philippe Mathieu-Daudé Musca boards use the embedded subsystems (SSE) tied to a specific Cortex core. Our models only use the Cortex-M33. Use the common code introduced in commit c9cf636d48 ("machine: Add a valid_cpu_types property") to check for valid CPU type at the board level. Remove

[PULL 13/36] hw/arm/exynos: Add missing QOM parent for CPU cores

2024-02-02 Thread Peter Maydell
From: Philippe Mathieu-Daudé QDev objects created with qdev_new() need to manually add their parent relationship with object_property_add_child(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Gavin Shan Message-id: 20240129151828.59544-2-phi...@linaro.org

[PULL 08/36] qemu-options.hx: Improve -serial option documentation

2024-02-02 Thread Peter Maydell
The -serial option documentation is a bit brief about '-serial none' and '-serial null'. In particular it's not very clear about the difference between them, and it doesn't mention that it's up to the machine model whether '-serial none' means "don't create the serial port" or "don't wire the seria

[PULL 19/36] hw/arm/npcm7xx_boards: Simplify setting MachineClass::valid_cpu_types[]

2024-02-02 Thread Peter Maydell
From: Philippe Mathieu-Daudé The npcm7xx Soc is created with a Cortex-A9 core, see in hw/arm/npcm7xx.c: static void npcm7xx_init(Object *obj) { NPCM7xxState *s = NPCM7XX(obj); for (int i = 0; i < NPCM7XX_MAX_NUM_CPUS; i++) { object_initialize_child(obj, "cpu[*]", &s->c

[PULL 06/36] hw/core: Remove transitional infrastructure from BusClass

2024-02-02 Thread Peter Maydell
BusClass currently has transitional infrastructure to support subclasses which implement the legacy BusClass::reset method rather than the Resettable interface. We have now removed all the users of BusClass::reset in the tree, so we can remove the transitional infrastructure. Signed-off-by: Peter

[PULL 05/36] hw/s390x/css-bridge: switch virtual-css bus to 3-phase-reset

2024-02-02 Thread Peter Maydell
Switch the s390x virtual-css bus from using BusClass::reset to the Resettable interface. This has no behavioural change, because the BusClass code to support subclasses that use the legacy BusClass::reset will call that method in the hold phase of 3-phase reset. Signed-off-by: Peter Maydell Acke

[PULL 23/36] hw/arm/strongarm.c: convert DPRINTF to trace events and guest errors

2024-02-02 Thread Peter Maydell
From: Manos Pitsidianakis Tracing DPRINTFs to stderr might not be desired. A developer that relies on trace events should be able to opt-in to each trace event and rely on QEMU's log redirection, instead of stderr by default. This commit converts DPRINTFs in this file that are used for tracing i

  1   2   >