Re: [PATCH] vfio/igd: Check host PCI address when probing

2025-04-10 Thread Cédric Le Goater
+ Corvin On 4/9/25 19:18, Alex Williamson wrote: On Wed, 26 Mar 2025 01:22:39 +0800 Tomita Moeko wrote: So far, all Intel VGA adapters, including discrete GPUs like A770 and B580, were treated as IGD devices. While this had no functional impact, a error about "unsupported IGD device" will be

[PATCH] i386/cpu: Consolidate the helper to get Host's vendor

2025-04-10 Thread Zhao Liu
Extend host_cpu_vendor_fms() to help more cases to get Host's vendor information. Cc: Dongli Zhang Signed-off-by: Zhao Liu --- target/i386/host-cpu.c| 10 ++ target/i386/kvm/vmsr_energy.c | 3 +-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/target/i386/host-c

[PATCH v2 0/3] virtio-gpu: fix blob unmapping sequence

2025-04-10 Thread Manos Pitsidianakis
A hang was observed when running a small kernel that exercised VIRTIO GPU under TCG. This is an edge-case and won't happen under typical conditions. When unmapping a blob object, its MemoryRegion's freeing is deferred to the RCU thread. The hang's cause was determined to be a busy main loop no

Re: [PATCH 00/10] Enable QEMU to run on browsers

2025-04-10 Thread Kohei Tokunaga
Hi Stefan, > > This patch series enables QEMU's system emulator to run in a browser using > > Emscripten. > > It includes implementations and workarounds to address browser environment > > limitations, as shown in the following. > > I think it would be great to merge this even if there are limitat

Re: [PATCH] vfio/igd: Check host PCI address when probing

2025-04-10 Thread Alex Williamson
On Wed, 26 Mar 2025 01:22:39 +0800 Tomita Moeko wrote: > So far, all Intel VGA adapters, including discrete GPUs like A770 and > B580, were treated as IGD devices. While this had no functional impact, > a error about "unsupported IGD device" will be printed when passthrough > Intel discrete GPUs.

Re: [PATCH for-10.0] scsi-disk: Apply error policy for host_status errors again

2025-04-10 Thread Kevin Wolf
Am 10.04.2025 um 14:37 hat Michael Tokarev geschrieben: > 07.04.2025 18:59, Kevin Wolf пишет: > > Originally, all failed SG_IO requests called scsi_handle_rw_error() to > > apply the configured error policy. However, commit f3126d65, which was > > supposed to be a mere refactoring for scsi-disk.c,

Re: [PATCH for-10.0] scsi-disk: Apply error policy for host_status errors again

2025-04-10 Thread Paolo Bonzini
On 4/7/25 17:59, Kevin Wolf wrote: Originally, all failed SG_IO requests called scsi_handle_rw_error() to apply the configured error policy. However, commit f3126d65, which was supposed to be a mere refactoring for scsi-disk.c, broke this and accidentally completed the SCSI request without consid

Re: [RFC PATCH-for-8.0 09/10] hw/virtio: Extract vhost_user_ram_slots_max() to vhost-user-target.c

2025-04-10 Thread Pierrick Bouvier
On 4/10/25 05:14, Philippe Mathieu-Daudé wrote: Hi Pierrick, On 13/12/22 00:05, Philippe Mathieu-Daudé wrote: The current definition of VHOST_USER_MAX_RAM_SLOTS is target specific. By converting this definition to a runtime vhost_user_ram_slots_max() helper declared in a target specific unit, w

[PATCH v2 6/6] h264: new vnc option to configure h264 at server side

2025-04-10 Thread Dietmar Maurer
Values can be 'on', 'off', or a space sparated list of allowed gstreamer encoders. - on: automatically select the encoder - off: disbale h264 - encoder-list: select first available encoder from that list. Signed-off-by: Dietmar Maurer --- ui/vnc-enc-h264.c | 28 +--- ui/

Re: [PATCH] hw/ppc/spapr_hcall: Return host mitigation characteristics in KVM mode

2025-04-10 Thread Philippe Mathieu-Daudé
Hi Gautam, On 10/4/25 12:43, Gautam Menghani wrote: Currently, on a P10 KVM guest, the mitigations seen in the output of "lscpu" command are different from the host. The reason for this behaviour is that when the KVM guest makes the "h_get_cpu_characteristics" hcall, QEMU does not consider the d

Re: [PATCH 00/10] Enable QEMU to run on browsers

2025-04-10 Thread Kohei Tokunaga
Hi Philippe, > On 9/4/25 21:21, Stefan Hajnoczi wrote: > > On Mon, Apr 07, 2025 at 11:45:51PM +0900, Kohei Tokunaga wrote: > >> This patch series enables QEMU's system emulator to run in a browser using > >> Emscripten. > >> It includes implementations and workarounds to address browser environmen

Re: Note improvements to QAPI-generated manuals in ChangeLog/10.0?

2025-04-10 Thread Stefan Hajnoczi
On Thu, Apr 10, 2025 at 06:53:53AM +0200, Markus Armbruster wrote: > Stefan Hajnoczi writes: > > > On Wed, Apr 9, 2025 at 9:44 AM Markus Armbruster wrote: > >> > >> John improved looks and usabilibity of the QAPI-generated manuals quite > >> a bit. These are > >> > >> QEMU QMP Reference Man

[PATCH v4 2/4] hw/s390x: add Control-Program Identification to QOM

2025-04-10 Thread Shalini Chellathurai Saroja
Add Control-Program Identification data to the QEMU Object Model (QOM), along with the timestamp in which the data was received. Example: virsh # qemu-monitor-command vm --pretty '{ "execute": "qom-get", "arguments": { "path": "/machine/sclp/s390-sclp-event-facility/sclpcpi", "property": "control-

[PATCH v4 4/4] hw/s390x: compat handling for backward migration

2025-04-10 Thread Shalini Chellathurai Saroja
Add Control-Program Identification (CPI) device to QOM only when the virtual machine supports CPI. CPI is supported from "s390-ccw-virtio-10.0" machine and higher. Signed-off-by: Shalini Chellathurai Saroja --- hw/s390x/s390-virtio-ccw.c | 10 +- include/hw/s390x/s390-virtio-ccw.

[PATCH v4 1/4] hw/s390x: add SCLP event type CPI

2025-04-10 Thread Shalini Chellathurai Saroja
Implement the Service-Call Logical Processor (SCLP) event type Control-Program Identification (CPI) in QEMU. This event is used to send CPI identifiers from the guest to the host. The CPI identifiers are: system type, system name, system level and sysplex name. System type: operating system of the

Re: [PATCH 01/10] various: Fix type conflict of GLib function pointers

2025-04-10 Thread Paolo Bonzini
On 4/7/25 16:45, Kohei Tokunaga wrote: On emscripten, function pointer casts can cause function call failure. This commit fixes the function definition to match to the type of the function call. - qtest_set_command_cb passed to g_once should match to GThreadFunc Sending an alternative patch th

Re: [PATCH v3 0/3] Enable QEMU NVMe userspace driver on s390x

2025-04-10 Thread Farhan Ali
On 4/3/2025 2:24 PM, Alex Williamson wrote: On Thu, 3 Apr 2025 13:33:17 -0700 Farhan Ali wrote: On 4/3/2025 11:05 AM, Alex Williamson wrote: On Thu, 3 Apr 2025 10:33:52 -0700 Farhan Ali wrote: On 4/3/2025 9:27 AM, Alex Williamson wrote: On Thu, 3 Apr 2025 11:44:42 -0400 Stefan Hajnocz

Re: [PATCH 02/10] various: Define macros for dependencies on emscripten

2025-04-10 Thread Paolo Bonzini
On 4/7/25 16:45, Kohei Tokunaga wrote: +#ifdef EMSCRIPTEN +/* + * emscripten exposes copy_file_range declaration but doesn't provide the + * implementation in the final link. Define the stub here but avoid type + * conflict with the emscripten's header. + */ +ssize_t copy_file_range(int in_fd, of

[PATCH] tests/avocado: add memlock tests

2025-04-10 Thread Alexandr Moshkov
Add new tests to check the correctness of the `-overcommit memlock` option (possible values: off, on, on-fault) by using `/proc/{qemu_pid}/smaps` file to check in Size, Rss and Locked fields of anonymous segments: * if `memlock=off`, then Locked = 0 on every anonymous smaps; * if `memlock=on`, the

Re: [PATCH for-10.0] scsi-disk: Apply error policy for host_status errors again

2025-04-10 Thread Paolo Bonzini
On Thu, Apr 10, 2025 at 4:25 PM Paolo Bonzini wrote: > You should set ret = 0 here to avoid going down the > scsi_sense_from_errno() path. > > Otherwise, > > Reviewed-by: Paolo Bonzini Okay, going down the scsi_sense_from_errno() path is more or less harmless because status and sense end up unus

[PATCH v4 0/4] Add SCLP event type CPI

2025-04-10 Thread Shalini Chellathurai Saroja
Implement the Service-Call Logical Processor (SCLP) event type Control-Program Identification (CPI) in QEMU. Changed since v3: - Add QOM object sclpcpi from ccw_init() - Add SCLPEventCPI state to store the CPI data in the sclpcpi device - Other minor changes Changed since v2: - Add SPDX license t

[PATCH] scsi: add conversion from ENODEV to sense

2025-04-10 Thread Paolo Bonzini
This is mostly for completeness; I noticed it because ENODEV is used internally within scsi-disk.c, but when scsi_sense_from_errno(ENODEV) is called the resulting sense is never used and instead scsi_sense_from_host_status() is called later by scsi_req_complete_failed(). Signed-off-by: Paolo Bonz

Re: [PATCH 1/5] qapi/qom: Introduce kvm-pmu-filter object

2025-04-10 Thread Markus Armbruster
Zhao Liu writes: > Introduce the kvm-pmu-filter object and support the PMU event with raw > format. Remind me, what does the kvm-pmu-filter object do, and why would we want to use it? > The raw format, as a native PMU event code representation, can be used > for several architectures. > > Signe

[PATCH] hw/riscv: Fix type conflict of GLib function pointers

2025-04-10 Thread Paolo Bonzini
qtest_set_command_cb passed to g_once should match GThreadFunc, which it does not. But using g_once is actually unnecessary, because the function is called by riscv_harts_realize() under the Big QEMU Lock. Reported-by: Kohei Tokunaga Signed-off-by: Paolo Bonzini --- hw/riscv/riscv_hart.c | 7 +

Re: [PATCH] hw/riscv: Fix type conflict of GLib function pointers

2025-04-10 Thread Kohei Tokunaga
Hi Paolo, I appreciate you addressing this issue and submitting the fix. Reviewed-by: Kohei Tokunaga

Re: [PATCH] [for-10.1] qtest: introduce qtest_init_ext

2025-04-10 Thread Philippe Mathieu-Daudé
On 10/4/25 18:22, Vladimir Sementsov-Ogievskiy wrote: Merge qtest_init_with_env_and_capabilities() and qtest_init_with_env() into one qtest_init_ext(). Reasons: 1. qtest_init_with_env() is just wrong: it gets do_connect parameter but always pass true to qtest_init_with_env_and_capabilities(

Re: [PATCH] hw/riscv: Fix type conflict of GLib function pointers

2025-04-10 Thread Philippe Mathieu-Daudé
On 10/4/25 18:17, Paolo Bonzini wrote: qtest_set_command_cb passed to g_once should match GThreadFunc, which it does not. But using g_once is actually unnecessary, because the function is called by riscv_harts_realize() under the Big QEMU Lock. Reported-by: Kohei Tokunaga Signed-off-by: Paolo

[PATCH v2 0/6] Add VNC Open H.264 Encoding

2025-04-10 Thread Dietmar Maurer
As defined by: https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#open-h-264-encoding The noVNC HTML application recently added support for this encoding. There is also an open pull request to add audio support to noVNC: https://github.com/novnc/noVNC/pull/1952 With that in place, th

Re: [PATCH v2 2/3] virtio-gpu: fix hang under TCG when unmapping blob

2025-04-10 Thread Alex Bennée
Manos Pitsidianakis writes: > From: Manos Pitsidianakis > > This commit fixes an indefinite hang when using VIRTIO GPU blob objects > under TCG in certain conditions. > > The VIRTIO_GPU_CMD_RESOURCE_MAP_BLOB VIRTIO command creates a > MemoryRegion and attaches it to an offset on a PCI BAR of the

Re: [PATCH] target/i386: Reset parked vCPUs together with the online ones

2025-04-10 Thread Maciej S. Szmigiero
On 27.03.2025 19:24, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" Commit 3f2a05b31ee9 ("target/i386: Reset TSCs of parked vCPUs too on VM reset") introduced a way to reset TSCs of parked vCPUs during VM reset to prevent them getting desynchronized with the online vCPUs and therefore c

Re: [PATCH-for-10.1 v3 6/9] qtest/bios-tables-test: Whitelist aarch64/virt 'its_off' variant blobs

2025-04-10 Thread Gustavo Romero
Hi Igor, On 4/10/25 03:50, Igor Mammedov wrote: On Wed, 9 Apr 2025 12:49:36 -0300 Gustavo Romero wrote: Hi Igor, On 4/9/25 11:05, Igor Mammedov wrote: On Fri, 4 Apr 2025 00:01:22 -0300 Gustavo Romero wrote: Hi Phil, On 4/3/25 17:40, Philippe Mathieu-Daudé wrote: We are going to fix

[PATCH] [for-10.1] qtest: introduce qtest_init_ext

2025-04-10 Thread Vladimir Sementsov-Ogievskiy
Merge qtest_init_with_env_and_capabilities() and qtest_init_with_env() into one qtest_init_ext(). Reasons: 1. qtest_init_with_env() is just wrong: it gets do_connect parameter but always pass true to qtest_init_with_env_and_capabilities(). Happily, all qtest_init_with_env() callers pass tru

Re: [PATCH] [for-10.1] qtest: introduce qtest_init_ext

2025-04-10 Thread Vladimir Sementsov-Ogievskiy
On 10.04.25 19:22, Vladimir Sementsov-Ogievskiy wrote: Merge qtest_init_with_env_and_capabilities() and qtest_init_with_env() into one qtest_init_ext(). CC Steve -- Best regards, Vladimir

[PATCH v4 3/4] hw/s390x: support migration of CPI data

2025-04-10 Thread Shalini Chellathurai Saroja
Register Control-Program Identification data with the live migration infrastructure. Signed-off-by: Shalini Chellathurai Saroja Reviewed-by: Nina Schoetterl-Glausch --- hw/s390x/sclpcpi.c | 25 + 1 file changed, 25 insertions(+) diff --git a/hw/s390x/sclpcpi.c b/hw/s390

Re: [PATCH 08/10] hw/9pfs: Allow using hw/9pfs with emscripten

2025-04-10 Thread Paolo Bonzini
On 4/7/25 16:45, Kohei Tokunaga wrote: Emscripten's fiber does not support submitting coroutines to other threads. Does it work as long as the thread does not rewind? diff --git a/hw/9pfs/9p-util-stub.c b/hw/9pfs/9p-util-stub.c new file mode 100644 index 00..57c89902ab --- /dev/null

Re: [PATCH] target/i386: Reset parked vCPUs together with the online ones

2025-04-10 Thread Paolo Bonzini
On 4/10/25 17:57, Maciej S. Szmigiero wrote: On 27.03.2025 19:24, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" Commit 3f2a05b31ee9 ("target/i386: Reset TSCs of parked vCPUs too on VM reset") introduced a way to reset TSCs of parked vCPUs during VM reset to prevent them getting desync

Re: [PATCH] virtio: Call set_features during reset

2025-04-10 Thread Michael S. Tsirkin
On Thu, Apr 10, 2025 at 05:26:47PM +0900, Akihiko Odaki wrote: > On 2025/04/10 17:02, Michael S. Tsirkin wrote: > > On Thu, Apr 10, 2025 at 04:54:41PM +0900, Akihiko Odaki wrote: > > > On 2025/04/10 16:48, 'Michael S. Tsirkin' via devel wrote: > > > > On Thu, Apr 10, 2025 at 04:42:06PM +0900, Akihi

Re: [PATCH v3 10/10] target/i386/kvm: don't stop Intel PMU counters

2025-04-10 Thread Zhao Liu
On Sun, Mar 30, 2025 at 06:32:29PM -0700, Dongli Zhang wrote: > Date: Sun, 30 Mar 2025 18:32:29 -0700 > From: Dongli Zhang > Subject: [PATCH v3 10/10] target/i386/kvm: don't stop Intel PMU counters > X-Mailer: git-send-email 2.43.5 > > The kvm_put_msrs() sets the MSRs using KVM_SET_MSRS. The x86

Re: [PATCH] virtio: Call set_features during reset

2025-04-10 Thread Philippe Mathieu-Daudé
Hi Akihiko, On 10/4/25 09:42, Akihiko Odaki wrote: virtio-net expects set_features() will be called when the feature set used by the guest changes to update the number of virtqueues. Call it during reset as reset clears all features and the queues added for VIRTIO_NET_F_MQ or VIRTIO_NET_F_RSS wi

Re: [PATCH v3 2/4] hw/s390x: add Control-Program Identification to QOM

2025-04-10 Thread Shalini Chellathurai Saroja
On 2025-04-09 07:30, Thomas Huth wrote: On 03/04/2025 16.33, Shalini Chellathurai Saroja wrote: On 2025-04-01 15:55, Nina Schoetterl-Glausch wrote: On Mon, 2025-03-31 at 16:00 +0200, Shalini Chellathurai Saroja wrote: Add Control-Program Identification data to the QEMU Object Model (QOM), alon

[PATCH v2 2/6] add vnc h264 encoder

2025-04-10 Thread Dietmar Maurer
This patch implements H264 support for VNC. The RFB protocol extension is defined in: https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#open-h-264-encoding Currently the Gstreamer x264enc plugin (software encoder) is used to encode the video stream. The gstreamer pipe is: appsrc ->

[PATCH v2 4/6] h264: remove wrong libavcodec_ prefix from function names

2025-04-10 Thread Dietmar Maurer
Signed-off-by: Dietmar Maurer --- ui/vnc-enc-h264.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/ui/vnc-enc-h264.c b/ui/vnc-enc-h264.c index ca8e206335..9e01b8a548 100644 --- a/ui/vnc-enc-h264.c +++ b/ui/vnc-enc-h264.c @@ -3,7 +3,7 @@

[Bug 2072564] Re: qemu-aarch64-static segfaults running ldconfig.real (amd64 host)

2025-04-10 Thread Dimitry Andric
I've tested https://launchpad.net/ubuntu/+source/qemu/1:8.2.2+ds-0ubuntu1.7/+build/30620359/+files/qemu- user-static_8.2.2+ds-0ubuntu1.7_amd64.deb, and it solves the problem for me. With 8.2.2+ds-0ubuntu1.6, running a Docker container with Ubuntu 22.04, targeting arm64 on an amd64 host, and upgrad

Re: [PATCH v3 08/10] target/i386/kvm: reset AMD PMU registers during VM reset

2025-04-10 Thread Zhao Liu
... > TODO: > - This patch adds is_host_compat_vendor(), while there are something > like is_host_cpu_intel() from target/i386/kvm/vmsr_energy.c. A rework > may help move those helpers to target/i386/cpu*. vmsr_energy emulates RAPL in user space...but RAPL is not architectural (no CPUID

Re: [RFC PATCH-for-8.0 09/10] hw/virtio: Extract vhost_user_ram_slots_max() to vhost-user-target.c

2025-04-10 Thread Philippe Mathieu-Daudé
Hi Pierrick, On 13/12/22 00:05, Philippe Mathieu-Daudé wrote: The current definition of VHOST_USER_MAX_RAM_SLOTS is target specific. By converting this definition to a runtime vhost_user_ram_slots_max() helper declared in a target specific unit, we can have the rest of vhost-user.c target indepe

Re: [PATCH 00/10] Enable QEMU to run on browsers

2025-04-10 Thread Philippe Mathieu-Daudé
On 9/4/25 21:21, Stefan Hajnoczi wrote: On Mon, Apr 07, 2025 at 11:45:51PM +0900, Kohei Tokunaga wrote: This patch series enables QEMU's system emulator to run in a browser using Emscripten. It includes implementations and workarounds to address browser environment limitations, as shown in the f

Re: [PATCH v8 0/7] Allow to enable multifd and postcopy migration together

2025-04-10 Thread Prasad Pandit
Hello Fabiano, On Thu, 3 Apr 2025 at 18:41, Fabiano Rosas wrote: > Prasad Pandit writes: > > * Thank you for the reproducer and traces. I'll try to check more and > > see if I'm able to reproduce it on my side. > > Thanks. I cannot merge this series until that issue is resolved. If it > reproduc

Re: [PATCH 05/10] meson: Add wasm build in build scripts

2025-04-10 Thread Kohei Tokunaga
Hi Paolo, thank you for the comments. > >> has_int128_type is set to false on emscripten as of now to avoid errors by > >> libffi. > > What is the error here? How hard would it be to test for it? When has_int128_type=true, I encountered a runtime error from libffi. To reproduce this, we need to

Re: [RFC PATCH v2 0/5] virtio-balloon: Working Set Reporting

2025-04-10 Thread Michael S. Tsirkin
On Wed, Apr 09, 2025 at 09:52:12AM -0700, Yuanchu Xie wrote: > On Mon, Apr 7, 2025 at 2:39 AM Michael S. Tsirkin wrote: > > > > On Thu, May 25, 2023 at 10:20:11PM +, T.J. Alumbaugh wrote: > > > This is the device implementation for the proposed expanded balloon > > > feature > > > described h

Re: [PATCH v2] target/i386: Fix model number of Zhaoxin YongFeng vCPU template

2025-04-10 Thread Paolo Bonzini
On 4/7/25 04:07, Ewan Hai wrote: The model number was mistakenly set to 0x0b (11) in commit ff04bc1ac4. The correct value is 0x5b. This mistake occurred because the extended model bits in cpuid[eax=0x1].eax were overlooked, and only the base model was used. This patch corrects the model field.

[PATCH v2 1/3] hw/display: re-arrange memory region tracking

2025-04-10 Thread Manos Pitsidianakis
From: Alex Bennée QOM objects can be embedded in other QOM objects and managed as part of their lifetime but this isn't the case for virtio_gpu_virgl_hostmem_region. However before we can split it out we need some other way of associating the wider data structure with the memory region. Fortunat

Re: [PATCH 1/3] scripts: nixify archive-source.sh

2025-04-10 Thread Paolo Bonzini
On 4/8/25 22:14, Joel Granados wrote: Use "#!/usr/bin/env bash" instead of "#!/bin/bash". This is necessary for nix environments as they only provide /usr/bin/env at the standard location. I am confused, how does this not break everything else? All the test scripts in tests/docker/test-* have

Re: [PATCH for-10.0] scsi-disk: Apply error policy for host_status errors again

2025-04-10 Thread Michael Tokarev
07.04.2025 18:59, Kevin Wolf пишет: Originally, all failed SG_IO requests called scsi_handle_rw_error() to apply the configured error policy. However, commit f3126d65, which was supposed to be a mere refactoring for scsi-disk.c, broke this and accidentally completed the SCSI request without consi

[PATCH 1/2] hw/i386/amd_iommu: Fix device setup failure when PT is on.

2025-04-10 Thread Sairaj Kodilkar
Current amd_iommu enables the iommu_nodma address space when pt_supported flag is on. This causes device to bypass the IOMMU and use untranslated address to perform DMA when guest kernel uses DMA mode, resulting in failure to setup the devices in the guest. Fix the issue by removing pt_supported c

[PATCH 2/2] hw/i386/amd_iommu: Fix xtsup when vcpus < 255

2025-04-10 Thread Sairaj Kodilkar
From: Vasant Hegde If vCPUs > 255 then x86 common code (x86_cpus_init()) call kvm_enable_x2apic(). But if vCPUs <= 255 then it won't call kvm_enable_x2apic(). Booting guest in x2apic mode, amd-iommu,xtsup=on and <= 255 vCPUs is broken as it fails to call kvm_enable_x2apic(). Fix this by adding

[PATCH] virtio: Call set_features during reset

2025-04-10 Thread Akihiko Odaki
virtio-net expects set_features() will be called when the feature set used by the guest changes to update the number of virtqueues. Call it during reset as reset clears all features and the queues added for VIRTIO_NET_F_MQ or VIRTIO_NET_F_RSS will need to be removed. Fixes: f9d6dbf0bf6e ("virtio-n

Re: [PATCH] virtio: Call set_features during reset

2025-04-10 Thread Michael S. Tsirkin
On Thu, Apr 10, 2025 at 04:42:06PM +0900, Akihiko Odaki wrote: > virtio-net expects set_features() will be called when the feature set > used by the guest changes to update the number of virtqueues. Call it > during reset as reset clears all features and the queues added for > VIRTIO_NET_F_MQ or VI

Re: [PATCH] virtio: Call set_features during reset

2025-04-10 Thread Michael S. Tsirkin
On Thu, Apr 10, 2025 at 04:54:41PM +0900, Akihiko Odaki wrote: > On 2025/04/10 16:48, 'Michael S. Tsirkin' via devel wrote: > > On Thu, Apr 10, 2025 at 04:42:06PM +0900, Akihiko Odaki wrote: > > > virtio-net expects set_features() will be called when the feature set > > > used by the guest changes

Re: [PATCH 1/2] hw/i386/amd_iommu: Fix device setup failure when PT is on.

2025-04-10 Thread Vasant Hegde
+ Michael, On 4/10/2025 12:14 PM, Sairaj Kodilkar wrote: > Current amd_iommu enables the iommu_nodma address space when pt_supported > flag is on. This causes device to bypass the IOMMU and use untranslated > address to perform DMA when guest kernel uses DMA mode, resulting in > failure to setup

Re: [PATCH v3 09/10] target/i386/kvm: support perfmon-v2 for reset

2025-04-10 Thread Zhao Liu
On Sun, Mar 30, 2025 at 06:32:28PM -0700, Dongli Zhang wrote: > Date: Sun, 30 Mar 2025 18:32:28 -0700 > From: Dongli Zhang > Subject: [PATCH v3 09/10] target/i386/kvm: support perfmon-v2 for reset > X-Mailer: git-send-email 2.43.5 > > Since perfmon-v2, the AMD PMU supports additional registers. T

Re: [PATCH] virtio: Call set_features during reset

2025-04-10 Thread Akihiko Odaki
On 2025/04/10 17:02, Michael S. Tsirkin wrote: On Thu, Apr 10, 2025 at 04:54:41PM +0900, Akihiko Odaki wrote: On 2025/04/10 16:48, 'Michael S. Tsirkin' via devel wrote: On Thu, Apr 10, 2025 at 04:42:06PM +0900, Akihiko Odaki wrote: virtio-net expects set_features() will be called when the feat

[PATCH 2/3] add vnc h264 encoder

2025-04-10 Thread Dietmar Maurer
Signed-off-by: Dietmar Maurer --- ui/meson.build| 1 + ui/vnc-enc-h264.c | 269 ++ ui/vnc-jobs.c | 49 ++--- ui/vnc.c | 21 ui/vnc.h | 21 5 files changed, 346 insertions(+), 15 deletions(-) create mode 1006

[PATCH] hw/intc/loongarch_pch_msi: Remove gpio input handler

2025-04-10 Thread Bibo Mao
MSI interrupt is triggered by writing message on specified memory address. In generic it is used by PCI devices, and no device is connected pch MSI irqchip with GPIO pin line method, here remove gpio input setting for MSI controller. Signed-off-by: Bibo Mao --- hw/intc/loongarch_pch_msi.c | 9 --

Re: [PATCH v4 07/13] ram-block-attribute: Introduce RamBlockAttribute to manage RAMBLock with guest_memfd

2025-04-10 Thread Chenyi Qiang
On 4/9/2025 5:57 PM, Alexey Kardashevskiy wrote: > > > On 7/4/25 17:49, Chenyi Qiang wrote: >> Commit 852f0048f3 ("RAMBlock: make guest_memfd require uncoordinated >> discard") highlighted that subsystems like VFIO may disable RAM block >> discard. However, guest_memfd relies on discard operat

[PATCH v1 06/24] s390x/diag: Implement DIAG 320 subcode 1

2025-04-10 Thread Zhuoying Cai
DIAG 320 subcode 1 provides information needed to determine the amount of storage to store one or more certificates. The subcode value is denoted by setting the left-most bit of an 8-byte field. The verification-certificate-storage-size block (VCSSB) contains the output data when the operation co

[PATCH 00/10] Enable QEMU to run on browsers

2025-04-10 Thread Kohei Tokunaga
This patch series enables QEMU's system emulator to run in a browser using Emscripten. It includes implementations and workarounds to address browser environment limitations, as shown in the following. # New TCG Backend for Browsers A new TCG backend translates IR instructions into Wasm instructi

Re: [PATCH 03/13] hw/intc/aspeed: Add support for AST2700 SSP INTC

2025-04-10 Thread Cédric Le Goater
On 3/13/25 06:40, Steven Lee wrote: - Define new types for ast2700ssp INTC and INTCIO - Add register definitions for SSP INTC and INTCIO - Implement write handlers for SSP INTC and INTCIO - Register new types in aspeed_intc_register_types The design of the SSP INTC and INTCIO controllers is simi

[PATCH v1 01/24] Add -boot-certificates /path/dir:/path/file option in QEMU command line

2025-04-10 Thread Zhuoying Cai
The `-boot-certificates /path/dir:/path/file` option is implemented to provide path to either a directory or a single certificate. Multiple paths can be delineated using a colon. Signed-off-by: Zhuoying Cai --- qemu-options.hx | 11 +++ system/vl.c | 22 ++ 2 fil

[PATCH for-10.1 v5 07/13] arm/cpu: Store aa64smfr0 into the idregs array

2025-04-10 Thread Cornelia Huck
From: Eric Auger Reviewed-by: Richard Henderson Reviewed-by: Sebastian Ott Signed-off-by: Eric Auger Signed-off-by: Cornelia Huck --- target/arm/cpu-features.h | 6 +++--- target/arm/cpu.h | 1 - target/arm/cpu64.c| 7 ++- target/arm/helper.c | 2 +- target/arm/kvm

Re: [PATCH v8 08/55] i386/tdx: Initialize TDX before creating TD vcpus

2025-04-10 Thread Xiaoyao Li
On 4/2/2025 7:41 PM, Daniel P. Berrangé wrote: On Tue, Apr 01, 2025 at 09:01:18AM -0400, Xiaoyao Li wrote: Invoke KVM_TDX_INIT_VM in kvm_arch_pre_create_vcpu() that KVM_TDX_INIT_VM configures global TD configurations, e.g. the canonical CPUID config, and must be executed prior to creating vCPUs.

[PATCH v1 19/24] pc-bios/s390-ccw: Add additional security checks for secure boot

2025-04-10 Thread Zhuoying Cai
Add additional checks to ensure that components do not overlap with signed components when loaded into memory. Add additional checks to ensure the load addresses of unsigned components are greater than or equal to 0x2000. When the secure IPL code loading attributes facility (SCLAF) is installed,

[PATCH v3 5/5] target/hexagon: Remove unreachable

2025-04-10 Thread Brian Cain
We should raise an exception in the event that we encounter a packet that can't be correctly decoded, not fault. Signed-off-by: Brian Cain --- target/hexagon/decode.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/hexagon/decode.c b/target/hexagon/decode.c index

[PATCH v3 4/5] target/hexagon: s/pkt_has_store/pkt_has_scalar_store

2025-04-10 Thread Brian Cain
To remove any confusion with HVX or other potential store instructions, we'll qualify this context var with "scalar". Signed-off-by: Brian Cain --- target/hexagon/idef-parser/README.rst | 2 +- target/hexagon/insn.h | 4 ++-- target/hexagon/macros.h

Re: Issue with stoptrigger.c Plugin in QEMU Emulation

2025-04-10 Thread Pierrick Bouvier
Hi Saanjh, I have not been able to reproduce the issue with current master branch. Is it an error you see for every run? Regards, Pierrick On 4/10/25 04:10, Saanjh Sengupta wrote: Hi, I am writing to seek assistance with an issue I am experiencing while using the stoptrigger.c plugin in QEMU

Re: [PATCH] vfio/spapr: Fix L2 crash with PCI device passthrough with L2 guest memory > 128G

2025-04-10 Thread Amit Machhiwal
Hi Cédric, Thanks for looking into this patch. Please find my response inline: On 2025/04/04 01:29 PM, Cédric Le Goater wrote: > On 4/4/25 11:17, Amit Machhiwal wrote: > > An L2 KVM guest fails to boot inside a pSeries LPAR when booted with a > > memory more than 128 GB and PCI device passthrough

Re: [RFC PATCH-for-8.0 09/10] hw/virtio: Extract vhost_user_ram_slots_max() to vhost-user-target.c

2025-04-10 Thread Philippe Mathieu-Daudé
On 10/4/25 16:36, Pierrick Bouvier wrote: On 4/10/25 05:14, Philippe Mathieu-Daudé wrote: Hi Pierrick, On 13/12/22 00:05, Philippe Mathieu-Daudé wrote: The current definition of VHOST_USER_MAX_RAM_SLOTS is target specific. By converting this definition to a runtime vhost_user_ram_slots_max() h

Re: [PATCH for-10.0] scsi-disk: Apply error policy for host_status errors again

2025-04-10 Thread Michael Tokarev
10.04.2025 16:14, Kevin Wolf wrote: Am 10.04.2025 um 14:37 hat Michael Tokarev geschrieben: ...>> Does it make sense to apply this one for older stable qemu series? In particular, in 8.2, we lack cfe0880835cd3 "scsi-disk: Use positive return value for status in dma_readv/writev", which seems to

RE: [PATCH v1 0/1] hw/misc/aspeed_sbc: Implement OTP memory and controller

2025-04-10 Thread Kane Chen
Hi Cédric, Thank you for your comments and suggestions. I’ll start by reviewing the changes in commit ebc29e1beab0. At the moment, I don’t have another example of a device that is accessed through an external bus, but I’ll look into it and see what I can find. Best Regards, Kane > -Original

Re: [PATCH 00/16] Add Multi-Core Debug (MCD) API support

2025-04-10 Thread Markus Armbruster
Alex Bennée writes: > Markus Armbruster writes: > >> Mario Fleischmann writes: >> >>> Apologies for the line wrapping in yesterday's answer. Should be fixed now. >>> >>> On 08.04.2025 09:00, Markus Armbruster wrote: [...] What about providing the MCD interface as a separate QMP-like prot

Re: [RFC v2 1/5] qapi/qom: Introduce kvm-pmu-filter object

2025-04-10 Thread Markus Armbruster
Zhao Liu writes: > Hi Mrkus, > > I'm really sorry I completely missed your reply (and your patient > advice). It wasn't until I looked back at the lore archives that I > realized my mistake. Thinking it over again, I see that your reply, > which I missed, really helped clear up my confusion: I'm

Re: [PATCH v3 1/2] vfio/spapr: Enhance error handling in vfio_spapr_create_window()

2025-04-10 Thread Cédric Le Goater
On 4/8/25 14:40, Amit Machhiwal wrote: Introduce an Error ** parameter to vfio_spapr_create_window() to enable structured error reporting. This allows the function to propagate detailed errors back to callers. Suggested-by: Cédric Le Goater Signed-off-by: Amit Machhiwal ---> hw/vfio/spapr.c

[PATCH v1 21/24] hw/s390x/ipl: Set IPIB flags for secure IPL

2025-04-10 Thread Zhuoying Cai
If `-secure-boot on` is specified on the command line option, indicating true secure IPL enabled, set Secure-IPL bit and IPL-Information-Report bit on in IPIB Flags field, and trigger true secure IPL in the S390 BIOS. Any error that occurs during true secure IPL will cause the IPL to terminate. S

[PATCH for-10.1 v5 02/13] arm/cpu: Store aa64isar0/aa64zfr0 into the idregs arrays

2025-04-10 Thread Cornelia Huck
From: Eric Auger Also add kvm add accessors for storing host features into idregs. Reviewed-by: Richard Henderson Reviewed-by: Sebastian Ott Signed-off-by: Eric Auger Signed-off-by: Cornelia Huck --- target/arm/cpu-features.h | 57 --- target/arm/cpu-sysr

[PATCH for-10.1 v5 11/13] arm/cpu: Store id_mmfr0-5 into the idregs array

2025-04-10 Thread Cornelia Huck
From: Eric Auger Reviewed-by: Richard Henderson Reviewed-by: Sebastian Ott Signed-off-by: Eric Auger Signed-off-by: Cornelia Huck --- hw/intc/armv7m_nvic.c | 8 ++-- target/arm/cpu-features.h | 18 target/arm/cpu.h | 6 --- target/arm/cpu64.c| 16 +++ targ

Re: [RFC PATCH-for-8.0 09/10] hw/virtio: Extract vhost_user_ram_slots_max() to vhost-user-target.c

2025-04-10 Thread Pierrick Bouvier
On 4/10/25 10:21, Philippe Mathieu-Daudé wrote: On 10/4/25 16:36, Pierrick Bouvier wrote: On 4/10/25 05:14, Philippe Mathieu-Daudé wrote: Hi Pierrick, On 13/12/22 00:05, Philippe Mathieu-Daudé wrote: The current definition of VHOST_USER_MAX_RAM_SLOTS is target specific. By converting this def

Re: [PATCH] migration: add FEATURE_SEEKABLE to QIOChannelBlock

2025-04-10 Thread Prasad Pandit
On Mon, 7 Apr 2025 at 14:31, Marco Cavenati wrote: > As you said the capability is used internally. Its goal is to signal to > other QEMU code that the QIOChannel is seekable. > 'qio_channel_pwritev' and 'qio_channel_preadv' can be used only if > the QIOChannel has the 'QIO_CHANNEL_FEATURE_SEEKABL

[PATCH v3 02/16] hw/intc/loongarch_pch: Modify register name PCH_PIC_xxx_OFFSET with PCH_PIC_xxx

2025-04-10 Thread Bibo Mao
Macro PCH_PIC_HTMSI_VEC_OFFSET and PCH_PIC_ROUTE_ENTRY_OFFSET is renamed as PCH_PIC_HTMSI_VEC and PCH_PIC_ROUTE_ENTRY separately, it is easier to understand. Signed-off-by: Bibo Mao --- hw/intc/loongarch_pch_pic.c| 20 ++-- hw/loongarch/virt.c| 2

Re: [PATCH 3/3] vnc: h264: send additional frames after the display is clean

2025-04-10 Thread Marc-André Lureau
On Mon, Apr 7, 2025 at 3:06 PM Dietmar Maurer wrote: > > So that encoder can improve the picture quality. > > Signed-off-by: Dietmar Maurer Reviewed-by: Marc-André Lureau > --- > ui/vnc.c | 25 - > ui/vnc.h | 3 +++ > 2 files changed, 27 insertions(+), 1 deletion(-) >

[PATCH v2 02/10] hw/arm/aspeed_ast27x0: Add "vbootrom_size" field to AspeedSoCClass

2025-04-10 Thread Jamin Lin via
Introduced a "vbootrom_size" attribute in "AspeedSoCClass" to define virtual boot ROM size. Initialized "vbootrom_size" to "0x2" for both AST2700 A0 and A1 variants. Signed-off-by: Jamin Lin --- include/hw/arm/aspeed_soc.h | 1 + hw/arm/aspeed_ast27x0.c | 2 ++ 2 files changed, 3 inserti

[PATCH 02/14] vfio: refactor out vfio_pci_config_setup()

2025-04-10 Thread John Levon
Refactor the PCI config setup code out of vfio_realize() for readability. Reviewed-by: Cédric Le Goater Signed-off-by: John Levon --- hw/vfio/pci.c | 176 +++--- 1 file changed, 94 insertions(+), 82 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/p

[PATCH v1 00/24] Secure IPL Support for SCSI Scheme of virtio-blk/virtio-scsi Devices

2025-04-10 Thread Zhuoying Cai
# Description This patch series is an external requirement by Linux distribution partners to verify secure IPL process. Additional secure IPL checks are also included in this series to address security holes in the original secure IPL design to prevent malicious actors to boot modified or unsigned

Re: CXL memory pooling emulation inqury

2025-04-10 Thread Fan Ni
On Wed, Mar 12, 2025 at 03:33:12PM -0400, Gregory Price wrote: > On Wed, Mar 12, 2025 at 06:05:43PM +, Jonathan Cameron wrote: > > > > Longer term I remain a little unconvinced by whether this is the best > > approach > > because I also want a single management path (so fake CCI etc) and that

Re: [PATCH v4 02/13] memory: Change memory_region_set_ram_discard_manager() to return the result

2025-04-10 Thread Alexey Kardashevskiy
On 7/4/25 17:49, Chenyi Qiang wrote: Modify memory_region_set_ram_discard_manager() to return false if a RamDiscardManager is already set in the MemoryRegion. The caller must handle this failure, such as having virtio-mem undo its actions and fail the realize() process. Opportunistically move

[PATCH v2 1/2] vfio/spapr: Enhance error handling in vfio_spapr_create_window()

2025-04-10 Thread Amit Machhiwal
Introduce an Error ** parameter to vfio_spapr_create_window() to enable structured error reporting. This allows the function to propagate detailed errors back to callers. Suggested-by: Cédric Le Goater Signed-off-by: Amit Machhiwal --- hw/vfio/spapr.c | 23 --- 1 file change

Re: [PATCH 00/11] qapi: Documentation improvements

2025-04-10 Thread Markus Armbruster
Queued for 10.0.

[PATCH v2 2/2] block/io: skip head/tail requests on EINVAL

2025-04-10 Thread Stefan Hajnoczi
When guests send misaligned discard requests, the block layer breaks them up into a misaligned head, an aligned main body, and a misaligned tail. The file-posix block driver on Linux returns -EINVAL on misaligned discard requests. This causes bdrv_co_pdiscard() to fail and guests configured with w

Re: [PATCH v2] Revert "virtio-net: Copy received header to buffer"

2025-04-10 Thread Stefan Hajnoczi
On Tue, Apr 8, 2025 at 10:55 AM Antoine Damhet wrote: > > This reverts commit 7987d2be5a8bc3a502f89ba8cf3ac3e09f64d1ce. > > The goal was to remove the need to patch the (const) input buffer > with a recomputed UDP checksum by copying headers to a RW region and > inject the checksum there. The patc

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-04-10 Thread Gerd Hoffmann
On Thu, Apr 10, 2025 at 12:01:18PM +0530, Ani Sinha wrote: > > > > On 9 Apr 2025, at 11:51 AM, Gerd Hoffman wrote: > > > > Hi, > > > >>> The chicken-and-egg problem arises if you go for hashing and want embed > >>> the igvm file in the UKI. > >> > >> I don't really see how signing the IGVM f

[PULL 3/4] scsi-disk: Apply error policy for host_status errors again

2025-04-10 Thread Kevin Wolf
Originally, all failed SG_IO requests called scsi_handle_rw_error() to apply the configured error policy. However, commit f3126d65, which was supposed to be a mere refactoring for scsi-disk.c, broke this and accidentally completed the SCSI request without considering the error policy any more if th

RE: [PATCH v2] hw/i2c/aspeed: Fix wrong I2CC_DMA_LEN when I2CM_DMA_TX/RX_ADDR set first

2025-04-10 Thread Jamin Lin
Hi Cedric, > Subject: Re: [PATCH v2] hw/i2c/aspeed: Fix wrong I2CC_DMA_LEN when > I2CM_DMA_TX/RX_ADDR set first > > Hello, > > On 4/9/25 11:10, Jamin Lin wrote: > > Hi Cedric, > > > > After discussing with the I2C hardware designers, we confirmed that the I2c > design in AST2600 and AST2700 A1

  1   2   3   >