Re: [PATCH 2/5] hw/net/can/xlnx-versal-canfd: Fix CAN FD flag check

2024-08-20 Thread Pavel Pisa
Hello Doug Brown, On Friday 16 of August 2024 18:35:02 Doug Brown wrote: > When checking the QEMU_CAN_FRMF_TYPE_FD flag, we need to ignore other > potentially set flags. Before this change, received CAN FD frames from > SocketCAN weren't being recognized as CAN FD. > > Signed-off-by: Doug Brown >

Re: [PULL 0/1] LoongArch: Fix for 9.1

2024-08-20 Thread Richard Henderson
On 8/21/24 12:47, Song Gao wrote: The following changes since commit 4220ebde107c44412755d593fb46e168eeaed936: Merge tag 'migration-20240820-pull-request' ofhttps://gitlab.com/farosas/qemu into staging (2024-08-21 08:46:45 +1000) are available in the Git repository at:

Re: [PATCH RFC V3 17/29] arm/virt: Release objects for *disabled* possible vCPUs after init

2024-08-20 Thread Gavin Shan
Hi Salil, On 8/21/24 2:40 AM, Salil Mehta wrote: I don’t understand this clearly. Are you suggesting to reuse only single vCPU object to initialize all KVM vCPUs not yet plugged? If yes, then I'm not sure what do we gain here by adding this complexity? It does not consume time or resources bec

Re: [PATCH v2 4/4] tests/tcg/aarch64: Extend MTE gdbstub tests to system mode

2024-08-20 Thread Richard Henderson
On 8/8/24 15:15, Gustavo Romero wrote: diff --git a/tests/tcg/aarch64/system/boot.S b/tests/tcg/aarch64/system/boot.S index 501685d0ec..79a2ada74a 100644 --- a/tests/tcg/aarch64/system/boot.S +++ b/tests/tcg/aarch64/system/boot.S @@ -135,6 +135,17 @@ __start: orr x1, x1, x3 st

Re: [PATCH v2 1/4] gdbstub: Use specific MMU index when probing MTE addresses

2024-08-20 Thread Richard Henderson
On 8/8/24 15:15, Gustavo Romero wrote: @@ -458,8 +459,10 @@ static void handle_q_memtag(GArray *params, void *user_ctx) gdb_put_packet("E03"); } +/* Find out the current translation regime for probe. */ +mmu_index = cpu_mmu_index(env_cpu(env), false) & ARM_MMU_IDX_CORE

Re: [PULL 0/5] misc patch queue

2024-08-20 Thread Richard Henderson
On 8/21/24 12:25, Richard Henderson wrote: The following changes since commit 9eb5bfbe3394b92fb37cc6f155ceea4d6c9e401c: Merge tag 'for_upstream' ofhttps://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2024-08-20 21:29:52 +1000) are available in the Git repository at: https://gi

Re: [PATCH v3] kvm: replace fprintf with error_report/printf() in kvm_init()

2024-08-20 Thread Ani Sinha
> On 16 Aug 2024, at 11:51 AM, Philippe Mathieu-Daudé wrote: > > On 12/8/24 11:59, Ani Sinha wrote: >> On Mon, 12 Aug, 2024, 3:23 pm Ani Sinha, > > wrote: >>On Fri, Aug 9, 2024 at 2:06 PM Philippe Mathieu-Daudé >>mailto:phi...@linaro.org>> wrote: >> > >>

[PULL 1/1] hw/loongarch: Fix length for lowram in ACPI SRAT

2024-08-20 Thread Song Gao
From: Jiaxun Yang The size of lowram should be "gap" instead of the whole node. This is failing kernel's sanity check: [0.00] ACPI: SRAT: Node 0 PXM 0 [mem 0x-0x] [0.00] ACPI: SRAT: Node 0 PXM 0 [mem 0x8000-0x16fff] [0.00] ACPI: SRAT: Node 1 PXM 1

[PULL 0/1] LoongArch: Fix for 9.1

2024-08-20 Thread Song Gao
The following changes since commit 4220ebde107c44412755d593fb46e168eeaed936: Merge tag 'migration-20240820-pull-request' of https://gitlab.com/farosas/qemu into staging (2024-08-21 08:46:45 +1000) are available in the Git repository at: https://gitlab.com/gaosong/qemu.git

[PULL 1/5] linux-user: Handle short reads in mmap_h_gt_g

2024-08-20 Thread Richard Henderson
In particular, if an image has a large bss, we can hit EOF before reading all host_len bytes of the mapping. Create a helper, mmap_pread to handle the job for both the larger block in mmap_h_gt_g itself, as well as the smaller block in mmap_frag. Cc: qemu-sta...@nongnu.org Fixes: eb5027ac618 ("li

[PULL 0/5] misc patch queue

2024-08-20 Thread Richard Henderson
Two x86 fixes and one {bsd,linux}-user fix. r~ The following changes since commit 9eb5bfbe3394b92fb37cc6f155ceea4d6c9e401c: Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2024-08-20 21:29:52 +1000) are available in the Git repository at: https:

[PULL 4/5] target/i386: Fix carry flag for BLSI

2024-08-20 Thread Richard Henderson
BLSI has inverted semantics for C as compared to the other two BMI1 instructions, BLSMSK and BLSR. Introduce CC_OP_BLSI* for this purpose. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2175 Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <2024080107584

[PULL 5/5] target/i386: Fix tss access size in switch_tss_ra

2024-08-20 Thread Richard Henderson
The two limit_max variables represent size - 1, just like the encoding in the GDT, thus the 'old' access was off by one. Access the minimal size of the new tss: the complete tss contains the iopb, which may be a larger block than the access api expects, and irrelevant because the iopb is not access

[PULL 3/5] target/i386: Split out gen_prepare_val_nz

2024-08-20 Thread Richard Henderson
Split out the TCG_COND_TSTEQ logic from gen_prepare_eflags_z, and use it for CC_OP_BMILG* as well. Prepare for requiring both zero and non-zero senses. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Message-Id: <20240801075845.573075-2-richard.hender...@linaro.org> --- ta

[PULL 2/5] bsd-user: Handle short reads in mmap_h_gt_g

2024-08-20 Thread Richard Henderson
In particular, if an image has a large bss, we can hit EOF before reading all bytes of the mapping. Mirror the similar change to linux-user. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20240820050848.165253-3-richard.hender...@linaro.org> --- bsd-user/mmap

Re: [PULL 0/1] Migration patches for 2024-08-20

2024-08-20 Thread Richard Henderson
gitlab.com/farosas/qemu.git tags/migration-20240820-pull-request for you to fetch changes up to 4c107870e8b2ba3951ee0c46123f1c3b5d3a19d3: migration/multifd: FreeMultiFDRecvParams::data (2024-08-20 12:44:13 -0300) Migration pu

Re: [PATCH for-9.1] hw/loongarch: Fix length for lowram in ACPI SRAT

2024-08-20 Thread maobibo
gap, i, MEM_AFFINITY_ENABLED); len -= gap; base = VIRT_HIGHMEM_BASE; gap = machine->ram_size - VIRT_LOWMEM_SIZE; --- base-commit: 075fd020afe3150a0e6c4b049705b358b597b65a change-id: 20240820-fix-numa-range-f1f0302e138d Best regards, Thanks for catching this. Reviewed-by: Bibo Mao

Re: [PATCH v2 11/12] hw/i386/xen: Add a Xen PVH x86 machine

2024-08-20 Thread Stefano Stabellini
On Tue, 20 Aug 2024, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Add a Xen PVH x86 machine based on the abstract PVH Machine. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini > --- > hw/i386/xen/meson.build | 1 + > hw/i386/xen/xen-pvh.c | 121

Re: [PATCH v2 10/12] hw/xen: pvh-common: Add support for creating PCIe/GPEX

2024-08-20 Thread Stefano Stabellini
On Tue, 20 Aug 2024, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Add support for optionally creating a PCIe/GPEX controller. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini > --- > hw/xen/xen-pvh-common.c | 76 + > i

Re: [PATCH v2 07/12] hw/arm: xenpvh: Break out a common PVH machine

2024-08-20 Thread Stefano Stabellini
On Tue, 20 Aug 2024, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Break out a common Xen PVH machine in preparation for > adding a x86 Xen PVH machine. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini > --- > hw/arm/trace-events | 5 - > hw/arm

Re: [PATCH v2 06/12] hw/arm: xenpvh: Move stubbed functions to xen-stubs.c

2024-08-20 Thread Stefano Stabellini
On Tue, 20 Aug 2024, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini > --- > hw/arm/meson.build | 5 - > hw/arm/xen-stubs.c | 32 > hw/arm/xen_arm.c | 20 >

Re: [PATCH v2 05/12] hw/arm: xenpvh: Remove double-negation in warning

2024-08-20 Thread Stefano Stabellini
On Tue, 20 Aug 2024, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini > --- > hw/arm/xen_arm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c > index fda65

Re: [PATCH v2 04/12] hw/arm: xenpvh: Add support for SMP guests

2024-08-20 Thread Stefano Stabellini
On Tue, 20 Aug 2024, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Add SMP support for Xen PVH ARM guests. > Create ms->smp.max_cpus ioreq servers to handle hotplug. > > Note that ms->smp.max_cpus will be passed to us by the > user (Xen tools) set to the guests maxvcpus. > > The valu

RE: [PATCH] scripts/coccinelle: New range.cocci

2024-08-20 Thread Xingtao Yao (Fujitsu)
> -Original Message- > From: Peter Maydell > Sent: Tuesday, August 20, 2024 4:41 PM > To: Yao, Xingtao/姚 幸涛 > Cc: qemu-devel@nongnu.org > Subject: Re: [PATCH] scripts/coccinelle: New range.cocci > > On Thu, 25 Jul 2024 at 06:55, Yao Xingtao via wrote: > > > > This is the semantic patc

Re: [RFC PATCH] accel/tcg: clear all TBs from a page when it is written to

2024-08-20 Thread Richard Henderson
On 8/14/24 16:09, Nicholas Piggin wrote: @@ -1107,6 +1107,9 @@ tb_invalidate_phys_page_range__locked(struct page_collection *pages, TranslationBlock *current_tb = retaddr ? tcg_tb_lookup(retaddr) : NULL; #endif /* TARGET_HAS_PRECISE_SMC */ +start &= TARGET_PAGE_MASK; +last

Re: [PULL 0/3] virtio: regression fixes

2024-08-20 Thread Richard Henderson
On 8/20/24 21:01, Michael S. Tsirkin wrote: The following changes since commit 76277cf82f0e1123bd69ec59d22014b8f78485ec: Merge tag 'hw-misc-20240820' ofhttps://github.com/philmd/qemu into staging (2024-08-20 09:17:41 +1000) are available in the Git repository at: https://git.

Re: [PULL 18/20] hw/i386/pc: Unify vmport=auto handling

2024-08-20 Thread Richard Henderson
On 8/21/24 06:32, Kamil Szczęk wrote: Also, just as a test I added a single line of code before the assert: pcms->vmport = -1; And, to my surprise, it compiled successfully without any warning and as expected, aborted on the assert: qemu-system-x86_64: ../hw/i386/pc.c:1225: pc_basic_device_in

Re: [PATCH v5 11/15] target/riscv: mmu changes for zicfiss shadow stack protection

2024-08-20 Thread Richard Henderson
On 8/21/24 04:55, Deepak Gupta wrote: Something on the below lines? I've one question as well for you in comment. diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index fee31b8037..b4e04fe849 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -46,8 +46,14 @@ typedef struct CPUA

Re: [PATCH for-9.2 v3 0/6] target/sparc: emulate floating point queue when raising fp traps -- CORRECTION

2024-08-20 Thread Richard Henderson
On 8/21/24 02:59, Carl Hauser wrote: Do you want me to submit a patch set fixing this or will you? I will. r~

Re: [PATCH v5 11/15] target/riscv: mmu changes for zicfiss shadow stack protection

2024-08-20 Thread Deepak Gupta
On Tue, Aug 20, 2024 at 11:55 AM Deepak Gupta wrote: > > On Tue, Aug 20, 2024 at 07:20:48PM +1000, Richard Henderson wrote: > >On 8/20/24 17:35, Deepak Gupta wrote: > >>>+/* If shadow stack instruction initiated this access, treat it as > >>>store */ > >>>+if (mmu_idx & MMU_IDX_SS_WRITE)

Re: [PATCH v5 11/15] target/riscv: mmu changes for zicfiss shadow stack protection

2024-08-20 Thread Deepak Gupta
On Tue, Aug 20, 2024 at 07:20:48PM +1000, Richard Henderson wrote: On 8/20/24 17:35, Deepak Gupta wrote: +    /* If shadow stack instruction initiated this access, treat it as store */ +    if (mmu_idx & MMU_IDX_SS_WRITE) { +    access_type = MMU_DATA_STORE; +    } + I think I forgot to ad

[PATCH for-9.1] hw/loongarch: Fix length for lowram in ACPI SRAT

2024-08-20 Thread Jiaxun Yang
base = VIRT_HIGHMEM_BASE; gap = machine->ram_size - VIRT_LOWMEM_SIZE; --- base-commit: 075fd020afe3150a0e6c4b049705b358b597b65a change-id: 20240820-fix-numa-range-f1f0302e138d Best regards, -- Jiaxun Yang

RE: [PATCH RFC V3 11/29] arm/virt: Create GED dev before *disabled* CPU Objs are destroyed

2024-08-20 Thread Salil Mehta via
Hi Gavin, > From: Gavin Shan > Sent: Tuesday, August 20, 2024 1:22 AM > To: Salil Mehta ; qemu-devel@nongnu.org; > qemu-...@nongnu.org; m...@redhat.com > > Hi Salil, > > On 8/19/24 10:10 PM, Salil Mehta wrote: > >> From: Gavin Shan > >> Sent: Tuesday, August 13, 2024 2:05 AM > >

[PATCH v8 5/5] tests/migration: Add integration test for 'qatzip' compression method

2024-08-20 Thread Yichen Wang
From: Bryan Zhang Adds an integration test for 'qatzip'. Reviewed-by: Fabiano Rosas Signed-off-by: Bryan Zhang Signed-off-by: Hao Xiang Signed-off-by: Yichen Wang --- tests/qtest/migration-test.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/tests/qtest/mi

[PATCH v8 3/5] migration: Add migration parameters for QATzip

2024-08-20 Thread Yichen Wang
From: Bryan Zhang Adds support for migration parameters to control QATzip compression level and to enable/disable software fallback when QAT hardware is unavailable. This is a preparatory commit for a subsequent commit that will actually use QATzip compression. Acked-by: Markus Armbruster Signe

[PATCH v8 0/5] Implement QATzip compression method

2024-08-20 Thread Yichen Wang
v8: - Rebase changes on top of 2eefd4fcec4b8fe41ceee2a8f00cdec1fe81b75c; - Fix typo and grammars in documentation and comments; v7: - Rebase changes on top of 0173b97a219c63062972744682eba46c560fb7f3 - Added QAT memory requirement introduction in documentations; - Change the configuration options

[PATCH v8 4/5] migration: Introduce 'qatzip' compression method

2024-08-20 Thread Yichen Wang
From: Bryan Zhang Adds support for 'qatzip' as an option for the multifd compression method parameter, and implements using QAT for 'qatzip' compression and decompression. Acked-by: Markus Armbruster Reviewed-by: Fabiano Rosas Signed-off-by: Bryan Zhang Signed-off-by: Hao Xiang Signed-off-by

[PATCH v8 2/5] meson: Introduce 'qatzip' feature to the build system

2024-08-20 Thread Yichen Wang
From: Bryan Zhang Add a 'qatzip' feature, which is automatically disabled, and which depends on the QATzip library if enabled. Reviewed-by: Fabiano Rosas Signed-off-by: Bryan Zhang Signed-off-by: Hao Xiang Signed-off-by: Yichen Wang --- meson.build | 10 ++ meson_o

[PATCH v8 1/5] docs/migration: add qatzip compression feature

2024-08-20 Thread Yichen Wang
From: Yuan Liu add Intel QATzip compression method introduction Reviewed-by: Nanhai Zou Reviewed-by: Peter Xu Signed-off-by: Yuan Liu Signed-off-by: Yichen Wang --- docs/devel/migration/features.rst | 1 + docs/devel/migration/qatzip-compression.rst | 165 2

[PULL 0/1] Migration patches for 2024-08-20

2024-08-20 Thread Fabiano Rosas
The following changes since commit 075fd020afe3150a0e6c4b049705b358b597b65a: Merge tag 'nvme-next-pull-request' of https://gitlab.com/birkelund/qemu into staging (2024-08-20 16:51:15 +1000) are available in the Git repository at: https://gitlab.com/farosas/qemu.git tags/migratio

[PULL 1/1] migration/multifd: Free MultiFDRecvParams::data

2024-08-20 Thread Fabiano Rosas
From: Peter Maydell In multifd_recv_setup() we allocate (among other things) * a MultiFDRecvData struct to multifd_recv_state::data * a MultiFDRecvData struct to each multfd_recv_state->params[i].data (Then during execution we might swap these pointers around.) But in multifd_recv_cleanup() w

[PATCH v2] .gitlab-ci.d/windows.yml: Disable the qtests in the MSYS2 job

2024-08-20 Thread Thomas Huth
The qtests are broken since a while in the MSYS2 job in the gitlab-CI, likely due to some changes in the MSYS2 environment. So far nobody has neither a clue what's going wrong here, nor an idea how to fix this (in fact most QEMU developers even don't have a Windows environment available for properl

Re: [PATCH for-9.2 v3 0/6] target/sparc: emulate floating point queue when raising fp traps -- CORRECTION

2024-08-20 Thread Carl Hauser
Do you want me to submit a patch set fixing this or will you? -- Carl On 8/18/24 19:42, Richard Henderson wrote: On 8/18/24 10:03, Carl Hauser wrote: I changed translate.c:4597 from return true; to return advance_pc(dc); and it work

Re: [PATCH] hw/char: suppress sunmouse events with no changes

2024-08-20 Thread Carl Hauser
Yes, just equality, no masking needed. Boneheaded. I think I could figure out how to do the state migration if that's the direction you want to go. I don't think I could do the migration to qemu_input_handler_register, especially as I would think that the keybo

RE: [PATCH RFC V3 17/29] arm/virt: Release objects for *disabled* possible vCPUs after init

2024-08-20 Thread Salil Mehta via
> From: Gavin Shan > Sent: Tuesday, August 20, 2024 1:06 AM > To: Salil Mehta ; qemu-devel@nongnu.org; > qemu-...@nongnu.org; m...@redhat.com > > Hi Salil, > > On 8/19/24 10:21 PM, Salil Mehta wrote: > >> From: Gavin Shan > >> Sent: Tuesday, August 13, 2024 2:17 AM > >> To: Sal

Re: [RFC V1 0/6] Live update: cpr-transfer

2024-08-20 Thread Steven Sistare
On 8/16/2024 2:34 PM, Steven Sistare wrote: On 8/16/2024 11:59 AM, Peter Xu wrote: On Fri, Aug 16, 2024 at 04:36:58PM +0100, Daniel P. Berrangé wrote: On Fri, Aug 16, 2024 at 11:23:01AM -0400, Peter Xu wrote: On Fri, Aug 16, 2024 at 11:13:36AM -0400, Steven Sistare wrote: On 8/15/2024 4:28 PM

Re: [PATCH V2 00/11] Live update: cpr-exec (reconnections)

2024-08-20 Thread Steven Sistare
On 8/13/2024 4:12 PM, Peter Xu wrote: On Wed, Aug 07, 2024 at 03:47:47PM -0400, Steven Sistare wrote: On 8/4/2024 12:10 PM, Peter Xu wrote: On Sat, Jul 20, 2024 at 05:26:07PM -0400, Steven Sistare wrote: On 7/18/2024 11:56 AM, Peter Xu wrote: [...] Lastly, there is no loss of connectivity to

Re: [PATCH] ppc: fixed incorrect name filed in vmstate_tlbemb_entry

2024-08-20 Thread Peter Maydell
On Tue, 20 Aug 2024 at 17:03, wrote: > > From: armanincredible > > Signed-off-by: armanincredible [cc'd the ppc maintainers and list] > --- > target/ppc/machine.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target/ppc/machine.c b/target/ppc/machine.c > index 731

[PATCH 0/1] hw/nvme: add atomic write support

2024-08-20 Thread Alan Adamson
Since there is work in the Linux NVMe Driver community to add Atomic Write support, it would be desirable to be able to test it with qemu nvme emulation. This patch will focus on supporting NVMe controller atomic write parameters (AWUN and AWUPF) but can be extended to support Namespace paramete

[PATCH 1/1] hw/nvme: add atomic write support

2024-08-20 Thread Alan Adamson
Adds support for the controller atomic parameters: AWUN and AWUPF. Atomic Compare and Write Unit (ACWU) is not currently supported. Writes that adhere to the ACWU and AWUPF parameters are guaranteed to be atomic. New NVMe QEMU Parameters (See NVMe Specification for details): atomic.dn (def

Re: [PATCH for-9.1] target/i386: Fix tss access size in switch_tss_ra

2024-08-20 Thread Pierrick Bouvier
On 8/19/24 00:40, Richard Henderson wrote: The two limit_max variables represent size - 1, just like the encoding in the GDT, thus the 'old' access was off by one. Access the minimal size of the new tss: the complete tss contains the iopb, which may be a larger block than the access api expects,

[PATCH] ppc: fixed incorrect name filed in vmstate_tlbemb_entry

2024-08-20 Thread nabiev . arman13
From: armanincredible Signed-off-by: armanincredible --- target/ppc/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ppc/machine.c b/target/ppc/machine.c index 731dd8df35..d433fd45fc 100644 --- a/target/ppc/machine.c +++ b/target/ppc/machine.c @@ -621,7 +621,

Re: [PATCH for-9.1] target/i386: Fix tss access size in switch_tss_ra

2024-08-20 Thread Peter Maydell
On Mon, 19 Aug 2024 at 08:42, Richard Henderson wrote: > > The two limit_max variables represent size - 1, just like the > encoding in the GDT, thus the 'old' access was off by one. > Access the minimal size of the new tss: the complete tss contains > the iopb, which may be a larger block than the

Re: [PATCH for-9.1?] migration/multifd: Free MultiFDRecvParams::data

2024-08-20 Thread Fabiano Rosas
Peter Maydell writes: > In multifd_recv_setup() we allocate (among other things) > * a MultiFDRecvData struct to multifd_recv_state::data > * a MultiFDRecvData struct to each multfd_recv_state->params[i].data > > (Then during execution we might swap these pointers around.) > > But in multifd_re

RE: [PATCH RFC V3 24/29] target/arm: Add support of *unrealize* ARMCPU during vCPU Hot-unplug

2024-08-20 Thread Salil Mehta via
HI Peter, > From: Peter Maydell > Sent: Monday, August 19, 2024 2:47 PM > To: Salil Mehta > > On Mon, 19 Aug 2024 at 13:58, Salil Mehta > wrote: > > > > Hi Peter, > > > > > From: Peter Maydell > > > > > > We shouldn't need to explicitly call cpu_address_space_destroy() > > > fr

Re: [PATCH for-9.2 v6 08/12] hw/riscv/riscv-iommu: add Address Translation Cache (IOATC)

2024-08-20 Thread Jason Chien
Hi Daniel, On 2024/8/1 下午 11:43, Daniel Henrique Barboza wrote: From: Tomasz Jeznach The RISC-V IOMMU spec predicts that the IOMMU can use translation caches to hold entries from the DDT. This includes implementation for all cache commands that are marked as 'not implemented'. There are some

Re: [PATCH for-9.2 v6 03/12] hw/riscv: add RISC-V IOMMU base emulation

2024-08-20 Thread Jason Chien
Hi Daniel, On 2024/8/1 下午 11:43, Daniel Henrique Barboza wrote: From: Tomasz Jeznach The RISC-V IOMMU specification is now ratified as-per the RISC-V international process. The latest frozen specifcation can be found at: https://github.com/riscv-non-isa/riscv-iommu/releases/download/v1.0/risc

[PATCH for-9.2 6/9] tests/unit/crypto-tls-x509-helpers: deinit privkey in test_tls_cleanup

2024-08-20 Thread Peter Maydell
We create a gnutls_x509_privkey_t in test_tls_init(), but forget to deinit it in test_tls_cleanup(), resulting in leaks reported in hte migration test such as: Indirect leak of 8 byte(s) in 1 object(s) allocated from: #0 0x55fa6d11c12e in malloc (/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/bui

[PATCH for-9.2 3/9] tests/qtest/migration-test: Fix leaks in calc_dirtyrate_ready()

2024-08-20 Thread Peter Maydell
In calc_dirtyrate_ready() we g_strdup() a string but then never free it: Direct leak of 19 byte(s) in 2 object(s) allocated from: #0 0x55ead613413e in malloc (/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/tests/qtest/migration-test+0x22f13e) (BuildId: e7cd5c37b2987a1af682b43ee5240b98

[PATCH for-9.2 5/9] tests/qtest/migration-test: Free QCRyptoTLSTestCertReq objects

2024-08-20 Thread Peter Maydell
In the migration test we create several TLS certificates with the TLS_* macros from crypto-tls-x509-helpers.h. These macros create both a QCryptoTLSCertReq object which must be deinitialized and also an on-disk certificate file. The migration test currently removes the on-disk file in test_migrate_

[PATCH for-9.2 4/9] tests/qtest/migration-helpers: Fix migrate_get_socket_address() leak

2024-08-20 Thread Peter Maydell
In migrate_get_socket_address() we leak the SocketAddressList: (cd build/asan && \ ASAN_OPTIONS="fast_unwind_on_malloc=0:strip_path_prefix=/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/../../" QTEST_QEMU_BINARY=./qemu-system-x86_64 \ ./tests/qtest/migration-test --tap -k -p /x86_64

[PATCH for-9.2 1/9] tests/qtest/migration-test: Fix bootfile cleanup handling

2024-08-20 Thread Peter Maydell
If you invoke the migration-test binary in such a way that it doesn't run any tests, then we never call bootfile_create(), and at the end of main() bootfile_delete() will try to unlink(NULL), which is not valid. This can happen if for instance you tell the test binary to run a subset of tests that

[PATCH for-9.2 9/9] tests/qtest/migration-test: Don't leak QTestState in test_multifd_tcp_cancel()

2024-08-20 Thread Peter Maydell
In test_multifd_tcp_cancel() we create three QEMU processes: 'from', 'to' and 'to2'. We clean up (via qtest_quit()) 'from' and 'to2' when we call test_migrate_end(), but never clean up 'to', which results in this leak: Direct leak of 336 byte(s) in 1 object(s) allocated from: #0 0x55e984fcd32

[PATCH for-9.2 2/9] tests/qtest/migration-test: Don't leak resp in multifd_mapped_ram_fdset_end()

2024-08-20 Thread Peter Maydell
In multifd_mapped_ram_fdset_end() we call qtest_qmp() but forgot to unref the response QDict we get back, which means it is leaked: Indirect leak of 4120 byte(s) in 1 object(s) allocated from: #0 0x55c0c095d318 in __interceptor_calloc (/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/tes

[PATCH for-9.2 8/9] tests/qtest/migration-test: Don't strdup in get_dirty_rate()

2024-08-20 Thread Peter Maydell
We g_strdup() the "status" string we get out of the qdict in get_dirty_rate(), but we never free it. Since we only use this string while the dictionary is still valid, we don't need to strdup at all; drop the unnecessary call to avoid this leak: Direct leak of 18 byte(s) in 2 object(s) allocated

[PATCH for-9.2 7/9] tests/qtest/migration-helpers: Don't dup argument to qdict_put_str()

2024-08-20 Thread Peter Maydell
In migrate_set_ports() we call qdict_put_str() with a value string which we g_strdup(). However qdict_put_str() takes a copy of the value string, it doesn't take ownership of it, so the g_strdup() only results in a leak: Direct leak of 6 byte(s) in 1 object(s) allocated from: #0 0x56298023713e

[PATCH for-9.2 0/9] tests/qtest/migration-test: Fix various leaks

2024-08-20 Thread Peter Maydell
This patchset fixes various leaks that show up if you run migration-test under the clang leak-sanitizer. Since they're all test code problems, this is 9.2 material. The one leak that was really in the QEMU code I have sent a separate patch for: https://patchew.org/QEMU/20240820144429.320176-1-peter

[PATCH for-9.1?] migration/multifd: Free MultiFDRecvParams::data

2024-08-20 Thread Peter Maydell
In multifd_recv_setup() we allocate (among other things) * a MultiFDRecvData struct to multifd_recv_state::data * a MultiFDRecvData struct to each multfd_recv_state->params[i].data (Then during execution we might swap these pointers around.) But in multifd_recv_cleanup() we free multifd_recv_st

[PATCH v2 11/12] hw/i386/xen: Add a Xen PVH x86 machine

2024-08-20 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add a Xen PVH x86 machine based on the abstract PVH Machine. Signed-off-by: Edgar E. Iglesias --- hw/i386/xen/meson.build | 1 + hw/i386/xen/xen-pvh.c | 121 2 files changed, 122 insertions(+) create mode 100644 hw/i386/xe

[PATCH v2 03/12] hw/arm: xenpvh: Tweak machine description

2024-08-20 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Tweak machine description to better express that this is a Xen PVH machine for ARM. Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini --- hw/arm/xen_arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/xen_arm.c b/hw/arm/xen

[PATCH v2 02/12] hw/arm: xenpvh: Update file header to use SPDX

2024-08-20 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Update file header to use SPDX and remove stray empty comment line. No functional changes. Signed-off-by: Edgar E. Iglesias Acked-by: Stefano Stabellini --- hw/arm/xen_arm.c | 19 +-- 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/hw/a

[PATCH v2 08/12] hw/arm: xenpvh: Rename xen_arm.c -> xen-pvh.c

2024-08-20 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Rename xen_arm.c -> xen-pvh.c to better express that this is a PVH machine and to align with x86 HVM and future PVH machine filenames: hw/i386/xen/xen-hvm.c hw/i386/xen/xen-pvh.c (in preparation) No functional changes. Signed-off-by: Edgar E. Iglesias Reviewed-by: Ste

[PATCH v2 06/12] hw/arm: xenpvh: Move stubbed functions to xen-stubs.c

2024-08-20 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- hw/arm/meson.build | 5 - hw/arm/xen-stubs.c | 32 hw/arm/xen_arm.c | 20 3 files changed, 36 insertions(+), 21 deletions(-) create mode 100644 hw/arm/xen-stubs.c diff -

[PATCH v2 10/12] hw/xen: pvh-common: Add support for creating PCIe/GPEX

2024-08-20 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add support for optionally creating a PCIe/GPEX controller. Signed-off-by: Edgar E. Iglesias --- hw/xen/xen-pvh-common.c | 76 + include/hw/xen/xen-pvh-common.h | 29 + 2 files changed, 105 insertions(+) diff --git

[PATCH v2 07/12] hw/arm: xenpvh: Break out a common PVH machine

2024-08-20 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Break out a common Xen PVH machine in preparation for adding a x86 Xen PVH machine. Signed-off-by: Edgar E. Iglesias --- hw/arm/trace-events | 5 - hw/arm/xen_arm.c| 198 +++ hw/xen/meson.build | 1 + hw

[PATCH v2 01/12] MAINTAINERS: Add docs/system/arm/xenpvh.rst

2024-08-20 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias Acked-by: Stefano Stabellini --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 3584d6a6c6..c2fb0c2f42 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -559,6 +559,7 @@ F: include/hw/xen/

[PATCH v2 12/12] docs/system/i386: xenpvh: Add a basic description

2024-08-20 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini --- MAINTAINERS | 1 + docs/system/i386/xenpvh.rst | 49 + docs/system/target-i386.rst | 1 + 3 files changed, 51 insertions(+) create mode 100644 d

[PATCH v2 09/12] hw/arm: xenpvh: Reverse virtio-mmio creation order

2024-08-20 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" We've been creating the virtio-mmio devices in forwards order but since the qbus lists prepend (rather than append) entries, the virtio busses end up with decreasing base address order. Xen enables virtio-mmio nodes in forwards order so there's been a missmatch. So far,

[PATCH v2 04/12] hw/arm: xenpvh: Add support for SMP guests

2024-08-20 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add SMP support for Xen PVH ARM guests. Create ms->smp.max_cpus ioreq servers to handle hotplug. Note that ms->smp.max_cpus will be passed to us by the user (Xen tools) set to the guests maxvcpus. The value in mc->max_cpus is an absolute maximum for the -smp option and

[PATCH v2 05/12] hw/arm: xenpvh: Remove double-negation in warning

2024-08-20 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- hw/arm/xen_arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c index fda65d0d8d..16b3f00992 100644 --- a/hw/arm/xen_arm.c +++ b/hw/arm/xen_arm.c @@ -165,7 +165,7 @@ static vo

[PATCH v2 00/12] xen: pvh: Partial QOM:fication with new x86 PVH machine

2024-08-20 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" This series breaks out parts of the ARM PVH support into an abstract machine that other targets can reuse.. There's a bit of refactoring and some bug-fixes along the way. Finally we add a new x86 xen-pvh machine. The corresponding changes in Xen for PVH x86 are work in

Re: [PATCH v1 04/10] hw/arm: xenpvh: Add support for SMP guests

2024-08-20 Thread Edgar E. Iglesias
On Sat, Aug 17, 2024 at 2:45 AM Jason Andryuk wrote: > On 2024-08-16 12:53, Stefano Stabellini wrote: > > On Fri, 16 Aug 2024, Edgar E. Iglesias wrote: > >> On Thu, Aug 15, 2024 at 2:30 AM Stefano Stabellini < > sstabell...@kernel.org> wrote: > >>On Wed, 14 Aug 2024, Edgar E. Iglesias wro

Re: [PATCH] hvf: arm: Allow creating VMs with > 63GB of RAM on macOS 15+

2024-08-20 Thread Peter Maydell
On Sat, 17 Aug 2024 at 01:37, Danny Canter wrote: > > Peter, thought I’d send this little snippet before getting the rest of V2 > done in case anyone hates this :). I tried to take a similar approach to > kvm_type, > but I’m not sure if this will be looked upon favorably so want an early > opin

[PATCH] vnc: fix crash when no console attached

2024-08-20 Thread marcandre . lureau
From: Marc-André Lureau Since commit e99441a3793b5 ("ui/curses: Do not use console_select()") qemu_text_console_put_keysym() no longer checks for NULL console argument, which leads to a later crash: Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault. 0x559ee186 in qem

RE: [PATCH v3 2/3] hw/acpi: Upgrade ACPI SPCR table to support SPCR table version 4 format

2024-08-20 Thread JeeHeng Sia
> -Original Message- > From: Sunil V L > Sent: Monday, August 19, 2024 12:10 PM > To: JeeHeng Sia > Cc: qemu-...@nongnu.org; qemu-devel@nongnu.org; qemu-ri...@nongnu.org; > m...@redhat.com; imamm...@redhat.com; > anisi...@redhat.com; peter.mayd...@linaro.org; shannon.zha...@gmail.com;

RE: KVM Community Call (20/8/24) agenda items?

2024-08-20 Thread Brian Cain
> -Original Message- > From: Alex Bennée > Sent: Tuesday, August 20, 2024 5:59 AM > To: QEMU Developers > Cc: Alessandro Di Federico ; Alistair Francis > ; Anton Johansson ; Markus > Armbruster ; Brian Cain ; Daniel P. > Berrange ; Chao Peng ; > c...@nvidia.com; Cédric Le Goater ; c...@

Re: [PATCH v2 2/4] reset: Add RESET_TYPE_WAKEUP

2024-08-20 Thread David Hildenbrand
On 20.08.24 13:56, Peter Maydell wrote: On Tue, 20 Aug 2024 at 12:40, David Hildenbrand wrote: On 14.08.24 14:32, Juraj Marcin wrote: On Tue, Aug 13, 2024 at 6:37 PM Peter Maydell wrote: On Tue, 13 Aug 2024 at 16:39, Juraj Marcin wrote: Some devices need to distinguish cold start reset

Re: [PATCH v2 2/4] reset: Add RESET_TYPE_WAKEUP

2024-08-20 Thread Peter Maydell
On Tue, 20 Aug 2024 at 12:40, David Hildenbrand wrote: > > On 14.08.24 14:32, Juraj Marcin wrote: > > On Tue, Aug 13, 2024 at 6:37 PM Peter Maydell > > wrote: > >> > >> On Tue, 13 Aug 2024 at 16:39, Juraj Marcin wrote: > >>> > >>> Some devices need to distinguish cold start reset from waking up

[PATCH V2 1/1] virtio-pci: Add lookup subregion of VirtIOPCIRegion MR

2024-08-20 Thread Gao Shiyuan via
When VHOST_USER_PROTOCOL_F_HOST_NOTIFIER feature negotiated and virtio_queue_set_host_notifier_mr success on system blk device's queue, the VM can't load MBR if the notify region's address above 4GB. Assign the address of notify region in the modern bar above 4G, the vp_notify in SeaBIOS will use

Re: [PATCH v2 2/4] reset: Add RESET_TYPE_WAKEUP

2024-08-20 Thread David Hildenbrand
On 14.08.24 14:32, Juraj Marcin wrote: On Tue, Aug 13, 2024 at 6:37 PM Peter Maydell wrote: On Tue, 13 Aug 2024 at 16:39, Juraj Marcin wrote: Some devices need to distinguish cold start reset from waking up from a suspended state. This patch adds new value to the enum, and updates the i386

Re: [PATCH] target/arm/helper: Fix timer interrupt masking when HCR_EL2.E2H == 0

2024-08-20 Thread Florian Lugou
> > $ aarch64-none-elf-gcc -ffreestanding -nostdlib -T > > qemu/tests/tcg/aarch64/system/kernel.ld -o test test.S > > > > $ qemu-system-aarch64 \ > > -machine virt,secure=on,gic-version=3 \ > > -cpu cortex-a57 \ > > -kernel test \ > > -display none \ > > -se

Re: [PULL for-9.1 0/1] hw/nvme late fix

2024-08-20 Thread Richard Henderson
On 8/20/24 14:45, Klaus Jensen wrote: From: Klaus Jensen Hi, The following changes since commit 48e4ba59a3756aad743982da16bf9b5120d91a0c: Merge tag 'pull-riscv-to-apply-20240819-1' ofhttps://github.com/alistair23/qemu into staging (2024-08-19 14:55:23 +1000) are available in the Git repos

[PULL 1/3] vhost: Add VIRTIO_NET_F_RSC_EXT to vhost feature bits

2024-08-20 Thread Michael S. Tsirkin
From: Akihiko Odaki VIRTIO_NET_F_RSC_EXT is implemented in the rx data path, which vhost implements, so vhost needs to support the feature if it is ever to be enabled with vhost. The feature must be disabled otherwise. Fixes: 2974e916df87 ("virtio-net: support RSC v4/v6 tcp traffic for Windows

[PULL 2/3] hw/audio/virtio-snd: fix invalid param check

2024-08-20 Thread Michael S. Tsirkin
From: Volker Rümelin Commit 9b6083465f ("virtio-snd: check for invalid param shift operands") tries to prevent invalid parameters specified by the guest. However, the code is not correct. Change the code so that the parameters format and rate, which are a bit numbers, are compared with the bit s

[PULL 3/3] virtio-pci: Fix the use of an uninitialized irqfd

2024-08-20 Thread Michael S. Tsirkin
From: Cindy Lu The crash was reported in MAC OS and NixOS, here is the link for this bug https://gitlab.com/qemu-project/qemu/-/issues/2334 https://gitlab.com/qemu-project/qemu/-/issues/2321 In this bug, they are using the virtio_input device. The guest notifier was not supported for this device

[PULL 0/3] virtio: regression fixes

2024-08-20 Thread Michael S. Tsirkin
The following changes since commit 76277cf82f0e1123bd69ec59d22014b8f78485ec: Merge tag 'hw-misc-20240820' of https://github.com/philmd/qemu into staging (2024-08-20 09:17:41 +1000) are available in the Git repository at: https://git.kernel.org/pub/scm/virt/kvm/mst/qem

KVM Community Call (20/8/24) agenda items?

2024-08-20 Thread Alex Bennée
Hi, The KVM/QEMU community call is at: https://meet.jit.si/kvmcallmeeting @ 20/08/2024 14:00 UTC Are there any agenda items for the sync-up? -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v2] hw/virtio/vdpa-dev: Check returned value instead of dereferencing @errp

2024-08-20 Thread Michael S. Tsirkin
On Wed, Jul 17, 2024 at 12:26:15AM +0800, Zhao Liu wrote: > As the comment in qapi/error, dereferencing @errp requires > ERRP_GUARD(): > > * = Why, when and how to use ERRP_GUARD() = > * > * Without ERRP_GUARD(), use of the @errp parameter is restricted: > * - It must not be dereferenced, because

Re: [PATCH v16 00/13] Support blob memory and venus on qemu

2024-08-20 Thread Alex Bennée
Dmitry Osipenko writes: > Hello, > > This series enables Vulkan Venus context support on virtio-gpu. > > All virglrender and almost all Linux kernel prerequisite changes > needed by Venus are already in upstream. For kernel there is a pending > KVM patchset that fixes mapping of compound pages ne

Re: [PULL for-9.1 1/1] hw/nvme: fix leak of uninitialized memory in io_mgmt_recv

2024-08-20 Thread Klaus Jensen
On Aug 20 12:30, Philippe Mathieu-Daudé wrote: > Hi Klaus, > > On 20/8/24 06:45, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Yutaro Shimizu from the Cyber Defense Institute discovered a bug in the > > NVMe emulation that leaks contents of an uninitialized heap buffer if > > subsystem and

  1   2   >