Re: [PATCH] hostmem/shm: Allow shm memory backend serve as shared memory for coco-VMs

2025-07-21 Thread David Hildenbrand
and pass down RAM_GUEST_MEMFD when backend->guest_memfd is true, to allow shm memory backend serve as shared memory for coco-VMs. cc: Stefano Garzarella Signed-off-by: Xiaoyao Li Acked-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH v1] vhost: Fix used memslot tracking when destroying a vhost device

2025-07-16 Thread David Hildenbrand
On 16.07.25 15:31, Michael Tokarev wrote: On 03.06.2025 14:13, David Hildenbrand wrote: When we unplug a vhost device, we end up calling vhost_dev_cleanup() where we do a memory_listener_unregister(). This memory_listener_unregister() call will end up disconnecting the listener from the

Re: [PATCH v2] intel_iommu: Allow both Status Write and Interrupt Flag in QI wait

2025-07-15 Thread David Woodhouse
safe. > > > > > > On Mon, Jul 14, 2025 at 05:41:22PM +0100, David Woodhouse wrote: > > > On 14 July 2025 15:28:09 GMT+01:00, Yi Liu > > > wrote: > > > > Hi David, > > > > > > > > On 2025/7/14 16:00, David Woodhouse wro

Re: [PATCH v2] intel_iommu: Allow both Status Write and Interrupt Flag in QI wait

2025-07-14 Thread David Woodhouse
On 14 July 2025 15:28:09 GMT+01:00, Yi Liu wrote: >Hi David, > >On 2025/7/14 16:00, David Woodhouse wrote: >> From: David Woodhouse >> >> FreeBSD does both, and this appears to be perfectly valid. The VT-d >> spec even talks about the ordering (the sta

Re: [PATCH] intel_iommu: Allow both Status Write and Interrupt Flag in QI wait

2025-07-14 Thread David Woodhouse
On Sun, 2025-07-13 at 17:29 -0400, Michael S. Tsirkin wrote: > > > +    if (inv_desc->lo & VTD_INV_DESC_WAIT_IF) > > +    vtd_generate_completion_event(s); > >   > >   /* FIXME: need to be masked with HAW? */ > >   dma_addr_t status_addr = inv_desc->hi; > > Follow QEM

[PATCH v2] intel_iommu: Allow both Status Write and Interrupt Flag in QI wait

2025-07-14 Thread David Woodhouse
From: David Woodhouse FreeBSD does both, and this appears to be perfectly valid. The VT-d spec even talks about the ordering (the status write should be done first, unsurprisingly). We certainly shouldn't assert() and abort QEMU if the guest asks for both. Fixes: ed7b8fbcfb88 ("i

[PATCH] intel_iommu: Allow both Status Write and Interrupt Flag in QI wait

2025-07-11 Thread David Woodhouse
From: David Woodhouse FreeBSD does both, and this appears to be perfectly valid. The VT-d spec even talks about the ordering (the status write should be done first, unsurprisingly). We certainly shouldn't assert() and abort QEMU if the guest asks for both. Fixes: ed7b8fbcfb88 ("i

Re: [PATCH 0/4] target/s390x: Cleanups around s390_cpu_[un]halt()

2025-07-11 Thread David Hildenbrand
pull request. For these 3: Reviewed-by: David Hildenbrand -- Cheers, David / dhildenb

[PATCH 3/3] video: add libcamera backend extension

2025-07-08 Thread David Milosevic
to query them in runtime, hence we have to select format, width, height and framerate via QEMU's cmdline. Signed-off-by: David Milosevic --- video/libcamera.c | 148 ++ video/meson.build | 1 + 2 files changed, 149 insertions(+)

[PATCH 2/3] video: add GStreamer backend

2025-07-08 Thread David Milosevic
QEMU's core option parsing logic, we adopt a simple workaround: users are asked to substitute commas with '^' when specifying the pipeline. Signed-off-by: Marcello Sylvester Bauer Signed-off-by: David Milosevic --- meson.build | 11 + meson_options.txt

[PATCH 0/3] Introduce new video subsystem with multiple backends

2025-07-08 Thread David Milosevic
emu-Camera/ Best regards, David Milosevic David Milosevic (3): video: introduce video subsystem with inital v4l2 backend video: add GStreamer backend video: add libcamera backend extension hw/core/qdev-properties-system.c| 52 ++ hw/usb/Kconfig |5 + hw/usb/d

[PATCH 1/3] video: introduce video subsystem with inital v4l2 backend

2025-07-08 Thread David Milosevic
(e.g. virtio-video). It is worth mentioning, that this patch incorporates and builds upon earlier work by Zhenwei Pi on video device emulation in QEMU. Previous RFC: https://lists.gnu.org/archive/html/qemu-devel/2025-03/msg02804.html Signed-off-by: Marcello Sylvester Bauer Signed-off-by: David

Re: [PATCH] target/riscv: implement MonitorDef HMP API

2025-07-03 Thread Dr. David Alan Gilbert
80958af4: 6402 ld s0,0(sp) > 0x80958af6: 0141 addisp,sp,16 > 0x80958af8: 8082 ret > 0x80958afa: 10016073 csrrsi zero,sstatus,2 > 0x80958afe: 8082 ret

Re: Controlling time in QEMU

2025-07-03 Thread Dr. David Alan Gilbert
; [1] > https://gitlab.com/qemu-project/qemu/-/commit/72db6d54a4a9203736261fc63f32f6cd3486b7e4 > [2] > https://gitlab.com/qemu-project/qemu/-/commit/847a65dd76bf1868c7966a2b2608dcd00cb68dc7 > [3] > https://gitlab.com/qemu-project/qemu/-/blob/master/include/qemu/timer.h?re

Re: [PATCH v5 23/69] accel/tcg: Remove 'info opcount' and @x-query-opcount

2025-07-03 Thread Dr. David Alan Gilbert
ful command. > > Signed-off-by: Philippe Mathieu-Daudé For HMP Acked-by: Dr. David Alan Gilbert > --- > qapi/machine.json | 18 -- > accel/tcg/monitor.c| 21 - > tests/qtest/qmp-cmd-test.c | 1 - > hmp-commands-info

Re: [PATCH] hmp-cmds-target, target/riscv: add 'info register'

2025-07-01 Thread Dr. David Alan Gilbert
* Daniel Henrique Barboza (dbarb...@ventanamicro.com) wrote: > > > On 6/30/25 9:07 PM, Dr. David Alan Gilbert wrote: > > * Daniel Henrique Barboza (dbarb...@ventanamicro.com) wrote: > > > > Hi Daniel, > > > > > The RISC-V target has *a lot* of CPU

Re: [PATCH] hmp-cmds-target, target/riscv: add 'info register'

2025-06-30 Thread Dr. David Alan Gilbert
ax It doesn't seem very well maintained in the architectures though; the x86 one is prehistoric for example. d) Another way would be to modify info registers to take an optional -r register-list Anyway, those are _suggestions_ only. Dave > The API is introduced as TARGE

Re: [PATCH v7 0/5] Enable shared device assignment

2025-06-24 Thread David Hildenbrand
s to be seen. -- Cheers, David / dhildenb

Re: [PATCH v7 4/6] target/i386: Add couple of feature bits in CPUID_Fn80000021_EAX

2025-06-16 Thread Dr. David Alan Gilbert
* Moger, Babu (babu.mo...@amd.com) wrote: > Hi Dave, > > On 6/6/25 07:29, Dr. David Alan Gilbert wrote: > > * Babu Moger (babu.mo...@amd.com) wrote: > >> Add CPUID bit indicates that a WRMSR to MSR_FS_BASE, MSR_GS_BASE, or > >> MSR_KERNEL_GS_BASE is non-s

Re: [PATCH v2 08/13] migration/postcopy: Report fault latencies in blocktime

2025-06-10 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Tue, Jun 10, 2025 at 12:08:23AM +, Dr. David Alan Gilbert wrote: > > > diff --git a/qapi/migration.json b/qapi/migration.json > > > index 4963f6ca12..e95b7402cb 100644 > > > --- a/qapi/migration.json > > > ++

Re: [PATCH v5 2/7] vhost_user.rst: Align VhostUserMsg excerpt members

2025-06-10 Thread David Hildenbrand
On 09.06.25 16:47, Albert Esteve wrote: Add missing members to the VhostUserMsg excerpt in the vhost-user spec documentation. Reviewed-by: Stefan Hajnoczi Signed-off-by: Albert Esteve --- Reviewed-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH v5 1/7] vhost-user: Add VirtIO Shared Memory map request

2025-06-10 Thread David Hildenbrand
request to the backend to avoid deadlocks. The device model needs to create VirtSharedMemory instances for the VirtIO Shared Memory Regions and add them to the `VirtIODevice` instance. Just a general comment: you can use more characters per line in the patch desription. -- Cheers, David

Re: [PATCH] migration/postcopy: Add latency distribution report for blocktime

2025-06-09 Thread Dr. David Alan Gilbert
262 ms ]: 0 > [ 262 ms - 524 ms ]: 0 > [ 524 ms -1 sec ]: 0 > [1 sec -2 sec ]: 0 > [2 sec -4 sec ]: 0 > [4 sec -8 sec ]: 0 > [8 sec - 16 sec ]: 0 > > Cc: Dr. David

Re: [PATCH v2 08/13] migration/postcopy: Report fault latencies in blocktime

2025-06-09 Thread Dr. David Alan Gilbert
doc that this is not the real average > fault latency, but only the ones that was requested for a remote fault. > > Unwrap get_vcpu_blocktime_list() so we don't need to walk the list twice, > meanwhile add the entry checks in qtests for all postcopy tests. > > Cc: Markus Ar

Re: [PATCH v7 4/6] target/i386: Add couple of feature bits in CPUID_Fn80000021_EAX

2025-06-06 Thread Dr. David Alan Gilbert
_0021_EAX_NULL_SEL_CLR_BASE(1U << 6) > /* Automatic IBRS */ > #define CPUID_8000_0021_EAX_AUTO_IBRS(1U << 8) > +/* Indicates support for IC prefetch */ > +#define CPUID_8000_0021_EAX_PREFETCHI(1U << 20) > /* Enhanc

Re: ppc kvm: support of 64K guest page size with 4K host pagesize?

2025-06-05 Thread David Gibson
lab.com/qemu-project/qemu/-/commit/2309832afdaf8d6451ebc2e81bace8eb8ea41293 > > it seems like this was done on purpose? David, do you remember why > auto-detecting was not a good idea here? Because the available page sizes are guest visible. So if we auto-detected, guests could be silently

Re: [PATCH v2 2/5] virtio-pmem: Fix definition of VirtIOPMEMClass

2025-06-04 Thread David Hildenbrand
On 04.06.25 13:53, Zhenzhong Duan wrote: VirtIOPMEMClass's parent is VirtioDeviceClass rather than VirtIODevice. Fixes: 5f503cd9f388 ("virtio-pmem: add virtio device") Suggested-by: David Hildenbrand Reported-by: might be better, with Closes: linking to my mail Signed-of

Re: [PATCH v6 5/5] physmem: Support coordinated discarding of RAM with guest_memfd

2025-06-04 Thread David Hildenbrand
undo support if state_change() failed. - Didn't add Reviewed-by from Alexey due to the new changes in this commit. --- Acked-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH] virtio-mem: Fix definition of VirtIOMEMClass

2025-06-04 Thread David Hildenbrand
/* private */ -VirtIODevice parent; +VirtioDeviceClass parent; We seem to have the same problem for VirtIOPMEMClass. Can you check the other devices and send fixes? Thanks! -- Cheers, David / dhildenb

Re: [PATCH] virtio-mem: Fix definition of VirtIOMEMClass

2025-06-04 Thread David Hildenbrand
/* private */ -VirtIODevice parent; +VirtioDeviceClass parent; Reviewed-by: David Hildenbrand I assume it's not currently a real problem because VirtIODevice is bigger than VirtioDeviceClass? Or are you aware of any existing problems with that? -- Cheers, David / dhildenb

[PATCH v1] vhost: Fix used memslot tracking when destroying a vhost device

2025-06-03 Thread David Hildenbrand
ghao Link: https://lore.kernel.org/qemu-devel/20241121060755.164310-1-yuanm...@chinatelecom.cn/ Fixes: 2ce68e4cf5be ("vhost: add vhost_has_free_slot() interface") Cc: Igor Mammedov Cc: Michael S. Tsirkin Cc: Stefano Garzarella Signed-off-by: David Hildenbrand --- I assume the pro

Re: [PATCH 1/1] vhost: do not reset used_memslots when destroying vhost dev

2025-06-03 Thread David Hildenbrand
On 30.05.25 13:36, Michael S. Tsirkin wrote: On Fri, May 30, 2025 at 01:28:58PM +0200, David Hildenbrand wrote: On 30.05.25 13:18, Michael S. Tsirkin wrote: On Wed, May 14, 2025 at 11:26:05AM +0200, David Hildenbrand wrote: On 14.05.25 11:12, Igor Mammedov wrote: On Tue, 13 May 2025 15:12:11

Re: [PATCH v6 4/5] ram-block-attributes: Introduce RamBlockAttributes to manage RAMBlock with guest_memfd

2025-06-03 Thread David Hildenbrand
e don't even know what exactly we will exactly need for other future use cases does not sound too plausible. -- Cheers, David / dhildenb

Re: [PATCH v6 4/5] ram-block-attributes: Introduce RamBlockAttributes to manage RAMBlock with guest_memfd

2025-06-02 Thread David Hildenbrand
e. For now, keep the complex error handling out of the picture as it is not required. Signed-off-by: Chenyi Qiang --- Changes in v6: - Change the object type name from RamBlockAttribute to RamBlockAttributes. (David) - Save the associated RAMBlock instead Memor

Re: [PATCH 1/1] vhost: do not reset used_memslots when destroying vhost dev

2025-05-30 Thread David Hildenbrand
On 30.05.25 13:18, Michael S. Tsirkin wrote: On Wed, May 14, 2025 at 11:26:05AM +0200, David Hildenbrand wrote: On 14.05.25 11:12, Igor Mammedov wrote: On Tue, 13 May 2025 15:12:11 +0200 David Hildenbrand wrote: On 13.05.25 14:13, Igor Mammedov wrote: On Mon, 3 Mar 2025 13:02:17 -0500

Re: [PATCH 02/11] migration/hmp: Fix postcopy-blocktime per-vCPU results

2025-05-28 Thread Dr. David Alan Gilbert
elements and also sort them. > > > > To fix it, simply loop over the uint32List manually. Now it looks like: > > > > Postcopy vCPU Blocktime (ms): > >[15, 0, 0, 43, 29, 34, 36, 29, 37, 41, > > 33, 37, 45, 52, 50, 38, 40, 37, 40, 49, > > 40, 35, 3

Re: [PATCH 01/11] migration/hmp: Reorg "info migrate" once more

2025-05-28 Thread Dr. David Alan Gilbert
the QMP interface > when necessary. > > - Sub-grouping for "Transfers" ("Channels" and "Page Types"). > > - Better indentations Thanks, Acked-by: Dr. David Alan Gilbert > Sample output: > > (qemu) info migrate > Status:

Re: [PATCH v5 10/10] ram-block-attribute: Add more error handling during state changes

2025-05-27 Thread David Hildenbrand
maybe keep it as an attached patch for future reference or just remove it. probably best to remove it for now. The patch is in the mailing list archives for future reference :) -- Cheers, David / dhildenb

Re: [PATCH v5 07/10] RAMBlock: Make guest_memfd require coordinate discard

2025-05-27 Thread David Hildenbrand
On 27.05.25 07:47, Chenyi Qiang wrote: On 5/26/2025 5:08 PM, David Hildenbrand wrote: On 20.05.25 12:28, Chenyi Qiang wrote: As guest_memfd is now managed by RamBlockAttribute with RamDiscardManager, only block uncoordinated discard. Signed-off-by: Chenyi Qiang --- Changes in v5

Re: [PATCH v5 10/10] ram-block-attribute: Add more error handling during state changes

2025-05-26 Thread David Hildenbrand
On 26.05.25 12:19, Chenyi Qiang wrote: On 5/26/2025 5:17 PM, David Hildenbrand wrote: On 20.05.25 12:28, Chenyi Qiang wrote: The current error handling is simple with the following assumption: - QEMU will quit instead of resuming the guest if kvm_convert_memory()    fails, thus no need to

Re: [PATCH v5 10/10] ram-block-attribute: Add more error handling during state changes

2025-05-26 Thread David Hildenbrand
bitmap_set(attr->bitmap, first_bit, nbits); +ret = ram_block_attribute_notify_to_populated(attr, offset, size); + if (ret) { +bitmap_clear(attr->bitmap, first_bit, nbits); +} +} } return ret; -- Cheers, David / dhildenb

Re: [PATCH v5 09/10] KVM: Introduce RamDiscardListener for attribute changes during memory conversions

2025-05-26 Thread David Hildenbrand
;d need to call in different orders ... e.g., do private -> shared before mapping to vfio, but to shared ->private after unmapping from vfio. That can be easier handled when doing the calls from KVM code directly. -- Cheers, David / dhildenb

Re: [PATCH v5 07/10] RAMBlock: Make guest_memfd require coordinate discard

2025-05-26 Thread David Hildenbrand
ram_block_discard_require(false); +ram_block_coordinated_discard_require(false); } g_free(block); I think this patch should be squashed into the previous one, then the story in that single patch is consistent. -- Cheers, David / dhildenb

Re: [PATCH v5 06/10] memory: Attach RamBlockAttribute to guest_memfd-backed RAMBlocks

2025-05-26 Thread David Hildenbrand
uot;unsupported for confidential VMs") on this level, and even just exit()'ing the process? All these object_dynamic_cast() checks in this patch should be dropped. -- Cheers, David / dhildenb

Re: [PATCH v5 05/10] ram-block-attribute: Introduce a helper to notify shared/private state changes

2025-05-26 Thread David Hildenbrand
that the bitmap status is updated before callbacks, allowing listeners to handle memory based on the latest status. Signed-off-by: Chenyi Qiang --- I think this should be squashed into the previous patch: I fail to see why the split makes sense. -- Cheers, David / dhildenb

Re: [PATCH v5 04/10] ram-block-attribute: Introduce RamBlockAttribute to manage RAMBlock with guest_memfd

2025-05-26 Thread David Hildenbrand
AMBlock { ram_addr_t postcopy_length; }; +struct RamBlockAttribute { Should this actually be "RamBlockAttributes" ? +Object parent; + + MemoryRegion *mr; Should we link to the parent RAMBlock instead, and lookup the MR from there? -- Cheers, David / dhildenb

Re: [PATCH v5 03/10] memory: Unify the definiton of ReplayRamPopulate() and ReplayRamDiscard()

2025-05-26 Thread David Hildenbrand
VirtIOMEMReplayData, which makes it cleaner. Signed-off-by: Chenyi Qiang Reviewed-by: David Hildenbrand -- Cheers, David / dhildenb

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

2025-05-26 Thread David Hildenbrand
at present. Suggested-by: David Hildenbrand Signed-off-by: Chenyi Qiang --- Reviewed-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [EXTERNAL] [PATCH] hw/xen: Fix trace_xs_node_read() params

2025-05-23 Thread David Woodhouse
_chk (__pri, __USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack > ()); >   |   > ^~ > > Add a check that 'value' is not null before passing it to > trace_xs_node_read(). > > Fixes: e6cdeee95990 ("hw/xen: Add xs

Re: [PATCH v2 2/2] migration/hmp: Add "info migrate -a", reorg the dump

2025-05-21 Thread Dr. David Alan Gilbert
it is for those humans find easiest - that's the H in HMP! (Those AIs can parse Json way easier than I can read Json!) Of course you don't need to reorg it all at once again, if someone finds one section hard, then reorg the way that people find it easy. > It's already in a pull, let's revisit whenever necessary. Thanks for the > input! > Nod. Dave > -- > Peter Xu > -- -Open up your eyes, open up your mind, open up your code --- / Dr. David Alan Gilbert| Running GNU/Linux | Happy \ \dave @ treblig.org | | In Hex / \ _|_ http://www.treblig.org |___/

Re: [PATCH 0/2] hw/riscv/virt.c: change default CPU to 'max'

2025-05-19 Thread David Abdurachmanov
the guest type is QEMU. Basically if you are using libvirt/QEMU (non-KVM guests) and setup VMs with virt-install it will get maximum CPU. See PR: https://github.com/virt-manager/virt-manager/pull/784 Our current instructions in Fedora/RISCV set cpu to max too. This is done by passing --cpu mode=maximum to virt-install command. david

Re: [PATCH V4] vfio: return mr from vfio_get_xlat_addr

2025-05-19 Thread David Hildenbrand
On 17.05.25 15:55, Steven Sistare wrote: On 5/16/2025 4:50 PM, David Hildenbrand wrote: On 16.05.25 21:26, Steven Sistare wrote: On 5/16/2025 2:58 PM, David Hildenbrand wrote: On 16.05.25 19:13, Steve Sistare wrote: Modify memory_get_xlat_addr and vfio_get_xlat_addr to return the memory

Re: [PATCH V4] vfio: return mr from vfio_get_xlat_addr

2025-05-16 Thread David Hildenbrand
On 16.05.25 21:26, Steven Sistare wrote: On 5/16/2025 2:58 PM, David Hildenbrand wrote: On 16.05.25 19:13, Steve Sistare wrote: Modify memory_get_xlat_addr and vfio_get_xlat_addr to return the memory region that the translated address is found in.  This will be needed by CPR in a subsequent

Re: [PATCH V4] vfio: return mr from vfio_get_xlat_addr

2025-05-16 Thread David Hildenbrand
r, errp); -if (ret && mr_has_discard_manager) { +mr = memory_translate_iotlb(iotlb, xlat_p, errp); +if (!mr && memory_region_has_ram_discard_manager(mr)) { Pretty sue this should be if (mr && ...) otherwise we'd be dereferencing NULL :) Apart from tha

Re: [PATCH 8/9] target/s390x/kvm/pv: Consolidate OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES

2025-05-16 Thread David Hildenbrand
27;s all unbelievable unreadable already, no need to fake that breaking lines would improve that in any way ... -- Cheers, David / dhildenb

Re: [PATCH V3 26/42] vfio: return mr from vfio_get_xlat_addr

2025-05-15 Thread David Hildenbrand
On 14.05.25 19:03, Cédric Le Goater wrote: + Paolo + David + Peter + Phil On 5/12/25 22:51, John Levon wrote: On Mon, May 12, 2025 at 08:32:37AM -0700, Steve Sistare wrote: Modify memory_get_xlat_addr and vfio_get_xlat_addr to return the memory region that the translated address is found in

Re: [PATCH v2 2/2] migration/hmp: Add "info migrate -a", reorg the dump

2025-05-14 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Wed, May 14, 2025 at 08:29:53PM +, Dr. David Alan Gilbert wrote: > > * Peter Xu (pet...@redhat.com) wrote: > > > A new parameter "-a" is added to "info migrate" to dump all info, while > > > when not sp

Re: [PATCH v2 2/2] migration/hmp: Add "info migrate -a", reorg the dump

2025-05-14 Thread Dr. David Alan Gilbert
normal" pages) > - Regroup things, so that related fields will show together > - etc. Thanks for the update, Reviewed-by: Dr. David Alan Gilbert Note that you did miss the change (which would be fine as a follow up) where I point out that I think your unit abbreviations are sl

Re: live-migration performance regression when using pmem

2025-05-14 Thread David Hildenbrand
On 13.05.25 22:11, Michael S. Tsirkin wrote: On Tue, May 13, 2025 at 07:21:36PM +0200, David Hildenbrand wrote: On 12.05.25 17:16, Chaney, Ben wrote: Hello, When live migrating to a destination host with pmem there is a very long downtime where the guest is paused. In some cases

Re: [PATCH 2/3] migration/hmp: Dump global in "info migrate_parameters" instead

2025-05-14 Thread Dr. David Alan Gilbert
+migration_global_dump(mon); > + > params = qmp_query_migrate_parameters(NULL); > > if (params) { > -- > 2.49.0 > -- -Open up your eyes, open up your mind, open up your code --- / Dr. David Alan Gilbert| Running GNU/Linux | Happy \ \dave @ treblig.org | | In Hex / \ _|_ http://www.treblig.org |___/

Re: [PATCH 3/3] migration/hmp: Add "info migrate -a", reorg the dump

2025-05-14 Thread Dr. David Alan Gilbert
s->mbps = ((double) bytes * 8.0) / transfer_time / 1000; > Sizes (KB): psize=4, total=16777992 and I think that is actually (KiB) i.e. 2^10 bytes Other than those, Reviewed-by: Dr. David Alan Gilbert > transferred=15697718, remain=12383520, > precopy=2, multifd=156977

Re: [PATCH 1/3] migration: Allow caps to be set when preempt or multifd cap enabled

2025-05-14 Thread Dr. David Alan Gilbert
t > before incoming") > Signed-off-by: Peter Xu Reviewed-by: Dr. David Alan Gilbert > --- > migration/options.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/migration/options.c b/migration/options.c > index 3fcd577cd7..162c72cda4 1006

Re: [PATCH 1/1] vhost: do not reset used_memslots when destroying vhost dev

2025-05-14 Thread David Hildenbrand
On 14.05.25 11:12, Igor Mammedov wrote: On Tue, 13 May 2025 15:12:11 +0200 David Hildenbrand wrote: On 13.05.25 14:13, Igor Mammedov wrote: On Mon, 3 Mar 2025 13:02:17 -0500 yuanminghao wrote: Global used_memslots or used_shared_memslots is updated to 0 unexpectly it shouldn't

Re: [PATCH 8/9] target/s390x/kvm/pv: Consolidate OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES

2025-05-14 Thread David Hildenbrand
Pasic Cc: Christian Borntraeger Cc: Thomas Huth Cc: Richard Henderson Cc: David Hildenbrand Cc: Ilya Leoshkevich Cc: qemu-s3...@nongnu.org Signed-off-by: Zhao Liu --- target/s390x/kvm/pv.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/target/s390x/

Re: live-migration performance regression when using pmem

2025-05-13 Thread David Hildenbrand
); /* Clear whole block of mem */ static inline void qemu_ram_block_writeback(RAMBlock *block) { -qemu_ram_msync(block, 0, block->used_length); +if (!(block->flags & RAM_READONLY)) +qemu_ram_msync(block, 0, block->used_length); } -- Cheers, David / dhildenb

Re: [PATCH 1/1] vhost: do not reset used_memslots when destroying vhost dev

2025-05-13 Thread David Hildenbrand
ops->vhost_backend_no_private_memslots(dev)) { used_shared_memslots = dev->mem->nregions; } else { used_memslots = dev->mem->nregions; } where value dev->mem->nregions gets is well hidden/obscured and hard to trace where tail ends => fragile. CCing Davi

Re: [PATCH v4 18/23] target/s390x: call plugin trap callbacks

2025-05-12 Thread David Hildenbrand
On 12.05.25 10:43, Julian Ganz wrote: From: Julian Ganz Hi David, It appears you only replied to the qemu-devel list? I just saw this when informing a co-worker about this series. Yeah, sorry for that. My tired mind clicked the wrong button (reply to sender only ...) On 11.05.25 15:14

Re: [PATCH v2 01/20] memory: Adjust event ranges to fit within notifier boundaries

2025-05-12 Thread David Hildenbrand
65506.31315-6-epere...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin I think this change here is fine, but it would be good getting Pete Xu's opinion. Acked-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH v4 10/13] memory: Change NotifyStateClear() definition to return the result

2025-05-12 Thread David Hildenbrand
On 09.05.25 12:04, Chenyi Qiang wrote: On 5/9/2025 4:22 PM, Baolu Lu wrote: On 4/27/2025 10:26 AM, Chenyi Qiang wrote: Hi David, Any thought on patch 10-12, which is to move the change attribute into a priority listener. A problem is how to handle the error handling of private_to_shared

Re: [PATCH v4 18/23] target/s390x: call plugin trap callbacks

2025-05-12 Thread David Hildenbrand
t I'm curious about the semantics: are we supposed to call qemu_plugin_vcpu_interrupt_cb() just after an interrupt got delivered? -- Cheers, David / dhildenb

Re: [PATCH v4 10/13] memory: Change NotifyStateClear() definition to return the result

2025-05-09 Thread David Hildenbrand
On 09.05.25 04:38, Chao Gao wrote: On Sun, Apr 27, 2025 at 10:26:52AM +0800, Chenyi Qiang wrote: Hi David, Any thought on patch 10-12, which is to move the change attribute into a priority listener. A problem is how to handle the error handling of private_to_shared failure. Previously, we

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

2025-05-09 Thread David Hildenbrand
M, we also allocate yet another dirty bitmap without KVM_MEM_LOG_DIRTY_PAGES. Assuming a 4 TiB VM, a single bitmap should be 128 MiB. -- Cheers, David / dhildenb

Re: [PATCH 06/10] qapi: make Xen event commands unconditionally available

2025-05-08 Thread David Woodhouse
; file impl should get discarded by the linker automatically, avoiding > a duplicate symbols problem. Thanks. In that case, Acked-by: David Woodhouse smime.p7s Description: S/MIME cryptographic signature

Re: [PATCH 06/10] qapi: make Xen event commands unconditionally available

2025-05-08 Thread David Woodhouse
On Thu, 2025-05-08 at 17:01 +0200, Philippe Mathieu-Daudé wrote: > Cc'ing Zhao > > On 8/5/25 15:58, Daniel P. Berrangé wrote: Hm, what mailer does that? Does it mean August 5th or May 8th? Even in the original definition of RFC821 they knew not to use dates in those forms :) > > This removes the

Re: [PATCH v3 5/5] hw/virtio: Compile virtio-mem.c once

2025-05-05 Thread David Hildenbrand
On 02.05.25 23:45, Philippe Mathieu-Daudé wrote: Remove unused "system/ram_addr.h" header. This file doesn't use any target specific definitions anymore, compile it once by moving it to system_virtio_ss[]. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Hildenbrand

Re: [PATCH v3 4/5] hw/virtio/virtio-mem: Convert VIRTIO_MEM_HAS_LEGACY_GUESTS to runtime

2025-05-05 Thread David Hildenbrand
runtime. Signed-off-by: Philippe Mathieu-Daudé --- Acked-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH v3 3/5] hw/virtio/virtio-mem: Convert VIRTIO_MEM_USABLE_EXTENT to runtime

2025-05-05 Thread David Hildenbrand
On 02.05.25 23:45, Philippe Mathieu-Daudé wrote: Use target_system_arch() to check at runtime which target architecture is being run. Note, since TARGET_ARM is defined for TARGET_AARCH64, we check for both ARM & AARCH64 enum values. Signed-off-by: Philippe Mathieu-Daudé --- Acked-by: D

Re: [PATCH v3 1/1] system: optimizing info mtree printing for monitors

2025-04-30 Thread David Hildenbrand
since the mtree_node_type enum doesn't bring much (see [*] below). Note that I suggested that, because the passing or true/false in the code is horrible for readability. -- Cheers, David / dhildenb

Re: [PATCH v1 1/1] system: optimizing info mtree printing for monitors

2025-04-30 Thread David Hildenbrand
ail" into an enum like. enum mtree_node_type { MTREE_NODE_T_INNER, MTREE_NODE_T_TAIL, } e.g. mtree_print_mr(mr, 1, 0, asi->ml_head, asi->owner, asi->disabled, MTREE_NODE_T_INNER); and enum mtree_node_type mtree_node_type = MTREE_NODE_T_INNER; ... if (ml == QTAILQ_LAST(

Re: [PATCH v4 05/13] memory: Introduce PrivateSharedManager Interface as child of GenericStateManager

2025-04-29 Thread David Hildenbrand
On 27.04.25 03:40, Chenyi Qiang wrote: On 4/25/2025 8:57 PM, David Hildenbrand wrote: On 07.04.25 09:49, Chenyi Qiang wrote: To manage the private and shared RAM states in confidential VMs, introduce a new class of PrivateShareManager as a child of GenericStateManager, which inherits the six

Re: [PATCH] s390x: Clear RAM on diag308 subcode 3 reset

2025-04-29 Thread David Hildenbrand
s the new "memory pinned" mode. [1] There, we'd have to check if any such device is around (discarding of ram is disabled?), and fallback to actual zeroing of memory. [1] https://lkml.kernel.org/r/20250226210013.238349-1-mjros...@linux.ibm.com -- Cheers, David / dhildenb

Re: [PATCH v4 05/13] memory: Introduce PrivateSharedManager Interface as child of GenericStateManager

2025-04-25 Thread David Hildenbrand
. (e.g., RamDiscardStateProvider vs. RamPrivateStateProvider) -- Cheers, David / dhildenb

Re: [PATCH v4 04/13] memory: Introduce generic state change parent class for RamDiscardManager

2025-04-25 Thread David Hildenbrand
ared as no use case at present. } In the future, if we want to manage three states, we can only extend PrivateSharedManagerClass/PrivateSharedListener. Hi Alexey & David, Any thoughts on this proposal? Thinking about how to reasonable make virtio-mem and guest_memdfd work in the future tog

Re: [PATCH v4 04/13] memory: Introduce generic state change parent class for RamDiscardManager

2025-04-25 Thread David Hildenbrand
k. The sources notify the manager, and the manager can ask other sources to merge the information. -- Cheers, David / dhildenb

Re: [PATCH v4 03/13] memory: Unify the definiton of ReplayRamPopulate() and ReplayRamDiscard()

2025-04-25 Thread David Hildenbrand
s/ReplayStateChange/ReplayRamStateChange/ Just "State" is way too generic imho. Right, but raised in my review, the "Change" is wrong, it's not a change. ReplayRamState ... ReplayRamDiscardState or sth like that ? After all, it's the "RAM Discard manager". -- Cheers, David / dhildenb

Re: [PATCH v4 03/13] memory: Unify the definiton of ReplayRamPopulate() and ReplayRamDiscard()

2025-04-25 Thread David Hildenbrand
aller, that can just always return 0 -- like we do in dirty_bitmap_clear_section() now. So yeah, this looks fine to me, given that we don't call it a "state change" when we are merely replaying a selected state. -- Cheers, David / dhildenb

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

2025-04-25 Thread David Hildenbrand
ly the solution would look like. Possibly, we have a list of such "populate/discard" information sources, and a real "manager" on top, that gets notified by these sources. That real "manager" would then collect information from other sources to make a decision whether to propagate the populate / shared notification. -- Cheers, David / dhildenb

Re: [PATCH] system/memory: Remove DEVICE_HOST_ENDIAN definition

2025-04-23 Thread David Hildenbrand
ned-off-by: Philippe Mathieu-Daudé --- Reviewed-by: David Hildenbrand -- Cheers, David / dhildenb

Re: Trying cpr

2025-04-21 Thread Dr. David Alan Gilbert
* Dongli Zhang (dongli.zh...@oracle.com) wrote: > > > On 4/21/25 6:38 AM, Dr. David Alan Gilbert wrote: > > Hi Steve, > > I've just had a go with cpr-transfer, it's quite interesting. > > I was just trying it on my (AMD) desktop. > > > > *

Trying cpr

2025-04-21 Thread Dr. David Alan Gilbert
, "addr": { "transport": "socket", "type": "unix", "path": "cpr.sock"}}' Dave -- -Open up your eyes, open up your mind, open up your code --- / Dr. David Alan Gilbert| Running GNU/Linux | Happy \ \dave @ treblig.org | | In Hex / \ _|_ http://www.treblig.org |___/

Re: Management applications and CPU feature flags

2025-04-11 Thread David Hildenbrand
ask why we don't have something like a "query-cpu" command to tell us the current CPU expansion, avoiding the need for poking at QOM properties directly. How do the existing query-cpu-FOO fall short of what management applications such as libvirt needs? It has been along while since I looked at them, but IIRC they were returning static info about CPU models, whereas libvirt wanted info on the currently requested '-cpu ARGS' Not sure what the exact requirements and other archs, but at least on s390x I think that's exactly what we do. If you expand a non-static model (e.g., z14) you'd get the expansion as if you would specify "-cpu z14" on the cmdline for a specific QEMU machine. Looking at CPU properties is really a nasty hack. Libvirt developers, please work with us on design of new commands or improvements to existing ones to better meet libvirt's needs in this area. Yes, knowing about requirements and why the existing APIs don't work would be great. -- Cheers, David / dhildenb

Re: [PATCH 1/2] i386/xen: Move KVM_XEN_HVM_CONFIG ioctl to kvm_xen_init_vcpu()

2025-04-05 Thread David Woodhouse
On Fri, 2025-02-07 at 14:37 +, David Woodhouse wrote: > From: David Woodhouse > > At the time kvm_xen_init() is called, hyperv_enabled() doesn't yet work, so > the correct MSR index to use for the hypercall page isn't known. > > Rather than setting it to the

[PATCH] hw/smbios/smbios.c: Add missing NUL terminal to string from path= parameter

2025-04-05 Thread Valentin David
Without it, it seems the data gets garbage at the end of the string. Signed-off-by: Valentin David --- hw/smbios/smbios.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index 02a09eb9cd..7522e9a172 100644 --- a/hw/smbios/smbios.c +++ b/hw/smbios

Re: [PATCH] smbios: Fix buffer overrun when using path= option

2025-04-04 Thread Valentin David
On Thu, Apr 3, 2025 at 9:37 PM Philippe Mathieu-Daudé wrote: > Also I was hoping I could get feedback from Valentin. > > Sorry, I did not realize that you wanted my feedback. Daan's patch looks fine to me. I have manually tested it and it fixes my issue.

Re: [PATCH] smbios: Fix buffer overrun when using path= option

2025-04-04 Thread Valentin David
Yes. On Fri, Apr 4, 2025 at 5:02 PM Philippe Mathieu-Daudé wrote: > On 4/4/25 16:46, Valentin David wrote: > > On Thu, Apr 3, 2025 at 9:37 PM Philippe Mathieu-Daudé > <mailto:phi...@linaro.org>> wrote: > > > > Also I was hoping I could get feedback from V

Re: [PULL 23/29] ui & main loop: Redesign of system-specific main thread event handling

2025-04-02 Thread David Woodhouse
On Tue, 2025-04-01 at 13:58 +0200, Philippe Mathieu-Daudé wrote: > On 1/4/25 13:43, David Woodhouse wrote: > > On Tue, 2025-04-01 at 13:30 +0200, Philippe Mathieu-Daudé wrote: > > > On 1/4/25 13:18, Philippe Mathieu-Daudé wrote: > > > > Hi David, > > > >

Re: [PULL 23/29] ui & main loop: Redesign of system-specific main thread event handling

2025-04-01 Thread David Woodhouse
On Tue, 2025-04-01 at 13:30 +0200, Philippe Mathieu-Daudé wrote: > On 1/4/25 13:18, Philippe Mathieu-Daudé wrote: > > Hi David, > > > > On 8/1/25 14:51, David Woodhouse wrote: > > > On Tue, 2024-12-31 at 21:22 +0100, Philippe Mathieu-Daudé wrote: > > > >

Re: [PATCH] hw/acpi: Remove legacy reset handling from vmclock

2025-03-29 Thread David Woodhouse
On Fri, 2025-02-07 at 14:34 +, David Woodhouse wrote: > From: David Woodhouse > > The vmclock device only has a reset method in order to plug its memory > region into the system memory. It was originally done this way in order > to defer the memory_region_add_subregion

Re: [PATCH 0/2] exec: Restrict memory-internal.h to system/

2025-03-17 Thread David Hildenbrand
On 17.03.25 17:13, Philippe Mathieu-Daudé wrote: Only file units within the system/ directory need access to "memory-internal.h". Move it to system/ to restrict its scope. Based-on: <20250314173139.2122904-1-pierrick.bouv...@linaro.org> Reviewed-by: David Hildenbrand -

Re: [PATCH v3 4/7] memory-attribute-manager: Introduce MemoryAttributeManager to manage RAMBLock with guest_memfd

2025-03-17 Thread David Hildenbrand
m for confidential VMs. Then we'd have "shared+populated, private+populated, shared+discard, private+discarded". Not sure if this could simply be achieved by allowing multiple RamDiscardManager that are effectively chained, or if we'd want a different interface. -- Cheers, David / dhildenb

  1   2   3   4   5   6   7   8   9   10   >