Re: [PATCH v2 3/3] virtio-gpu-rutabaga.c: override resource_destroy method

2024-01-30 Thread Manos Pitsidianakis
On Tue, 30 Jan 2024 at 14:50, Marc-André Lureau wrote: > > Hi > > On Mon, Jan 29, 2024 at 7:46 PM Manos Pitsidianakis > wrote: > > > > When the Rutabaga GPU device frees resources, it calls > > rutabaga_resource_unref for that resource_id. However, when the generic > > VirtIOGPU functions destroy

Re: [PATCH v3 14/29] target/i386: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-30 Thread Igor Mammedov
On Mon, 29 Jan 2024 17:44:56 +0100 Philippe Mathieu-Daudé wrote: > Mechanical patch produced running the command documented > in scripts/coccinelle/cpu_env.cocci_template header. commenting here since, I'm not expert on coccinelle scripts. On negative side we are permanently loosing type check

Re: [PATCH v2 3/3] virtio-gpu-rutabaga.c: override resource_destroy method

2024-01-30 Thread Marc-André Lureau
Hi On Tue, Jan 30, 2024 at 5:01 PM Manos Pitsidianakis wrote: > > On Tue, 30 Jan 2024 at 14:50, Marc-André Lureau > wrote: > > > > Hi > > > > On Mon, Jan 29, 2024 at 7:46 PM Manos Pitsidianakis > > wrote: > > > > > > When the Rutabaga GPU device frees resources, it calls > > > rutabaga_resource

Re: [PATCH 00/33] hw/core: Introduce CPUClass hook for mmu_index

2024-01-30 Thread Anton Johansson via
On 30/01/24, Richard Henderson wrote: > While the primary use of mmu_index is for the softmmu index for > system-mode tcg, it has a secondary use in encoding cpu state for > the page table walker, and thus depending on the target may also > be used by memory_rw_debug with kvm et al. > > This is wh

Re: [PATCH v3 25/33] tests/tcg: Extend file in linux-madvise.c

2024-01-30 Thread Ilya Leoshkevich
On Tue, Jan 02, 2024 at 12:58:00PM +1100, Richard Henderson wrote: > When guest page size > host page size, this test can fail > due to the SIGBUS protection hack. Avoid this by making > sure that the file size is at least one guest page. Maybe also mention PAGE_PASSTHROUGH? > Visible with alpha

Re: [PATCH v3 26/33] *-user: Deprecate and disable -p pagesize

2024-01-30 Thread Ilya Leoshkevich
On Tue, Jan 02, 2024 at 12:58:01PM +1100, Richard Henderson wrote: > This option controls the host page size. From the mis-usage in > our own testsuite, this is easily confused with guest page size. > > The only thing that occurs when changing the host page size is > that stuff breaks, because on

Re: [PATCH v3 27/33] cpu: Remove page_size_init

2024-01-30 Thread Ilya Leoshkevich
On Tue, Jan 02, 2024 at 12:58:02PM +1100, Richard Henderson wrote: > Move qemu_host_page_{size,mask} and HOST_PAGE_ALIGN into bsd-user. > It should be removed from bsd-user as well, but defer that cleanup. > > Reviewed-by: Warner Losh > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Richar

Re: [PATCH v3 28/33] accel/tcg: Disconnect TargetPageDataNode from page size

2024-01-30 Thread Ilya Leoshkevich
On Tue, Jan 02, 2024 at 12:58:03PM +1100, Richard Henderson wrote: > Dynamically size the node for the runtime target page size. > > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Richard Henderson > --- > accel/tcg/user-exec.c | 13 - > 1 file changed, 8 insertions(+), 5 dele

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

2024-01-30 Thread Alex Bennée
Ilya Leoshkevich writes: > 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-

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

2024-01-30 Thread Alex Bennée
Ilya Leoshkevich writes: > Make sure that qemu gdbstub, like gdbserver, allows reading from and > writing to PROT_NONE pages. > > Signed-off-by: Ilya Leoshkevich Acked-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

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

2024-01-30 Thread Tao Su
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: > > - PREFETCHITI CPUID.(EAX=7,ECX=1):EDX[bit 14] > > - AMX-FP16 CPUID.(EAX=7,E

Re: [PATCH v3 29/33] linux-user: Allow TARGET_PAGE_BITS_VARY

2024-01-30 Thread Ilya Leoshkevich
On Tue, Jan 02, 2024 at 12:58:04PM +1100, Richard Henderson wrote: > If set, match the host and guest page sizes. > > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Richard Henderson > --- > linux-user/main.c | 16 +--- > 1 file changed, 13 insertions(+), 3 deletions(-) [...]

Re: [PATCH v3 31/33] linux-user: Bound mmap_min_addr by host page size

2024-01-30 Thread Ilya Leoshkevich
On Tue, Jan 02, 2024 at 12:58:06PM +1100, Richard Henderson wrote: > Bizzarely, it is possible to set /proc/sys/vm/mmap_min_addr > to a value below the host page size. Fix that. > > Signed-off-by: Richard Henderson > --- > linux-user/main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-

Re: [PATCH v2 3/3] virtio-gpu-rutabaga.c: override resource_destroy method

2024-01-30 Thread Manos Pitsidianakis
On Tue, 30 Jan 2024 at 15:10, Marc-André Lureau wrote: > > Hi > > On Tue, Jan 30, 2024 at 5:01 PM Manos Pitsidianakis > wrote: > > > > On Tue, 30 Jan 2024 at 14:50, Marc-André Lureau > > wrote: > > > > > > Hi > > > > > > On Mon, Jan 29, 2024 at 7:46 PM Manos Pitsidianakis > > > wrote: > > > > >

Re: [PATCH v3 32/33] target/ppc: Enable TARGET_PAGE_BITS_VARY for user-only

2024-01-30 Thread Ilya Leoshkevich
On Tue, Jan 02, 2024 at 12:58:07PM +1100, Richard Henderson wrote: > Since ppc binaries are generally built for multiple > page sizes, it is trivial to allow the page size to vary. > > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Richard Henderson > --- > target/ppc/cpu-param.h | 9

Re: [PATCH v3 33/33] target/alpha: Enable TARGET_PAGE_BITS_VARY for user-only

2024-01-30 Thread Ilya Leoshkevich
On Tue, Jan 02, 2024 at 12:58:08PM +1100, Richard Henderson wrote: > Since alpha binaries are generally built for multiple > page sizes, it is trivial to allow the page size to vary. > > Signed-off-by: Richard Henderson > --- > target/alpha/cpu-param.h | 16 ++-- > 1 file changed, 14

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

2024-01-30 Thread Vinayak Kale
In case of migration, during restore operation, qemu checks the config space of the pci device with the config space in the migration stream captured during save operation. In case of config space data mismatch, restore operation is failed. config space check is done in function get_pci_config_d

Re: [PATCH] migration/docs: Explain two solutions for VMSD compatibility

2024-01-30 Thread Fabiano Rosas
Peter Xu writes: > On Mon, Jan 29, 2024 at 10:44:46AM -0300, Fabiano Rosas wrote: >> > Since we're at it, I would also like to know how you think about whether we >> > should still suggest people using VMSD versioning, as we know that it won't >> > work for backward migrations. >> > >> > My curre

Re: [PATCH v2 6/8] leon3: implement multiprocessor

2024-01-30 Thread Clément Chigot
On Tue, Jan 30, 2024 at 12:43 PM Philippe Mathieu-Daudé wrote: > > Hi Clément, > > On 16/1/24 14:02, Clément Chigot wrote: > > 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

Re: [PATCH 1/2] target/sparc: Provide hint about CPUSPARCState::irq_manager member

2024-01-30 Thread Clément Chigot
On Tue, Jan 30, 2024 at 12:31 PM Philippe Mathieu-Daudé wrote: > > CPUSPARCState::irq_manager holds a pointer to a QDev, > so declare it as DeviceState instead of void. > > Move the comment about Leon3 fields. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/sparc/cpu.h | 5 ++--- > 1 fi

Re: [PATCH 2/2] hw/sparc/leon3: Remove duplicated code

2024-01-30 Thread Clément Chigot
On Tue, Jan 30, 2024 at 12:31 PM Philippe Mathieu-Daudé wrote: > > Since commit b04d989054 ("SPARC: Emulation of Leon3") the > main_cpu_reset() handler sets both pc/npc when the CPU is > reset, after the machine is realized. It is pointless to > set it in leon3_generic_hw_init(). > > Signed-off-by

Re: [PATCH v2 05/14] tests/plugin: add test plugin for inline operations

2024-01-30 Thread Alex Bennée
Pierrick Bouvier writes: > On 1/26/24 20:05, Alex Bennée wrote: >> Pierrick Bouvier writes: >> >>> For now, it simply performs instruction, bb and mem count, and ensure >>> that inline vs callback versions have the same result. Later, we'll >>> extend it when new inline operations are added. >>

[PATCH v3 0/3] Fix resource freeing bugs in virtio-gpu-rutabaga

2024-01-30 Thread Manos Pitsidianakis
While testing the rutabaga gpu device, we noticed that if the device is reset, it stops working and complains about missing resource ids. A quick investigation discovered that the generic VirtIOGPU implementation frees all resources, but for Rutabaga, they are tied with rutabaga objects that need t

[PATCH v3 1/3] hw/display/virtio-gpu.c: use reset_bh class method

2024-01-30 Thread Manos Pitsidianakis
While the VirtioGPU type has a reset_bh field to specify a reset callback, it's never used. virtio_gpu_reset() calls the general virtio_gpu_reset_bh() function for all devices that inherit from VirtioGPU. While no devices override reset_bh at the moment, a device reset might require special logic

[PATCH v3 2/3] virtio-gpu.c: add resource_destroy class method

2024-01-30 Thread Manos Pitsidianakis
When destroying/unrefing resources, devices such as virtio-gpu-rutabaga need to do their own bookkeeping (free rutabaga resources that are associated with the virtio_gpu_simple_resource). This commit adds a class method so that virtio-gpu-rutabaga can override it in the next commit. Reviewed-by:

Re: [PATCH] target/mips: Use qemu_irq typedef for CPUMIPSState::irq member

2024-01-30 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Missed during commit d537cf6c86 ("Unify IRQ handling") > when qemu_irq typedef was introduced for IRQState. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

[PATCH v3 3/3] virtio-gpu-rutabaga.c: override resource_destroy method

2024-01-30 Thread Manos Pitsidianakis
When the Rutabaga GPU device frees resources, it calls rutabaga_resource_unref for that resource_id. However, when the generic VirtIOGPU functions destroys resources, it only removes the virtio_gpu_simple_resource from the device's VirtIOGPU->reslist list. The rutabaga resource associated with that

Re: [PATCH v2] scripts/checkpatch.pl: check for placeholders in cover letter patches

2024-01-30 Thread Peter Maydell
On Tue, 30 Jan 2024 at 15:11, Alex Bennée wrote: > I suspect the problem is that checkpatch.pl is an import from the Linux > source tree which has since had syncs with its upstream as well as a > slew of QEMU specific patches. If we don't care about tracking upstream > anymore we could bite the bu

[PATCH] hw/arm/xilinx_zynq: Wire FIQ between CPU <> GIC

2024-01-30 Thread Philippe Mathieu-Daudé
Similarly to commits dadbb58f59..5ae79fe825 for other ARM boards, connect FIQ output of the GIC CPU interfaces to the CPU. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/xilinx_zynq.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c index 66d0de

Re: [PATCH v2] scripts/checkpatch.pl: check for placeholders in cover letter patches

2024-01-30 Thread Alex Bennée
Manos Pitsidianakis writes: > On Tue, 30 Jan 2024 12:15, "Daniel P. Berrangé" wrote: >>On Tue, Jan 30, 2024 at 12:11:07PM +0200, Manos Pitsidianakis wrote: >>> Check if a file argument is a cover letter patch produced by >>> git-format-patch --cover-letter; It is initialized with subject suffix

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

2024-01-30 Thread Fabiano Rosas
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 MultiFDMethods multifd_socket_ops = { >> >> +.send_setup = multifd_socket_send_setup, >> >> +.send_c

[PATCH 2/3] hw/loongarch: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
error_fprintf() doesn't add newlines. Signed-off-by: Greg Kurz --- 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 730bc4a748c4..a1c419874123 100644 --- a/hw/loongarch/acpi-build.c +++ b/hw/

[PATCH 1/3] hw/i386: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
error_fprintf() doesn't add newlines. Signed-off-by: Greg Kurz --- 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 edc979379c03..e990b0ae927f 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.

[PATCH 3/3] hw/arm: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
error_fprintf() doesn't add newlines. Signed-off-by: Greg Kurz --- 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 17aeec7a6f56..48febde1ccd1 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/

[PATCH 0/3] acpi-build: Fix hint messages

2024-01-30 Thread Greg Kurz
ACPI build for ARM, i386 and Loongarch all have the same warning report with a hint for the user. The hint is printed with error_printf() as expected but it lacks the terminating '\n'. Greg Kurz (3): hw/i386: Add `\n` to hint message hw/loongarch: Add `\n` to hint message hw/arm: Add `\n` to

[PATCH v4 6/8] Add write protections to CR register

2024-01-30 Thread Arnaud Minier
Add write protections for the fields in the CR register. PLL configuration write protections (among others) have not been handled yet. This is planned in a future patch set. Signed-off-by: Arnaud Minier Signed-off-by: Inès Varhol --- hw/misc/stm32l4x5_rcc.c | 164 ---

[PATCH v4 8/8] Add tests for the STM32L4x5_RCC

2024-01-30 Thread Arnaud Minier
Tests: - the ability to change the sysclk of the device - the ability to enable/disable/configure the PLLs - if the clock multiplexers work - the register flags and the generation of irqs Signed-off-by: Arnaud Minier Signed-off-by: Inès Varhol --- tests/qtest/meson.build | 3 +- test

Re: [PATCH 1/3] hw/i386: Add `\n` to hint message

2024-01-30 Thread Ani Sinha
> On 30-Jan-2024, at 21:26, Greg Kurz wrote: > > error_fprintf() doesn't add newlines. ^ Should be error_printf(). Ditto for other patches. > > Signed-off-by: Greg Kurz > --- > hw/i386/acpi-build.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git

[PATCH v4 4/8] Add initialization information for PLLs and clock multiplexers

2024-01-30 Thread Arnaud Minier
Instanciate the whole clock tree and using the Clock multiplexers and the PLLs defined in the previous commits. This allows to statically define the clock tree and easily follow the clock signal from one end to another. Signed-off-by: Arnaud Minier Signed-off-by: Inès Varhol --- hw/misc/stm32l4

Re: [PATCH v3 14/29] target/i386: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-30 Thread Zhao Liu
On Mon, Jan 29, 2024 at 05:44:56PM +0100, Philippe Mathieu-Daudé wrote: > Date: Mon, 29 Jan 2024 17:44:56 +0100 > From: Philippe Mathieu-Daudé > Subject: [PATCH v3 14/29] target/i386: Prefer fast cpu_env() over slower > CPU QOM cast macro > X-Mailer: git-send-email 2.41.0 > > Mechanical patch pr

[PATCH v4 0/8] Add device STM32L4x5 RCC

2024-01-30 Thread Arnaud Minier
This patch adds the STM32L4x5 RCC (Reset and Clock Control) device and is part of a series implementing the STM32L4x5 with a few peripherals. Due to the high number of lines, I tried to split the patch into several independent commits. Each commit compiles on its own but I had to add temporary wo

[PATCH v4 2/8] Add an internal clock multiplexer object

2024-01-30 Thread Arnaud Minier
This object is used to represent every multiplexer in the clock tree as well as every clock output, every presecaler, frequency multiplier, etc. This allows to use a generic approach for every component of the clock tree (except the PLLs). Wasn't sure about how to handle the reset and the migratio

[PATCH v4 7/8] STM32L4x5: Use the RCC Sysclk

2024-01-30 Thread Arnaud Minier
Now that we can generate reliable clock frequencies from the RCC, remove the hacky definition of the sysclk in the b_l475e_iot01a initialisation code and use the correct RCC clock. Signed-off-by: Arnaud Minier Signed-off-by: Inès Varhol --- hw/arm/b-l475e-iot01a.c| 10 +- hw/arm

[PATCH v4 5/8] RCC: Handle Register Updates

2024-01-30 Thread Arnaud Minier
Update the RCC state and propagate frequency changes when writing to the RCC registers. Currently, ICSCR, CIER, the reset registers and the stop mode registers are not implemented. Some fields have not been implemented due to uncertainty about how to handle them (Like the clock security system or

[PATCH v4 1/8] Implement STM32L4x5_RCC skeleton

2024-01-30 Thread Arnaud Minier
Add the necessary files to add a simple RCC implementation with just reads from and writes to registers. Also instanciate the RCC in the STM32L4x5_SoC. It is needed for accurate emulation of all the SoC clocks and timers. Signed-off-by: Arnaud Minier Signed-off-by: Inès Varhol --- MAINTAINERS

Re: [PATCH v3 01/29] bulk: Access existing variables initialized to &S->F when available

2024-01-30 Thread Zhao Liu
On Mon, Jan 29, 2024 at 05:44:43PM +0100, Philippe Mathieu-Daudé wrote: > Date: Mon, 29 Jan 2024 17:44:43 +0100 > From: Philippe Mathieu-Daudé > Subject: [PATCH v3 01/29] bulk: Access existing variables initialized to > &S->F when available > X-Mailer: git-send-email 2.41.0 > > When a variable i

[PATCH v2 2/3] hw/loongarch: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
error_printf() doesn't add newlines. Signed-off-by: Greg Kurz --- 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 730bc4a748c4..a1c419874123 100644 --- a/hw/loongarch/acpi-build.c +++ b/hw/l

[PATCH v2 3/3] hw/arm: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
error_printf() doesn't add newlines. Signed-off-by: Greg Kurz --- 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 17aeec7a6f56..48febde1ccd1 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/v

[PATCH v2 0/3] acpi-build: Fix hint messages

2024-01-30 Thread Greg Kurz
ACPI build for ARM, i386 and Loongarch all have the same warning report with a hint for the user. The hint is printed with error_printf() as expected but it lacks the terminating '\n'. v2: - s/error_fprintf/error_printf in commit logs (Ani) Greg Kurz (3): hw/i386: Add `\n` to hint message hw/

[PATCH v2 1/3] hw/i386: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
error_printf() doesn't add newlines. Signed-off-by: Greg Kurz --- 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 edc979379c03..e990b0ae927f 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c

Re: [PATCH v2 05/14] tests/plugin: add test plugin for inline operations

2024-01-30 Thread Pierrick Bouvier
On 1/30/24 18:52, Alex Bennée wrote: Pierrick Bouvier writes: On 1/26/24 20:05, Alex Bennée wrote: Pierrick Bouvier writes: For now, it simply performs instruction, bb and mem count, and ensure that inline vs callback versions have the same result. Later, we'll extend it when new inline op

[PATCH] pc: q35: Bump max_cpus to 1728 vcpus

2024-01-30 Thread Ani Sinha
Since commit f10a570b093e6 ("KVM: x86: Add CONFIG_KVM_MAX_NR_VCPUS to allow up to 4096 vCPUs") Linux kernel can support upto a maximum number of 4096 vCPUS when MAXSMP is enabled in the kernel. QEMU has been tested to correctly boot a linux guest with 1728 vcpus both with edk2 and seabios firmware

Re: [PATCH] pc: q35: Bump max_cpus to 1728 vcpus

2024-01-30 Thread Daniel P . Berrangé
On Tue, Jan 30, 2024 at 10:14:28PM +0530, Ani Sinha wrote: > Since commit f10a570b093e6 ("KVM: x86: Add CONFIG_KVM_MAX_NR_VCPUS to allow > up to 4096 vCPUs") > Linux kernel can support upto a maximum number of 4096 vCPUS when MAXSMP is > enabled in the kernel. QEMU has been tested to correctly boo

Re: [PATCH v2] target/arm: fix exception syndrome for AArch32 bkpt insn

2024-01-30 Thread Peter Maydell
On Sat, 27 Jan 2024 at 20:30, Jan Klötzke wrote: > > Debug exceptions that target AArch32 Hyp mode are reported differently > than on AAarch64. Internally, Qemu uses the AArch64 syndromes. Therefore > such exceptions need to be either converted to a prefetch abort > (breakpoints, vector catch) or

[PATCH v4 3/8] Add an internal PLL Clock object

2024-01-30 Thread Arnaud Minier
This object represents the PLLs and their channels. The PLLs allow for a more fine-grained control of the clocks frequency. Wasn't sure about how to handle the reset and the migration so used the same appproach as the BCM2835 CPRMAN. Signed-off-by: Arnaud Minier Signed-off-by: Inès Varhol ---

Re: [PATCH v2 2/3] hw/loongarch: Add `\n` to hint message

2024-01-30 Thread Ani Sinha
> On 30-Jan-2024, at 22:07, Greg Kurz wrote: > > error_printf() doesn't add newlines. > > Signed-off-by: Greg Kurz Reviewed-by: Ani Sinha > --- > hw/loongarch/acpi-build.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/loongarch/acpi-build.c b/hw/loongarch/acp

Re: [PATCH v2 1/3] hw/i386: Add `\n` to hint message

2024-01-30 Thread Ani Sinha
> On 30-Jan-2024, at 22:07, Greg Kurz wrote: > > error_printf() doesn't add newlines. > > Signed-off-by: Greg Kurz Reviewed-by: Ani Sinha > --- > 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 >

Re: [PATCH] pc: q35: Bump max_cpus to 1728 vcpus

2024-01-30 Thread Ani Sinha
> On 30-Jan-2024, at 22:17, Daniel P. Berrangé wrote: > > On Tue, Jan 30, 2024 at 10:14:28PM +0530, Ani Sinha wrote: >> Since commit f10a570b093e6 ("KVM: x86: Add CONFIG_KVM_MAX_NR_VCPUS to allow >> up to 4096 vCPUs") >> Linux kernel can support upto a maximum number of 4096 vCPUS when MAXSMP

Re: [PATCH v2 3/3] hw/arm: Add `\n` to hint message

2024-01-30 Thread Ani Sinha
> On 30-Jan-2024, at 22:07, Greg Kurz wrote: > > error_printf() doesn't add newlines. > > Signed-off-by: Greg Kurz Reviewed-by: Ani Sinha > --- > 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-b

Re: [PATCH 1/3] hw/i386: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
On Tue, 30 Jan 2024 21:43:27 +0530 Ani Sinha wrote: > > > > On 30-Jan-2024, at 21:26, Greg Kurz wrote: > > > > error_fprintf() doesn't add newlines. > > ^ > > Should be error_printf(). Ditto for other patches. > Thanks. Posted a v2. > > > > Signed-off-by: Greg Kurz > >

Re: [PATCH v15 1/9] hw/misc: Add Nuvoton's PCI Mailbox Module

2024-01-30 Thread Peter Maydell
On Thu, 25 Jan 2024 at 19:42, Nabih Estefan wrote: > > From: Hao Wu > > The PCI Mailbox Module is a high-bandwidth communcation module > between a Nuvoton BMC and CPU. It features 16KB RAM that are both > accessible by the BMC and core CPU. and supports interrupt for > both sides. > > This patch

Re: [PATCH v15 3/9] hw/misc: Add qtest for NPCM7xx PCI Mailbox

2024-01-30 Thread Peter Maydell
On Thu, 25 Jan 2024 at 19:42, Nabih Estefan wrote: > > From: Hao Wu > > This patches adds a qtest for NPCM7XX PCI Mailbox module. > It sends read and write requests to the module, and verifies that > the module contains the correct data after the requests. > > Change-Id: I2e1dbaecf8be9ec7eab55cb5

Re: [PATCH] pc: q35: Bump max_cpus to 1728 vcpus

2024-01-30 Thread Daniel P . Berrangé
On Tue, Jan 30, 2024 at 10:39:51PM +0530, Ani Sinha wrote: > > > > On 30-Jan-2024, at 22:17, Daniel P. Berrangé wrote: > > > > On Tue, Jan 30, 2024 at 10:14:28PM +0530, Ani Sinha wrote: > >> Since commit f10a570b093e6 ("KVM: x86: Add CONFIG_KVM_MAX_NR_VCPUS to > >> allow up to 4096 vCPUs") > >

Re: [PATCH v3] doc/sphinx/hxtool.py: add optional label argument to SRST directive

2024-01-30 Thread Peter Maydell
On Sat, 27 Jan 2024 at 23:18, David Woodhouse wrote: > > From: David Woodhouse > > We can't just embed labels directly into files like qemu-options.hx which > are included from multiple top-level rST files, because Sphinx sees the > labels as duplicate: https://github.com/sphinx-doc/sphinx/issues

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

2024-01-30 Thread Vinayak Kale
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 the config space of the pci device with the config space in the migration stream captured during save operati

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

2024-01-30 Thread Jean-Philippe Brucker
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-bypass. > >This allocates all guest pages, which takes a w

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

2024-01-30 Thread Avihai Horon
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 asynchronously without waiting for their creation -- migration simply proceeds and may wait in multifd_send_sync_main(), which is

Re: [PATCH] hw/scsi/lsi53c895a: add missing decrement of reentrancy counter

2024-01-30 Thread Helge Deller
On 1/28/24 21:22, Sven Schnelle wrote: When the maximum count of SCRIPTS instructions is reached, the code stops execution and returns, but fails to decrement the reentrancy counter. This effectively renders the SCSI controller unusable because on next entry the reentrancy counter is still above

Re: [PATCH 04/17] migration/multifd: Set p->running = true in the right place

2024-01-30 Thread Avihai Horon
On 30/01/2024 7:57, Peter Xu wrote: External email: Use caution opening links or attachments On Mon, Jan 29, 2024 at 02:20:35PM +0200, Avihai Horon wrote: On 29/01/2024 6:17, Peter Xu wrote: External email: Use caution opening links or attachments On Sun, Jan 28, 2024 at 05:43:52PM +0200,

Re: [PATCH v3] doc/sphinx/hxtool.py: add optional label argument to SRST directive

2024-01-30 Thread David Woodhouse
On Tue, 2024-01-30 at 17:55 +, Peter Maydell wrote: > > This looks good so > Reviewed-by: Peter Maydell Thanks. > but something has got mangled somewhere: patchew can't apply it: > https://patchew.org/QEMU/4114f7204e892316d66be8f810eb5b8de4c0f75f.ca...@infradead.org/ > and patches doesn't l

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

2024-01-30 Thread Alex Williamson
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 the config > > space of the pci device

[PATCH 0/4] hw/arm/stellaris: QOM/QDev cleanups

2024-01-30 Thread Philippe Mathieu-Daudé
Gustavo wants to access the QOM path of an input IRQ line from the NVIC, but since the device is orphan he ends up with this nasty path [*]: -device ivshmem-flat,chardev=ivshmem_flat,x-irq-qompath='/machine/unattached/device[1]/nvic/unnamed-gpio-in[0]',x-bus-qompath='/sysbus' Add the missing p

[PATCH 2/4] hw/arm/stellaris: Convert I2C controller to Resettable interface

2024-01-30 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/stellaris.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index afbc83f1e6..284b95005f 100644 --- a/hw/arm/stellaris.c +++ b/hw/arm/stellaris.c @@ -607,8 +607,11 @@ static void

[PATCH 3/4] hw/arm/stellaris: Add missing QOM 'machine' parent

2024-01-30 Thread Philippe Mathieu-Daudé
QDev objects created with qdev_new() need to manually add their parent relationship with object_property_add_child(). Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/stellaris.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index 284b95005f..bb8

[PATCH v4] doc/sphinx/hxtool.py: add optional label argument to SRST directive

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

[PATCH 4/4] hw/arm/stellaris: Add missing QOM 'SoC' parent

2024-01-30 Thread Philippe Mathieu-Daudé
QDev objects created with qdev_new() need to manually add their parent relationship with object_property_add_child(). Since we don't model the SoC, just use a QOM container. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/stellaris.c | 11 ++- 1 file changed, 10 insertions(+), 1 deleti

[PATCH 1/4] hw/arm/stellaris: Convert ADC controller to Resettable interface

2024-01-30 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/stellaris.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index d18b1144af..afbc83f1e6 100644 --- a/hw/arm/stellaris.c +++ b/hw/arm/stellaris.c @@ -773,8 +773,9 @@ static void stel

[PATCH v1 1/1] migration: prevent migration when VM has poisoned memory

2024-01-30 Thread “William Roche
From: William Roche A memory page poisoned from the hypervisor level is no longer readable. The migration of a VM will crash Qemu when it tries to read the memory address space and stumbles on the poisoned page with a similar stack trace: Program terminated with signal SIGBUS, Bus error. #0 _mm

[PATCH v1 0/1] Qemu crashes on VM migration after an handled memory error

2024-01-30 Thread “William Roche
From: William Roche Problem: A Qemu VM can survive a memory error, as qemu can relay the error to the VM kernel which could also deal with it -- poisoning/off-lining the impacted page. This situation creates a hole in the VM memory address space (an unreadable page or set of pages). A m

Re: [PATCH] pc: q35: Bump max_cpus to 1728 vcpus

2024-01-30 Thread Philippe Mathieu-Daudé
On 30/1/24 18:09, Ani Sinha wrote: On 30-Jan-2024, at 22:17, Daniel P. Berrangé wrote: On Tue, Jan 30, 2024 at 10:14:28PM +0530, Ani Sinha wrote: Since commit f10a570b093e6 ("KVM: x86: Add CONFIG_KVM_MAX_NR_VCPUS to allow up to 4096 vCPUs") Linux kernel can support upto a maximum number of

Re: [PATCH v2] scripts/checkpatch.pl: check for placeholders in cover letter patches

2024-01-30 Thread Philippe Mathieu-Daudé
On 30/1/24 16:11, Alex Bennée wrote: Manos Pitsidianakis writes: On Tue, 30 Jan 2024 12:15, "Daniel P. Berrangé" wrote: On Tue, Jan 30, 2024 at 12:11:07PM +0200, Manos Pitsidianakis wrote: Check if a file argument is a cover letter patch produced by git-format-patch --cover-letter; It is in

Re: Call for GSoC/Outreachy internship project ideas

2024-01-30 Thread Alexander Graf
Hey Stefan, Thanks a lot for setting up GSoC this year again! On 15.01.24 17:32, Stefan Hajnoczi wrote: Dear QEMU and KVM communities, QEMU will apply for the Google Summer of Code and Outreachy internship programs again this year. Regular contributors can submit project ideas that they'd like

Re: Call for GSoC/Outreachy internship project ideas

2024-01-30 Thread Stefan Hajnoczi
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. This is attractive for security reasons in vhost-user-vsock where a

Re: Call for GSoC/Outreachy internship project ideas

2024-01-30 Thread Palmer Dabbelt
On Mon, 15 Jan 2024 08:32:59 PST (-0800), stefa...@gmail.com wrote: Dear QEMU and KVM communities, QEMU will apply for the Google Summer of Code and Outreachy internship programs again this year. Regular contributors can submit project ideas that they'd like to mentor by replying to this email be

Re: Call for GSoC/Outreachy internship project ideas

2024-01-30 Thread Stefan Hajnoczi
On Tue, 30 Jan 2024 at 14:16, Alexander Graf wrote: > === Implement -M nitro-enclave in QEMU === > > '''Summary:''' AWS EC2 provides the ability to create an isolated > sibling VM context from within a VM. This project implements the machine > model and input data format parsing needed to run the

Re: Call for GSoC/Outreachy internship project ideas

2024-01-30 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: > > Dear QEMU and KVM communities, > > QEMU will apply for the Google Summer of Code and Outreachy internship > > programs again this year. Regular contributors can submit pr

Re: [PATCH v5 0/9] Misc clean ups to target/ppc exception handling

2024-01-30 Thread BALATON Zoltan
On Thu, 18 Jan 2024, BALATON Zoltan wrote: These are some small clean ups for target/ppc/excp_helper.c trying to make this code a bit simpler. No functional change is intended. This series was submitted before but only partially merged due to freeze and conflicting series os thia was postponed th

Re: [PATCH [repost]] block/blkio: Don't assume size_t is 64 bit

2024-01-30 Thread Stefan Hajnoczi
On Tue, Jan 30, 2024 at 12:19:37PM +, Richard W.M. Jones wrote: > On Tue, Jan 30, 2024 at 01:04:46PM +0100, Kevin Wolf wrote: > > Am 30.01.2024 um 11:30 hat Richard W.M. Jones geschrieben: > > > On Tue, Jan 30, 2024 at 09:51:59AM +0100, Kevin Wolf wrote: > > > > Am 29.01.2024 um 19:53 hat Richa

Re: [PATCH v2] block/blkio: Make s->mem_region_alignment be 64 bits

2024-01-30 Thread Stefan Hajnoczi
On Tue, Jan 30, 2024 at 12:20:01PM +, Richard W.M. Jones wrote: > With GCC 14 the code failed to compile on i686 (and was wrong for any > version of GCC): > > ../block/blkio.c: In function ‘blkio_file_open’: > ../block/blkio.c:857:28: error: passing argument 3 of ‘blkio_get_uint64’ from > inc

Re: [PATCH] pflash: fix sectors vs bytes confusion in blk_pread_nonzeroes()

2024-01-30 Thread Stefan Hajnoczi
On Mon, Jan 29, 2024 at 07:27:12PM -0500, Stefan Hajnoczi wrote: > The following expression is incorrect because blk_pread_nonzeroes() > deals in units of bytes, not sectors: > > bytes = MIN(size - offset, BDRV_REQUEST_MAX_SECTORS) > ^^^ > > BDR

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

2024-01-30 Thread Fabiano Rosas
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 Xu writes: >> > > >> > >> On Fri, Jan 26, 2024 at 11:54:32AM -0300, Fabiano Rosas wrote: >> > > The issue th

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

2024-01-30 Thread Fabiano Rosas
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 asynchronously without waiting >>> for their creation -- migration simply proceeds and may wai

Re: [PATCH v2 2/4] scripts/replay-dump.py: Update to current rr record format

2024-01-30 Thread John Snow
On Thu, Jan 25, 2024 at 11:09 AM Nicholas Piggin wrote: > > The v12 format support for replay-dump has a few issues still. This > fixes async decoding; adds event, shutdown, and end decoding; fixes > audio in / out events, fixes checkpoint checking of following async > events. > > Signed-off-by: N

[PULL 0/5] Block patches

2024-01-30 Thread Stefan Hajnoczi
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/stefanha/qemu.git tags/block-pull-request for

[PULL 4/5] hw/core/qdev.c: add qdev_get_human_name()

2024-01-30 Thread Stefan Hajnoczi
From: Manos Pitsidianakis Add a simple method to return some kind of human readable identifier for use in error messages. Reviewed-by: Stefan Hajnoczi Signed-off-by: Manos Pitsidianakis Message-id: 8b566bfced98ae44be1fcc1f8e7215f0c3393aa1.1706598705.git.manos.pitsidiana...@linaro.org Signed-o

[PULL 3/5] pflash: fix sectors vs bytes confusion in blk_pread_nonzeroes()

2024-01-30 Thread Stefan Hajnoczi
The following expression is incorrect because blk_pread_nonzeroes() deals in units of bytes, not sectors: bytes = MIN(size - offset, BDRV_REQUEST_MAX_SECTORS) ^^^ BDRV_REQUEST_MAX_BYTES is the appropriate constant. Fixes: a4b15a8b9ef2 ("pflash:

[PULL 1/5] block/io_uring: improve error message when init fails

2024-01-30 Thread Stefan Hajnoczi
From: Fiona Ebner The man page for io_uring_queue_init states: > io_uring_queue_init(3) returns 0 on success and -errno on failure. and the man page for io_uring_setup (which is one of the functions where the return value of io_uring_queue_init() can come from) states: > On error, a negative e

Re: [PATCH v3 0/2] hw/block/block.c: improve confusing error

2024-01-30 Thread Stefan Hajnoczi
On Tue, Jan 30, 2024 at 09:30:30AM +0200, Manos Pitsidianakis wrote: > In cases where a device tries to read more bytes than the block device > contains with the blk_check_size_and_read_all() function, the error is > vague: "device requires X bytes, block backend provides Y bytes". > > This patch

[PULL 2/5] block/blkio: Make s->mem_region_alignment be 64 bits

2024-01-30 Thread Stefan Hajnoczi
From: "Richard W.M. Jones" With GCC 14 the code failed to compile on i686 (and was wrong for any version of GCC): ../block/blkio.c: In function ‘blkio_file_open’: ../block/blkio.c:857:28: error: passing argument 3 of ‘blkio_get_uint64’ from incompatible pointer type [-Wincompatible-pointer-type

[PULL 5/5] hw/block/block.c: improve confusing blk_check_size_and_read_all() error

2024-01-30 Thread Stefan Hajnoczi
From: Manos Pitsidianakis In cases where a device tries to read more bytes than the block device contains, the error is vague: "device requires X bytes, block backend provides Y bytes". This patch changes the errors of this function to include the block backend name, the device id and device typ

<    1   2   3   >