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

[PATCH v3] vfio/pci: migration: Skip config space check for Vendor Specific Information in VSC during restore/load

2024-03-22 Thread Vinayak Kale
In case of migration, during restore operation, qemu checks config space of the pci device with the config space in the migration stream captured during save operation. In case of config space data mismatch, restore operation is failed. config space check is done in function

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]

Re: [PATCH 2/2] target/hppa: Fix B,GATE for wide mode

2024-03-22 Thread Helge Deller
On 3/21/24 20:28, Richard Henderson wrote: Do not clobber the high bits of the address by using a 32-bit deposit. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller Helge --- target/hppa/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[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

[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

[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 ++--

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.

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

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

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 *):

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

[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

[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

[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

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

[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 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

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

[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

[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

[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 ---

[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

[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

[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

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

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 >

[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

[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,

[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.

[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

[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>

[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

[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:

[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:

[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:

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

2024-03-22 Thread Alistair Francis
/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 PR for 9.0

[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

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:

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:

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

[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]

[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

[PULL 0/1] loongarch fix for 9.0

2024-03-22 Thread Song Gao
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

[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 =

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 +- >

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

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

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

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
ifyMouseModeChange]; [cocoaView updateUIInfo]; qemu_event_init(, 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: > > *

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

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

[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 ---

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 >

[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 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 +++

[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 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

Re: [PATCH 5/7] target/i386: introduce x86-confidential-guest

2024-03-22 Thread Xiaoyao Li
On 3/19/2024 9:59 PM, Paolo Bonzini wrote: Introduce a common superclass for x86 confidential guest implementations. It will extend ConfidentialGuestSupportClass with a method that provides the VM type to be passed to KVM_CREATE_VM. Signed-off-by: Paolo Bonzini Reviewed-by: Xiaoyao Li

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

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

2024-03-22 Thread Peter Maydell
On Fri, 22 Mar 2024 at 14:08, Cédric Le Goater wrote: > > 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 > >>

[PATCH-for-9.0 1/2] hw/clock: Let clock_set_mul_div() return boolean value

2024-03-22 Thread Philippe Mathieu-Daudé
Let clock_set_mul_div() return a boolean value whether the clock has been updated or not, similarly to clock_set(). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/clock.h | 4 +++- hw/core/clock.c| 8 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git

[PATCH-for-9.0 2/2] hw/misc/stm32l4x5_rcc: Propagate period when enabling a clock

2024-03-22 Thread Philippe Mathieu-Daudé
From: Arnaud Minier The "clock_set_mul_div" function doesn't propagate the clock period to the children if it is changed (e.g. by enabling/disabling a clock multiplexer). This was overlooked during the implementation due to late changes. This commit propagates the change if the multiplier or

[PATCH-for-9.0 0/2] hw/clock: Propagate clock changes when STM32L4X5 MUX is updated

2024-03-22 Thread Philippe Mathieu-Daudé
Per https://www.qemu.org/docs/master/devel/clocks.html#clock-multiplier-and-divider-settings: Note that clock_set_mul_div() does not automatically call clock_propagate(). If you make a runtime change to the multiplier or divider you must call clock_propagate() yourself. Fix what we forgot

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(-) > >

[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

[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

[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 ++--

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

[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 @@ #

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

2024-03-22 Thread Michael Tokarev
22.03.2024 13:03, 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:

Re: [PATCH 6/7] target/i386: Implement mc->kvm_type() to get VM type

2024-03-22 Thread Xiaoyao Li
On 3/19/2024 9:59 PM, Paolo Bonzini wrote: From: Xiaoyao Li KVM is introducing a new API to create confidential guests, which will be used by TDX and SEV-SNP but is also available for SEV and SEV-ES. The API uses the VM type argument to KVM_CREATE_VM to identify which confidential computing

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

2024-03-22 Thread Peter Xu
On Fri, Mar 22, 2024 at 02:51:14PM +0100, Markus Armbruster wrote: > 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

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

2024-03-22 Thread John Snow
On Fri, Mar 22, 2024, 10:09 AM Markus Armbruster wrote: > Reported-by: John Snow > Fixes: 119ebac1feb2 (qapi-schema: use generated marshaller for > 'qmp_capabilities') > Signed-off-by: Markus Armbruster > Reviewed-by: John Snow --- > qapi/control.json | 2 -- > 1 file changed, 2

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

2024-03-22 Thread John Snow
On Fri, Mar 22, 2024, 9:51 AM Markus Armbruster wrote: > 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

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 >

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

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

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

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

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

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 =

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:

[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

[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

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 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 ---

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

Re: [PATCH] migration/postcopy: Fix high frequency sync

2024-03-22 Thread Peter Xu
On Thu, Mar 21, 2024 at 12:20:32PM -0400, Peter Xu wrote: > On Wed, Mar 20, 2024 at 05:44:53PM -0400, pet...@redhat.com wrote: > > From: Peter Xu > > > > On current code base I can observe extremely high sync count during > > precopy, as long as one enables postcopy-ram=on before switchover to >

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

2024-03-22 Thread Philippe Mathieu-Daudé
On 22/3/24 10:23, Stefano Garzarella wrote: 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

  1   2   >