[PATCH v5 3/7] migration/multifd: Add new migration option zero-page-detection.

2024-03-09 Thread Hao Xiang
From: Hao Xiang This new parameter controls where the zero page checking is running. 1. If this parameter is set to 'legacy', zero page checking is done in the migration main thread. 2. If this parameter is set to 'none', zero page checking is disabled. Signed-off-by: Hao Xiang Reviewed-by: Pet

Re: [PATCH v4 2/7] migration/multifd: Implement zero page transmission on the multifd thread.

2024-03-09 Thread hao . xiang
> > On Mon, Mar 4, 2024 at 10:24 AM Fabiano Rosas wrote: > > > > > > Fabiano Rosas writes: > > > > Peter Xu writes: > > > > On Fri, Mar 01, 2024 at 02:28:24AM +, Hao Xiang wrote: > > > > -GlobalProperty hw_compat_8_2[] = {}; > > > > +GlobalProperty hw_compat_8_2[

Re: [PATCH v4 7/7] Update maintainer contact for migration multifd zero page checking acceleration.

2024-03-09 Thread hao . xiang
> > On Sun, Mar 3, 2024 at 11:34 PM Peter Xu wrote: > > > > > On Fri, Mar 01, 2024 at 02:28:29AM +, Hao Xiang wrote: > > > > Add myself to maintain multifd zero page checking acceleration function. > > > > Signed-off-by: Hao Xiang > > > > --- > > > > MAINTAINERS | 5 + > > > >

Re: [PATCH v2] hw/m68k/mcf5208: add support for reset

2024-03-09 Thread Thomas Huth
Am Fri, 8 Mar 2024 10:08:12 +0100 schrieb Angelo Dureghello : > Add reset support for mcf5208. > > Signed-off-by: Angelo Dureghello > --- > hw/m68k/mcf5208.c | 49 --- > 1 file changed, 46 insertions(+), 3 deletions(-) > > diff --git a/hw/m68k/mcf52

Re: [PATCH v2] hw/m68k/mcf5208: add support for reset

2024-03-09 Thread Angelo Dureghello
Hi Thomas, On 09/03/24 10:06 AM, Thomas Huth wrote: Am Fri, 8 Mar 2024 10:08:12 +0100 schrieb Angelo Dureghello : Add reset support for mcf5208. Signed-off-by: Angelo Dureghello --- hw/m68k/mcf5208.c | 49 --- 1 file changed, 46 insertions(+),

[PATCH v3] hw/m68k/mcf5208: add support for reset

2024-03-09 Thread Angelo Dureghello
Add reset support for mcf5208. Signed-off-by: Angelo Dureghello --- hw/m68k/mcf5208.c | 44 ++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/hw/m68k/mcf5208.c b/hw/m68k/mcf5208.c index 0cfb806c20..ec14096aa4 100644 --- a/hw/m68k/mcf5208.

Re: Unmapping KVM Guest Memory from Host Kernel

2024-03-09 Thread Mike Rapoport
On Fri, Mar 08, 2024 at 03:22:50PM -0800, Sean Christopherson wrote: > On Fri, Mar 08, 2024, James Gowans wrote: > > However, memfd_secret doesn’t work out the box for KVM guest memory; the > > main reason seems to be that the GUP path is intentionally disabled for > > memfd_secret, so if we use a

Re: [PATCH] hw/ppc/sam460ex: Support short options for adding drives

2024-03-09 Thread BALATON Zoltan
On Tue, 5 Mar 2024, BALATON Zoltan wrote: Having to use -drive if=none,... and -device ide-[cd,hd] is inconvenient. Add support for shorter convenience options such as -cdrom and -drive media=disk. Also adjust two nearby comments for code style. Signed-off-by: BALATON Zoltan Ping for freeze?

Re: [PATCH v3] docs/system/ppc: Document running Linux on AmigaNG machines

2024-03-09 Thread BALATON Zoltan
On Thu, 29 Feb 2024, BALATON Zoltan wrote: On Wed, 21 Feb 2024, BALATON Zoltan wrote: Documentation on how to run Linux on the amigaone, pegasos2 and sam460ex machines is currently buried in the depths of the qemu-devel mailing list and in the source code. Let's collect the information in the QE

Re: [PATCH v7 02/10] target/ppc: Readability improvements in exception handlers

2024-03-09 Thread BALATON Zoltan
On Thu, 29 Feb 2024, Nicholas Piggin wrote: On Wed Feb 28, 2024 at 6:24 AM AEST, BALATON Zoltan wrote: On Tue, 27 Feb 2024, BALATON Zoltan wrote: On Tue, 27 Feb 2024, Peter Maydell wrote: On Tue, 27 Feb 2024 at 15:10, BALATON Zoltan wrote: Improve readability by shortening some long comment

Re: [PATCH v2 3/5] gdbstub: Save target's siginfo

2024-03-09 Thread Alex Bennée
Richard Henderson writes: > On 3/8/24 09:25, Alex Bennée wrote: >>make vm-build-[open|net|free]bsd >> see make vm-help for details. > > That won't build freebsd user. > Something I've mentioned to you before... make vm-build-freebsd BUILD_TARGET=all I guess the default "check" target does

[RFC PATCH] tests/vm: ensure we build everything by default

2024-03-09 Thread Alex Bennée
The "check" target by itself is not enough to ensure we build the user mode binaries. While we can't test them with check-tcg we can at least include them in the build. Signed-off-by: Alex Bennée Cc: Richard Henderson Cc: Gustavo Romero --- tests/vm/basevm.py | 2 +- 1 file changed, 1 insertio

Re: [PATCH] disas/riscv: Further correction to LUI disassembly

2024-03-09 Thread Andrew Jones
On Fri, Mar 08, 2024 at 08:22:01PM -0800, Richard Bagley wrote: > post-nack, one further comment: > > One could argue that this change also aligns QEMU with supporting tools (as > Andrew observed), and it makes sense to merge this change into QEMU until > those tools update to supporting signed de

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

2024-03-09 Thread Xiaoyao Li
On 2/27/2024 6:32 PM, Zhao Liu wrote: 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 usin

[PATCH 0/2] Make PAMMemoryRegion less Intel-specific

2024-03-09 Thread Bernhard Beschow
This series makes pam_update() more self-contained by removing some Intel assumptions. As a result, the purpose of PAMMemoryRegion becomes clearer and, as a side effect, makes it reusable for northbridges other than Intel, e.g. VIA. Testing done: * `make check` * `make check-avocado` * This series

[PATCH 2/2] hw/pci-host/pam: Remove northbridge-specific PAM_REGIONS_COUNT

2024-03-09 Thread Bernhard Beschow
PAM_REGIONS_COUNT being 13 seems to be Intel-specific. There are VIA 82cXX northbridges having only 10, for example. Communicate this by having northbridge-specific constants. Signed-off-by: Bernhard Beschow -- Do we need the constants or can we omit them, given they're just used once? --- inc

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

2024-03-09 Thread Xiaoyao Li
On 2/27/2024 6:32 PM, Zhao Liu wrote: 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[b

[PATCH 1/2] hw/pci-host/pam: Free PAMMemoryRegion from Intel-specific bit handling

2024-03-09 Thread Bernhard Beschow
The PAM bit extraction is currently spread across pam.c and the northbridge device models, making the extraction logic harder to comprehend. Also note how pam_update() deals with PAM_REGIONS_COUNT, even though it handles exactly one region. Fix this (at the cost of minor code duplication) by moving

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

2024-03-09 Thread Xiaoyao Li
On 2/27/2024 6:32 PM, Zhao Liu wrote: 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 Again as in v7, please changes to "cs->nr_co

Re: [PATCH v2 00/13] Cleanup on SMP and its test

2024-03-09 Thread Philippe Mathieu-Daudé
On 9/3/24 01:46, Zhao Liu wrote: Hi Philippe, Can you share your base commit please? Applying: hw/core/machine-smp: Remove deprecated "parameter=0" SMP configurations Applying: hw/core/machine-smp: Deprecate unsupported "parameter=1" SMP configurations error: patch failed: docs/about/deprecat

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

2024-03-09 Thread Philippe Mathieu-Daudé
Hi Zhao, On 9/3/24 01:49, Zhao Liu wrote: On Fri, Mar 08, 2024 at 05:36:38PM +0100, Philippe Mathieu-Daudé wrote: Date: Fri, 8 Mar 2024 17:36:38 +0100 From: Philippe Mathieu-Daudé Subject: Re: [PATCH v9 00/21] Introduce smp.modules for x86 in QEMU On 27/2/24 11:32, Zhao Liu wrote: --- Zhao

Re: [PATCH 2/2] hw/pci-host/pam: Remove northbridge-specific PAM_REGIONS_COUNT

2024-03-09 Thread Philippe Mathieu-Daudé
On 9/3/24 14:40, Bernhard Beschow wrote: PAM_REGIONS_COUNT being 13 seems to be Intel-specific. There are VIA 82cXX northbridges having only 10, for example. Communicate this by having northbridge-specific constants. Signed-off-by: Bernhard Beschow -- Do we need the constants or can we omit t

Re: [PATCH v3] hw/m68k/mcf5208: add support for reset

2024-03-09 Thread Thomas Huth
Am Sat, 9 Mar 2024 10:34:59 +0100 schrieb Angelo Dureghello : > Add reset support for mcf5208. > > Signed-off-by: Angelo Dureghello > --- > hw/m68k/mcf5208.c | 44 ++-- > 1 file changed, 42 insertions(+), 2 deletions(-) Reviewed-by: Thomas Huth

Re: [PULL 00/12] Cocoa patches for 2024-03-05

2024-03-09 Thread Peter Maydell
On Tue, 5 Mar 2024 at 11:06, Philippe Mathieu-Daudé wrote: > > The following changes since commit 52e7db443bd8d233acc3977bd150bdadb62db86c: > > Merge tag 'hppa-latest-pull-request' of > https://github.com/hdeller/qemu-hppa into staging (2024-03-04 16:01:33 +) > > are available in the Git re

Re: [PULL 00/14] target-arm queue

2024-03-09 Thread Peter Maydell
On Fri, 8 Mar 2024 at 15:50, Peter Maydell wrote: > > The following changes since commit 8f6330a807f2642dc2a3cdf33347aa28a4c00a87: > > Merge tag 'pull-maintainer-updates-060324-1' of > https://gitlab.com/stsquad/qemu into staging (2024-03-06 16:56:20 +) > > are available in the Git reposito

Re: [PATCH 0/2] Revert "hw/i386/pc: Confine system flash handling to pc_sysfw"

2024-03-09 Thread Alex Williamson
On Mon, 26 Feb 2024 22:59:07 +0100 Bernhard Beschow wrote: > As reported by Volker [1], commit 6f6ad2b24582 "hw/i386/pc: Confine system > flash handling to pc_sysfw" causes a regression when specifying the property > `-M pflash0` in the PCI PC machines: > qemu-system-x86_64: Property 'pc-q35-9.

[PATCH] usb: add support for sending MSIs from EHCI PCI devices

2024-03-09 Thread Isaac Woods
This is a small patch that aims to add support for sending message-signalled interrupts from EHCI controllers on PCI busses. This was desirable for guests (in my case a hobbyist OS) that do not have support for legacy PCI interrupt routing but still want to / have to interface with EHCI controllers

[PATCH] usb: add support for sending MSIs from EHCI PCI devices

2024-03-09 Thread Isaac Woods
Signed-off-by: Isaac Woods --- hw/usb/hcd-ehci-pci.c| 27 +++ hw/usb/hcd-ehci-sysbus.c | 7 +++ hw/usb/hcd-ehci.c| 2 +- hw/usb/hcd-ehci.h| 2 ++ 4 files changed, 37 insertions(+), 1 deletion(-) diff --git a/hw/usb/hcd-ehci-pci.c b/hw/usb/hcd-eh

[PULL 08/11] hw/cxl/cxl-cdat: Fix type of buf in ct3_load_cdat()

2024-03-09 Thread Michael Tokarev
From: Thomas Huth When setting GLIB_VERSION_MAX_ALLOWED to GLIB_VERSION_2_58 or higher (which we'll certainly do in the not too distant future), glib adds type safety checks to the g_steal_pointer() macro. This trigger an error in the ct3_load_cdat() function: The local char *buf variable is assi

[PULL 06/11] blockdev: Fix block_resize error reporting for op blockers

2024-03-09 Thread Michael Tokarev
From: Markus Armbruster When block_resize() runs into an op blocker, it creates an error like this: error_setg(errp, "Device '%s' is in use", device); Trouble is @device can be null. My system formats null as "(null)", but other systems might crash. Reproducer: 1. Create two block de

[PULL 02/11] hw/vfio/pci.c: Make some structure static

2024-03-09 Thread Michael Tokarev
From: Frediano Ziglio Not used outside C module. Signed-off-by: Frediano Ziglio Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by Tokarev Signed-off-by: Michael Tokarev --- hw/vfio/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw

[PULL 04/11] make-release: switch to .xz format by default

2024-03-09 Thread Michael Tokarev
For a long time, we provide two compression formats in the download area, .bz2 and .xz. There's absolutely no reason to provide two in parallel, .xz compresses better, and all the links we use points to .xz. Downstream distributions mostly use .xz too. For the release maintenance providing two f

[PULL 01/11] replay: Improve error messages about configuration conflicts

2024-03-09 Thread Michael Tokarev
From: Markus Armbruster Improve Record/replay feature is not supported for '-rtc base=localtime' Record/replay feature is not supported for 'smp' Record/replay feature is not supported for '-snapshot' to Record/replay is not supported with -rtc base=localtime Record/replay is no

[PULL 05/11] char: Slightly better error reporting when chardev is in use

2024-03-09 Thread Michael Tokarev
From: Markus Armbruster Both $ qemu-system-x86_64 -chardev null,id=chr0,mux=on -mon chardev=chr0 -mon chardev=chr0 -mon chardev=chr0 -mon chardev=chr0 -mon chardev=chr0 and $ qemu-system-x86_64 -chardev null,id=chr0 -mon chardev=chr0 -mon chardev=chr0 fail with qemu-system-x86_6

[PULL 07/11] qerror: QERR_DEVICE_IN_USE is no longer used, drop

2024-03-09 Thread Michael Tokarev
From: Markus Armbruster Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- include/qapi/qmp/qerror.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h i

[PULL 10/11] hw/mem/cxl_type3: Fix problem with g_steal_pointer()

2024-03-09 Thread Michael Tokarev
From: Thomas Huth When setting GLIB_VERSION_MAX_ALLOWED to GLIB_VERSION_2_58 or higher, glib adds type safety checks to the g_steal_pointer() macro. This triggers errors in the ct3_build_cdat_entries_for_mr() function which uses the g_steal_pointer() for type-casting from one pointer type to the

[PULL 03/11] hw/scsi/lsi53c895a: Fix typo in comment

2024-03-09 Thread Michael Tokarev
From: BALATON Zoltan Signed-off-by: BALATON Zoltan Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- hw/scsi/lsi53c895a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c index d607a5f9fb..f8598a17f5 100644 --- a/hw/

[PULL 09/11] hw/pci-bridge/cxl_upstream: Fix problem with g_steal_pointer()

2024-03-09 Thread Michael Tokarev
From: Thomas Huth When setting GLIB_VERSION_MAX_ALLOWED to GLIB_VERSION_2_58 or higher, glib adds type safety checks to the g_steal_pointer() macro. This triggers errors in the build_cdat_table() function which uses the g_steal_pointer() for type-casting from one pointer type to the other (which

[PULL 11/11] docs/acpi/bits: add some clarity and details while also improving formating

2024-03-09 Thread Michael Tokarev
From: Ani Sinha Update bios-bits docs to add more details on why a pre-OS environment for testing bioses is useful. Add author's FOSDEM talk link. Also improve the formating of the document while at it. Signed-off-by: Ani Sinha Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev ---

[PULL 00/11] Trivial patches for 2024-03-09

2024-03-09 Thread Michael Tokarev
The following changes since commit 84644ac1b0f80d41b8a2f66547b83b2ad4a98576: Merge tag 'darwin-20240305' of https://github.com/philmd/qemu into staging (2024-03-08 18:19:25 +) are available in the Git repository at: https://gitlab.com/mjt0k/qemu.git tags/pull-trivial-patches for you to

Re: [PATCH 1/2] hw/pci-host/pam: Free PAMMemoryRegion from Intel-specific bit handling

2024-03-09 Thread Philippe Mathieu-Daudé
Hi Bernhard, On 9/3/24 14:40, Bernhard Beschow wrote: The PAM bit extraction is currently spread across pam.c and the northbridge device models, making the extraction logic harder to comprehend. Also note how pam_update() deals with PAM_REGIONS_COUNT, even though it handles exactly one region. F

Re: [PATCH v2] docs/conf.py: Remove usage of distutils

2024-03-09 Thread Peter Maydell
On Tue, 5 Mar 2024 at 10:39, Thomas Huth wrote: > > On 04/03/2024 19.04, Daniel P. Berrangé wrote: > > On Mon, Mar 04, 2024 at 06:11:58PM +0100, Thomas Huth wrote: > >> On 04/03/2024 17.56, Peter Maydell wrote: > >>> On Mon, 4 Mar 2024 at 13:04, Thomas Huth wrote: > > The macOS jobs in

Re: [PATCH] usb: add support for sending MSIs from EHCI PCI devices

2024-03-09 Thread BALATON Zoltan
On Sat, 9 Mar 2024, Isaac Woods wrote: Signed-off-by: Isaac Woods --- hw/usb/hcd-ehci-pci.c| 27 +++ hw/usb/hcd-ehci-sysbus.c | 7 +++ hw/usb/hcd-ehci.c| 2 +- hw/usb/hcd-ehci.h| 2 ++ 4 files changed, 37 insertions(+), 1 deletion(-) diff --git a/h

[PATCH 2/2] tcg/aarch64: Fix tcg_out_brcond for test comparisons

2024-03-09 Thread Richard Henderson
When converting test vs UINT32_MAX to compare vs 0, we need to adjust the condition to match. Cc: qemu-sta...@nongnu.org Fixes: 34aff3c2e06 ("tcg/aarch64: Generate CBNZ for TSTNE of UINT32_MAX") Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.c.inc | 1 + 1 file changed, 1 insertion(

[PATCH 0/2] tcg/aarch64: Fixes for test comparisons

2024-03-09 Thread Richard Henderson
Oopsies exposed by Paolo's target/i386 changes. r~ Richard Henderson (2): tcg/aarch64: Fix tcg_out_cmp for test comparisons tcg/aarch64: Fix tcg_out_brcond for test comparisons tcg/aarch64/tcg-target.c.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.34.1

Re: [PATCH] mac_newworld: change timebase frequency from 100MHz to 25MHz for mac99 machine

2024-03-09 Thread Philippe Mathieu-Daudé
On 4/3/24 08:35, Mark Cave-Ayland wrote: MacOS X uses multiple techniques for calibrating timers depending upon the detected hardware. One of these calibration routines compares the change in the timebase against the KeyLargo timer and uses this to recalculate the clock frequency, timebase frequ

[PATCH 1/2] tcg/aarch64: Fix tcg_out_cmp for test comparisons

2024-03-09 Thread Richard Henderson
Pass the type to tcg_out_logicali; remove the assert, duplicated at the start of tcg_out_logicali. Cc: qemu-sta...@nongnu.org Fixes: 339adf2f38e ("tcg/aarch64: Support TCG_COND_TST{EQ,NE}") Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.c.inc | 3 +-- 1 file changed, 1 insertion(+),

Re: [PATCH 1/2] tcg/aarch64: Fix tcg_out_cmp for test comparisons

2024-03-09 Thread Philippe Mathieu-Daudé
On 9/3/24 18:51, Richard Henderson wrote: Pass the type to tcg_out_logicali; remove the assert, duplicated at the start of tcg_out_logicali. Cc: qemu-sta...@nongnu.org Fixes: 339adf2f38e ("tcg/aarch64: Support TCG_COND_TST{EQ,NE}") Oops, thanks. Reviewed-by: Philippe Mathieu-Daudé Signed-o

Re: [PATCH 2/2] tcg/aarch64: Fix tcg_out_brcond for test comparisons

2024-03-09 Thread Philippe Mathieu-Daudé
On 9/3/24 18:51, Richard Henderson wrote: When converting test vs UINT32_MAX to compare vs 0, we need to adjust the condition to match. Cc: qemu-sta...@nongnu.org Fixes: 34aff3c2e06 ("tcg/aarch64: Generate CBNZ for TSTNE of UINT32_MAX") Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-tar

Re: [PATCH] target/riscv: raise an exception when CSRRS/CSRRC writes a read-only CSR

2024-03-09 Thread Richard Henderson
On 3/7/24 22:40, Yu-Ming Chang via wrote: Both CSRRS and CSRRC always read the addressed CSR and cause any read side effects regardless of rs1 and rd fields. Note that if rs1 specifies a register holding a zero value other than x0, the instruction will still attempt to write the unmodified value

Re: [PATCH v2] docs/conf.py: Remove usage of distutils

2024-03-09 Thread Philippe Mathieu-Daudé
On 9/3/24 18:27, Peter Maydell wrote: On Tue, 5 Mar 2024 at 10:39, Thomas Huth wrote: On 04/03/2024 19.04, Daniel P. Berrangé wrote: On Mon, Mar 04, 2024 at 06:11:58PM +0100, Thomas Huth wrote: On 04/03/2024 17.56, Peter Maydell wrote: On Mon, 4 Mar 2024 at 13:04, Thomas Huth wrote: The

Re: [PATCH v8 02/10] target/riscv: handle vstart >= vl in vext_set_tail_elems_1s()

2024-03-09 Thread Richard Henderson
On 3/8/24 11:53, Daniel Henrique Barboza wrote: +static void vext_set_tail_elems_1s(CPURISCVState *env, void *vd, + uint32_t desc, uint32_t esz, + uint32_t max_elems) { uint32_t vta = vext_vta(desc); +uint32_t nf = ve

Re: [PATCH v2] target/arm: Fix 32-bit SMOPA

2024-03-09 Thread Michael Tokarev
05.03.2024 19:39, Richard Henderson wrote: While the 8-bit input elements are sequential in the input vector, the 32-bit output elements are not sequential in the output matrix. Do not attempt to compute 2 32-bit outputs at the same time. Cc: qemu-sta...@nongnu.org Fixes: 23a5e3859f5 ("target/ar

Re: [PATCH 1/2] hw/pci-host/pam: Free PAMMemoryRegion from Intel-specific bit handling

2024-03-09 Thread Bernhard Beschow
Am 9. März 2024 16:29:23 UTC schrieb "Philippe Mathieu-Daudé" : >Hi Bernhard, > >On 9/3/24 14:40, Bernhard Beschow wrote: >> The PAM bit extraction is currently spread across pam.c and the northbridge >> device models, making the extraction logic harder to comprehend. Also note >> how >> pam_u

Re: [PATCH v8 06/10] trans_rvv.c.inc: set vstart = 0 in int scalar move insns

2024-03-09 Thread Richard Henderson
On 3/8/24 11:53, Daniel Henrique Barboza wrote: trans_vmv_x_s, trans_vmv_s_x, trans_vfmv_f_s and trans_vfmv_s_f aren't setting vstart = 0 after execution. This is usually done by a helper in vector_helper.c but these functions don't use helpers. We'll set vstart after any potential 'over' brcond

[PULL 00/43] Misc HW patches for 2024-03-09

2024-03-09 Thread Philippe Mathieu-Daudé
The following changes since commit 84644ac1b0f80d41b8a2f66547b83b2ad4a98576: Merge tag 'darwin-20240305' of https://github.com/philmd/qemu into staging (2024-03-08 18:19:25 +) are available in the Git repository at: https://github.com/philmd/qemu.git tags/hw-misc-20240309

[PULL 02/43] sysemu/xen: Forbid using Xen headers in user emulation

2024-03-09 Thread Philippe Mathieu-Daudé
Xen is a system specific accelerator, it makes no sense to include its headers in user emulation. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: David Woodhouse Message-Id: <20231114143816.71079-3-phi...@linaro.org> --- include/sysemu/xen.h | 8 1 fi

[PULL 12/43] hw/xen/hvm: Inline TARGET_PAGE_ALIGN() macro

2024-03-09 Thread Philippe Mathieu-Daudé
Use TARGET_PAGE_SIZE to calculate TARGET_PAGE_ALIGN. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Message-Id: <20231114163123.74888-2-phi...@linaro.org> --- hw/i386/xen/xen-hvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/xen/xen-hvm.c

[PULL 05/43] hw/pci/msi: Restrict xen_is_pirq_msi() call to Xen

2024-03-09 Thread Philippe Mathieu-Daudé
Similarly to the restriction in hw/pci/msix.c (see commit e1e4bf2252 "msix: fix msix_vector_masked"), restrict the xen_is_pirq_msi() call in msi_is_masked() to Xen. No functional change intended. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse Message-Id: <20231114143816.7107

[PULL 20/43] hw/i386/pc: Use generated NotifyVmexitOption_str()

2024-03-09 Thread Philippe Mathieu-Daudé
NotifyVmexitOption_str() is QAPI-generated in "qapi/qapi-types-run-state.h", which "sysemu/runstate.h" already includes. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240301185936.95175-3-phi...@linaro.org> --- hw/i386/pc_piix.c | 4 +--- 1 file changed, 1

[PULL 04/43] system/physmem: Do not include 'hw/xen/xen.h' but 'sysemu/xen.h'

2024-03-09 Thread Philippe Mathieu-Daudé
physmem.c doesn't use any declaration from "hw/xen/xen.h", it only requires "sysemu/xen.h" and "system/xen-mapcache.h". Suggested-by: David Woodhouse Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse Reviewed-by: David Hildenbrand Message-Id: <20231114143816.71079-5-phi...@lin

[PULL 08/43] hw/xen: Use target-agnostic qemu_target_page_bits()

2024-03-09 Thread Philippe Mathieu-Daudé
Instead of the target-specific TARGET_PAGE_BITS definition, use qemu_target_page_bits() which is target agnostic. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: David Woodhouse Message-Id: <20231114143816.71079-15-phi...@linaro.org> --- hw/xen/xen-hvm-common.

[PULL 01/43] hw/i386: Rename kvmvapic.c -> vapic.c

2024-03-09 Thread Philippe Mathieu-Daudé
vAPIC isn't KVM specific, so having its name prefixed 'kvm' is misleading. Rename it simply 'vapic'. Rename the single function prefixed 'kvm'. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230905145159.7898-1-phi...@linaro.org> --- hw/i386/{kvmvapic.c => vapic.c} | 5 ++--- hw/i386/meson

[PULL 09/43] hw/xen/xen_pt: Add missing license

2024-03-09 Thread Philippe Mathieu-Daudé
Commit eaab4d60d3 ("Introduce Xen PCI Passthrough, qdevice") introduced both xen_pt.[ch], but only added the license to xen_pt.c. Use the same license for xen_pt.h. Suggested-by: David Woodhouse Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse Message-Id: <20231114143816.71079

[PULL 14/43] hw/xen/hvm: Get target page size at runtime

2024-03-09 Thread Philippe Mathieu-Daudé
In order to build this file once for all targets, replace: TARGET_PAGE_BITS -> qemu_target_page_bits() TARGET_PAGE_SIZE -> qemu_target_page_size() TARGET_PAGE_MASK -> -qemu_target_page_size() Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Message-Id: <2023111416312

[PULL 06/43] hw/xen: Remove unnecessary xen_hvm_inject_msi() stub

2024-03-09 Thread Philippe Mathieu-Daudé
Since commit 04b0de0ee8 ("xen: factor out common functions") xen_hvm_inject_msi() stub is not required. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse Message-Id: <20231114143816.71079-8-phi...@linaro.org> --- stubs/xen-hw-stub.c | 4 1 file changed, 4 deletions(-) dif

[PULL 07/43] hw/xen: Rename 'ram_memory' global variable as 'xen_memory'

2024-03-09 Thread Philippe Mathieu-Daudé
To avoid a potential global variable shadow in hw/i386/pc_piix.c::pc_init1(), rename Xen's "ram_memory" as "xen_memory". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse Message-Id: <20231114143816.71079-11-phi...@linaro.org> --- include/hw/xen/xen-hvm-common.h | 2 +- hw/arm

[PULL 03/43] sysemu/xen-mapcache: Check Xen availability with CONFIG_XEN_IS_POSSIBLE

2024-03-09 Thread Philippe Mathieu-Daudé
"sysemu/xen.h" defines CONFIG_XEN_IS_POSSIBLE as a target-agnostic version of CONFIG_XEN accelerator. Use it in order to use "sysemu/xen-mapcache.h" in target-agnostic files. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse Message-Id: <20231114143816.71079-4-phi...@linaro.org>

[PULL 18/43] target/i386/sev: Fix missing ERRP_GUARD() for error_prepend()

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or * error_a

[PULL 16/43] hw/net/xen_nic: Fix missing ERRP_GUARD() for error_prepend()

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or * error_a

[PULL 26/43] mac_newworld: change timebase frequency from 100MHz to 25MHz for mac99 machine

2024-03-09 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland MacOS X uses multiple techniques for calibrating timers depending upon the detected hardware. One of these calibration routines compares the change in the timebase against the KeyLargo timer and uses this to recalculate the clock frequency, timebase frequency and bus frequ

[PULL 35/43] tests/unit/test-smp-parse: Bump max_cpus to 4096

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu The q35 machine is trying to support up to 4096 vCPUs [1], so it's necessary to bump max_cpus in test-smp-parse to 4096 to cover the topological needs of future machines. [1]: https://lore.kernel.org/qemu-devel/20240228143351.3967-1-anisi...@redhat.com/ Signed-off-by: Zhao Liu

[PULL 29/43] docs/interop/firmware.json: Fix doc for FirmwareFlashMode

2024-03-09 Thread Philippe Mathieu-Daudé
From: Thomas Weißschuh The doc title did not match the actual definition. Fixes: 2720ceda05 ("docs: expand firmware descriptor to allow flash without NVRAM") Signed-off-by: Thomas Weißschuh Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240307-qapi-firmware-json-v2-2-3b29eabb9...@linutron

[PULL 23/43] hw/intc/apic: fix memory leak

2024-03-09 Thread Philippe Mathieu-Daudé
From: Paolo Bonzini deliver_bitmask is allocated on the heap in apic_deliver(), but there are many paths in the function that return before the corresponding g_free() is reached. Fix this by switching to g_autofree and, while at it, also switch to g_new. Do the same in apic_deliver_irq() as wel

[PULL 11/43] hw/i386/xen: Compile 'xen-hvm.c' with Xen CPPFLAGS

2024-03-09 Thread Philippe Mathieu-Daudé
xen-hvm.c calls xc_set_hvm_param() from , so better compile it with Xen CPPFLAGS. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse Message-Id: <20231114143816.71079-19-phi...@linaro.org> --- hw/i386/xen/meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

[PULL 10/43] hw/xen: Extract 'xen_igd.h' from 'xen_pt.h'

2024-03-09 Thread Philippe Mathieu-Daudé
"hw/xen/xen_pt.h" requires "hw/xen/xen_native.h" which is target specific. It also declares IGD methods, which are not target specific. Target-agnostic code can use IGD methods. To allow that, extract these methos into a new "hw/xen/xen_igd.h" header. Signed-off-by: Philippe Mathieu-Daudé Review

[PULL 15/43] hw/char/xen_console: Fix missing ERRP_GUARD() for error_prepend()

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or * error_a

[PULL 28/43] docs/interop/firmware.json: Align examples

2024-03-09 Thread Philippe Mathieu-Daudé
From: Thomas Weißschuh Adjust indentation for commit d23055b8db8 (qapi: Require descriptions and tagged sections to be indented). Signed-off-by: Thomas Weißschuh Reviewed-by: Markus Armbruster Message-ID: <20240307-qapi-firmware-json-v2-1-3b29eabb9...@linutronix.de> [PMD: Reword description us

[PULL 40/43] tests/unit/test-smp-parse: Test the full 7-levels topology hierarchy

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu Currently, -smp supports up to 7-levels topology hierarchy: -drawers/books/sockets/dies/clusters/cores/threads. Though no machine supports all these 7 levels yet, these 7 levels have the strict containment relationship and together form the generic CPU topology representation of

[PULL 37/43] tests/unit/test-smp-parse: Test "books" parameter in -smp

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu Although book was introduced to -smp along with drawer by s390 machine, as a general topology level in QEMU that may be reused by other arches in the future, it is desirable to cover this parameter's parsing in a separate case. Signed-off-by: Zhao Liu Tested-by: Xiaoling Song Re

[PULL 21/43] hw/i386/pc: Remove 'host_type' argument from pc_init1()

2024-03-09 Thread Philippe Mathieu-Daudé
All callers use host_type=TYPE_I440FX_PCI_HOST_BRIDGE. Directly use this definition within pc_init1(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240301185936.95175-4-phi...@linaro.org> --- hw/i386/pc_piix.c | 14 +- 1 file changed, 5 inserti

[PULL 17/43] hw/remote/remote-obj: hw/misc/ivshmem: Fix missing ERRP_GUARD() for error_prepend()

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or * error_a

[PULL 34/43] tests/unit/test-smp-parse: Use CPU number macros in invalid topology case

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu Use MAX_CPUS/MIN_CPUS macros in invalid topology case. This gives us the flexibility to change the maximum and minimum CPU limits. Signed-off-by: Zhao Liu Tested-by: Xiaoling Song Reviewed-by: Thomas Huth Message-ID: <20240308160148.3130837-6-zhao1@linux.intel.com> Signed-o

[PULL 25/43] hmp: Add option to info qtree to omit details

2024-03-09 Thread Philippe Mathieu-Daudé
From: BALATON Zoltan The output of info qtree monitor command is very long. Add an option to print a brief overview omitting all the details. Signed-off-by: BALATON Zoltan Reviewed-by: Dr. David Alan Gilbert Message-ID: <20240307183812.0105d4e6...@zero.eik.bme.hu> Signed-off-by: Philippe Mathi

[PULL 43/43] hw/m68k/mcf5208: add support for reset

2024-03-09 Thread Philippe Mathieu-Daudé
From: Angelo Dureghello Add reset support for mcf5208. Signed-off-by: Angelo Dureghello Reviewed-by: Thomas Huth Message-ID: <20240309093459.984565-1-ang...@kernel-space.org> Signed-off-by: Philippe Mathieu-Daudé --- hw/m68k/mcf5208.c | 44 ++-- 1 file

[PULL 31/43] hw/core/machine-smp: Deprecate unsupported "parameter=1" SMP configurations

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu Currently, it was allowed for users to specify the unsupported topology parameter as "1". For example, x86 PC machine doesn't support drawer/book/cluster topology levels, but user could specify "-smp drawers=1,books=1,clusters=1". This is meaningless and confusing, so that the sup

[PULL 30/43] hw/core/machine-smp: Remove deprecated "parameter=0" SMP configurations

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu The "parameter=0" SMP configurations have been marked as deprecated since v6.2. For these cases, -smp currently returns the warning and adjusts the zeroed parameters to 1 by default. Remove the above compatibility logic in v9.0, and return error directly if any -smp parameter is

[PULL 39/43] tests/unit/test-smp-parse: Test "drawers" and "books" combination case

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu Since s390 machine supports both "drawers" and "books" in -smp, add the "drawers" and "books" combination test case to match the actual topology usage scenario. Signed-off-by: Zhao Liu Tested-by: Xiaoling Song Reviewed-by: Thomas Huth Message-ID: <20240308160148.3130837-11-zhao

[PULL 33/43] tests/unit/test-smp-parse: Drop the unsupported "dies=1" case

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu Unsupported "parameter=1" SMP configurations is marked as deprecated, so drop the related test case. Signed-off-by: Zhao Liu Reviewed-by: Thomas Huth Message-ID: <20240308160148.3130837-5-zhao1@linux.intel.com> Signed-off-by: Philippe Mathieu-Daudé --- tests/unit/test-smp-

[PULL 32/43] hw/core/machine-smp: Calculate total CPUs once in machine_parse_smp_config()

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu In machine_parse_smp_config(), the number of total CPUs is calculated by: drawers * books * sockets * dies * clusters * cores * threads To avoid missing the future new topology level, use a local variable to cache the calculation result so that total CPUs are only calculated

[PULL 41/43] tests/unit/test-smp-parse: Test smp_props.has_clusters

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu The smp_props.has_clusters in MachineClass is not a user configured field, and it indicates if user specifies "clusters" in -smp. After -smp parsing, other module could aware if the cluster level is configured by user. This is used when the machine has only 1 cluster since there's

[PULL 27/43] hw/intc/grlib_irqmp: abort realize when ncpus value is out of range

2024-03-09 Thread Philippe Mathieu-Daudé
From: Clément Chigot Even if the error is set, the build is not aborted when the ncpus value is wrong, the return is missing. Signed-off-by: Clément Chigot Reviewed-by: Peter Maydell Fixes: 6bf1478543 ("hw/intc/grlib_irqmp: add ncpus property") Reviewed-by: Philippe Mathieu-Daudé Message-ID:

[PULL 36/43] tests/unit/test-smp-parse: Make test cases aware of the book/drawer

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu Currently, -smp supports 2 more new levels: book and drawer. It is necessary to consider the effects of book and drawer in the test cases to ensure that the calculations are correct. This is also the preparation to add new book and drawer test cases. Signed-off-by: Zhao Liu Test

[PULL 38/43] tests/unit/test-smp-parse: Test "drawers" parameter in -smp

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu Although drawer was introduced to -smp along with book by s390 machine, as a general topology level in QEMU that may be reused by other arches in the future, it is desirable to cover this parameter's parsing in a separate case. Signed-off-by: Zhao Liu Tested-by: Xiaoling Song Re

[PULL 22/43] hw/i386/pc: Have pc_init_isa() pass a NULL pci_type argument

2024-03-09 Thread Philippe Mathieu-Daudé
The "isapc" machine only provides an ISA bus, not a PCI one, and doesn't instanciate any i440FX south bridge. Its machine class defines PCMachineClass::pci_enabled = false, and pc_init1() only uses the pci_type argument when pci_enabled is true. Since for this machine the argument is not used, pass

[PULL 19/43] hw/i386/pc: Remove pc_compat_1_4..1.7[] left over declarations

2024-03-09 Thread Philippe Mathieu-Daudé
These definitions were removed in commit ea985d235b ("pc_piix: remove pc-i440fx-1.4 up to pc-i440fx-1.7"). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240301185936.95175-2-phi...@linaro.org> --- include/hw/i386/pc.h | 12 1 file changed, 12 d

[PULL 42/43] tests/unit/test-smp-parse: Test "parameter=0" SMP configurations

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu The support for "parameter=0" SMP configurations is removed, and QEMU returns error for those cases. So add the related test cases to ensure parameters can't accept 0. Signed-off-by: Zhao Liu Reviewed-by: Thomas Huth Message-ID: <20240308160148.3130837-14-zhao1@linux.intel.

[PULL 24/43] qdev: Add a granule_mode property

2024-03-09 Thread Philippe Mathieu-Daudé
From: Eric Auger Introduce a new enum type property allowing to set an IOMMU granule. Values are 4k, 8k, 16k, 64k and host. This latter indicates the vIOMMU granule will match the host page size. A subsequent patch will add such a property to the virtio-iommu device. Signed-off-by: Eric Auger

[PULL 13/43] hw/xen/hvm: Propagate page_mask to a pair of functions

2024-03-09 Thread Philippe Mathieu-Daudé
We are going to replace TARGET_PAGE_MASK by a runtime variable. In order to reduce code duplication, propagate TARGET_PAGE_MASK to get_physmapping() and xen_phys_offset_to_gaddr(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Message-Id: <20231114163123.74888-3-phi...@l

Re: [PULL 0/3] Hyper-V Dynamic Memory and VMBus misc small patches

2024-03-09 Thread Peter Maydell
On Fri, 8 Mar 2024 at 17:03, Maciej S. Szmigiero wrote: > > From: "Maciej S. Szmigiero" > > The following changes since commit 8f6330a807f2642dc2a3cdf33347aa28a4c00a87: > > Merge tag 'pull-maintainer-updates-060324-1' of > https://gitlab.com/stsquad/qemu into staging (2024-03-06 16:56:20 +

  1   2   >