Re: [PATCH] hw/intc: Handle the error of IOAPICCommonClass.realize()

2024-01-31 Thread Philippe Mathieu-Daudé
Hi Zhao, On 31/1/24 15:29, Zhao Liu wrote: From: Zhao Liu IOAPICCommonClass implements its own private realize(), and this private realize() allows error. Therefore, return directly if IOAPICCommonClass.realize() meets error. Signed-off-by: Zhao Liu --- hw/intc/ioapic_common.c | 3 +++

Re: [PATCH 3/3] meson: Disable CONFIG_NOTIFY1 on FreeBSD

2024-01-31 Thread Daniel P . Berrangé
On Wed, Jan 31, 2024 at 05:24:10PM +0100, Philippe Mathieu-Daudé wrote: > Hi, > > Warner, do you remember what this is about? > > (https://cgit.freebsd.org/ports/commit/emulators/qemu-devel/files/patch-util_meson.build?id=2ab482e2c8f51eae7ffd747685b7f181fe1b3809 > isn't very verbose). That's

Re: [PATCH 3/3] meson: Disable CONFIG_NOTIFY1 on FreeBSD

2024-01-31 Thread Philippe Mathieu-Daudé
Hi, Warner, do you remember what this is about? (https://cgit.freebsd.org/ports/commit/emulators/qemu-devel/files/patch-util_meson.build?id=2ab482e2c8f51eae7ffd747685b7f181fe1b3809 isn't very verbose). On 25/1/24 20:48, Ilya Leoshkevich wrote: make vm-build-freebsd fails with: ld:

Re: [PATCH] target/riscv: FCSR doesn't contain vxrm and vxsat

2024-01-31 Thread Daniel Henrique Barboza
On 1/30/24 08:09, LIU Zhiwei wrote: vxrm and vxsat have been moved into a special register vcsr since RVV v1.0. So remove them from FCSR for vector 1.0. Signed-off-by: LIU Zhiwei --- Reviewed-by: Daniel Henrique Barboza target/riscv/cpu_bits.h | 8 1 file changed, 8

Re: [PATCH v3 1/1] oslib-posix: initialize backend memory objects in parallel

2024-01-31 Thread Mark Kanda
On 1/31/24 8:57 AM, David Hildenbrand wrote: On 31.01.24 15:48, Mark Kanda wrote: On 1/31/24 8:30 AM, David Hildenbrand wrote: OK. I'll call it 'PHASE_LATE_BACKENDS_CREATED' (to make it consistent with code comments/function name). But then, you should set it at the very end of the

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

2024-01-31 Thread Fabiano Rosas
pet...@redhat.com writes: > 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

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

2024-01-31 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > Multifd send side has two fields to indicate error quits: > > - MultiFDSendParams.quit > - _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

Re: Call for GSoC/Outreachy internship project ideas

2024-01-31 Thread Palmer Dabbelt
On Wed, 31 Jan 2024 06:39:25 PST (-0800), stefa...@gmail.com wrote: On Tue, 30 Jan 2024 at 14:40, Palmer Dabbelt wrote: On Mon, 15 Jan 2024 08:32:59 PST (-0800), stefa...@gmail.com wrote: I'm not 100% sure this is a sane GSoC idea, as it's a bit open ended and might have some tricky parts.

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

2024-01-31 Thread Jonathan Cameron via
On Tue, 30 Jan 2024 05:03:15 + JeeHeng Sia wrote: > > -Original Message- > > From: Jonathan Cameron > > Sent: Monday, January 29, 2024 7:08 PM > > To: JeeHeng Sia > > Cc: qemu-devel@nongnu.org; qemu-...@nongnu.org; qemu-ri...@nongnu.org; > > m...@redhat.com; imamm...@redhat.com; >

Re: [RFC v1 1/3] hw/acpi/aml-build: Add cache structure table creation for PPTT table

2024-01-31 Thread Jonathan Cameron via
On Tue, 30 Jan 2024 05:00:57 + JeeHeng Sia wrote: > > -Original Message- > > From: Jonathan Cameron > > Sent: Monday, January 29, 2024 7:03 PM > > To: JeeHeng Sia > > Cc: qemu-devel@nongnu.org; qemu-...@nongnu.org; qemu-ri...@nongnu.org; > > m...@redhat.com; imamm...@redhat.com; >

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

2024-01-31 Thread Fabiano Rosas
pet...@redhat.com writes: > 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

Re: [PATCH] mips: allow compiling out CONFIG_MIPS_ITU

2024-01-31 Thread Paolo Bonzini
Il lun 29 gen 2024, 14:31 Paolo Bonzini ha scritto: > On Mon, Jan 29, 2024 at 2:30 PM Philippe Mathieu-Daudé > wrote: > > > > Hi Paolo, > > > > On 29/1/24 13:13, Paolo Bonzini wrote: > > > itu_reconfigure() is referenced from TCG, provide a stub if needed. > > > >

Re: [PATCH rfcv1 23/23] intel_iommu: modify x-scalable-mode to be string option

2024-01-31 Thread Yi Liu
On 2024/1/31 22:40, Joel Granados wrote: On Mon, Jan 15, 2024 at 06:37:35PM +0800, Zhenzhong Duan wrote: From: Yi Liu Intel VT-d 3.0 introduces scalable mode, and it has a bunch of capabilities related to scalable mode translation, thus there are multiple combinations. While this vIOMMU

Re: [PATCH v3 1/1] oslib-posix: initialize backend memory objects in parallel

2024-01-31 Thread David Hildenbrand
On 31.01.24 15:48, Mark Kanda wrote: On 1/31/24 8:30 AM, David Hildenbrand wrote: OK. I'll call it 'PHASE_LATE_BACKENDS_CREATED' (to make it consistent with code comments/function name). But then, you should set it at the very end of the function (not sure if that would be a problem with the

Re: [PATCH 0/2] Enable -Wvla, forbidding use of variable length arrays

2024-01-31 Thread Thomas Huth
On 25/01/2024 18.32, Peter Maydell wrote: For a while now I've had an on-and-off-again campaign to get rid of the handful of uses of C variable-length-array syntax in our codebase. The rationale for this is that if the array size can be controlled by the guest and we don't get the size limit

Re: [PATCH v3 1/1] oslib-posix: initialize backend memory objects in parallel

2024-01-31 Thread Mark Kanda
On 1/31/24 8:30 AM, David Hildenbrand wrote: OK. I'll call it 'PHASE_LATE_BACKENDS_CREATED' (to make it consistent with code comments/function name). But then, you should set it at the very end of the function (not sure if that would be a problem with the other devices that are getting

Re: [PATCH rfcv1 23/23] intel_iommu: modify x-scalable-mode to be string option

2024-01-31 Thread Joel Granados
On Mon, Jan 15, 2024 at 06:37:35PM +0800, Zhenzhong Duan wrote: > From: Yi Liu > > Intel VT-d 3.0 introduces scalable mode, and it has a bunch of capabilities > related to scalable mode translation, thus there are multiple combinations. > While this vIOMMU implementation wants to simplify it for

Re: Call for GSoC/Outreachy internship project ideas

2024-01-31 Thread Stefan Hajnoczi
On Tue, 30 Jan 2024 at 14:40, Palmer Dabbelt wrote: > On Mon, 15 Jan 2024 08:32:59 PST (-0800), stefa...@gmail.com wrote: > I'm not 100% sure this is a sane GSoC idea, as it's a bit open ended and > might have some tricky parts. That said it's tripping some people up > and as far as I know

Re: [PATCH v3 1/1] oslib-posix: initialize backend memory objects in parallel

2024-01-31 Thread David Hildenbrand
OK. I'll call it 'PHASE_LATE_BACKENDS_CREATED' (to make it consistent with code comments/function name). But then, you should set it at the very end of the function (not sure if that would be a problem with the other devices that are getting created in between -- if they would be using one

Re: [PATCH v4 29/47] hw/arm/stellaris: use qemu_find_nic_info()

2024-01-31 Thread Peter Maydell
On Wed, 31 Jan 2024 at 12:14, Thomas Huth wrote: > > On 26/01/2024 18.25, David Woodhouse wrote: > > From: David Woodhouse > > > > Rather than just using qemu_configure_nic_device(), populate the MAC > > address in the system-registers device by peeking at the NICInfo before > > it's assigned to

Re: [PATCH v3 1/1] oslib-posix: initialize backend memory objects in parallel

2024-01-31 Thread Mark Kanda
On 1/31/24 8:04 AM, David Hildenbrand wrote: On 31.01.24 14:48, Mark Kanda wrote: QEMU initializes preallocated backend memory as the objects are parsed from the command line. This is not optimal in some cases (e.g. memory spanning multiple NUMA nodes) because the memory objects are

Re: [PATCH v4 33/47] hw/m68k/q800: use qemu_find_nic_info()

2024-01-31 Thread David Woodhouse
On Wed, 2024-01-31 at 13:18 +0100, Thomas Huth wrote: > > > @@ -386,14 +382,21 @@ static void q800_machine_init(MachineState > > *machine) > >     * 08:00:07 Apple > >     * (Q800 use the last one) > >     */ > > -    nd_table[0].macaddr.a[0] = 0x08; > > -    nd_table[0].macaddr.a[1]

[PATCH] hw/intc: Handle the error of IOAPICCommonClass.realize()

2024-01-31 Thread Zhao Liu
From: Zhao Liu IOAPICCommonClass implements its own private realize(), and this private realize() allows error. Therefore, return directly if IOAPICCommonClass.realize() meets error. Signed-off-by: Zhao Liu --- hw/intc/ioapic_common.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

Re: [PATCH v4 29/47] hw/arm/stellaris: use qemu_find_nic_info()

2024-01-31 Thread David Woodhouse
On Wed, 2024-01-31 at 13:13 +0100, Thomas Huth wrote: > > >    qdev_prop_set_uint32(ssys_dev, "user0", > > - macaddr[0] | (macaddr[1] << 8) | (macaddr[2] << > > 16)); > > + mac.a[0] | (mac.a[1] << 8) | (mac.a[2] << 16)); > >   

Re: [PATCH v3 1/1] oslib-posix: initialize backend memory objects in parallel

2024-01-31 Thread David Hildenbrand
On 31.01.24 14:48, Mark Kanda wrote: QEMU initializes preallocated backend memory as the objects are parsed from the command line. This is not optimal in some cases (e.g. memory spanning multiple NUMA nodes) because the memory objects are initialized in series. Allow the initialization to occur

[PATCH v3 1/1] oslib-posix: initialize backend memory objects in parallel

2024-01-31 Thread Mark Kanda
QEMU initializes preallocated backend memory as the objects are parsed from the command line. This is not optimal in some cases (e.g. memory spanning multiple NUMA nodes) because the memory objects are initialized in series. Allow the initialization to occur in parallel (asynchronously). In order

[PATCH v3 0/1] Initialize backend memory objects in parallel

2024-01-31 Thread Mark Kanda
v3: - squash into a single patch - use global context list for async handling only (MT capability) - add BQL asserts to guard against concurrent async prealloc requests - clean up qemu_finish_async_mem_prealloc() error handling Includes David's suggested restructuring [1] (with David's SoB). [1]

Re: [PATCH v3] target/riscv: mcountinhibit, mcounteren, scounteren, hcounteren is 32-bit

2024-01-31 Thread Andrew Jones
On Wed, Jan 31, 2024 at 03:36:24PM +0300, Vadim Shakirov wrote: > mcountinhibit, mcounteren, scounteren and hcounteren must always be 32-bit > by privileged spec > > Signed-off-by: Vadim Shakirov > --- > target/riscv/cpu.h | 8 > target/riscv/machine.c | 16 > 2

Re: [PATCH 0/3] make vm-build-freebsd fixes

2024-01-31 Thread Ilya Leoshkevich
On Wed, 2024-01-31 at 14:24 +0100, Thomas Huth wrote: > On 25/01/2024 20.48, Ilya Leoshkevich wrote: > > Hi, > > > > I needed to verify that my qemu-user changes didn't break BSD, and > > Daniel Berrange suggested vm-build-freebsd on IRC. I had several > > problems with it, which this series

Re: [PATCH 0/3] make vm-build-freebsd fixes

2024-01-31 Thread Thomas Huth
On 25/01/2024 20.48, Ilya Leoshkevich wrote: Hi, I needed to verify that my qemu-user changes didn't break BSD, and Daniel Berrange suggested vm-build-freebsd on IRC. I had several problems with it, which this series resolves. Best regards, Ilya Ilya Leoshkevich (3): tests/vm: Set

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

2024-01-31 Thread BALATON Zoltan
On Wed, 31 Jan 2024, Peter Maydell wrote: On Wed, 31 Jan 2024 at 10:29, Michael Tokarev wrote: 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

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

2024-01-31 Thread Fabiano Rosas
Peter Xu writes: > 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

Re: [PATCH 1/5] migration/multifd: Separate compression ops from non-compression

2024-01-31 Thread Fabiano Rosas
Peter Xu writes: > On Tue, Jan 30, 2024 at 12:11:47PM -0300, Fabiano Rosas wrote: >> Peter Xu writes: >> >> > On Mon, Jan 29, 2024 at 09:42:24AM -0300, Fabiano Rosas wrote: >> >> Peter Xu writes: >> >> >> >> > On Fri, Jan 26, 2024 at 07:19:39PM -0300, Fabiano Rosas wrote: >> >> >> +static

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

2024-01-31 Thread Philippe Mathieu-Daudé
On 31/1/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. Cc: qemu-sta...@nongnu.org Fixes: 19b84f3c35d7 ("added setgroups and getgroups

Re: [PULL 06/15] tests/qtest/migration: Don't use -cpu max for aarch64

2024-01-31 Thread Fabiano Rosas
Peter Xu writes: > On Tue, Jan 30, 2024 at 06:23:10PM -0300, Fabiano Rosas wrote: >> Peter Xu writes: >> >> > On Tue, Jan 30, 2024 at 10:18:07AM +, Peter Maydell wrote: >> >> On Mon, 29 Jan 2024 at 23:31, Fabiano Rosas wrote: >> >> > >> >> > Fabiano Rosas writes: >> >> > >> >> > > Peter

[PATCH] scsi: Don't ignore most usb-storage properties

2024-01-31 Thread Kevin Wolf
usb-storage is for the most part just a wrapper around an internally created scsi-disk device. It uses DEFINE_BLOCK_PROPERTIES() to offer all of the usual block device properties to the user, but then only forwards a few select properties to the internal device while the rest is silently ignored.

Re: [PATCH v2 6/6] target/i386: Add new CPU model GraniteRapids

2024-01-31 Thread Tao Su
On Wed, Jan 31, 2024 at 01:34:31PM +0100, Igor Mammedov wrote: > On Tue, 30 Jan 2024 21:34:36 +0800 > Tao Su wrote: > > > On Tue, Jan 30, 2024 at 11:14:59AM +0100, Igor Mammedov wrote: > > > On Thu, 6 Jul 2023 13:49:49 +0800 > > > Tao Su wrote: > > > > > > > The GraniteRapids CPU model

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

2024-01-31 Thread Peter Maydell
On Wed, 31 Jan 2024 at 10:29, Michael Tokarev wrote: > 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

Re: [PATCH 1/3] tests/vm: Set UseDNS=no in the sshd configuration

2024-01-31 Thread Thomas Huth
On 25/01/2024 20.48, Ilya Leoshkevich wrote: make vm-build-freebsd sometimes fails with "Connection timed out during banner exchange". The client strace shows: 13:59:30 write(3, "SSH-2.0-OpenSSH_9.3\r\n", 21) = 21 13:59:30 getpid() = 252655 13:59:30

Re: [PATCH 3/3] meson: Disable CONFIG_NOTIFY1 on FreeBSD

2024-01-31 Thread Thomas Huth
On 25/01/2024 20.48, Ilya Leoshkevich wrote: make vm-build-freebsd fails with: ld: error: undefined symbol: inotify_init1 >>> referenced by filemonitor-inotify.c:183 (../src/util/filemonitor-inotify.c:183) >>> util_filemonitor-inotify.c.o:(qemu_file_monitor_new) in

Re: [PATCH 2/3] tests/vm/freebsd: Reload the sshd configuration

2024-01-31 Thread Thomas Huth
On 25/01/2024 20.48, Ilya Leoshkevich wrote: After console_sshd_config(), the SSH server needs to be nudged to pick up the new configs. The scripts for the other BSD flavors already do this with a reboot, but a simple reload is sufficient. Signed-off-by: Ilya Leoshkevich --- tests/vm/freebsd

[PATCH v3] target/riscv: mcountinhibit, mcounteren, scounteren, hcounteren is 32-bit

2024-01-31 Thread Vadim Shakirov
mcountinhibit, mcounteren, scounteren and hcounteren must always be 32-bit by privileged spec Signed-off-by: Vadim Shakirov --- target/riscv/cpu.h | 8 target/riscv/machine.c | 16 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/target/riscv/cpu.h

Re: [PATCH v2 6/6] target/i386: Add new CPU model GraniteRapids

2024-01-31 Thread Igor Mammedov
On Tue, 30 Jan 2024 21:34:36 +0800 Tao Su wrote: > On Tue, Jan 30, 2024 at 11:14:59AM +0100, Igor Mammedov wrote: > > On Thu, 6 Jul 2023 13:49:49 +0800 > > Tao Su wrote: > > > > > The GraniteRapids CPU model mainly adds the following new features > > > based on SapphireRapids: > > > -

Re: [PATCH v4 33/47] hw/m68k/q800: use qemu_find_nic_info()

2024-01-31 Thread Thomas Huth
On 26/01/2024 18.25, David Woodhouse wrote: From: David Woodhouse If a corresponding NIC configuration was found, it will have a MAC address already assigned, so use that. Else, generate and assign a default one. Using qemu_find_nic_info() is simpler than the alternative of using

Re: [PATCH v4 29/47] hw/arm/stellaris: use qemu_find_nic_info()

2024-01-31 Thread Thomas Huth
On 26/01/2024 18.25, David Woodhouse wrote: From: David Woodhouse Rather than just using qemu_configure_nic_device(), populate the MAC address in the system-registers device by peeking at the NICInfo before it's assigned to the device. Generate the MAC address early, if there is no matching

RE: [PATCH] vhost_net: add NOTIFICATION_DATA and IN_ORDER feature bits to vdpa_feature_bits

2024-01-31 Thread Vamsi Krishna Attunuru
Hi Michael, Can you review this feature support patch, appreciate your review and comments. Patch considers all feature bits supported by vhost net client type as part of feature negotiation to address the concerns raised in below thread.

building qemu on a system with libxkbcommon installed but not xkeyboard-config produces an core dump

2024-01-31 Thread Zhang Wen
With this patch, qemu requires keyboard-config when libxkbcommon is found on the system. So if the qemu is configured when libxkbcommon is installed but not keyboard-config, the configure stage will produce an error message, thus avoid coredump in the build stage. From

Re: [PATCH v4 46/47] net: remove qemu_show_nic_models(), qemu_find_nic_model()

2024-01-31 Thread Thomas Huth
On 26/01/2024 18.25, David Woodhouse wrote: From: David Woodhouse These old functions can be removed now too. Let net_param_nic() print the full set of network devices directly, and also make it note that a list more specific to this platform/config will be available by using '-nic model=help'

Re: [PATCH v4 42/47] hw/sparc/sun4m: use qemu_find_nic_info()

2024-01-31 Thread Thomas Huth
On 26/01/2024 18.25, David Woodhouse wrote: From: David Woodhouse Obtain the MAC address from the NIC configuration if there is one, or generate one explicitly so that it can be placed in the PROM. Signed-off-by: David Woodhouse --- hw/sparc/sun4m.c | 20 ++-- 1 file

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

[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

[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

[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

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:

[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

[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

[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

[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

[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. *

[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 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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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 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

[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 ---

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

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 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 >

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> >

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

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

[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 +

[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

[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

[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

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

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

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 >

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 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: 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 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

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.

[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

[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

[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

[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

[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 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 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,

[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

<    1   2   3   >