Thread (184 messages) 184 messages, 12 authors, 14h ago

Re: [PATCH v8 07/46] KVM: Rename memory attribute APIs to prepare for in-place gmem conversion

From: Sean Christopherson <seanjc@google.com>
Date: 2026-06-30 17:30:43
Also in: kvm, linux-coco, linux-doc, linux-kselftest, linux-mm, lkml

On Tue, Jun 30, 2026, Xiaoyao Li wrote:
On 6/19/2026 8:31 AM, Ackerley Tng via B4 Relay wrote:
quoted
-bool kvm_range_has_memory_attributes(struct kvm *kvm, gfn_t start, gfn_t end,
-				     unsigned long mask, unsigned long attrs);
+bool kvm_range_has_vm_memory_attributes(struct kvm *kvm, gfn_t start, gfn_t end,
+					unsigned long mask, unsigned long attrs);
  bool kvm_arch_pre_set_memory_attributes(struct kvm *kvm,
  					struct kvm_gfn_range *range);
  bool kvm_arch_post_set_memory_attributes(struct kvm *kvm,
We have

 - kvm_pre_set_memory_attributes()
 - kvm_arch_pre_set_memory_attributes()
 - kvm_arch_post_set_memory_attributes()
Yeah, that's probably for the best.
left, do they need to be renamed as well?

then the interesting one is kvm_vm_set_mem_attributes(), which contains "vm"
already while it means "vm ioctl". Do we need to rename it to
kvm_vm_set_vm_mem_attributes()?
I say "no" on this last one, the fact that the function is scoped to a VM ioctl
is enough to communicate that it applies to per-VM attributes.

Actually, since it's a local helper, we could go with kvm_set_vm_mem_attributes()
to be consistent with the other functions.  That just leaves
kvm_vm_ioctl_set_mem_attributes(), which I think it appropriately scoped.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help