[PATCH v4 1/2] memory tier: dax/kmem: introduce an abstract layer for finding, allocating, and putting memory types

2024-03-22 Thread Ho-Ren (Jack) Chuang
Since different memory devices require finding, allocating, and putting memory types, these common steps are abstracted in this patch, enhancing the scalability and conciseness of the code. Signed-off-by: Ho-Ren (Jack) Chuang --- drivers/dax/kmem.c | 20 ++-- include/li

[PATCH v4 2/2] memory tier: create CPUless memory tiers after obtaining HMAT info

2024-03-22 Thread Ho-Ren (Jack) Chuang
The current implementation treats emulated memory devices, such as CXL1.1 type3 memory, as normal DRAM when they are emulated as normal memory (E820_TYPE_RAM). However, these emulated devices have different characteristics than traditional DRAM, making it important to distinguish them. Thus, we mod

[PATCH v4 0/2] Improved Memory Tier Creation for CPUless NUMA Nodes

2024-03-22 Thread Ho-Ren (Jack) Chuang
When a memory device, such as CXL1.1 type3 memory, is emulated as normal memory (E820_TYPE_RAM), the memory device is indistinguishable from normal DRAM in terms of memory tiering with the current implementation. The current memory tiering assigns all detected normal memory nodes to the same DRAM t

Re: [RFC v2 2/2] hw/riscv: Add server platform reference machine

2024-03-22 Thread Marcin Juszkiewicz
W dniu 22.03.2024 o 05:55, Alistair Francis pisze: I see no mention of device trees in the spec, but I do see ACPI. Do we really expect a server platform to use DTs? This platform "kind of" follows sbsa-ref where we have very minimalistic device tree sharing information qemu->firmware. libfd

Re: [PATCH] misc/pca9554: Fix check of pin range value in property accessors

2024-03-22 Thread Cédric Le Goater
On 3/21/24 18:15, Philippe Mathieu-Daudé wrote: On 21/3/24 17:01, Cédric Le Goater wrote: Coverity detected an "Integer handling" issue with the pin value :    In expression "state >> pin", right shifting "state" by more than 7    bits always yields zero.  The shift amount, "pin", is as much as

Re: [PATCH V8 1/8] accel/kvm: Extract common KVM vCPU {creation, parking} code

2024-03-22 Thread Harsh Prateek Bora
+ Vaibhav, Shiva Hi Salil, I came across your patch while trying to solve a related problem on spapr. One query below .. On 3/12/24 07:29, Salil Mehta via wrote: KVM vCPU creation is done once during the vCPU realization when Qemu vCPU thread is spawned. This is common to all the architectur

Re: [PATCH] target/ppc: Do not clear MSR[ME] on MCE interrupts to supervisor

2024-03-22 Thread Harsh Prateek Bora
On 3/21/24 11:24, Nicholas Piggin wrote: Hardware clears the MSR[ME] bit when delivering a machine check interrupt, so that is what QEMU does. The spapr environment runs in supervisor mode though, and receives machine check interrupts after they are processed by the hypervisor, and MSR[ME] mu

Re: [PATCH v4 2/2] memory tier: create CPUless memory tiers after obtaining HMAT info

2024-03-22 Thread Huang, Ying
"Ho-Ren (Jack) Chuang" writes: > The current implementation treats emulated memory devices, such as > CXL1.1 type3 memory, as normal DRAM when they are emulated as normal memory > (E820_TYPE_RAM). However, these emulated devices have different > characteristics than traditional DRAM, making it im

Re: [RFC v2 2/2] hw/riscv: Add server platform reference machine

2024-03-22 Thread Heinrich Schuchardt
On 3/22/24 08:14, Marcin Juszkiewicz wrote: W dniu 22.03.2024 o 05:55, Alistair Francis pisze: I see no mention of device trees in the spec, but I do see ACPI. Do we really expect a server platform to use DTs? This platform "kind of" follows sbsa-ref where we have very minimalistic device tre

Re: qemu fuzz crash in virtio_net_queue_reset()

2024-03-22 Thread Vladimir Sementsov-Ogievskiy
On 22.03.24 05:17, Xuan Zhuo wrote: On Wed, 20 Mar 2024 00:24:37 +0300, "Vladimir Sementsov-Ogievskiy" wrote: Hi all! From fuzzing I've got a fuzz-data, which produces the following crash: qemu-fuzz-x86_64: ../hw/net/virtio-net.c:134: void flush_or_purge_queued_packets(NetClientState *):

[PULL 02/15] target/riscv/vector_helper.c: set vstart = 0 in GEN_VEXT_VSLIDEUP_VX()

2024-03-22 Thread Alistair Francis
From: Daniel Henrique Barboza The helper isn't setting env->vstart = 0 after its execution, as it is expected from every vector instruction that completes successfully. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Reviewed-by: LIU Zhiwei

[PULL 03/15] trans_rvv.c.inc: set vstart = 0 in int scalar move insns

2024-03-22 Thread Alistair Francis
From: Daniel Henrique Barboza trans_vmv_x_s, trans_vmv_s_x, trans_vfmv_f_s and trans_vfmv_s_f aren't setting vstart = 0 after execution. This is usually done by a helper in vector_helper.c but these functions don't use helpers. We'll set vstart after any potential 'over' brconds, and that will a

[PULL 12/15] hw/intc: Update APLIC IDC after claiming iforce register

2024-03-22 Thread Alistair Francis
From: Frank Chang Currently, QEMU only sets the iforce register to 0 and returns early when claiming the iforce register. However, this may leave mip.meip remains at 1 if a spurious external interrupt triggered by iforce register is the only pending interrupt to be claimed, and the interrupt cann

[PULL 09/15] trans_rvv.c.inc: remove redundant mark_vs_dirty() calls

2024-03-22 Thread Alistair Francis
From: Daniel Henrique Barboza trans_vmv_v_i , trans_vfmv_v_f and the trans_##NAME macro from GEN_VMV_WHOLE_TRANS() are calling mark_vs_dirty() in both branches of their 'ifs'. conditionals. Call it just once in the end like other functions are doing. Signed-off-by: Daniel Henrique Barboza Revi

[PULL 04/15] target/riscv/vector_helper.c: fix 'vmvr_v' memcpy endianess

2024-03-22 Thread Alistair Francis
From: Daniel Henrique Barboza vmvr_v isn't handling the case where the host might be big endian and the bytes to be copied aren't sequential. Suggested-by: Richard Henderson Fixes: f714361ed7 ("target/riscv: rvv-1.0: implement vstart CSR") Signed-off-by: Daniel Henrique Barboza Reviewed-by: Al

[PULL 13/15] target/riscv: rvv: Remove the dependency of Zvfbfmin to Zfbfmin

2024-03-22 Thread Alistair Francis
From: Max Chou According to the Zvfbfmin definition in the RISC-V BF16 extensions spec, the Zvfbfmin extension only requires either the V extension or the Zve32f extension. Signed-off-by: Max Chou Reviewed-by: Alistair Francis Message-ID: <20240321170929.1162507-1-max.c...@sifive.com> Signed-o

[PULL 07/15] target/riscv/vector_helpers: do early exit when vstart >= vl

2024-03-22 Thread Alistair Francis
From: Daniel Henrique Barboza We're going to make changes that will required each helper to be responsible for the 'vstart' management, i.e. we will relieve the 'vstart < vl' assumption that helpers have today. Helpers are usually able to deal with vstart >= vl, i.e. doing nothing aside from set

[PULL 14/15] target/riscv: Fix mode in riscv_tlb_fill

2024-03-22 Thread Alistair Francis
From: Irina Ryapolova Need to convert mmu_idx to privilege mode for PMP function. Signed-off-by: Irina Ryapolova Fixes: b297129ae1 ("target/riscv: propagate PMP permission to TLB page") Reviewed-by: Alistair Francis Reviewed-by: Daniel Henrique Barboza Message-ID: <20240320172828.23965-1-irin

[PULL 15/15] target/riscv/kvm: fix timebase-frequency when using KVM acceleration

2024-03-22 Thread Alistair Francis
From: Yong-Xuan Wang The timebase-frequency of guest OS should be the same with host machine. The timebase-frequency value in DTS should be got from hypervisor when using KVM acceleration. Signed-off-by: Yong-Xuan Wang Message-ID: <20240314061510.9800-1-yongxuan.w...@sifive.com> Reviewed-by: An

Re: [PATCH] Fix fp16 checking in vector fp widen/narrow instructions

2024-03-22 Thread Max Chou
Thanks for the notification. I'll resend this series and rebase on the riscv-to-apply.next branch. Max On 2024/3/22 12:12 PM, Alistair Francis wrote: On Wed, Mar 20, 2024 at 5:28 PM Max Chou wrote: When SEW is 16, we need to check whether the Zvfhmin is enabled for the single width operator f

[PULL 10/15] target/riscv: enable 'vstart_eq_zero' in the end of insns

2024-03-22 Thread Alistair Francis
From: Ivan Klokov The vstart_eq_zero flag is updated at the beginning of the translation phase from the env->vstart variable. During the execution phase all functions will set env->vstart = 0 after a successful execution, but the vstart_eq_zero flag remains the same as at the start of the block.

[PULL 00/15] riscv-to-apply queue

2024-03-22 Thread Alistair Francis
alistair23/qemu.git tags/pull-riscv-to-apply-20240322 for you to fetch changes up to 385e575cd5ab2436c123e4b7f8c9b383a64c0dbe: target/riscv/kvm: fix timebase-frequency when using KVM acceleration (2024-03-22 15:41:01 +1000) RISC-V

[PULL 11/15] target/riscv/vector_helper.c: optimize loops in ldst helpers

2024-03-22 Thread Alistair Francis
From: Daniel Henrique Barboza Change the for loops in ldst helpers to do a single increment in the counter, and assign it env->vstart, to avoid re-reading from vstart every time. Suggested-by: Richard Henderson Signed-off-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Reviewed-by:

[PULL 05/15] target/riscv: always clear vstart in whole vec move insns

2024-03-22 Thread Alistair Francis
From: Daniel Henrique Barboza These insns have 2 paths: we'll either have vstart already cleared if vstart_eq_zero or we'll do a brcond to check if vstart >= maxsz to call the 'vmvr_v' helper. The helper will clear vstart if it executes until the end, or if vstart >= vl. For starters, the check

[PULL 01/15] target/riscv: do not enable all named features by default

2024-03-22 Thread Alistair Francis
From: Daniel Henrique Barboza Commit 3b8022269c added the capability of named features/profile extensions to be added in riscv,isa. To do that we had to assign priv versions for each one of them in isa_edata_arr[]. But this resulted in a side-effect: vendor CPUs that aren't running priv_version_l

[PULL 08/15] target/riscv: remove 'over' brconds from vector trans

2024-03-22 Thread Alistair Francis
From: Daniel Henrique Barboza All helpers that rely on vstart >= vl are now doing early exits using the VSTART_CHECK_EARLY_EXIT() macro. This macro will not only exit the helper but also clear vstart. We're still left with brconds that are skipping the helper, which is the only place where we're

Re: [PATCH v4 3/3] ui/console: Introduce dpy_gl_create_dmabuf() helper

2024-03-22 Thread Marc-André Lureau
Hi On Fri, Mar 22, 2024 at 3:45 AM wrote: > > From: Dongwon Kim > > dpy_gl_create_dmabuf() allocates QemuDmaBuf and initialize fields. > hw/display modules, hw/vfio and ui/dbus-listener now use this method > to create QemuDmaBuf instead of declaring and initializing it on their > own. > > Cc: Ph

Re: [PATCH v4 2/3] ui/console: Introduce dpy_gl_dmabuf_get_fd() helper

2024-03-22 Thread Marc-André Lureau
Hi On Fri, Mar 22, 2024 at 3:45 AM wrote: > > From: Dongwon Kim > > dpy_gl_dmabuf_get_fd() is a helper for retrieving FD of the dmabuf > from QemuDmaBuf struct. > Same remarks as previous patch regarding exhaustivity, setter, accepting NULL argument etc. > Cc: Philippe Mathieu-Daudé > Cc: Mar

Re: [PATCH v4 1/3] ui/console: Introduce dpy_gl_dmabuf_get_height/width() helpers

2024-03-22 Thread Marc-André Lureau
Hi Kim On Fri, Mar 22, 2024 at 3:45 AM wrote: > > From: Dongwon Kim > > dpy_gl_dmabuf_get_height() and dpy_gl_dmabuf_get_width() are helpers for > retrieving width and height fields from QemuDmaBuf struct. > There are many places left where width/height fields are still accessed directly. If w

Re: [RFC v2 2/2] hw/riscv: Add server platform reference machine

2024-03-22 Thread Marcin Juszkiewicz
W dniu 22.03.2024 o 09:50, Heinrich Schuchardt pisze: >>> I see no mention of device trees in the spec, but I do see ACPI. Do we >>> really expect a server platform to use DTs? >> >> This platform "kind of" follows sbsa-ref where we have very >> minimalistic device tree sharing information qemu->f

[PATCH for-9.0 v2] vhost-vdpa: check vhost_vdpa_set_vring_ready() return value

2024-03-22 Thread Stefano Garzarella
vhost_vdpa_set_vring_ready() could already fail, but if Linux's patch [1] will be merged, it may fail with more chance if userspace does not activate virtqueues before DRIVER_OK when VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK is not negotiated. So better check its return value anyway. [1] https://lo

[PULL 06/15] target/riscv: always clear vstart for ldst_whole insns

2024-03-22 Thread Alistair Francis
From: Daniel Henrique Barboza Commit 8ff8ac6329 added a conditional to guard the vext_ldst_whole() helper if vstart >= evl. But by skipping the helper we're also not setting vstart = 0 at the end of the insns, which is incorrect. We'll move the conditional to vext_ldst_whole(), following in line

[PATCH v2 4/4] target/riscv: rvv: Remove redudant SEW checking for vector fp narrow/widen instructions

2024-03-22 Thread Max Chou
If the checking functions check both the single and double width operators at the same time, then the single width operator checking functions (require_rvf[min]) will check whether the SEW is 8. Signed-off-by: Max Chou Reviewed-by: Daniel Henrique Barboza --- target/riscv/insn_trans/trans_rvv.c

[PATCH v2 1/4] target/riscv: rvv: Fix Zvfhmin checking for vfwcvt.f.f.v and vfncvt.f.f.w instructions

2024-03-22 Thread Max Chou
According v spec 18.4, only the vfwcvt.f.f.v and vfncvt.f.f.w instructions will be affected by Zvfhmin extension. And the vfwcvt.f.f.v and vfncvt.f.f.w instructions only support the conversions of * From 1*SEW(16/32) to 2*SEW(32/64) * From 2*SEW(32/64) to 1*SEW(16/32) Signed-off-by: Max Chou Rev

[PATCH v2 2/4] target/riscv: rvv: Check single width operator for vector fp widen instructions

2024-03-22 Thread Max Chou
The require_scale_rvf function only checks the double width operator for the vector floating point widen instructions, so most of the widen checking functions need to add require_rvf for single width operator. The vfwcvt.f.x.v and vfwcvt.f.xu.v instructions convert single width integer to double w

[PATCH v2 3/4] target/riscv: rvv: Check single width operator for vfncvt.rod.f.f.w

2024-03-22 Thread Max Chou
The opfv_narrow_check needs to check the single width float operator by require_rvf. Signed-off-by: Max Chou Reviewed-by: Daniel Henrique Barboza --- target/riscv/insn_trans/trans_rvv.c.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/target/riscv/insn_trans/trans_rvv.c.inc b/target/ris

[PATCH v2 0/4] Fix fp16 checking in vector fp widen/narrow instructions

2024-03-22 Thread Max Chou
When SEW is 16, we need to check whether the Zvfhmin is enabled for the single width operator for vector floating point widen/narrow instructions. The commits in this patchset fix the single width operator checking and remove the redudant SEW checking for vector floating point widen/narrow instru

Re: [PATCH] virtio-snd: Skip invalid message sizes and null streams

2024-03-22 Thread Manos Pitsidianakis
Hello Ma, On Thu, 21 Mar 2024 23:42, Zheyu Ma wrote: This update changes how virtio_snd_handle_tx_xfer handles message size discrepancies and null streams. Instead of using error handling paths which led to unnecessary processing and potential null pointer dereferences, the function now continu

Re: [RFC 1/8] virtio: Define InOrderVQElement

2024-03-22 Thread Eugenio Perez Martin
On Thu, Mar 21, 2024 at 4:57 PM Jonah Palmer wrote: > > Define the InOrderVQElement structure for the VIRTIO_F_IN_ORDER > transport feature implementation. > > The InOrderVQElement structure is used to encapsulate out-of-order > VirtQueueElement data that was processed by the host. This data > inc

[PATCH v3 4/4] iotests: add test for stream job with an unaligned prefetch read

2024-03-22 Thread Fiona Ebner
Previously, bdrv_pad_request() could not deal with a NULL qiov when a read needed to be aligned. During prefetch, a stream job will pass a NULL qiov. Add a test case to cover this scenario. By accident, also covers a previous race during shutdown, where block graph changes during iteration in bdrv

[PATCH v3 1/4] block/io: accept NULL qiov in bdrv_pad_request

2024-03-22 Thread Fiona Ebner
From: Stefan Reiter Some operations, e.g. block-stream, perform reads while discarding the results (only copy-on-read matters). In this case, they will pass NULL as the target QEMUIOVector, which will however trip bdrv_pad_request, since it wants to extend its passed vector. In particular, this i

[PATCH v3 2/4] block-backend: fix edge case in bdrv_next() where BDS associated to BB changes

2024-03-22 Thread Fiona Ebner
The old_bs variable in bdrv_next() is currently determined by looking at the old block backend. However, if the block graph changes before the next bdrv_next() call, it might be that the associated BDS is not the same that was referenced previously. In that case, the wrong BDS is unreferenced, lead

[PATCH v3 3/4] block-backend: fix edge case in bdrv_next_cleanup() where BDS associated to BB changes

2024-03-22 Thread Fiona Ebner
Same rationale as for commit "block-backend: fix edge case in bdrv_next() where BDS associated to BB changes". The block graph might change between the bdrv_next() call and the bdrv_next_cleanup() call, so it could be that the associated BDS is not the same that was referenced previously anymore. I

[PATCH v3 0/4] fix two edge cases related to stream block jobs

2024-03-22 Thread Fiona Ebner
Changes in v3: * Also deal with edge case in bdrv_next_cleanup(). Haven't run into an actual issue there, but at least the caller in migration/block.c uses bdrv_nb_sectors() which, while not a coroutine wrapper itself (it's written manually), may call bdrv_refresh_total_

[PULL 0/1] loongarch fix for 9.0

2024-03-22 Thread Song Gao
g/qemu.git tags/pull-loongarch-20240322 for you to fetch changes up to 1590154ee4376819a8c6ee61e849ebf4a4e7cd02: target/loongarch: Fix qemu-system-loongarch64 assert failed with the option '-d int' (2024-03-22 17:57:49 +0800) -

[PULL 1/1] target/loongarch: Fix qemu-system-loongarch64 assert failed with the option '-d int'

2024-03-22 Thread Song Gao
qemu-system-loongarch64 assert failed with the option '-d int', the helper_idle() raise an exception EXCP_HLT, but the exception name is undefined. Signed-off-by: Song Gao Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20240321123606.1704900-1-gaos...@loongson.cn> --- target/loongarch/cpu.c

Re: [PATCH v2 2/2] Refactor common functions between POSIX and Windows implementation

2024-03-22 Thread Daniel P . Berrangé
On Thu, Mar 21, 2024 at 04:07:25PM +, aidan_le...@selinc.com wrote: > From: aidaleuc > > Signed-off-by: aidaleuc > --- > qga/commands-posix-ssh.c | 47 +-- > qga/commands-ssh-core.c| 57 > qga/commands-ssh-core.h| 8 + >

Re: [PATCH] virtio_net: Do not send RSS key if it is not supported

2024-03-22 Thread Breno Leitao
Hello Xuan, On Fri, Mar 22, 2024 at 10:00:22AM +0800, Xuan Zhuo wrote: > On Thu, 21 Mar 2024 09:54:30 -0700, Breno Leitao wrote: > > 4) Since the command above does not have a key, then the last > >scatter-gatter entry will be zeroed, since rss_key_size == 0. > > sg_buf_size = vi->rss_ke

Re: [PATCH v2 1/2] Implement SSH commands in QEMU GA for Windows

2024-03-22 Thread Daniel P . Berrangé
On Thu, Mar 21, 2024 at 04:07:24PM +, aidan_le...@selinc.com wrote: > From: aidaleuc > > Signed-off-by: aidaleuc > --- > qga/commands-windows-ssh.c | 848 + > qga/commands-windows-ssh.h | 26 ++ > qga/meson.build| 9 +- > qga/qapi-schema.js

Re: [RFC PATCH v9 06/23] target/arm: Add support for Non-maskable Interrupt

2024-03-22 Thread Peter Maydell
On Fri, 22 Mar 2024 at 05:05, Jinjie Ruan wrote: > > > > On 2024/3/22 2:28, Peter Maydell wrote: > > On Thu, 21 Mar 2024 at 15:46, Peter Maydell > > wrote: > >> Something somewhere needs to implement "if SCTLR_ELx.NMI is 0 then > >> we don't take EXCP_VINMI etc but instead (maybe) EXCP_VIRQ etc"

Re: [PATCH v4 1/7] qga: guest-get-fsinfo: add optional 'total-bytes-privileged' field

2024-03-22 Thread Daniel P . Berrangé
On Wed, Mar 20, 2024 at 06:16:42PM +0200, Andrey Drobyshev wrote: > Since the commit 25b5ff1a86 ("qga: add mountpoint usage info to > GuestFilesystemInfo") we have 2 values reported in guest-get-fsinfo: > used = (f_blocks - f_bfree), total = (f_blocks - f_bfree + f_bavail) as > returned by statvfs(

Re: [RFC 4/8] virtio: Implement in-order handling for virtio devices

2024-03-22 Thread Eugenio Perez Martin
On Thu, Mar 21, 2024 at 4:57 PM Jonah Palmer wrote: > > Implements in-order handling for most virtio devices using the > VIRTIO_F_IN_ORDER transport feature, specifically those who call > virtqueue_push to push their used elements onto the used ring. > > The logic behind this implementation is as

Re: [RFC 7/8] vhost/vhost-user: Add VIRTIO_F_IN_ORDER to vhost feature bits

2024-03-22 Thread Eugenio Perez Martin
On Thu, Mar 21, 2024 at 4:57 PM Jonah Palmer wrote: > > Add support for the VIRTIO_F_IN_ORDER feature across a variety of vhost > devices. > > The inclusion of VIRTIO_F_IN_ORDER in the feature bits arrays for these > devices ensures that the backend is capable of offering and providing > support f

Re: [RFC 8/8] virtio: Add VIRTIO_F_IN_ORDER property definition

2024-03-22 Thread Eugenio Perez Martin
On Thu, Mar 21, 2024 at 4:57 PM Jonah Palmer wrote: > > Extend the virtio device property definitions to include the > VIRTIO_F_IN_ORDER feature. > > The default state of this feature is disabled, allowing it to be > explicitly enabled where it's supported. > Acked-by: Eugenio Pérez Thanks! >

[PATCH] ui/cocoa: Use qemu_add_mouse_change_notifier

2024-03-22 Thread Akihiko Odaki
er(&mouse_mode_change_notifier); +[cocoaView notifyMouseModeChange]; [cocoaView updateUIInfo]; qemu_event_init(&cbevent, false); --- base-commit: fea445e8fe9acea4f775a832815ee22bdf2b0222 change-id: 20240322-mouse-bbc0fa90e8dc Best regards, -- Akihiko Odaki

Re: [RFC PATCH v9 06/23] target/arm: Add support for Non-maskable Interrupt

2024-03-22 Thread Peter Maydell
On Fri, 22 Mar 2024 at 03:56, Jinjie Ruan wrote: > > > > On 2024/3/21 23:46, Peter Maydell wrote: > > Something somewhere needs to implement "if SCTLR_ELx.NMI is 0 then > > we don't take EXCP_VINMI etc but instead (maybe) EXCP_VIRQ etc". > > At the moment nothing does that: > > * arm_cpu_update_v

Re: [RFC PATCH v9 00/23] target/arm: Implement FEAT_NMI and FEAT_GICv3_NMI

2024-03-22 Thread Peter Maydell
On Thu, 21 Mar 2024 at 13:10, Jinjie Ruan wrote: > > This patch set implements FEAT_NMI and FEAT_GICv3_NMI for armv8. These > introduce support for a new category of interrupts in the architecture > which we can use to provide NMI like functionality. By the way, when you send the next version of

[PATCH v2] virtio-snd: Enhance error handling for invalid transfers

2024-03-22 Thread Zheyu Ma
This patch improves error handling in virtio_snd_handle_tx_xfer() and virtio_snd_handle_rx_xfer() in the VirtIO sound driver. Previously, 'goto' statements were used for error paths, leading to unnecessary processing and potential null pointer dereferences. Now, 'continue' is used to skip the rest

Re: [RFC 0/8] virtio,vhost: Add VIRTIO_F_IN_ORDER support

2024-03-22 Thread Eugenio Perez Martin
On Thu, Mar 21, 2024 at 4:57 PM Jonah Palmer wrote: > > The goal of these patches is to add support to a variety of virtio and > vhost devices for the VIRTIO_F_IN_ORDER transport feature. This feature > indicates that all buffers are used by the device in the same order in > which they were made a

Re: [PATCH 2/7] tests/unit/socket-helpers: Don't close(-1)

2024-03-22 Thread Thomas Huth
On 12/03/2024 19.38, Peter Maydell wrote: In socket_check_afunix_support() we call socket(PF_UNIX, SOCK_STREAM, 0) to see if it works, but we call close() on the result whether it worked or not. Only close the fd if the socket() call succeeded. Spotted by Coverity. Resolves: Coverity CID 1497481

Re: [PATCH] contrib/plugins/execlog: Fix compiler warning

2024-03-22 Thread Peter Maydell
On Wed, 20 Mar 2024 at 02:05, Yao Xingtao via wrote: > > 1. The g_pattern_match_string() is deprecated when glib2 version >= 2.70. >Use g_pattern_spec_match_string() instead to avoid this problem. > > 2. The type of second parameter in g_ptr_array_add() is >'gpointer' {aka 'void *'}, but t

Re: [PATCH 1/3] ui/cocoa: Fix aspect ratio

2024-03-22 Thread Peter Maydell
On Mon, 18 Mar 2024 at 07:53, Akihiko Odaki wrote: > > [NSWindow setContentAspectRatio:] does not trigger window resize itself, > so the wrong aspect ratio will persist if nothing resizes the window. > Call [NSWindow setContentSize:] in such a case. > > Fixes: 91aa508d0274 ("ui/cocoa: Let the plat

Re: [PATCH 2/3] ui/cocoa: Resize window after toggling zoom-to-fit

2024-03-22 Thread Peter Maydell
On Mon, 18 Mar 2024 at 07:53, Akihiko Odaki wrote: > > Resize the window so that the content will fit without zooming. > > Fixes: 91aa508d0274 ("ui/cocoa: Let the platform toggle fullscreen") > Signed-off-by: Akihiko Odaki > --- > ui/cocoa.m | 1 + > 1 file changed, 1 insertion(+) > > diff --git

Re: [PATCH 3/3] ui/cocoa: Use NSTrackingInVisibleRect

2024-03-22 Thread Peter Maydell
On Mon, 18 Mar 2024 at 07:53, Akihiko Odaki wrote: > > I observed [NSTrackingArea rect] becomes de-synchronized with the view > frame with some unknown condition. Specify NSTrackingInVisibleRect > option to let Cocoa automatically update NSTrackingArea, which also > saves code for synchronization.

Re: [PATCH 1/3] ui/cocoa: Fix aspect ratio

2024-03-22 Thread Akihiko Odaki
On 2024/03/22 21:22, Peter Maydell wrote: On Mon, 18 Mar 2024 at 07:53, Akihiko Odaki wrote: [NSWindow setContentAspectRatio:] does not trigger window resize itself, so the wrong aspect ratio will persist if nothing resizes the window. Call [NSWindow setContentSize:] in such a case. Fixes: 91

Re: [PATCH v4 1/2] kvm: add support for guest physical bits

2024-03-22 Thread Gerd Hoffmann
> > +if (cpu->host_phys_bits_limit && > > +cpu->guest_phys_bits > cpu->host_phys_bits_limit) { > > +cpu->guest_phys_bits = cpu->host_phys_bits_limit; > > host_phys_bits_limit takes effect only when cpu->host_phys_bits is set. > > If users pass configuration like "-cpu > qemu64

Re: [PATCH 1/3] ui/cocoa: Fix aspect ratio

2024-03-22 Thread Peter Maydell
On Fri, 22 Mar 2024 at 12:25, Akihiko Odaki wrote: > > On 2024/03/22 21:22, Peter Maydell wrote: > > On Mon, 18 Mar 2024 at 07:53, Akihiko Odaki > > wrote: > >> > >> [NSWindow setContentAspectRatio:] does not trigger window resize itself, > >> so the wrong aspect ratio will persist if nothing re

Re: [PULL 0/1] loongarch fix for 9.0

2024-03-22 Thread Peter Maydell
000) > > are available in the Git repository at: > > https://gitlab.com/gaosong/qemu.git tags/pull-loongarch-20240322 > > for you to fetch changes up to 1590154ee4376819a8c6ee61e849ebf4a4e7cd02: > > target/loongarch: Fix qemu-system-loongarch64 assert failed with

Re: [PULL 00/15] riscv-to-apply queue

2024-03-22 Thread Peter Maydell
1 10:31:56 +) > > are available in the Git repository at: > > https://github.com/alistair23/qemu.git tags/pull-riscv-to-apply-20240322 > > for you to fetch changes up to 385e575cd5ab2436c123e4b7f8c9b383a64c0dbe: > > target/riscv/kvm: fix timebase-frequency when usi

Re: [PULL for-9.0 0/1] Block patches

2024-03-22 Thread Peter Maydell
On Thu, 21 Mar 2024 at 17:23, Stefan Hajnoczi wrote: > > The following changes since commit fea445e8fe9acea4f775a832815ee22bdf2b0222: > > Merge tag 'pull-maintainer-final-for-real-this-time-200324-1' of > https://gitlab.com/stsquad/qemu into staging (2024-03-21 10:31:56 +) > > are available

[PATCH] Add support for abs info in vhost-user-input

2024-03-22 Thread Christian Pötzsch
Absolute input device did not work, cause VIRTIO_INPUT_CFG_ABS_INFO is missing. Fetch this info when available and provide it to any virtio client. This is basically the same code as in hw/input/virtio-input-host.c, just modified to work here. Signed-off-by: Christian Pötzsch --- contrib/vhost-

Re: [PATCH] ui/cocoa: Do not automatically zoom for HiDPI

2024-03-22 Thread Peter Maydell
On Mon, 18 Mar 2024 at 09:02, Akihiko Odaki wrote: > > Cocoa automatically zooms for a HiDPI display like Retina and makes > the display blurry. Revert the automatic zooming. > > Signed-off-by: Akihiko Odaki > --- > ui/cocoa.m | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > >

Re: [PATCH v4 1/7] qga: guest-get-fsinfo: add optional 'total-bytes-privileged' field

2024-03-22 Thread Andrey Drobyshev
On 3/22/24 12:39, Daniel P. Berrangé wrote: > On Wed, Mar 20, 2024 at 06:16:42PM +0200, Andrey Drobyshev wrote: >> Since the commit 25b5ff1a86 ("qga: add mountpoint usage info to >> GuestFilesystemInfo") we have 2 values reported in guest-get-fsinfo: >> used = (f_blocks - f_bfree), total = (f_block

Re: [PATCH for-9.1 v5 11/14] memory: Add Error** argument to the global_dirty_log routines

2024-03-22 Thread Peter Xu
On Fri, Mar 22, 2024 at 09:55:18AM +0800, Yong Huang wrote: > Indeed, for the GLOBAL_DIRTY_DIRTY_RATE and GLOBAL_DIRTY_LIMIT > dirty tracking, they should handle the failure path of logging start. > The work may be done once the current patchset is merged. Thanks for confirming this, Yong. I thin

Re: [PATCH for-9.1 v5 00/14] migration: Improve error reporting

2024-03-22 Thread Peter Xu
On Wed, Mar 20, 2024 at 07:48:56AM +0100, Cédric Le Goater wrote: > Hello, > > The motivation behind these changes is to improve error reporting to > the upper management layer (libvirt) with a more detailed error, this > to let it decide, depending on the reported error, whether to try > migratio

[PATCH 2/3] qapi: Resync MigrationParameter and MigrateSetParameters

2024-03-22 Thread Markus Armbruster
Enum MigrationParameter mirrors the members of struct MigrateSetParameters. Differences to MigrateSetParameters's member documentation are pointless. Clean them up: * @compress-level, @compress-threads, @decompress-threads, and x-checkpoint-delay are more thoroughly documented for MigrationP

[PATCH 1/3] qapi: Improve migration TLS documentation

2024-03-22 Thread Markus Armbruster
MigrateSetParameters is about setting parameters, and MigrationParameters is about querying them. Their documentation of @tls-creds and @tls-hostname has residual damage from a failed attempt at de-duplicating them (see commit de63ab61241 "migrate: Share common MigrationParameters struct" and comm

[PATCH 3/3] qapi: Fix bogus documentation of query-migrationthreads

2024-03-22 Thread Markus Armbruster
The doc comment documents an argument that doesn't exist. Would fail compilation if it was marked up correctly. Delete. The Returns: section fails to refer to the data type, leaving the user to guess. Fix that. The command name violates QAPI naming rules: it should be query-migration-threads.

[PATCH 0/3] qapi/migration: Doc fixes

2024-03-22 Thread Markus Armbruster
I'd like to get these into the release. Please review. Markus Armbruster (3): qapi: Improve migration TLS documentation qapi: Resync MigrationParameter and MigrateSetParameters qapi: Fix bogus documentation of query-migrationthreads qapi/migration.json | 91 +--

Re: [PATCH 1/3] qapi: Improve migration TLS documentation

2024-03-22 Thread Fabiano Rosas
Markus Armbruster writes: > MigrateSetParameters is about setting parameters, and > MigrationParameters is about querying them. Their documentation of > @tls-creds and @tls-hostname has residual damage from a failed attempt > at de-duplicating them (see commit de63ab61241 "migrate: Share common

Re: [PATCH 0/4] hw/nmi: Remove @cpu_index argument

2024-03-22 Thread Cédric Le Goater
On 3/20/24 16:00, Peter Maydell wrote: On Wed, 20 Mar 2024 at 14:10, Mark Burton wrote: I’d broaden this to all ’signals’ (IRQ, Reset etc) - and I guess similar statements apply, with the “bridge” between the function and the GPIO mechanism moved closer or further from the originator(s) of the

[PATCH 04/12] qapi: Tidy up indentation of add_client's example

2024-03-22 Thread Markus Armbruster
Commit d23055b8db8 (qapi: Require descriptions and tagged sections to be indented) indented add_client's example too much. Revert that. Signed-off-by: Markus Armbruster --- qapi/misc.json | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qapi/misc.json b/qapi/misc.json

[PATCH 00/12] qapi: Fairly trivial documentation work

2024-03-22 Thread Markus Armbruster
Markus Armbruster (12): qapi: Drop stray Arguments: line from qmp_capabilities docs qapi: Expand a few awkward abbreviations in documentation qapi: Tidy up block-latency-histogram-set documentation some more qapi: Tidy up indentation of add_client's example qapi: Fix argument markup in dr

[PATCH 01/12] qapi: Drop stray Arguments: line from qmp_capabilities docs

2024-03-22 Thread Markus Armbruster
Reported-by: John Snow Fixes: 119ebac1feb2 (qapi-schema: use generated marshaller for 'qmp_capabilities') Signed-off-by: Markus Armbruster --- qapi/control.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/qapi/control.json b/qapi/control.json index f404daef60..6bdbf077c2 100644 --- a/q

[PATCH 05/12] qapi: Fix argument markup in drive-mirror documentation

2024-03-22 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qapi/block-core.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 1874f880a8..64668b080d 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -2117,7 +2117,7 @@ # Start mirror

[PATCH 09/12] qapi: Don't repeat member type in its documentation text

2024-03-22 Thread Markus Armbruster
Documentation generated for the arguments of MEMORY_FAILURE looks like "recipient": "MemoryFailureRecipient" recipient is defined as "MemoryFailureRecipient". "action": "MemoryFailureAction" action that has been taken. action is defined as "MemoryFailureAction".

[PATCH 08/12] qapi: Start sentences with a capital letter, end them with a period

2024-03-22 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qapi/migration.json | 16 qapi/ui.json| 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/qapi/migration.json b/qapi/migration.json index faeb7d1ca9..9ce0f6249f 100644 --- a/qapi/migration.json +++ b/qapi/migration.

[PATCH 12/12] qga/qapi-schema: Refill doc comments to conform to current conventions

2024-03-22 Thread Markus Armbruster
For legibility, wrap text paragraphs so every line is at most 70 characters long. To check the generated documentation does not change, I compared the generated HTML before and after this commit with "wdiff -3". Finds no differences. Comparing with diff is not useful, as the refilled paragraphs

[PATCH 02/12] qapi: Expand a few awkward abbreviations in documentation

2024-03-22 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qapi/replay.json | 4 ++-- qapi/virtio.json | 8 +--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/qapi/replay.json b/qapi/replay.json index 8626fb58f4..d3559f9c8f 100644 --- a/qapi/replay.json +++ b/qapi/replay.json @@ -105,8 +105,8 @@

[PATCH 10/12] qapi: Refill doc comments to conform to current conventions

2024-03-22 Thread Markus Armbruster
For legibility, wrap text paragraphs so every line is at most 70 characters long. To check the generated documentation does not change, I compared the generated HTML before and after this commit with "wdiff -3". Finds no differences. Comparing with diff is not useful, as the refilled paragraphs

[PATCH 03/12] qapi: Tidy up block-latency-histogram-set documentation some more

2024-03-22 Thread Markus Armbruster
Commit a937b6aa739 (qapi: Reformat doc comments to conform to current conventions) reflowed some text that should have been left alone. Revert that. Signed-off-by: Markus Armbruster --- qapi/block.json | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qapi/block.json

[PATCH 06/12] qapi: Fix typo in request-ebpf documentation

2024-03-22 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qapi/ebpf.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/ebpf.json b/qapi/ebpf.json index f413d00154..61359e1c0f 100644 --- a/qapi/ebpf.json +++ b/qapi/ebpf.json @@ -51,7 +51,7 @@ # @request-ebpf: # # Retrieve an eBPF object t

[PATCH 11/12] qapi: Correct documentation indentation and whitespace

2024-03-22 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qapi/block-core.json | 20 ++-- qapi/crypto.json | 12 ++-- qapi/dump.json | 2 +- qapi/machine.json| 3 +-- qapi/migration.json | 38 ++ qapi/qom.json| 4 ++-- qapi/run-stat

Re: [PATCH 2/3] qapi: Resync MigrationParameter and MigrateSetParameters

2024-03-22 Thread Fabiano Rosas
Markus Armbruster writes: > Enum MigrationParameter mirrors the members of struct > MigrateSetParameters. Differences to MigrateSetParameters's member > documentation are pointless. Clean them up: > > * @compress-level, @compress-threads, @decompress-threads, and > x-checkpoint-delay are more

[PATCH 07/12] qapi: Fix abbreviation punctuation in doc comments

2024-03-22 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qapi/migration.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qapi/migration.json b/qapi/migration.json index aa1b39bce1..faeb7d1ca9 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -1762,7 +1762,7 @@ #defaul

Re: [PATCH 3/3] qapi: Fix bogus documentation of query-migrationthreads

2024-03-22 Thread Fabiano Rosas
Markus Armbruster writes: > The doc comment documents an argument that doesn't exist. Would > fail compilation if it was marked up correctly. Delete. > > The Returns: section fails to refer to the data type, leaving the user > to guess. Fix that. > > The command name violates QAPI naming rules

Re: [PATCH 1/3] qapi: Improve migration TLS documentation

2024-03-22 Thread Markus Armbruster
Fabiano Rosas writes: > Markus Armbruster writes: > >> MigrateSetParameters is about setting parameters, and >> MigrationParameters is about querying them. Their documentation of >> @tls-creds and @tls-hostname has residual damage from a failed attempt >> at de-duplicating them (see commit de63

RE: [PATCH v2 1/2] Implement SSH commands in QEMU GA for Windows

2024-03-22 Thread Aidan Leuck
Thanks for the feedback, Daniel, I will get these issues resolved shortly. Thank you for your patience, this is my first time committing to QEMU. Aidan Leuck -Original Message- From: Daniel P. Berrangé Sent: Friday, March 22, 2024 4:32 AM To: Aidan Leuck Cc: qemu-devel@nongnu.org; kko

RE: [PATCH v5 5/7] migration/multifd: implement initialization of qpl compression

2024-03-22 Thread Liu, Yuan1
> -Original Message- > From: Liu, Yuan1 > Sent: Friday, March 22, 2024 10:07 AM > To: Peter Xu > Cc: Daniel P. Berrangé ; faro...@suse.de; qemu- > de...@nongnu.org; hao.xi...@bytedance.com; bryan.zh...@bytedance.com; Zou, > Nanhai > Subject: RE: [PATCH v5 5/7] migration/multifd: implement

Re: [PATCH v8] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER

2024-03-22 Thread Daniel P . Berrangé
On Tue, Mar 12, 2024 at 03:48:49AM -0400, Shaoqin Huang wrote: > The KVM_ARM_VCPU_PMU_V3_FILTER provides the ability to let the VMM decide > which PMU events are provided to the guest. Add a new option > `kvm-pmu-filter` as -cpu sub-option to set the PMU Event Filtering. > Without the filter, all P

  1   2   >