Re: [PATCH v6 07/60] kvm: Introduce kvm_arch_pre_create_vcpu()

2024-11-24 Thread Xiaoyao Li
On 11/13/2024 2:28 PM, Philippe Mathieu-Daudé wrote: Hi, On 5/11/24 06:23, Xiaoyao Li wrote: Introduce kvm_arch_pre_create_vcpu(), to perform arch-dependent work prior to create any vcpu. This is for i386 TDX because it needs call TDX_INIT_VM before creating any vcpu. Signed-off-by: Xiaoyao Li

Re: Supporting clang on windows

2024-11-24 Thread Thomas Huth
On 24/11/2024 21.23, Pierrick Bouvier wrote: On 11/24/24 04:10, Paolo Bonzini wrote: On 11/24/24 01:21, Pierrick Bouvier wrote: After thinking about it, a simple, exhaustive and reliable way to find this type information is the debug (dwarf) info. By compiling qemu binaries with --enable-debug,

Re: Supporting clang on windows

2024-11-24 Thread Paolo Bonzini
On Sun, Nov 24, 2024 at 9:23 PM Pierrick Bouvier wrote: > > This one unfortunately shows why the global change is wrong. The size > > of _GIOChannel must match between glib and QEMU, otherwise you have an > > ABI mismatch. > > In the codebase, we always use this type as an opaque type (through >

[PATCH] tests/functional/aarch64_virt: add test for FEAT_RME

2024-11-24 Thread Pierrick Bouvier
This boot an OP-TEE environment, and launch a nested guest VM inside it using the Realms feature. Signed-off-by: Pierrick Bouvier --- tests/functional/test_aarch64_virt.py | 62 +++ 1 file changed, 62 insertions(+) diff --git a/tests/functional/test_aarch64_virt.py b/te

Re: Supporting clang on windows

2024-11-24 Thread Thomas Huth
On 24/11/2024 13.28, Philippe Mathieu-Daudé wrote: On 24/11/24 01:21, Pierrick Bouvier wrote: Hi all, After thinking about it, a simple, exhaustive and reliable way to find this type information is the debug (dwarf) info. By compiling qemu binaries with --enable-debug, and extracting info us

[PULL 5/6] virtio-net: Initialize hash reporting values

2024-11-24 Thread Jason Wang
From: Akihiko Odaki The specification says hash_report should be set to VIRTIO_NET_HASH_REPORT_NONE if VIRTIO_NET_F_HASH_REPORT is negotiated but not configured with VIRTIO_NET_CTRL_MQ_RSS_CONFIG. However, virtio_net_receive_rcu() instead wrote out the content of the extra_hdr variable, which is

[PULL 6/6] virtio-net: Copy received header to buffer

2024-11-24 Thread Jason Wang
From: Akihiko Odaki receive_header() used to cast the const qualifier of the pointer to the received packet away to modify the header. Avoid this by copying the received header to buffer. Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- hw/net/virtio-net.c | 85 +

[PULL 4/6] virtio-net: Fix hash reporting when the queue changes

2024-11-24 Thread Jason Wang
From: Akihiko Odaki virtio_net_process_rss() fills the values used for hash reporting, but the values used to be thrown away with a recursive function call if the queue changes after RSS. Avoid the function call to keep the values. Fixes: a4c960eedcd2 ("virtio-net: Do not write hashes to peer bu

[PULL 0/6] Net patches

2024-11-24 Thread Jason Wang
The following changes since commit 6b99bb046dd36a6dd5525b8f88c2dcddae49222a: Merge tag 'pull-lu-20241122' of https://gitlab.com/rth7680/qemu into staging (2024-11-24 13:39:06 +) are available in the Git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for you t

[PULL 2/6] virtio-net: Fix size check in dhclient workaround

2024-11-24 Thread Jason Wang
From: Akihiko Odaki work_around_broken_dhclient() accesses IP and UDP headers to detect relevant packets and to calculate checksums, but it didn't check if the packet has size sufficient to accommodate them, causing out-of-bound access hazards. Fix this by correcting the size requirement. Fixes:

[PULL 1/6] net: checksum: Convert data to void *

2024-11-24 Thread Jason Wang
From: Akihiko Odaki Convert the data parameter of net_checksum_calculate() to void * to save unnecessary casts for callers. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jason Wang --- include/net/checksum.h | 2 +- net/checksum.c | 4 ++-- 2 files c

[PULL 3/6] virtio-net: Do not check for the queue before RSS

2024-11-24 Thread Jason Wang
From: Akihiko Odaki virtio_net_can_receive() checks if the queue is ready, but RSS will change the queue to use so, strictly speaking, we may still be able to receive the packet even if the queue initially provided is not ready. Perform RSS before virtio_net_can_receive() to cover such a case. F

Re: [PATCH for-10.0 1/9] target/riscv/tcg: hide warn for named feats when disabling via priv_ver

2024-11-24 Thread Alistair Francis
On Thu, Nov 14, 2024 at 3:20 AM Daniel Henrique Barboza wrote: > > Commit 68c9e54bea handled a situation where a warning was being shown > when using the 'sifive_e' cpu when disabling the named extension zic64b. > It makes little sense to show user warnings for named extensions that > users can't

Re: [PATCH v2 1/7] target/riscv: Remove obsolete pointer masking extension code.

2024-11-24 Thread Alistair Francis
On Thu, Nov 21, 2024 at 4:13 PM wrote: > > From: Alexey Baturo > > Zjpm extension is finally ratified. And it's much simplier compared to the > experimental one. > The newer version doesn't allow to specify custom mask or base for pointer > masking. > Instead it allows only certain options for

Re: [PATCH v2] vhost_net: fix assertion triggered by batch of host notifiers processing

2024-11-24 Thread Jason Wang
On Fri, Nov 15, 2024 at 4:03 PM Zuo boqun wrote: > > From: zuoboqun > > When the backend of vhost_net restarts during the vm is running, vhost_net > is stopped and started. The virtio_device_grab_ioeventfd() fucntion in > vhost_net_enable_notifiers() will result in a call to > virtio_bus_set_host

Re: [PATCH v4] hw/riscv: Add Microblaze V generic board

2024-11-24 Thread Alistair Francis
On Wed, Nov 20, 2024 at 12:50 AM Sai Pavan Boddu wrote: > > Add a basic board with interrupt controller (intc), timer, serial > (uartlite), small memory called LMB@0 (128kB) and DDR@0x8000 > (configured via command line eg. -m 2g). > This is basic configuration which matches HW generated out o

Re: [PATCH] system/physmem: Fix cpu_memory_rw_debug for armv7m MPU

2024-11-24 Thread xndcn
Got it, thanks. It seems like there is still a lot of work surrounding the API, so I create a issue to track it https://gitlab.com/qemu-project/qemu/-/issues/2697 On Mon, Nov 25, 2024 at 5:23 AM Richard Henderson wrote: > > On 11/23/24 22:30, xndcn wrote: > > Thanks. This patch at least guarantee

Re: [PATCH v4 1/6] hw/loongarch/virt: Add CPU topology support

2024-11-24 Thread bibo mao
On 2024/11/22 下午9:31, Igor Mammedov wrote: On Tue, 19 Nov 2024 16:01:37 +0800 bibo mao wrote: Hi Ignor, On 2024/11/19 上午12:10, Igor Mammedov wrote: On Tue, 12 Nov 2024 10:17:33 +0800 Bibo Mao wrote: Add topological relationships for Loongarch VCPU and initialize topology member vari

Re: [PATCH v4 6/6] hw/loongarch/virt: Enable cpu hotplug feature on virt machine

2024-11-24 Thread bibo mao
On 2024/11/22 下午9:50, Igor Mammedov wrote: On Tue, 19 Nov 2024 18:18:27 +0800 bibo mao wrote: On 2024/11/19 上午1:03, Igor Mammedov wrote: On Tue, 12 Nov 2024 10:17:38 +0800 Bibo Mao wrote: On virt machine, enable CPU hotplug feature has_hotpluggable_cpus. For hot-added CPUs, there is

Re: [PATCH v4 3/6] hw/loongarch/virt: Add generic function to init interrupt pin of CPU

2024-11-24 Thread bibo mao
On 2024/11/22 下午9:45, Igor Mammedov wrote: On Tue, 19 Nov 2024 18:02:54 +0800 bibo mao wrote: On 2024/11/19 上午12:43, Igor Mammedov wrote: On Tue, 12 Nov 2024 10:17:35 +0800 Bibo Mao wrote: Here generic function virt_init_cpu_irq() is added to init interrupt pin of CPU object, IPI and

Re: [PATCH v4 1/6] hw/loongarch/virt: Add CPU topology support

2024-11-24 Thread bibo mao
On 2024/11/22 下午9:31, Igor Mammedov wrote: On Tue, 19 Nov 2024 16:01:37 +0800 bibo mao wrote: Hi Ignor, On 2024/11/19 上午12:10, Igor Mammedov wrote: On Tue, 12 Nov 2024 10:17:33 +0800 Bibo Mao wrote: Add topological relationships for Loongarch VCPU and initialize topology member vari

Re: [PATCH 12/12] docs/system/arm/aspeed: add missing model supermicrox11spi-bmc

2024-11-24 Thread Andrew Jeffery
On Fri, 2024-11-22 at 14:50 -0800, Pierrick Bouvier wrote: > Signed-off-by: Pierrick Bouvier Reviewed-by: Andrew Jeffery

Re: [PATCH] system/physmem: Fix cpu_memory_rw_debug for armv7m MPU

2024-11-24 Thread Richard Henderson
On 11/23/24 22:30, xndcn wrote: Thanks. This patch at least guarantees normal read/write access to addresses with r/w flags, although there is still a risk of misidentifying accessible regions within continuous address spaces. Actually, initially I did write a patch with a modified page size as

Re: Supporting clang on windows

2024-11-24 Thread Pierrick Bouvier
On 11/24/24 04:28, Philippe Mathieu-Daudé wrote: On 24/11/24 01:21, Pierrick Bouvier wrote: Hi all, After thinking about it, a simple, exhaustive and reliable way to find this type information is the debug (dwarf) info. By compiling qemu binaries with --enable-debug, and extracting info usin

Re: Supporting clang on windows

2024-11-24 Thread Pierrick Bouvier
On 11/24/24 04:10, Paolo Bonzini wrote: On 11/24/24 01:21, Pierrick Bouvier wrote: After thinking about it, a simple, exhaustive and reliable way to find this type information is the debug (dwarf) info. By compiling qemu binaries with --enable-debug, and extracting info using llvm-dwarfdump plus

Re: [PATCH 5/6] 9pfs: fix 'Tgetattr' after unlink

2024-11-24 Thread Christian Schoenebeck
On Sunday, November 24, 2024 4:50:03 PM CET Christian Schoenebeck wrote: > With a valid file ID (FID) of an open file, it should be possible to send > a 'Tgettattr' 9p request and successfully receive a 'Rgetattr' response, > even if the file has been removed in the meantime. Currently this would >

Re: [PATCH 4/6] 9pfs: remove obsolete comment in v9fs_getattr()

2024-11-24 Thread Christian Schoenebeck
On Sunday, November 24, 2024 4:06:40 PM CET Christian Schoenebeck wrote: > The comment claims that we'd only support basic Tgetattr fields. This is > no longer true, so remove this comment. > > Signed-off-by: Christian Schoenebeck > --- Fixes: e06a765efbe3 ('hw/9pfs: Add st_gen support in getatt

Re: [PATCH 3/6] tests/9p: add missing Rgetattr response name

2024-11-24 Thread Christian Schoenebeck
On Sunday, November 24, 2024 3:49:55 PM CET Christian Schoenebeck wrote: > 'Tgetattr' 9p request and its 'Rgetattr' response types are already used > by test client, however this response type is yet missing in function > rmessage_name(), so add it. > > Signed-off-by: Christian Schoenebeck > ---

Re: [PATCH 2/6] tests/9p: fix Rreaddir response name

2024-11-24 Thread Christian Schoenebeck
On Sunday, November 24, 2024 2:34:31 PM CET Christian Schoenebeck wrote: > All 9p response types are prefixed with an "R", therefore fix > "READDIR" -> "RREADDIR" in function rmessage_name(). > > Signed-off-by: Christian Schoenebeck > --- Fixes: 4829469fd9ff ('tests/virtio-9p: added readdir test

Re: [PULL 0/2] linux-user patch queue

2024-11-24 Thread Peter Maydell
On Sat, 23 Nov 2024 at 15:08, Richard Henderson wrote: > > The following changes since commit 34754a3a627e1937be7f3daaa0c5e73d91c7d9b5: > > Update version for v9.2.0-rc1 release (2024-11-20 18:27:48 +) > > are available in the Git repository at: > > https://gitlab.com/rth7680/qemu.git tags

Re: Onboarding QEMU Firmware Configuration to other machines

2024-11-24 Thread Peter Maydell
On Sun, 24 Nov 2024 at 14:24, Anne Macedo wrote: > How should one port fw_cfg to other QEMU machines? > > Context: > > - I found a possible bug on the Debian builds for Raspberry Pi 4 that is > only triggered when I try to launch it on QEMU; > > - I wrote an issue on systemd (I thought it had so

[PATCH 6/6] tests/9p: also check 'Tgetattr' in 'use-after-unlink' test

2024-11-24 Thread Christian Schoenebeck
This verifies expected behaviour of previous bug fix patch. Signed-off-by: Christian Schoenebeck --- tests/qtest/virtio-9p-test.c | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/qtest/virtio-9p-test.c b/tests/qtest/virtio-9p-test.c index f6d7400a87..ab3a12c816 100644 --- a/tests/q

[PATCH 2/6] tests/9p: fix Rreaddir response name

2024-11-24 Thread Christian Schoenebeck
All 9p response types are prefixed with an "R", therefore fix "READDIR" -> "RREADDIR" in function rmessage_name(). Signed-off-by: Christian Schoenebeck --- tests/qtest/libqos/virtio-9p-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/libqos/virtio-9p-clien

[PATCH 0/6] 9pfs: fix fstat() after unlink() (with a Linux guest)

2024-11-24 Thread Christian Schoenebeck
This fixes an infamous, long standing bug: https://gitlab.com/qemu-project/qemu/-/issues/103 * Actual fix of this bug is patch 5. * Patches 1 and 6 add a test case to verify the expected behaviour. * The other patches (2, 3, 4) are basically just minor cleanup patches more or less (un)related

[PATCH 4/6] 9pfs: remove obsolete comment in v9fs_getattr()

2024-11-24 Thread Christian Schoenebeck
The comment claims that we'd only support basic Tgetattr fields. This is no longer true, so remove this comment. Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p.c | 4 1 file changed, 4 deletions(-) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 9a291d1b51..851e36b9a1 100644 --- a/hw/9

[PATCH 1/6] tests/9p: add 'use-after-unlink' test

2024-11-24 Thread Christian Schoenebeck
After removing a file from the file system, we should still be able to work with the file if we already had it open before removal. As a first step we verify that it is possible to write to an unlinked file, as this is what already works. This test is extended later on after having fixed other use

[PATCH 3/6] tests/9p: add missing Rgetattr response name

2024-11-24 Thread Christian Schoenebeck
'Tgetattr' 9p request and its 'Rgetattr' response types are already used by test client, however this response type is yet missing in function rmessage_name(), so add it. Signed-off-by: Christian Schoenebeck --- tests/qtest/libqos/virtio-9p-client.c | 1 + 1 file changed, 1 insertion(+) diff --

[PATCH 5/6] 9pfs: fix 'Tgetattr' after unlink

2024-11-24 Thread Christian Schoenebeck
With a valid file ID (FID) of an open file, it should be possible to send a 'Tgettattr' 9p request and successfully receive a 'Rgetattr' response, even if the file has been removed in the meantime. Currently this would fail with ENOENT. I.e. this fixes the following misbehaviour with a 9p Linux cl

Onboarding QEMU Firmware Configuration to other machines

2024-11-24 Thread Anne Macedo
Hello! How should one port fw_cfg to other QEMU machines? Context: - I found a possible bug on the Debian builds for Raspberry Pi 4 that is only triggered when I try to launch it on QEMU; - I wrote an issue on systemd (I thought it had something to do with logind) and they requested me to

Re: Supporting clang on windows

2024-11-24 Thread Philippe Mathieu-Daudé
On 24/11/24 01:21, Pierrick Bouvier wrote: Hi all, After thinking about it, a simple, exhaustive and reliable way to find this type information is the debug (dwarf) info. By compiling qemu binaries with --enable-debug, and extracting info using llvm-dwarfdump plus a custom filter [4], we can

Re: Supporting clang on windows

2024-11-24 Thread Paolo Bonzini
On 11/24/24 01:21, Pierrick Bouvier wrote: After thinking about it, a simple, exhaustive and reliable way to find this type information is the debug (dwarf) info. By compiling qemu binaries with --enable-debug, and extracting info using llvm-dwarfdump plus a custom filter [4], we can obtain a te