Re: [RFC PATCH] tests/vm: update openbsd image to 7.4

2024-02-26 Thread Thomas Huth
On 26/02/2024 23.48, Alex Bennée wrote: The old links are dead so even if we have the ISO cached we can't finish the install. Update to the current stable and tweak the install strings. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2192 Signed-off-by: Alex Bennée --- tests/vm/openbs

Re: [PATCH v3 21/27] plugins: add an API to read registers

2024-02-26 Thread Akihiko Odaki
On 2024/02/27 1:56, Alex Bennée wrote: We can only request a list of registers once the vCPU has been initialised so the user needs to use either call the get function on vCPU initialisation or during the translation phase. We don't expose the reg number to the plugin instead hiding it behind an

Re: [PATCH] migration: Don't serialize migration while can't switchover

2024-02-26 Thread Peter Xu
On Thu, Feb 22, 2024 at 05:56:27PM +0200, Avihai Horon wrote: > Currently, migration code serializes device data sending during pre-copy > iterative phase. As noted in the code comment, this is done to prevent > faster changing device from sending its data over and over. Frankly speaking I don't u

Re: [PATCH v6 5/9] target/ppc: Simplify syscall exception handlers

2024-02-26 Thread Nicholas Piggin
On Thu Feb 22, 2024 at 10:20 PM AEST, BALATON Zoltan wrote: > On Thu, 22 Feb 2024, Philippe Mathieu-Daudé wrote: > > On 22/2/24 12:33, BALATON Zoltan wrote: > >> After previous changes the hypercall handling in 7xx and 74xx > >> exception handlers can be folded into one if statement to simpilfy > >

Re: [PATCH v6 5/9] target/ppc: Simplify syscall exception handlers

2024-02-26 Thread Nicholas Piggin
On Thu Feb 22, 2024 at 9:33 PM AEST, BALATON Zoltan wrote: > After previous changes the hypercall handling in 7xx and 74xx > exception handlers can be folded into one if statement to simpilfy > this code. Also add "unlikely" to mark the less freqiently used branch > for the compiler. > > Signed-off

Re: [PATCH v6 3/9] target/ppc: Fix gen_sc to use correct nip

2024-02-26 Thread Nicholas Piggin
On Thu Feb 22, 2024 at 9:33 PM AEST, BALATON Zoltan wrote: > Most exceptions are raised with nip pointing to the faulting > instruction but the sc instruction generating a syscall exception > leaves nip pointing to next instruction. Fix gen_sc to not use > gen_exception_err() which sets nip back bu

Re: [PATCH 10/10] docs/devel/reset: Update to discuss system reset

2024-02-26 Thread Zhao Liu
On Tue, Feb 20, 2024 at 04:06:22PM +, Peter Maydell wrote: > Date: Tue, 20 Feb 2024 16:06:22 + > From: Peter Maydell > Subject: [PATCH 10/10] docs/devel/reset: Update to discuss system reset > X-Mailer: git-send-email 2.34.1 > > Now that system reset uses a three-phase-reset, update the r

Re: [PATCH 09/10] hw/core/machine: Use qemu_register_resettable for sysbus reset

2024-02-26 Thread Zhao Liu
On Tue, Feb 20, 2024 at 04:06:21PM +, Peter Maydell wrote: > Date: Tue, 20 Feb 2024 16:06:21 + > From: Peter Maydell > Subject: [PATCH 09/10] hw/core/machine: Use qemu_register_resettable for > sysbus reset > X-Mailer: git-send-email 2.34.1 > > Move the reset of the sysbus (and thus all

Re: [PATCH 08/10] hw/core/reset: Implement qemu_register_reset via qemu_register_resettable

2024-02-26 Thread Zhao Liu
On Tue, Feb 20, 2024 at 04:06:20PM +, Peter Maydell wrote: > Date: Tue, 20 Feb 2024 16:06:20 + > From: Peter Maydell > Subject: [PATCH 08/10] hw/core/reset: Implement qemu_register_reset via > qemu_register_resettable > X-Mailer: git-send-email 2.34.1 > > Reimplement qemu_register_reset(

Re: [PATCH 07/10] hw/core/reset: Add qemu_{register, unregister}_resettable()

2024-02-26 Thread Zhao Liu
On Tue, Feb 20, 2024 at 04:06:19PM +, Peter Maydell wrote: > Date: Tue, 20 Feb 2024 16:06:19 + > From: Peter Maydell > Subject: [PATCH 07/10] hw/core/reset: Add qemu_{register, > unregister}_resettable() > X-Mailer: git-send-email 2.34.1 > > Implement new functions qemu_register_resettab

[PATCH v2] hw/char/pl011: Add support for loopback

2024-02-26 Thread Tong Ho
This patch adds loopback for sent characters, sent BREAK, and modem-control signals. Loopback of send and modem-control is often used for uart self tests in real hardware but missing from current pl011 model, resulting in self-test failures when running in QEMU. This implementation matches what i

Re: [PATCH v6 11/41] Temporarily disable unimplemented rpi4b devices

2024-02-26 Thread Kambalin, Sergey
Hi Peter and Philippe! Thank you for the review and feedback! OK, I'll fix PCIE-relarted comments and the overlapping issue BR, Sergey Kambalin Software Developer, Auriga Inc. От: Peter Maydell Отправлено: 26 февраля 2024 г. 10:41:31 Кому: Philippe Mathieu-

Re: [PATCH V4 00/14] allow cpr-reboot for vfio

2024-02-26 Thread Peter Xu
On Mon, Feb 26, 2024 at 05:08:05PM -0500, Steven Sistare wrote: > On 2/26/2024 3:21 PM, Steven Sistare wrote: > > On 2/26/2024 4:01 AM, Peter Xu wrote: > >> On Mon, Feb 26, 2024 at 09:49:46AM +0100, Cédric Le Goater wrote: > >>> Go ahead. It will help me for the changes I am doing on error reportin

RE: [PATCH RFCv2 1/8] backends/iommufd: Introduce helper function iommufd_device_get_hw_capabilities()

2024-02-26 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH RFCv2 1/8] backends/iommufd: Introduce helper >function iommufd_device_get_hw_capabilities() > >On 26/02/2024 07:29, Duan, Zhenzhong wrote: >> Hi Joao, >> >>> -Original Message- >>> From: Joao Martins >>> Subject: [PAT

Re: [PATCH v4 22/34] migration/multifd: Prepare multifd sync for fixed-ram migration

2024-02-26 Thread Peter Xu
On Mon, Feb 26, 2024 at 07:52:20PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Tue, Feb 20, 2024 at 07:41:26PM -0300, Fabiano Rosas wrote: > >> The fixed-ram migration can be performed live or non-live, but it is > >> always asynchronous, i.e. the source machine and the destination >

RE: [PATCH v5 3/3] virtio-iommu: Change the default granule to the host page size

2024-02-26 Thread Duan, Zhenzhong
Hi Eric, >-Original Message- >From: Eric Auger >Subject: [PATCH v5 3/3] virtio-iommu: Change the default granule to the >host page size > >We used to set the default granule to 4KB but with VFIO assignment >it makes more sense to use the actual host page size. > >Indeed when hotplugging a

RE: [PATCH v5 1/3] qdev: Add a granule_mode property

2024-02-26 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: [PATCH v5 1/3] qdev: Add a granule_mode property > >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 s

RE: [PATCH v5 2/3] virtio-iommu: Add a granule property

2024-02-26 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: [PATCH v5 2/3] virtio-iommu: Add a granule property > >This allows to choose which granule will be used by >default by the virtio-iommu. Current page size mask >default is qemu_target_page_mask so this translates >into a 4K granule. > >Sig

Re: [PATCH 06/10] hw/core: Add ResetContainer which holds objects implementing Resettable

2024-02-26 Thread Zhao Liu
On Tue, Feb 20, 2024 at 04:06:18PM +, Peter Maydell wrote: > Date: Tue, 20 Feb 2024 16:06:18 + > From: Peter Maydell > Subject: [PATCH 06/10] hw/core: Add ResetContainer which holds objects > implementing Resettable > X-Mailer: git-send-email 2.34.1 > > Implement a ResetContainer. This

Re: [PATCH] migration: Don't serialize migration while can't switchover

2024-02-26 Thread Wang, Lei
On 2/22/2024 23:56, Avihai Horon wrote: > Currently, migration code serializes device data sending during pre-copy > iterative phase. As noted in the code comment, this is done to prevent > faster changing device from sending its data over and over. > > However, with switchover-ack capability enab

RE: [PATCH rfcv2 18/18] intel_iommu: Block migration if cap is updated

2024-02-26 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH rfcv2 18/18] intel_iommu: Block migration if cap is >updated > >On 01/02/2024 07:28, Zhenzhong Duan wrote: >> When there is VFIO device and vIOMMU cap/ecap is updated based on >host >> IOMMU cap/ecap, migration should be blocke

[PATCH v2 5/5] tests: Add migration test for loongarch64

2024-02-26 Thread Bibo Mao
This patch adds migration test support for loongarch64. The test code comes from aarch64 mostly, only that it booted as bios in qemu since kernel requires elf format and bios uses binary format. In addition to providing the binary, this patch also includes the source code and the build script in t

[PATCH v2 0/5] Add migration test for loongarch64

2024-02-26 Thread Bibo Mao
Migration test case is added for loongarch64 here. Since compat machine type is required for migration test case, also compat machine qemu 9.0 is added for loongarch virt machine. Migration test case passes to run in both tcg and kvm mode with the patch. --- Change in v2: 1. Keep the default me

[PATCH v2 3/5] hw/loongarch: Add compat machine for 9.0

2024-02-26 Thread Bibo Mao
Since migration test case requires compat machine type support, compat machine is added for qemu 9.0 here. Signed-off-by: Bibo Mao --- hw/loongarch/virt.c | 60 +++-- 1 file changed, 47 insertions(+), 13 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/

[PATCH v2 1/5] hw/loongarch: Rename LOONGARCH_MACHINE with VIRT_MACHINE.

2024-02-26 Thread Bibo Mao
On LoongArch system, there is only virt machine type now, name LOONGARCH_MACHINE is confused, rename it with VIRT_MACHINE. Machine name about Other real hw boards can be added in future. Signed-off-by: Bibo Mao --- hw/loongarch/acpi-build.c | 8 hw/loongarch/virt.c | 19 +

[PATCH v2 4/5] hw/loongarch: Set minimium memory size as 256M

2024-02-26 Thread Bibo Mao
The minimum memory size for LoongArch UEFI bios is 256M, also some test cases such as migration and qos use 256M memory by default. Here set minimum memory size for Loongarch VirtMachine with 256M rather than 1G, so that test cases with 256M memory can pass to run. Signed-off-by: Bibo Mao --- h

[PATCH v2 2/5] hw/loongarch: Rename LoongArchMachineState with VirtMachineState

2024-02-26 Thread Bibo Mao
Rename LoongArchMachineState with VirtMachineState, and change variable name LoongArchMachineState *lams with VirtMachineState *vms, and rename function loongarch_xxx() with virt_xxx() also. Signed-off-by: Bibo Mao --- hw/loongarch/acpi-build.c | 80 +- hw/loongarch/fw_cfg.c |

RE: [PATCH v3 0/4] RISC-V: Modularize common match conditions for trigger

2024-02-26 Thread 張哲嘉
Hi Alistair, > -Original Message- > From: Alistair Francis > Sent: Tuesday, February 27, 2024 8:02 AM > To: Alvin Che-Chia Chang(張哲嘉) > Cc: qemu-ri...@nongnu.org; qemu-devel@nongnu.org; > alistair.fran...@wdc.com; bin.m...@windriver.com; liwei1...@gmail.com; > dbarb...@ventanamicro.com;

[PATCH v4 1/4] target/riscv: Add functions for common matching conditions of trigger

2024-02-26 Thread Alvin Chang via
According to RISC-V Debug specification version 0.13 [1] (also applied to version 1.0 [2] but it has not been ratified yet), there are several common matching conditions before firing a trigger, including the enabled privilege levels of the trigger. This commit adds trigger_common_match() to prepa

[PATCH v4 3/4] target/riscv: Apply modularized matching conditions for watchpoint

2024-02-26 Thread Alvin Chang via
We have implemented trigger_common_match(), which checks if the enabled privilege levels of the trigger match CPU's current privilege level. Remove the related code in riscv_cpu_debug_check_watchpoint() and invoke trigger_common_match() to check the privilege levels of the type 2 and type 6 trigger

[PATCH v4 0/4] RISC-V: Modularize common match conditions for trigger

2024-02-26 Thread Alvin Chang via
According to RISC-V Debug specification ratified version 0.13 [1] (also applied to version 1.0 [2] but it has not been ratified yet), the enabled privilege levels of the trigger is common match conditions for all the types of the trigger. This series modularize the code for checking the privilege

[PATCH v4 4/4] target/riscv: Apply modularized matching conditions for icount trigger

2024-02-26 Thread Alvin Chang via
We have implemented trigger_common_match(), which checks if the enabled privilege levels of the trigger match CPU's current privilege level. We can invoke trigger_common_match() to check the privilege levels of the type 3 triggers. Signed-off-by: Alvin Chang --- target/riscv/debug.c | 2 +- 1 fi

[PATCH v4 2/4] target/riscv: Apply modularized matching conditions for breakpoint

2024-02-26 Thread Alvin Chang via
We have implemented trigger_common_match(), which checks if the enabled privilege levels of the trigger match CPU's current privilege level. Remove the related code in riscv_cpu_debug_check_breakpoint() and invoke trigger_common_match() to check the privilege levels of the type 2 and type 6 trigger

Re: [PATCH v4 08/10] hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity response

2024-02-26 Thread fan
On Mon, Feb 26, 2024 at 06:04:17PM +, Jonathan Cameron wrote: > On Wed, 21 Feb 2024 10:16:01 -0800 > nifan@gmail.com wrote: > > > From: Fan Ni > > > > Per CXL spec 3.1, two mailbox commands are implemented: > > Add Dynamic Capacity Response (Opcode 4802h) 8.2.9.9.9.3, and > > Release Dyn

Re: [PATCH v4 08/10] hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity response

2024-02-26 Thread fan
On Mon, Feb 26, 2024 at 06:04:17PM +, Jonathan Cameron wrote: > On Wed, 21 Feb 2024 10:16:01 -0800 > nifan@gmail.com wrote: > > > From: Fan Ni > > > > Per CXL spec 3.1, two mailbox commands are implemented: > > Add Dynamic Capacity Response (Opcode 4802h) 8.2.9.9.9.3, and > > Release Dyn

Re: [PATCH v3 0/4] RISC-V: Modularize common match conditions for trigger

2024-02-26 Thread Alistair Francis
On Mon, Feb 26, 2024 at 5:10 PM Alvin Chang via wrote: > > According to latest RISC-V Debug specification version 1.0 [1], the The issue here is that we really only support the "debug" spec. That's the 0.13 version of the spec. We do also support bits of the 1.0 spec, but those should be changed

Re: [PATCH v2 2/4] target/riscv: Apply modularized matching conditions for breakpoint

2024-02-26 Thread Alistair Francis
On Fri, Feb 23, 2024 at 12:22 PM Alvin Chang via wrote: > > We have implemented trigger_common_match(), which checks if the enabled > privilege levels of the trigger match CPU's current privilege level. > Remove the related code in riscv_cpu_debug_check_breakpoint() and invoke > trigger_common_mat

Re: [PATCH v4 22/34] migration/multifd: Prepare multifd sync for fixed-ram migration

2024-02-26 Thread Fabiano Rosas
Peter Xu writes: > On Tue, Feb 20, 2024 at 07:41:26PM -0300, Fabiano Rosas wrote: >> The fixed-ram migration can be performed live or non-live, but it is >> always asynchronous, i.e. the source machine and the destination >> machine are not migrating at the same time. We only need some pieces >>

Re: [PATCH v2 10/15] hw/southbridge/ich9: Add the DMI-to-PCI bridge

2024-02-26 Thread Bernhard Beschow
Am 26. Februar 2024 11:14:09 UTC schrieb "Philippe Mathieu-Daudé" : >Instantiate TYPE_ICH_DMI_PCI_BRIDGE in TYPE_ICH9_SOUTHBRIDGE. > >Since the Q35 machine doesn't use it, add the 'd2p-enabled' >property to disable it. > >Signed-off-by: Philippe Mathieu-Daudé >--- > include/hw/southbridge/ich9

[RFC PATCH] tests/vm: update openbsd image to 7.4

2024-02-26 Thread Alex Bennée
The old links are dead so even if we have the ISO cached we can't finish the install. Update to the current stable and tweak the install strings. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2192 Signed-off-by: Alex Bennée --- tests/vm/openbsd | 9 + 1 file changed, 5 insertio

Re: [PATCH v2 00/15] hw/southbridge: Extract ICH9 QOM container model

2024-02-26 Thread Bernhard Beschow
Am 26. Februar 2024 11:13:59 UTC schrieb "Philippe Mathieu-Daudé" : >Since v1 [1]: >- Rebased on top of Bernhard patches >- Rename files with 'ich9_' prefix (Bernhard) > >Hi, > >I have a long standing southbridge QOM rework branches. Since >Bernhard is actively working on the PIIX, I'll try to

[PATCH V2] migration: export fewer options

2024-02-26 Thread Steve Sistare
A small number of migration options are accessed by migration clients, but to see them clients must include all of options.h, which is mostly for migration core code. migrate_mode() in particular will be needed by multiple clients. Refactor the option declarations so clients can see the necessary

Re: [PATCH V4 00/14] allow cpr-reboot for vfio

2024-02-26 Thread Steven Sistare
On 2/26/2024 3:21 PM, Steven Sistare wrote: > On 2/26/2024 4:01 AM, Peter Xu wrote: >> On Mon, Feb 26, 2024 at 09:49:46AM +0100, Cédric Le Goater wrote: >>> Go ahead. It will help me for the changes I am doing on error reporting >>> for VFIO migration. I will rebase on top. >> >> Thanks for confirm

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

2024-02-26 Thread Bernhard Beschow
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.0-machine.pflash0' not found Revert the commit for now until a soluti

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

2024-02-26 Thread Bernhard Beschow
Specifying the property `-M pflash0` results in a regression: qemu-system-x86_64: Property 'pc-q35-9.0-machine.pflash0' not found Revert the change for now until a solution is found. This reverts commit 6f6ad2b24582593d8feb00434ce2396840666227. Reported-by: Volker Rümelin Signed-off-by: Bernha

[PATCH 1/2] Revert "hw/i386/pc_sysfw: Inline pc_system_flash_create() and remove it"

2024-02-26 Thread Bernhard Beschow
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.0-machine.pflash0' not found In order to revert the commit, the commit below must be reverted fi

Re: [PATCH v5 1/8] Implement STM32L4x5_RCC skeleton

2024-02-26 Thread Peter Maydell
On Mon, 26 Feb 2024 at 19:21, Arnaud Minier wrote: > > From: "Peter Maydell" > >> +static const MemoryRegionOps stm32l4x5_rcc_ops = { > >> +.read = stm32l4x5_rcc_read, > >> +.write = stm32l4x5_rcc_write, > >> +.endianness = DEVICE_NATIVE_ENDIAN, > >> +.valid = { > >> +.max_

Re: [PATCH v5 6/8] Add write protections to CR register

2024-02-26 Thread Arnaud Minier
Thank you for the review and for the tips ! It really helps. I will address the problems you have highlighted and will send a new version later this week. Arnaud - Original Message - > From: "Peter Maydell" > To: "Arnaud Minier" > Cc: "qemu-devel" , "Thomas Huth" , > "Laurent Vivier"

Re: [PATCH v4 19/34] migration/multifd: Allow receiving pages without packets

2024-02-26 Thread Fabiano Rosas
Fabiano Rosas writes: > Peter Xu writes: > >> On Tue, Feb 20, 2024 at 07:41:23PM -0300, Fabiano Rosas wrote: >>> Currently multifd does not need to have knowledge of pages on the >>> receiving side because all the information needed is within the >>> packets that come in the stream. >>> >>> We'

Re: [PATCH v5 2/8] Add an internal clock multiplexer object

2024-02-26 Thread Arnaud Minier
- Original Message - > From: "Peter Maydell" > To: "Arnaud Minier" > Cc: "qemu-devel" , "Thomas Huth" , > "Laurent Vivier" , "Inès > Varhol" , "Samuel Tardieu" > , "qemu-arm" > , "Alistair Francis" , "Paolo > Bonzini" , "Alistair > Francis" > Sent: Friday, February 23, 2024 3:44:59 PM

[PATCH 2/2] migration: Use migrate_has_error() in close_return_path_on_source()

2024-02-26 Thread Fabiano Rosas
From: Cédric Le Goater close_return_path_on_source() retrieves the migration error from the the QEMUFile '->to_dst_file' to know if a shutdown is required. This shutdown is required to exit the return-path thread. Avoid relying on '->to_dst_file' and use migrate_has_error() instead. (using to_d

[PATCH 0/2] migration: Fix RP shutdown order

2024-02-26 Thread Fabiano Rosas
These were extracted from: [PATCH 00/14] migration: Improve error reporting https://lore.kernel.org/r/20240207133347.1115903-1-...@redhat.com We're currently relying on the presence of a QEMUFile error in the to_dst_file to infer whether the return path file (rp_state.from_dst_file) might be hangi

[PATCH 1/2] migration: Join the return path thread before releasing to_dst_file

2024-02-26 Thread Fabiano Rosas
The return path thread might hang at a blocking system call. Before joining the thread we might need to issue a shutdown() on the socket file descriptor to release it. To determine whether the shutdown() is necessary we look at the QEMUFile error. Make sure we only clean up the QEMUFile after the

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

2024-02-26 Thread Hao Xiang
Add myself to maintain multifd zero page checking acceleration function. Signed-off-by: Hao Xiang --- MAINTAINERS | 5 + 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 992799171f..4a4f8f24e0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3413,6 +3413,11 @@ F: t

Re: [PATCH v2 1/3] qtest: migration: Enhance qtest migration functions to support 'channels' argument

2024-02-26 Thread Het Gala
On 27/02/24 1:04 am, Het Gala wrote: On 26/02/24 6:31 pm, Fabiano Rosas wrote: Het Gala writes: On 24/02/24 1:42 am, Fabiano Rosas wrote: this was the same first approach that I attempted. It won't work because The final 'migrate' QAPI with channels string would look like { "execute": "m

Re: [PATCH V4 00/14] allow cpr-reboot for vfio

2024-02-26 Thread Steven Sistare
On 2/26/2024 4:01 AM, Peter Xu wrote: > On Mon, Feb 26, 2024 at 09:49:46AM +0100, Cédric Le Goater wrote: >> Go ahead. It will help me for the changes I am doing on error reporting >> for VFIO migration. I will rebase on top. > > Thanks for confirming. I queued the migration patches then, but lea

[PATCH 5/9] Hexagon (tests/tcg/hexagon) Test HVX .new read from high half of pair

2024-02-26 Thread Taylor Simpson
Make sure the decoding of HVX .new is correctly handling this case Signed-off-by: Taylor Simpson --- tests/tcg/hexagon/hvx_misc.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/tcg/hexagon/hvx_misc.c b/tests/tcg/hexagon/hvx_misc.c index b45170acd1..1fe

[PATCH 8/9] Hexagon (target/hexagon) Remove gen_shortcode.py

2024-02-26 Thread Taylor Simpson
This data structure is not used Signed-off-by: Taylor Simpson --- target/hexagon/opcodes.c| 7 target/hexagon/README | 1 - target/hexagon/gen_shortcode.py | 63 - target/hexagon/meson.build | 10 -- 4 files changed, 81 deletions(

[PATCH 4/9] Hexagon (target/hexagon) Mark has_pred_dest in trans functions

2024-02-26 Thread Taylor Simpson
Check that the value matches opcode_wregs Signed-off-by: Taylor Simpson --- target/hexagon/insn.h | 1 + target/hexagon/decode.c | 3 +++ target/hexagon/gen_trans_funcs.py | 4 3 files changed, 8 insertions(+) diff --git a/target/hexagon/insn.h b/target/hexagon/insn.h

[PATCH 1/9] Hexagon (target/hexagon) Add is_old/is_new to Register class

2024-02-26 Thread Taylor Simpson
Signed-off-by: Taylor Simpson --- target/hexagon/hex_common.py | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/target/hexagon/hex_common.py b/target/hexagon/hex_common.py index 195620c7ec..4bacef223f 100755 --- a/target/hexagon/hex_common.py +++ b/target/hexagon

[PATCH 3/9] Hexagon (target/hexagon) Mark dest_idx in trans functions

2024-02-26 Thread Taylor Simpson
Check that the value matches opcode_reginfo/opcode_wregs Signed-off-by: Taylor Simpson --- target/hexagon/insn.h | 1 + target/hexagon/decode.c | 2 ++ target/hexagon/mmvec/decode_ext_mmvec.c | 2 ++ target/hexagon/gen_trans_funcs.py | 4 4 files chan

[PATCH 9/9] Hexagon (target/hexagon) Remove hex_common.read_attribs_file

2024-02-26 Thread Taylor Simpson
The attribinfo data structure is not used Adjust the command-line arguments to the python scripts Add hex_common.read_common_files for TCG/helper generation scripts Signed-off-by: Taylor Simpson --- target/hexagon/gen_analyze_funcs.py | 21 ++- target/hexagon/gen_helper_funcs.py

[PATCH 0/9] Hexagon (target/hexagon) Clean up .new decode and scripts

2024-02-26 Thread Taylor Simpson
During .new decode, there are several places where strchr is used. We remove these by generating the values that are needed. Once we have generated the proper values, we no longer need op_regs_generated.h.inc. We remove the script that generates it as well as the code in meson.build We also remo

[PATCH 7/9] Hexagon (target/hexagon) Remove gen_op_regs.py

2024-02-26 Thread Taylor Simpson
Signed-off-by: Taylor Simpson --- target/hexagon/README | 1 - target/hexagon/gen_op_regs.py | 125 -- target/hexagon/meson.build| 14 +--- 3 files changed, 2 insertions(+), 138 deletions(-) delete mode 100755 target/hexagon/gen_op_regs.py diff --g

[PATCH 6/9] Hexagon (target/hexagon) Remove uses of op_regs_generated.h.inc

2024-02-26 Thread Taylor Simpson
Signed-off-by: Taylor Simpson --- target/hexagon/opcodes.h| 4 -- target/hexagon/decode.c | 57 +++-- target/hexagon/mmvec/decode_ext_mmvec.c | 34 +++ target/hexagon/opcodes.c| 28 4 files changed, 13 i

[PATCH 2/9] Hexagon (target/hexagon) Mark new_read_idx in trans functions

2024-02-26 Thread Taylor Simpson
Check that the value matches opcode_reginfo Signed-off-by: Taylor Simpson --- target/hexagon/insn.h | 3 ++- target/hexagon/decode.c | 2 ++ target/hexagon/mmvec/decode_ext_mmvec.c | 2 ++ target/hexagon/gen_trans_funcs.py | 15 ++- 4 files

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

2024-02-26 Thread Hao Xiang
1. Add zero_pages field in MultiFDPacket_t. 2. Implements the zero page detection and handling on the multifd threads for non-compression, zlib and zstd compression backends. 3. Added a new value 'multifd' in ZeroPageDetection enumeration. 4. Handle migration QEMU9.0 -> QEMU8.2 compatibility. 5. Ad

[PATCH v3 0/7] Introduce multifd zero page checking.

2024-02-26 Thread Hao Xiang
v3 update: * Change "zero" to "zero-pages" and use type size for "zero-bytes". * Fixed ZeroPageDetection interface description. * Move zero page unit tests to its own path. * Removed some asserts. * Added backward compatibility support for migration 9.0 -> 8.2. * Removed fields "zero" and "normal"

[PATCH v3 6/7] migration/multifd: Add zero pages and zero bytes counter to migration status interface.

2024-02-26 Thread Hao Xiang
This change extends the MigrationStatus interface to track zero pages and zero bytes counter. Signed-off-by: Hao Xiang --- migration/migration-hmp-cmds.c | 4 migration/migration.c | 2 ++ qapi/migration.json | 15 ++- tests/migration/guestpe

[PATCH v3 3/7] migration/multifd: Implement ram_save_target_page_multifd to handle multifd version of MigrationOps::ram_save_target_page.

2024-02-26 Thread Hao Xiang
1. Add a dedicated handler for MigrationOps::ram_save_target_page in multifd live migration. 2. Refactor ram_save_target_page_legacy so that the legacy and multifd handlers don't have internal functions calling into each other. Signed-off-by: Hao Xiang --- migration/ram.c | 43 ++

[PATCH v3 5/7] migration/multifd: Add new migration test cases for legacy zero page checking.

2024-02-26 Thread Hao Xiang
Now that zero page checking is done on the multifd sender threads by default, we still provide an option for backward compatibility. This change adds a qtest migration test case to set the zero-page-detection option to "legacy" and run multifd migration with zero page checking on the migration main

[PATCH v3 4/7] migration/multifd: Enable multifd zero page checking by default.

2024-02-26 Thread Hao Xiang
Set default "zero-page-detection" option to "multifd". Now zero page checking can be done in the multifd threads and this becomes the default configuration. We still provide backward compatibility where zero page checking is done from the migration main thread. Signed-off-by: Hao Xiang --- migra

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

2024-02-26 Thread 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 --- hw/core/qdev-properties-syste

Re: 'make vm-build-openbsd' tries to download nonexistent 7.2 installer ISO

2024-02-26 Thread Alex Bennée
Peter Maydell writes: > 'make vm-build-openbsd' has stopped working -- I suspect that this > line from the logs is probably relevant: > > http://cdn.openbsd.org/pub/OpenBSD/7.2/packages/amd64/: no such dir > > though we don't eventually fail until much later, in 'make check' with > gmake

[RFC PATCH v2] tests/vm: avoid re-building the VM images all the time

2024-02-26 Thread Alex Bennée
The main problem is that "check-venv" is a .PHONY target will always evaluate and trigger a full re-build of the VM images. While its tempting to drop it from the dependencies that does introduce a breakage on freshly configured builds. Fortunately we do have the otherwise redundant --force flag f

Re: [External] Re: [PATCH v2 1/7] migration/multifd: Add new migration option zero-page-detection.

2024-02-26 Thread Hao Xiang
On Sun, Feb 25, 2024 at 11:19 PM Wang, Lei wrote: > > On 2/17/2024 6:39, Hao Xiang wrote: > > 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 s

Re: [PATCH v2 1/3] qtest: migration: Enhance qtest migration functions to support 'channels' argument

2024-02-26 Thread Het Gala
On 26/02/24 6:31 pm, Fabiano Rosas wrote: Het Gala writes: On 24/02/24 1:42 am, Fabiano Rosas wrote: this was the same first approach that I attempted. It won't work because The final 'migrate' QAPI with channels string would look like { "execute": "migrate", "arguments": { "channels": "[ {

Re: [PATCH v5 1/8] Implement STM32L4x5_RCC skeleton

2024-02-26 Thread Arnaud Minier
Thanks Peter for the review, - Original Message - > From: "Peter Maydell" > To: "Arnaud Minier" > Cc: "qemu-devel" , "Thomas Huth" , "Laurent Vivier" , "Inès > Varhol" , "Samuel Tardieu" , "qemu-arm" > , "Alistair Francis" , "Paolo Bonzini" , "Alistair > Francis" > Sent: Friday, Februar

Re: [PATCH v4 19/34] migration/multifd: Allow receiving pages without packets

2024-02-26 Thread Fabiano Rosas
Peter Xu writes: > On Tue, Feb 20, 2024 at 07:41:23PM -0300, Fabiano Rosas wrote: >> Currently multifd does not need to have knowledge of pages on the >> receiving side because all the information needed is within the >> packets that come in the stream. >> >> We're about to add support to fixed-

Re: [PATCH 28/28] qemu-img: extend cvtnum() and use it in more places

2024-02-26 Thread Michael Tokarev
22.02.2024 00:16, Michael Tokarev wrote: -static int64_t cvtnum_full(const char *name, const char *value, int64_t min, - int64_t max) +static int64_t cvtnum_full(const char *name, const char *value, + bool issize, int64_t min, int64_t max) {

Re: [PATCH v4 02/10] hw/cxl/cxl-mailbox-utils: Add dynamic capacity region representative and mailbox command support

2024-02-26 Thread fan
On Mon, Feb 26, 2024 at 05:33:17PM +, Jonathan Cameron wrote: > On Wed, 21 Feb 2024 10:15:55 -0800 > nifan@gmail.com wrote: > > > From: Fan Ni > > > > Per cxl spec r3.1, add dynamic capacity region representative based on > > Table 8-165 and extend the cxl type3 device definition to incl

Re: [RFC PATCH v3 04/21] target/arm: Implement ALLINT MSR (immediate)

2024-02-26 Thread Richard Henderson
On 2/25/24 16:22, Jinjie Ruan wrote: On 2024/2/24 3:03, Richard Henderson wrote: On 2/23/24 00:32, Jinjie Ruan via wrote: Add ALLINT MSR (immediate) to decodetree. And the EL0 check is necessary to ALLINT. Avoid the unconditional write to pc and use raise_exception_ra to unwind. Signed-off-b

Re: [PATCH 01/28] qemu-img: stop printing error twice in a few places

2024-02-26 Thread Michael Tokarev
26.02.2024 17:14, Daniel P. Berrangé : On Thu, Feb 22, 2024 at 12:15:42AM +0300, Michael Tokarev wrote: Currently we have: ./qemu-img resize none +10 qemu-img: Could not open 'none': Could not open 'none': No such file or directory stop printing the message twice, - local_err already ha

Re: [PATCH 1/7] qga/commands-posix: return fsinfo values directly as reported by statvfs

2024-02-26 Thread Konstantin Kostiuk
Best Regards, Konstantin Kostiuk. On Mon, Feb 26, 2024 at 7:02 PM Andrey Drobyshev < andrey.drobys...@virtuozzo.com> wrote: > Since the commit 25b5ff1a86 ("qga: add mountpoint usage info to > GuestFilesystemInfo") we have 2 values reported in guest-get-fsinfo: > used = (f_blocks - f_bfree), tota

Re: [PATCH v5 2/3] virtio-iommu: Add a granule property

2024-02-26 Thread Philippe Mathieu-Daudé
On 26/2/24 19:11, Eric Auger wrote: This allows to choose which granule will be used by default by the virtio-iommu. Current page size mask default is qemu_target_page_mask so this translates into a 4K granule. Signed-off-by: Eric Auger --- v4 -> v5: - use -(n * KiB) (Phild) v3 -> v4: - granu

Re: [RFC PATCH] tests/vm: avoid re-building the VM images all the time

2024-02-26 Thread Daniel P . Berrangé
On Mon, Feb 26, 2024 at 05:46:39PM +, Alex Bennée wrote: > There are two problems. > > The first is a .PHONY target will always evaluate which triggers a > full re-build of the VM images. Drop the requirement knowing that this > introduces a manual step on freshly configure build dirs. For co

Re: [PATCH v12 00/10] ui/cocoa: Use NSWindow's ability to resize

2024-02-26 Thread Philippe Mathieu-Daudé
On 24/2/24 13:43, Akihiko Odaki wrote: Akihiko Odaki (10): ui/cocoa: Split [-QemuCocoaView handleEventLocked:] ui/cocoa: Immediately call [-QemuCocoaView handleMouseEvent:buttons:] ui/cocoa: Release specific mouse buttons ui/cocoa: Scale with NSView instead of Core Gr

[PATCH v5 2/3] virtio-iommu: Add a granule property

2024-02-26 Thread Eric Auger
This allows to choose which granule will be used by default by the virtio-iommu. Current page size mask default is qemu_target_page_mask so this translates into a 4K granule. Signed-off-by: Eric Auger --- v4 -> v5: - use -(n * KiB) (Phild) v3 -> v4: - granule_mode introduction moved to that pat

[PATCH v5 3/3] virtio-iommu: Change the default granule to the host page size

2024-02-26 Thread Eric Auger
We used to set the default granule to 4KB but with VFIO assignment it makes more sense to use the actual host page size. Indeed when hotplugging a VFIO device protected by a virtio-iommu on a 64kB/64kB host/guest config, we current get a qemu crash: "vfio: DMA mapping failed, unable to continue"

[PATCH v5 0/3] VIRTIO-IOMMU: Set default granule to host page size

2024-02-26 Thread Eric Auger
We used to set the default granule to 4kB but with VFIO assignment it makes more sense to use the actual host page size. Indeed when hotplugging a VFIO device protected by a virtio-iommu on a 64kB/64kB host/guest config, we currently get a qemu crash: "vfio: DMA mapping failed, unable to cont

[PATCH v5 1/3] qdev: Add a granule_mode property

2024-02-26 Thread 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 Signed-off-by: Phil

Re: [RFC PATCH] tests/vm: avoid re-building the VM images all the time

2024-02-26 Thread Peter Maydell
On Mon, 26 Feb 2024 at 18:06, Alex Bennée wrote: > > Alex Bennée writes: > > > There are two problems. > > > > The first is a .PHONY target will always evaluate which triggers a > > full re-build of the VM images. Drop the requirement knowing that this > > introduces a manual step on freshly conf

Re: [PATCH v4 09/10] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-02-26 Thread Jonathan Cameron via
On Wed, 21 Feb 2024 10:16:02 -0800 nifan@gmail.com wrote: > From: Fan Ni > > Since fabric manager emulation is not supported yet, the change implements > the functions to add/release dynamic capacity extents as QMP interfaces. > > Note: we skips any FM issued extent release request if the e

Re: [PATCH v6 00/41] Raspberry Pi 4B machine

2024-02-26 Thread Peter Maydell
On Mon, 26 Feb 2024 at 00:04, Sergey Kambalin wrote: > > Introducing Raspberry Pi 4B model. > It contains new BCM2838 SoC, PCIE subsystem, > RNG200, Thermal sensor and Genet network controller. > > It can work with recent linux kernels 6.x.x. > Two avocado tests was added to check that. > > Unit t

Re: [PATCH v2] test/qtest: Add API functions to capture IRQ toggling

2024-02-26 Thread Philippe Mathieu-Daudé
On 14/11/23 00:01, Gustavo Romero wrote: Currently, the QTest API does not provide a function to capture when an IRQ line is raised or lowered, although the QTest Protocol already reports such IRQ transitions. As a consequence, it is also not possible to capture when an IRQ line is toggled. Funct

Re: [PATCH v4 08/10] hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity response

2024-02-26 Thread Jonathan Cameron via
On Wed, 21 Feb 2024 10:16:01 -0800 nifan@gmail.com wrote: > From: Fan Ni > > Per CXL spec 3.1, two mailbox commands are implemented: > Add Dynamic Capacity Response (Opcode 4802h) 8.2.9.9.9.3, and > Release Dynamic Capacity (Opcode 4803h) 8.2.9.9.9.4. > > Signed-off-by: Fan Ni Hi Fan, C

Re: [RFC PATCH] tests/vm: avoid re-building the VM images all the time

2024-02-26 Thread Alex Bennée
Alex Bennée writes: > There are two problems. > > The first is a .PHONY target will always evaluate which triggers a > full re-build of the VM images. Drop the requirement knowing that this > introduces a manual step on freshly configure build dirs. > > The second is a minor unrelated tweak to th

Re: [PATCH v4 07/10] hw/mem/cxl_type3: Add DC extent list representative and get DC extent list mailbox support

2024-02-26 Thread Jonathan Cameron via
On Wed, 21 Feb 2024 10:16:00 -0800 nifan@gmail.com wrote: > From: Fan Ni > > Add dynamic capacity extent list representative to the definition of > CXLType3Dev and add get DC extent list mailbox command per > CXL.spec.3.1:.8.2.9.9.9.2. > > Signed-off-by: Fan Ni Follow on from earlier comme

[RFC PATCH] tests/vm: avoid re-building the VM images all the time

2024-02-26 Thread Alex Bennée
There are two problems. The first is a .PHONY target will always evaluate which triggers a full re-build of the VM images. Drop the requirement knowing that this introduces a manual step on freshly configure build dirs. The second is a minor unrelated tweak to the Makefile also triggers an expens

Re: [PATCH v4 06/10] hw/mem/cxl_type3: Add host backend and address space handling for DC regions

2024-02-26 Thread Jonathan Cameron via
On Wed, 21 Feb 2024 10:15:59 -0800 nifan@gmail.com wrote: > From: Fan Ni > > Add (file/memory backed) host backend, all the dynamic capacity regions > will share a single, large enough host backend. Set up address space for > DC regions to support read/write operations to dynamic capacity fo

  1   2   3   4   >