Re: [PATCH v4 30/47] hw/arm: use qemu_configure_nic_device()

2024-01-31 Thread Thomas Huth
On 26/01/2024 18.25, David Woodhouse wrote: From: David Woodhouse Signed-off-by: David Woodhouse --- hw/arm/mps2-tz.c | 8 ++-- hw/arm/msf2-soc.c| 6 +- hw/arm/musicpal.c| 3 +-- hw/arm/xilinx_zynq.c | 11 --- hw/arm/xlnx-versal.c | 7 +-- hw/arm/xlnx

[PATCH v3 1/9] sparc/grlib: split out the headers for each peripherals

2024-01-31 Thread Clément Chigot
... and move them in their right hardware directory. Update Copyright and add SPDX-License-Identifier at the same time. Co-developed-by: Frederic Konrad Signed-off-by: Clément Chigot Reviewed-by: Philippe Mathieu-Daudé --- hw/char/grlib_apbuart.c | 6 ++-- hw/intc/grlib

[PATCH v3 9/9] MAINTAINERS: replace Fabien by myself as Leon3 maintainer

2024-01-31 Thread Clément Chigot
CC: Fabien Chouteau Signed-off-by: Clément Chigot Reviewed-by: Fabien Chouteau --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index dfaca8323e..f076c97fcb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1708,7 +1708,7 @@ F: hw/rtc/su

[PATCH v3 8/9] leon3: check cpu_id in the tiny bootloader

2024-01-31 Thread Clément Chigot
Now that SMP is possible, the asr17 must be checked in the little boot code or the secondary CPU will reinitialize the Timer and the Uart. Co-developed-by: Frederic Konrad Signed-off-by: Clément Chigot Reviewed-by: Philippe Mathieu-Daudé --- hw/sparc/leon3.c | 22 -- 1 file

[PATCH v3 3/9] intc/grlib_irqmp: implements the multiprocessor status register

2024-01-31 Thread Clément Chigot
This implements the multiprocessor status register in grlib-irqmp and bind it to a start signal, which will be later wired in leon3-generic to start a cpu. The EIRQ and BA bits are not implemented. Based on https://gaisler.com/doc/gr712rc-usermanual.pdf, §8.3.5. Co-developed-by: Frederic Konrad

[PATCH v3 5/9] target/sparc: implement asr17 feature for smp

2024-01-31 Thread Clément Chigot
This allows the guest program to know its cpu id. Co-developed-by: Frederic Konrad Signed-off-by: Clément Chigot Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- target/sparc/helper.c| 16 target/sparc/helper.h| 1 + target/sparc/translate.c | 1

[PATCH v3 0/9] sparc/leon3: Add support for -smp

2024-01-31 Thread Clément Chigot
V3 modifications - Patch 3: Fix indentation - Patch 4: Fix types and improves variable declarations - Patch 6 (NEW): Remove SP initialization in leon3 - Patch 7: Add assert in leon3_start_cpu - Patch 8: Improve comment --- V2 modifications - Patch1: Add SPDX copyright tags. - Patch3: Add d

[PATCH v3 7/9] leon3: implement multiprocessor

2024-01-31 Thread Clément Chigot
This allows to register more than one CPU on the leon3_generic machine. Co-developed-by: Frederic Konrad Signed-off-by: Clément Chigot --- hw/sparc/leon3.c | 98 ++-- 1 file changed, 70 insertions(+), 28 deletions(-) diff --git a/hw/sparc/leon3.c b/h

[PATCH v3 4/9] intc/grlib_irqmp: implements multicore irq

2024-01-31 Thread Clément Chigot
Now there is an ncpus property, use it in order to deliver the IRQ to multiple CPU. Co-developed-by: Frederic Konrad Signed-off-by: Clément Chigot Reviewed-by: Philippe Mathieu-Daudé --- hw/intc/grlib_irqmp.c | 41 +-- hw/sparc/leon3.c | 3

Re: [PATCH v4 35/47] hw/mips/mipssim: use qemu_create_nic_device()

2024-01-31 Thread Thomas Huth
On 26/01/2024 18.25, David Woodhouse wrote: From: David Woodhouse The MIPS SIM platform instantiates its NIC only if a corresponding configuration exists for it. Use qemu_create_nic_device() function for that. Signed-off-by: David Woodhouse --- hw/mips/mipssim.c | 13 +++-- 1 file

[PATCH v3 6/9] leon3: remove SP initialization

2024-01-31 Thread Clément Chigot
According to the doc (see §4.2.15 in [1]), the reset operation should not impact %SP. [1] https://gaisler.com/doc/gr712rc-usermanual.pdf Signed-off-by: Clément Chigot --- hw/sparc/leon3.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index 7866f0a049.

[PATCH v3 2/9] intc/grlib_irqmp: add ncpus property

2024-01-31 Thread Clément Chigot
This adds a "ncpus" property to the "grlib-irqmp" device to be used later, this required a little refactoring of how we initialize the device (ie: use realize instead of init). Co-developed-by: Frederic Konrad Signed-off-by: Clément Chigot Reviewed-by: Philippe Mathieu-Daudé --- hw/intc/grlib_

Re: [PATCH v2] pc: q35: Bump max_cpus to 1856 vcpus

2024-01-31 Thread Daniel P . Berrangé
On Wed, Jan 31, 2024 at 02:54:19PM +0800, Zhao Liu wrote: > On Wed, Jan 31, 2024 at 10:47:29AM +0530, Ani Sinha wrote: > > Date: Wed, 31 Jan 2024 10:47:29 +0530 > > From: Ani Sinha > > Subject: Re: [PATCH v2] pc: q35: Bump max_cpus to 1856 vcpus > > > > On Wed, Jan 31, 2024 at 9:27 AM Zhao Liu w

Re: [PATCH 0/5] migration/multifd: Prerequisite cleanups for ongoing work

2024-01-31 Thread Peter Xu
On Mon, Jan 29, 2024 at 09:51:06AM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Mon, Jan 29, 2024 at 01:41:01AM +, Liu, Yuan1 wrote: > >> Because this change has an impact on the previous live migration > >> With IAA Patch, does the submission of the next version needs > >> to be

Re: [PATCH] hw/pci: migration: Skip config space check for vendor specific capability during restore/load

2024-01-31 Thread Vinayak Kale
On 31/01/24 12:28 am, Alex Williamson wrote: On Tue, 30 Jan 2024 23:32:26 +0530 Vinayak Kale wrote: Missed adding Michael, Marcel, Alex and Avihai earlier, apologies. Regards, Vinayak On 30/01/24 3:26 pm, Vinayak Kale wrote: In case of migration, during restore operation, qemu checks th

[PATCH v8 01/21] hw/core/machine: Introduce the module as a CPU topology level

2024-01-31 Thread Zhao Liu
From: Zhao Liu In x86, module is the topology level above core, which contains a set of cores that share certain resources (in current products, the resource usually includes L2 cache, as well as module scoped features and MSRs). To build the module level topology for x86 CPUs, introduce module

[PATCH v8 04/21] hw/core: Support module-id in numa configuration

2024-01-31 Thread Zhao Liu
From: Zhao Liu Module is a level above the core, thereby supporting numa configuration on the module level can bring user more numa flexibility. This is the natural further support for module level. Add module level support in numa configuration. Tested-by: Yongwei Ma Signed-off-by: Zhao Liu

[PATCH v8 10/21] i386: Split topology types of CPUID[0x1F] from the definitions of CPUID[0xB]

2024-01-31 Thread Zhao Liu
From: Zhao Liu CPUID[0xB] defines SMT, Core and Invalid types, and this leaf is shared by Intel and AMD CPUs. But for extended topology levels, Intel CPU (in CPUID[0x1F]) and AMD CPU (in CPUID[0x8026]) have the different definitions with different enumeration values. Though CPUID[0x8026

[PATCH v8 00/21] Introduce smp.modules for x86 in QEMU

2024-01-31 Thread Zhao Liu
From: Zhao Liu Hi list, This is the our v8 patch series, rebased on the master branch at the commit 11be70677c70 ("Merge tag 'pull-vfio-20240129' of https://github.com/legoater/qemu into staging"). Compared with v7 [1], v8 mainly has the following changes: * Introduced smp.modules for x86 ins

[PATCH v8 03/21] hw/core: Introduce module-id as the topology subindex

2024-01-31 Thread Zhao Liu
From: Zhao Liu Add module-id in CpuInstanceProperties, to locate the CPU with module level. Suggested-by: Xiaoyao Li Tested-by: Yongwei Ma Signed-off-by: Zhao Liu --- Changes since v7: * New commit to introduce module_id to locate the CPU with module level. --- hw/core/machine-hmp-cmds.c

[PATCH v8 09/21] i386/cpu: Introduce bitmap to cache available CPU topology levels

2024-01-31 Thread Zhao Liu
From: Zhao Liu Currently, QEMU checks the specify number of topology domains to detect if there's extended topology levels (e.g., checking nr_dies). With this bitmap, the extended CPU topology (the levels other than SMT, core and package) could be easier to detect without touching the topology d

[PATCH v8 08/21] i386/cpu: Consolidate the use of topo_info in cpu_x86_cpuid()

2024-01-31 Thread Zhao Liu
From: Zhao Liu In cpu_x86_cpuid(), there are many variables in representing the cpu topology, e.g., topo_info, cs->nr_cores and cs->nr_threads. Since the names of cs->nr_cores/cs->nr_threads does not accurately represent its meaning, the use of cs->nr_cores/cs->nr_threads is prone to confusion a

[PATCH v8 18/21] hw/i386/pc: Support smp.modules for x86 PC machine

2024-01-31 Thread Zhao Liu
From: Zhao Liu As module-level topology support is added to X86CPU, now we can enable the support for the modules parameter on PC machines. With this support, we can define a 5-level x86 CPU topology with "-smp": -smp cpus=*,maxcpus=*,sockets=*,dies=*,modules=*,cores=*,threads=*. Additionally,

[PATCH v8 12/21] i386: Introduce module level cpu topology to CPUX86State

2024-01-31 Thread Zhao Liu
From: Zhao Liu Intel CPUs implement module level on hybrid client products (e.g., ADL-N, MTL, etc) and E-core server products. A module contains a set of cores that share certain resources (in current products, the resource usually includes L2 cache, as well as module scoped features and MSRs).

[PATCH v8 11/21] i386/cpu: Decouple CPUID[0x1F] subleaf with specific topology level

2024-01-31 Thread Zhao Liu
From: Zhao Liu At present, the subleaf 0x02 of CPUID[0x1F] is bound to the "die" level. In fact, the specific topology level exposed in 0x1F depends on the platform's support for extension levels (module, tile and die). To help expose "module" level in 0x1F, decouple CPUID[0x1F] subleaf with sp

[PATCH v8 15/21] i386: Support module_id in X86CPUTopoIDs

2024-01-31 Thread Zhao Liu
From: Zhao Liu Add module_id member in X86CPUTopoIDs. module_id can be parsed from APIC ID, so also update APIC ID parsing rule to support module level. With this support, the conversions with module level between X86CPUTopoIDs, X86CPUTopoInfo and APIC ID are completed. module_id can be also ge

[PATCH v8 20/21] i386/cpu: Use CPUCacheInfo.share_level to encode CPUID[4]

2024-01-31 Thread Zhao Liu
From: Zhao Liu CPUID[4].EAX[bits 25:14] is used to represent the cache topology for Intel CPUs. After cache models have topology information, we can use CPUCacheInfo.share_level to decide which topology level to be encoded into CPUID[4].EAX[bits 25:14]. And since with the helper max_processor_i

[PATCH v8 13/21] i386: Support modules_per_die in X86CPUTopoInfo

2024-01-31 Thread Zhao Liu
From: Zhao Liu Support module level in i386 cpu topology structure "X86CPUTopoInfo". Since x86 does not yet support the "modules" parameter in "-smp", X86CPUTopoInfo.modules_per_die is currently always 1. Therefore, the module level width in APIC ID, which can be calculated by "apicid_bitwidth_

[PATCH v8 02/21] hw/core/machine: Support modules in -smp

2024-01-31 Thread Zhao Liu
From: Zhao Liu Add "modules" parameter parsing support in -smp. Suggested-by: Xiaoyao Li Tested-by: Yongwei Ma Signed-off-by: Zhao Liu --- Changes since v7: * New commit to introduce module level in -smp. --- hw/core/machine-smp.c | 39 +-- hw/core/machin

[PATCH v8 06/21] i386/cpu: Use APIC ID info to encode cache topo in CPUID[4]

2024-01-31 Thread Zhao Liu
From: Zhao Liu Refer to the fixes of cache_info_passthrough ([1], [2]) and SDM, the CPUID.04H:EAX[bits 25:14] and CPUID.04H:EAX[bits 31:26] should use the nearest power-of-2 integer. The nearest power-of-2 integer can be calculated by pow2ceil() or by using APIC ID offset/width (like L3 topology

[PATCH v8 07/21] i386/cpu: Use APIC ID info get NumSharingCache for CPUID[0x8000001D].EAX[bits 25:14]

2024-01-31 Thread Zhao Liu
From: Zhao Liu The commit 8f4202fb1080 ("i386: Populate AMD Processor Cache Information for cpuid 0x801D") adds the cache topology for AMD CPU by encoding the number of sharing threads directly. >From AMD's APM, NumSharingCache (CPUID[0x801D].EAX[bits 25:14]) means [1]: The number of lo

[PATCH v8 17/21] tests: Add test case of APIC ID for module level parsing

2024-01-31 Thread Zhao Liu
From: Zhuocheng Ding After i386 supports module level, it's time to add the test for module level's parsing. Signed-off-by: Zhuocheng Ding Co-developed-by: Zhao Liu Signed-off-by: Zhao Liu Reviewed-by: Yanan Wang Tested-by: Babu Moger Tested-by: Yongwei Ma Acked-by: Michael S. Tsirkin ---

[PATCH v8 05/21] i386/cpu: Fix i/d-cache topology to core level for Intel CPU

2024-01-31 Thread Zhao Liu
From: Zhao Liu For i-cache and d-cache, current QEMU hardcodes the maximum IDs for CPUs sharing cache (CPUID.04H.00H:EAX[bits 25:14] and CPUID.04H.01H:EAX[bits 25:14]) to 0, and this means i-cache and d-cache are shared in the SMT level. This is correct if there's single thread per core, but is

[PATCH v8 16/21] i386/cpu: Introduce module-id to X86CPU

2024-01-31 Thread Zhao Liu
From: Zhao Liu Introduce module-id to be consistent with the module-id field in CpuInstanceProperties. Following the legacy smp check rules, also add the module_id validity into x86_cpu_pre_plug(). Tested-by: Yongwei Ma Co-developed-by: Zhuocheng Ding Signed-off-by: Zhuocheng Ding Signed-off

[PATCH v8 21/21] i386/cpu: Use CPUCacheInfo.share_level to encode CPUID[0x8000001D].EAX[bits 25:14]

2024-01-31 Thread Zhao Liu
From: Zhao Liu CPUID[0x801D].EAX[bits 25:14] NumSharingCache: number of logical processors sharing cache. The number of logical processors sharing this cache is NumSharingCache + 1. After cache models have topology information, we can use CPUCacheInfo.share_level to decide which topology le

[PATCH v8 14/21] i386: Expose module level in CPUID[0x1F]

2024-01-31 Thread Zhao Liu
From: Zhao Liu Linux kernel (from v6.4, with commit edc0a2b595765 ("x86/topology: Fix erroneous smp_num_siblings on Intel Hybrid platforms") is able to handle platforms with Module level enumerated via CPUID.1F. Expose the module level in CPUID[0x1F] if the machine has more than 1 modules. (Tes

[PATCH v8 19/21] i386: Add cache topology info in CPUCacheInfo

2024-01-31 Thread Zhao Liu
From: Zhao Liu Currently, by default, the cache topology is encoded as: 1. i/d cache is shared in one core. 2. L2 cache is shared in one core. 3. L3 cache is shared in one die. This default general setting has caused a misunderstanding, that is, the cache topology is completely equated with a sp

Re: Re: [PATCH] linux-user: Make TARGET_NR_setgroups affect only the current thread

2024-01-31 Thread Ilya Leoshkevich
On Wed, Jan 31, 2024 at 08:53:49AM +0100, Helge Deller wrote: > On 1/31/24 01:18, Ilya Leoshkevich wrote: > > Like TARGET_NR_setuid, TARGET_NR_setgroups should affect only the > > calling thread, and not the entire process. Therefore, implement it > > using a syscall, and not a libc call. > > > >

Re: [PATCH 1/6] vdpa: check for iova tree initialized at net_client_start

2024-01-31 Thread Si-Wei Liu
Hi Eugenio, Maybe there's some patch missing, but I saw this core dump when x-svq=on is specified while waiting for the incoming migration on destination host: (gdb) bt #0  0x5643b24cc13c in vhost_iova_tree_map_alloc (tree=0x0, map=map@entry=0x7ffd58c54830) at ../hw/virtio/vhost-iova-tree

Re: [PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2024-01-31 Thread Kevin Wolf
Am 29.01.2024 um 17:30 hat Hanna Czenczek geschrieben: > I don’t like using drain as a form of lock specifically against AioContext > changes, but maybe Stefan is right, and we should use it in this specific > case to get just the single problem fixed.  (Though it’s not quite trivial > either.  We’

Re: Re: [libvirt PATCH V2 0/4] add loongarch support for libvirt

2024-01-31 Thread Andrea Bolognani
On Wed, Jan 31, 2024 at 11:20:41AM +0800, lixianglai wrote: > > > In the qemu code, loongarch virt machine does only create a pflash, > > > > > > which is used for nvram, and uefi code is loaded by rom. > > > > > > In summary, loongarch virt machine can use nvram with the following > > > command:

why various devices are loading x86 roms on non-x86 architectures?

2024-01-31 Thread Michael Tokarev
Hi! qemu-system-aarch64 -device virtio-vga this one loads vgabios-virtio.bin. Why? Does this bios work on aarch64 (or any other non-x86 arch)? Should there may be some conditional in this and similar places? The same is true for x86 pxe roms and other x86-only roms. Thanks, /mjt

Re: [PATCH v8 00/21] Introduce smp.modules for x86 in QEMU

2024-01-31 Thread Daniel P . Berrangé
On Wed, Jan 31, 2024 at 06:13:29PM +0800, Zhao Liu wrote: > From: Zhao Liu > > Hi list, > > This is the our v8 patch series, rebased on the master branch at the > commit 11be70677c70 ("Merge tag 'pull-vfio-20240129' of > https://github.com/legoater/qemu into staging"). > > Compared with v7 [1],

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

2024-01-31 Thread peterx
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 global check doesn't need any lock. A few

[PATCH 00/14] migration/multifd: Refactor ->send_prepare() and cleanups

2024-01-31 Thread peterx
From: Peter Xu This patchset contains quite a few refactorings to current multifd: - It picked up some patches from an old series of mine [0] (the last patches were dropped, though; I did the cleanup slightly differently): I still managed to include one patch to split pending_job, but

[PATCH 01/14] migration/multifd: Drop stale comment for multifd zero copy

2024-01-31 Thread peterx
From: Peter Xu We've already done that with multifd_flush_after_each_section, for multifd in general. Drop the stale "TODO-like" comment. Reviewed-by: Fabiano Rosas Signed-off-by: Peter Xu --- migration/multifd.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/migration/multi

[PATCH 08/14] migration/multifd: Drop pages->num check in sender thread

2024-01-31 Thread peterx
From: Peter Xu Now with a split SYNC handler, we always have pages->num set for pending_job==true. Assert it instead. Signed-off-by: Peter Xu --- migration/multifd.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c ind

[PATCH 12/14] migration/multifd: multifd_send_prepare_header()

2024-01-31 Thread peterx
From: Peter Xu Introduce a helper multifd_send_prepare_header() to setup the header packet for multifd sender. It's fine to setup the IOV[0] _before_ send_prepare() because the packet buffer is already ready, even if the content is to be filled in. With this helper, we can already slightly clea

[PATCH 14/14] migration/multifd: Forbid spurious wakeups

2024-01-31 Thread peterx
From: Peter Xu Now multifd's logic is designed to have no spurious wakeup. I still remember a talk to Juan and he seems to agree we should drop it now, and if my memory was right it was there because multifd used to hit that when still debugging. Let's drop it and see what can explode; as long

[PATCH 04/14] migration/multifd: Postpone reset of MultiFDPages_t

2024-01-31 Thread peterx
From: Peter Xu Now we reset MultiFDPages_t object in the multifd sender thread in the middle of the sending job. That's not necessary, because the "*pages" struct will not be reused anyway until pending_job is cleared. Move that to the end after the job is completed, provide a helper to reset a

[PATCH 09/14] migration/multifd: Rename p->num_packets and clean it up

2024-01-31 Thread peterx
From: Peter Xu This field, no matter whether on src or dest, is only used for debugging purpose. They can even be removed already, unless it still more or less provide some accounting on "how many packets are sent/recved for this thread". The other more important one is called packet_num, which

[PATCH 05/14] migration/multifd: Drop MultiFDSendParams.normal[] array

2024-01-31 Thread peterx
From: Peter Xu This array is redundant when p->pages exists. Now we extended the life of p->pages to the whole period where pending_job is set, it should be safe to always use p->pages->offset[] rather than p->normal[]. Drop the array. Alongside, the normal_num is also redundant, which is the

[PATCH 02/14] migration/multifd: multifd_send_kick_main()

2024-01-31 Thread peterx
From: Peter Xu When a multifd sender thread hit errors, it always needs to kick the main thread by kicking all the semaphores that it can be waiting upon. Provide a helper for it and deduplicate the code. Reviewed-by: Fabiano Rosas Signed-off-by: Peter Xu --- migration/multifd.c | 21 +++

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

2024-01-31 Thread peterx
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 completed, the IOVs should be ready to be

[PATCH 11/14] migration/multifd: Move trace_multifd_send|recv()

2024-01-31 Thread peterx
From: Peter Xu Move them into fill/unfill of packets. With that, we can further cleanup the send/recv thread procedure, and remove one more temp var. Signed-off-by: Peter Xu --- migration/multifd.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/migration/multi

[PATCH 06/14] migration/multifd: Separate SYNC request with normal jobs

2024-01-31 Thread peterx
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 only a multifd packet telling the dest sid

[PATCH 07/14] migration/multifd: Simplify locking in sender thread

2024-01-31 Thread peterx
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 requester is currently the only one who ca

[PATCH 10/14] migration/multifd: Move total_normal_pages accounting

2024-01-31 Thread peterx
From: Peter Xu Just like the previous patch, move the accounting for total_normal_pages on both src/dst sides into the packet fill/unfill procedures. Signed-off-by: Peter Xu --- migration/multifd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/migration/multifd.c b/mi

Re: Call for GSoC/Outreachy internship project ideas

2024-01-31 Thread Eugenio Perez Martin
On Tue, Jan 30, 2024 at 8:34 PM Stefan Hajnoczi wrote: > > Hi Eugenio, > Stefano Garzarella and I had a SVQ-related project idea that I have added: > https://wiki.qemu.org/Google_Summer_of_Code_2024#vhost-user_memory_isolation > > We want to support vhost-user devices without exposing guest RAM. T

Re: [PATCH 05/17] migration/multifd: Wait for multifd channels creation before proceeding

2024-01-31 Thread Avihai Horon
On 30/01/2024 23:32, Fabiano Rosas wrote: External email: Use caution opening links or attachments Avihai Horon writes: On 29/01/2024 16:34, Fabiano Rosas wrote: External email: Use caution opening links or attachments Avihai Horon writes: Currently, multifd channels are created asyn

Re: why various devices are loading x86 roms on non-x86 architectures?

2024-01-31 Thread Jiaxun Yang
在 2024/1/31 10:28, Michael Tokarev 写道: Hi! qemu-system-aarch64 -device virtio-vga this one loads vgabios-virtio.bin.  Why? Does this bios work on aarch64 (or any other non-x86 arch)? Should there may be some conditional in this and similar places? The same is true for x86 pxe roms and other

Re: [PATCH v4 1/7] crypto: Support LUKS volume with detached header

2024-01-31 Thread Daniel P . Berrangé
On Tue, Jan 30, 2024 at 01:37:19PM +0800, yong.hu...@smartx.com wrote: > From: Hyman Huang > > By enhancing the LUKS driver, it is possible to implement > the LUKS volume with a detached header. > > Normally a LUKS volume has a layout: > disk: | header | key material | disk payload data | >

Re: Assistance Required for QEMU Hardfault Error with Cortex-M33 on MPS2AN505

2024-01-31 Thread sanjana gogte
Thank you Peter. I will reach out to someone from Xilinx. Do you have insights on how I could use a Qemu emulated core ( M profile ) with a Virtual Prototype ( System C IP ) ? Thank you. On Tue, 30 Jan 2024 at 15:59, Peter Maydell wrote: > On Tue, 30 Jan 2024 at 07:48, sanjana gogte wrote: > >

Re: [PATCH v4 3/7] crypto: Modify the qcrypto_block_create to support creation flags

2024-01-31 Thread Daniel P . Berrangé
On Tue, Jan 30, 2024 at 01:37:21PM +0800, yong.hu...@smartx.com wrote: > From: Hyman Huang > > Expand the signature of qcrypto_block_create to enable the > formation of LUKS volumes with detachable headers. To accomplish > that, introduce QCryptoBlockCreateFlags to instruct the creation > process

Re: [RFC 0/7] VIRTIO-IOMMU/VFIO: Fix host iommu geometry handling for hotplugged devices

2024-01-31 Thread Eric Auger
Hi Jean, On 1/30/24 19:22, Jean-Philippe Brucker wrote: > On Mon, Jan 29, 2024 at 05:38:55PM +0100, Eric Auger wrote: >>> There may be a separate argument for clearing bypass. With a coldplugged >>> VFIO device the flow is: >>> >>> 1. Map the whole guest address space in VFIO to implement boot-byp

Re: [PATCH v4 36/47] hw/mips/jazz: use qemu_find_nic_info()

2024-01-31 Thread Thomas Huth
On 26/01/2024 18.25, David Woodhouse wrote: From: David Woodhouse Signed-off-by: David Woodhouse --- hw/mips/jazz.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) Reviewed-by: Thomas Huth

[PATCH v5 1/3] linux-user: Allow gdbstub to ignore page protection

2024-01-31 Thread Ilya Leoshkevich
gdbserver ignores page protection by virtue of using /proc/$pid/mem. Teach qemu gdbstub to do this too. This will not work if /proc is not mounted; accept this limitation. One alternative is to temporarily grant the missing PROT_* bit, but this is inherently racy. Another alternative is self-debug

[PATCH v5 2/3] tests/tcg: Factor out gdbstub test functions

2024-01-31 Thread Ilya Leoshkevich
Both the report() function as well as the initial gdbstub test sequence are copy-pasted into ~10 files with slight modifications. This indicates that they are indeed generic, so factor them out. While at it, add a few newlines to make the formatting closer to PEP-8. Reviewed-by: Alex Bennée Signe

[PATCH v5 0/3] linux-user: Allow gdbstub to ignore page protection

2024-01-31 Thread Ilya Leoshkevich
v4: https://lists.gnu.org/archive/html/qemu-devel/2024-01/msg05857.html v4 -> v5: Fix the probe_proc_self_mem vs probe_proc_self_mem() typo. Add Alex's R-b and A-b. v3: https://lists.gnu.org/archive/html/qemu-devel/2024-01/msg02907.html v3 -> v4: Hide InteractiveConsole behind QEMU_TEST_

[PATCH v5 3/3] tests/tcg: Add the PROT_NONE gdbstub test

2024-01-31 Thread Ilya Leoshkevich
Make sure that qemu gdbstub, like gdbserver, allows reading from and writing to PROT_NONE pages. Acked-by: Alex Bennée Signed-off-by: Ilya Leoshkevich --- tests/tcg/multiarch/Makefile.target | 9 +- tests/tcg/multiarch/gdbstub/prot-none.py | 36 + tests/tcg/multiar

Re: [PATCH v4 4/7] block: Support detached LUKS header creation using blockdev-create

2024-01-31 Thread Daniel P . Berrangé
On Tue, Jan 30, 2024 at 01:37:22PM +0800, yong.hu...@smartx.com wrote: > From: Hyman Huang > > Firstly, enable the ability to choose the block device containing > a detachable LUKS header by adding the 'header' parameter to > BlockdevCreateOptionsLUKS. > > Secondly, when formatting the LUKS volu

Re: [PATCH v4 5/7] block: Support detached LUKS header creation using qemu-img

2024-01-31 Thread Daniel P . Berrangé
On Tue, Jan 30, 2024 at 01:37:23PM +0800, yong.hu...@smartx.com wrote: > From: Hyman Huang > > Even though a LUKS header might be created with cryptsetup, > qemu-img should be enhanced to accommodate it as well. > > Add the 'detached-header' option to specify the creation of > a detached LUKS he

Re: [PATCH v4 6/7] crypto: Introduce 'detached-header' field in QCryptoBlockInfoLUKS

2024-01-31 Thread Daniel P . Berrangé
On Tue, Jan 30, 2024 at 01:37:24PM +0800, yong.hu...@smartx.com wrote: > From: Hyman Huang > > When querying the LUKS disk with the qemu-img tool or other APIs, > add information about whether the LUKS header is detached. > > Additionally, update the test case with the appropriate > modification

Re: [PULL 13/31] tests/tcg: Add the PROT_NONE gdbstub test

2024-01-31 Thread Ilya Leoshkevich
On Tue, 2024-01-30 at 09:01 +1000, Richard Henderson wrote: > From: Ilya Leoshkevich > > Make sure that qemu gdbstub, like gdbserver, allows reading from and > writing to PROT_NONE pages. > > Signed-off-by: Ilya Leoshkevich > Message-Id: <20240129093410.3151-4-...@linux.ibm.com> > Signed-off-by

Re: [PATCH v4 7/7] tests: Add case for LUKS volume with detached header

2024-01-31 Thread Daniel P . Berrangé
On Tue, Jan 30, 2024 at 01:37:25PM +0800, yong.hu...@smartx.com wrote: > From: Hyman Huang > > Also, add a section to the MAINTAINERS file for detached > LUKS header, it only has a test case in it currently. > > Signed-off-by: Hyman Huang > --- > MAINTAINERS |

Re: [PATCH v2] pc: q35: Bump max_cpus to 1856 vcpus

2024-01-31 Thread Gerd Hoffmann
On Wed, Jan 31, 2024 at 08:19:06AM +0530, Ani Sinha wrote: > This error exists only with edk2. Seabios currently can boot a linux guest > fine with 4096 vcpus. Since the lowest common denominator for a working VM for > both edk2 and seabios is 1856 vcpus, bump up the value max_cpus to 1856 for >

[PULL 00/21] Trivial patches for 2024-01-31

2024-01-31 Thread Michael Tokarev
The following changes since commit 11be70677c70fdccd452a3233653949b79e97908: Merge tag 'pull-vfio-20240129' of https://github.com/legoater/qemu into staging (2024-01-29 10:53:56 +) are available in the Git repository at: https://gitlab.com/mjt0k/qemu.git tags/pull-trivial-patches for y

[PULL 03/21] qapi/migration.json: Fix the member name for MigrationCapability

2024-01-31 Thread Michael Tokarev
From: Han Han s/@compression/@compress/ Fixes: 864128df46 Signed-off-by: Han Han Signed-off-by: Michael Tokarev --- qapi/migration.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/migration.json b/qapi/migration.json index d3e2b864c5..819708321d 100644 --- a/qapi

[PULL 02/21] colo: examples: remove mentions of script= and (wrong) downscript=

2024-01-31 Thread Michael Tokarev
There's no need to repeat script=/etc/qemu-ifup in examples, as it is already in there. More, all examples uses incorrect "down script=" (which should be "downscript="). Signed-off-by: Michael Tokarev Reviewed-by: Zhang Chen --- docs/colo-proxy.txt | 6 +++--- qemu-options.hx | 8

[PULL 05/21] mailmap: Fix Stefan Weil email

2024-01-31 Thread Michael Tokarev
From: Philippe Mathieu-Daudé Commit 5204b499a6 ("mailmap: Fix Stefan Weil author email") corrected authorship for patch received at qemu-devel@nongnu.org, correct now for patch received at qemu-triv...@nongnu.org. Update other authorship email for Stefan's commits. Suggested-by: Stefan Weil Fi

[PULL 04/21] qemu-docs: Update options for graphical frontends

2024-01-31 Thread Michael Tokarev
From: Yihuan Pan The command line options `-ctrl-grab` and `-alt-grab` have been removed in QEMU 7.1. Instead, use the `-display sdl,grab-mod=` option to specify the grab modifiers. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2103 Signed-off-by: Yihuan Pan Signed-off-by: Michael Tok

[PULL 08/21] disas/riscv: Clean up includes

2024-01-31 Thread Michael Tokarev
From: Peter Maydell This commit was created with scripts/clean-includes: ./scripts/clean-includes --git disas/riscv disas/riscv*[ch] All .c should include qemu/osdep.h first. The script performs three related cleanups: * Ensure .c files include qemu/osdep.h first. * Including it in a .h is re

[PULL 14/21] riscv: Clean up includes

2024-01-31 Thread Michael Tokarev
From: Peter Maydell This commit was created with scripts/clean-includes: ./scripts/clean-includes --git riscv target/riscv/*.[ch] All .c should include qemu/osdep.h first. The script performs three related cleanups: * Ensure .c files include qemu/osdep.h first. * Including it in a .h is redun

[PULL 15/21] misc: Clean up includes

2024-01-31 Thread Michael Tokarev
From: Peter Maydell This commit was created with scripts/clean-includes: ./scripts/clean-includes --git misc net/af-xdp.c plugins/*.c audio/pwaudio.c util/userfaultfd.c All .c should include qemu/osdep.h first. The script performs three related cleanups: * Ensure .c files include qemu/osdep.

[PULL 12/21] include: Clean up includes

2024-01-31 Thread Michael Tokarev
From: Peter Maydell This commit was created with scripts/clean-includes: ./scripts/clean-includes --git include include/*/*.h include/*/*/*.h All .c should include qemu/osdep.h first. The script performs three related cleanups: * Ensure .c files include qemu/osdep.h first. * Including it in a

[PULL 17/21] hw/i386: Add `\n` to hint message

2024-01-31 Thread Michael Tokarev
From: Greg Kurz error_printf() doesn't add newlines. Signed-off-by: Greg Kurz Reviewed-by: Ani Sinha Signed-off-by: Michael Tokarev --- hw/i386/acpi-build.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index edc979379c..e

[PULL 18/21] hw/loongarch: Add `\n` to hint message

2024-01-31 Thread Michael Tokarev
From: Greg Kurz error_printf() doesn't add newlines. Signed-off-by: Greg Kurz Reviewed-by: Ani Sinha Signed-off-by: Michael Tokarev --- hw/loongarch/acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/loongarch/acpi-build.c b/hw/loongarch/acpi-build.c index 73

[PULL 07/21] hyperv: Clean up includes

2024-01-31 Thread Michael Tokarev
From: Peter Maydell This commit was created with scripts/clean-includes: ./scripts/clean-includes --git hyperv hw/hyperv/*.[ch] All .c should include qemu/osdep.h first. The script performs three related cleanups: * Ensure .c files include qemu/osdep.h first. * Including it in a .h is redunda

[PULL 20/21] hw/intc/xics: Include missing 'cpu.h' header

2024-01-31 Thread Michael Tokarev
From: Philippe Mathieu-Daudé Include missing headers in order to avoid when refactoring unrelated headers: hw/intc/xics.c: In function 'icp_realize': hw/intc/xics.c:304:5: error: unknown type name 'PowerPCCPU' 304 | PowerPCCPU *cpu; | ^~ Signed-off-by: Philippe M

[PULL 10/21] acpi: Clean up includes

2024-01-31 Thread Michael Tokarev
From: Peter Maydell This commit was created with scripts/clean-includes: ./scripts/clean-includes --git acpi include/hw/*/*acpi.h hw/*/*acpi.c All .c should include qemu/osdep.h first. The script performs three related cleanups: * Ensure .c files include qemu/osdep.h first. * Including it in

[PULL 09/21] aspeed: Clean up includes

2024-01-31 Thread Michael Tokarev
From: Peter Maydell This commit was created with scripts/clean-includes. All .c should include qemu/osdep.h first. The script performs three related cleanups: * Ensure .c files include qemu/osdep.h first. * Including it in a .h is redundant, since the .c already includes it. Drop such incl

[PULL 01/21] dump: Fix HMP dump-guest-memory -z without -R

2024-01-31 Thread Michael Tokarev
From: Markus Armbruster -z without -R has no effect: the dump format remains @elf. Fix the logic error so it becomes @kdump-zlib. Fixes: e6549197f7ed (dump: Add command interface for kdump-raw formats) Fixes: CID 1523841 Signed-off-by: Markus Armbruster Reviewed-by: Stephen Brennan Reviewed-b

[PULL 16/21] backends/hostmem: Fix block comments style (checkpatch.pl warnings)

2024-01-31 Thread Michael Tokarev
From: Philippe Mathieu-Daudé While re-indenting code in host_memory_backend_memory_complete(), we triggered various "Block comments use a leading /* on a separate line" warnings from checkpatch.pl. Correct the comments style. Fixes: e199f7ad4d ("backends: Simplify host_memory_backend_memory_comp

[PULL 11/21] m68k: Clean up includes

2024-01-31 Thread Michael Tokarev
From: Peter Maydell This commit was created with scripts/clean-includes: ./scripts/clean-includes --git m68k include/hw/audio/asc.h include/hw/m68k/*.h All .c should include qemu/osdep.h first. The script performs three related cleanups: * Ensure .c files include qemu/osdep.h first. * Includin

[PULL 13/21] cxl: Clean up includes

2024-01-31 Thread Michael Tokarev
From: Peter Maydell This commit was created with scripts/clean-includes. All .c should include qemu/osdep.h first. The script performs three related cleanups: * Ensure .c files include qemu/osdep.h first. * Including it in a .h is redundant, since the .c already includes it. Drop such incl

Re: [PATCH v4 37/47] hw/net/lasi_i82596: Re-enable build

2024-01-31 Thread Thomas Huth
On 26/01/2024 18.25, David Woodhouse wrote: From: David Woodhouse When converting to the shiny build-system-du-jour, a typo prevented the last_i82596 driver from being built. Correct the config option name to re-enable the build. And include "sysemu/sysemu.h" so it actually builds. Fixes: b141

[PULL 21/21] hw/hyperv: Include missing headers

2024-01-31 Thread Michael Tokarev
From: Philippe Mathieu-Daudé Include missing headers in order to avoid when refactoring unrelated headers: hw/hyperv/hyperv.c:33:18: error: field ‘msg_page_mr’ has incomplete type 33 | MemoryRegion msg_page_mr; | ^~~ hw/hyperv/hyperv.c: In function ‘sy

[PULL 19/21] hw/arm: Add `\n` to hint message

2024-01-31 Thread Michael Tokarev
From: Greg Kurz error_printf() doesn't add newlines. Signed-off-by: Greg Kurz Reviewed-by: Ani Sinha Signed-off-by: Michael Tokarev --- hw/arm/virt-acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 17aee

[PULL 06/21] scripts/clean-includes: Update exclude list

2024-01-31 Thread Michael Tokarev
From: Peter Maydell Update the exclude list to exclude some more files which don't follow our standard #include policy. Signed-off-by: Peter Maydell Signed-off-by: Michael Tokarev --- scripts/clean-includes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/clean-incl

Re: [PATCH v4 39/47] hw/openrisc/openrisc_sim: use qemu_create_nic_device()

2024-01-31 Thread Thomas Huth
On 26/01/2024 18.25, David Woodhouse wrote: From: David Woodhouse Signed-off-by: David Woodhouse --- hw/openrisc/openrisc_sim.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c index 35da123aef..bf

  1   2   3   >