Skip to contentSkip to conversation

PUCK Agenda - 2025.04.02 - No Topic

ANNOUNCE Sean Christopherson 2 participants 4 messages Apr 2, 2025 – May 1, 2025 KVM

lore
Share & tools
lore
#1 lore raw

Would like to add an agenda item for 2025-04-30's PUCK meeting: KVM memory attributes vs guest_memfd shareability.

guest_memfd tracks shareability to determine whether a page can be faulted by the host into userspace.

pKVM does not use kvm->mem_attr_array for tracking private/shared status of a page, and for Coco VMs like TDX, there seems to be duplicate tracking of private/shared status in guest_memfd's shareability and in KVM's memory attributes.

I would like to discuss a proposal for shared/private conversions to be performed through a guest_memfd (not KVM) ioctl instead of using KVM_SET_MEMORY_ATTRIBUTES, where Coco VMs using guest_memfd for both shared and private memory can be able to (with some other changes around KVM memory attributes) skip tracking private/shared in KVM's memory attributes.

Thank you!

author reviewer
#2 lore raw
Quoted 3 lines · Ackerley Tng

Would like to add an agenda item for 2025-04-30's PUCK meeting: KVM memory attributes vs guest_memfd shareability.

Does next week work for you? I.e. May 7th. I won't be able to make tomorrow's PUCK (about to send a cancelation mail).

Quoted 8 lines

guest_memfd tracks shareability to determine whether a page can be faulted by the host into userspace.

pKVM does not use kvm->mem_attr_array for tracking private/shared status of a page, and for Coco VMs like TDX, there seems to be duplicate tracking of private/shared status in guest_memfd's shareability and in KVM's memory attributes.

Quoted 6 lines

I would like to discuss a proposal for shared/private conversions to be performed through a guest_memfd (not KVM) ioctl instead of using KVM_SET_MEMORY_ATTRIBUTES, where Coco VMs using guest_memfd for both shared and private memory can be able to (with some other changes around KVM memory attributes) skip tracking private/shared in KVM's memory attributes.

Has the proposal been posted on-list anywhere? I haven't been following the guest_memfd threads very closely (understatement).

#3 lore raw
Quoted 23 lines · Sean Christopherson
Quoted 3 lines · Ackerley Tng

Would like to add an agenda item for 2025-04-30's PUCK meeting: KVM memory attributes vs guest_memfd shareability.

Does next week work for you? I.e. May 7th. I won't be able to make tomorrow's PUCK (about to send a cancelation mail).

Quoted 8 lines

guest_memfd tracks shareability to determine whether a page can be faulted by the host into userspace.

pKVM does not use kvm->mem_attr_array for tracking private/shared status of a page, and for Coco VMs like TDX, there seems to be duplicate tracking of private/shared status in guest_memfd's shareability and in KVM's memory attributes.

Quoted 6 lines

I would like to discuss a proposal for shared/private conversions to be performed through a guest_memfd (not KVM) ioctl instead of using KVM_SET_MEMORY_ATTRIBUTES, where Coco VMs using guest_memfd for both shared and private memory can be able to (with some other changes around KVM memory attributes) skip tracking private/shared in KVM's memory attributes.

Quoted 2 lines

Has the proposal been posted on-list anywhere? I haven't been following the guest_memfd threads very closely (understatement).

We managed to get it discussed at the guest_memfd upstream call. Here are the slides, updated with discussion notes:
https://lpc.events/event/18/contributions/1764/attachments/1409/3708/2025-05-01-kvm-memory-attributes-vs-guest_memfd-shareability.pdf

Please remove the topic from the next PUCK! Thanks.