Re: [PATCH v4 12/13] ram-block-attribute: Add priority listener support for PrivateSharedListener

2025-05-09 Thread Baolu Lu
On 4/7/2025 3:49 PM, Chenyi Qiang wrote: In-place page conversion requires operations to follow a specific sequence: unmap-before-conversion-to-private and map-after-conversion-to-shared. Currently, both attribute changes and VFIO DMA map/unmap operations are handled by PrivateSharedListeners, th

Re: [PATCH v4 11/13] KVM: Introduce CVMPrivateSharedListener for attribute changes during page conversions

2025-05-09 Thread Baolu Lu
On 4/7/2025 3:49 PM, Chenyi Qiang wrote: With the introduction of the RamBlockAttribute object to manage RAMBlocks with guest_memfd and the implementation of PrivateSharedManager interface to convey page conversion events, it is more elegant to move attribute changes into a PrivateSharedListener.

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

2025-05-09 Thread Baolu Lu
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 failure. Previously, we thought it would never be able to fail, but right now, it is

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

2025-05-09 Thread Baolu Lu
On 4/7/25 15:49, Chenyi Qiang wrote: Commit 852f0048f3 ("RAMBlock: make guest_memfd require uncoordinated discard") highlighted that subsystems like VFIO may disable RAM block discard. However, guest_memfd relies on discard operations for page conversion between private and shared memory, potenti