From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0C0E2356764 for ; Wed, 1 Jul 2026 15:07:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782918439; cv=none; b=q00vN1Z7G4Z86c0pH3Qw4+yC/uQDqwpgdrdbTFYQPES6ZbyCwGGhR4ssQNHf34CIXsOsssdKY7lIn8/A4v6H0wFD1fhOZPwFcPWRIhrPV+NMaJYd16WFIfOMRvAM7wUYJjrUp2scWDEIZOzbVIW5+qnx5U4RT3uOwWgeBf4l/lU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782918439; c=relaxed/simple; bh=mtle515uIyp+O7vElJnFWYGr1uuE1TQcAdjdXN5Vo4c=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=EWCoBlGm7rx4l5EoSZp6FGZCk6DEpIBYn7H1N5kc0STpP3k2PecJyRqYPCGK9JTZiMoAKQgxbbUq9op7Zl9A6PuDuSCquCRUWRrJ+k0nMbYnpMm3QjQtH3NodaErtedcEXcS0yoSsZ18DxUxlAel0keUx5a3yf6EHCKZm7EgnYg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=du7ybx56; arc=none smtp.client-ip=209.85.214.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="du7ybx56" Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-2ca0d4fb061so9105975ad.3 for ; Wed, 01 Jul 2026 08:07:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1782918434; x=1783523234; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=35ip1FXhxTsr49Tf+Elt4WaaVNO58PfZuNT2YrZrg5w=; b=du7ybx56GtUFlXWVU3O9LfpHYDV7/+pOAfpsOn3bikOwU9q6VYbpvER6Ii5TEfbid4 cVGaR09SdjsrGJzsKmN/yk+v0FhRORty75rVyokNjzxK8TyhzUilW2xLkb2MgKmKPMCc AXL6zeLlvcL/k3UL1pnt14R02XyU25z7yY2LH3R0yT8o4mSPH07QIRNQ63+5HlF+6eNe Mee8dMbugJRGxgfV3FBChkSW8XFiQktTpoNkk2YpP4HWAnrfvv0FNB5p9iNhvlXcNi0s p2XwqZKe8gw2bF282V7CByNKa9hR9GbqUKZyqCWl8VM5fLHE9dY4omhI4shhIuROgFUV uEsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782918434; x=1783523234; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=35ip1FXhxTsr49Tf+Elt4WaaVNO58PfZuNT2YrZrg5w=; b=YXnQr8rY0JMbO99kJ6Ubdrx/pBV2I9R7rw8orH8cJ5RIXsZqKvwzq5OTBQHP5G3gYN Puu/J+r9gCWz81nAul1IfbTH2pjXW6PfKvHEc0UkWBm3VkQh8ehnd7i+rMgaZZ4Ogpzc JHlkUzYwofvwrfUhoFCyWx7bLTF6YoHF3fcLMPzcpuJWiJhUkmAHzNPcO5Y3ckcPyFOh ONomuKxwyNAeZ0WSTnBa56XNNrZR24yTFRvPpjmCHv16lNrTeZ02I3JG32oucGjbynad Mg95mvm3csxzGWBaIMBF3Yq36Z1pDHphPlb0ZPsIvL0lgx45V8s50VqTdTZ/TU09pOib TaRw== X-Forwarded-Encrypted: i=1; AHgh+RoL94gq7Y75o2H6/aGMUViC9GR9A3OUEKzusrSAKIFF+V+9PcYdiHHqZ58K2bqGMZDcpNBMn+RKWd2M0vI=@vger.kernel.org X-Gm-Message-State: AOJu0YxrxY/3nWzqd8pfZ6ZYKkEhAfGZPNPh1rRTBK6o0awkizqqvehw OYfdSKbd14QBX7+I3ktPtJI/hUqlwY3Qaxj7MM6mrCfz/KAn6/1F8+Oi9Ual4GeXJx5vXer9EfZ MqJqwGw== X-Received: from plbl14.prod.google.com ([2002:a17:902:eb0e:b0:2b0:aef9:a5a2]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:903:3c50:b0:2ca:e5c:7fcf with SMTP id d9443c01a7336-2ca7e654686mr23268045ad.3.1782918433131; Wed, 01 Jul 2026 08:07:13 -0700 (PDT) Date: Wed, 1 Jul 2026 08:07:12 -0700 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260618-gmem-inplace-conversion-v8-0-9d2959357853@google.com> <20260618-gmem-inplace-conversion-v8-7-9d2959357853@google.com> Message-ID: Subject: Re: [PATCH v8 07/46] KVM: Rename memory attribute APIs to prepare for in-place gmem conversion From: Sean Christopherson To: Xiaoyao Li Cc: ackerleytng@google.com, aik@amd.com, andrew.jones@linux.dev, binbin.wu@linux.intel.com, brauner@kernel.org, chao.p.peng@linux.intel.com, david@kernel.org, jmattson@google.com, jthoughton@google.com, michael.roth@amd.com, oupton@kernel.org, pankaj.gupta@amd.com, qperret@google.com, rick.p.edgecombe@intel.com, rientjes@google.com, shivankg@amd.com, steven.price@arm.com, tabba@google.com, willy@infradead.org, wyihan@google.com, yan.y.zhao@intel.com, forkloop@google.com, pratyush@kernel.org, suzuki.poulose@arm.com, aneesh.kumar@kernel.org, liam@infradead.org, Paolo Bonzini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Jonathan Corbet , Shuah Khan , Shuah Khan , Vishal Annapurve , Andrew Morton , Chris Li , Kairui Song , Kemeng Shi , Nhat Pham , Barry Song , Axel Rasmussen , Yuanchu Xie , Wei Xu , Youngjun Park , Qi Zheng , Shakeel Butt , Kiryl Shutsemau , Baoquan He , Jason Gunthorpe , Vlastimil Babka , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, linux-coco@lists.linux.dev Content-Type: text/plain; charset="us-ascii" On Wed, Jul 01, 2026, Xiaoyao Li wrote: > On 7/1/2026 1:30 AM, Sean Christopherson wrote: > > On Tue, Jun 30, 2026, Xiaoyao Li wrote: > > > On 6/19/2026 8:31 AM, Ackerley Tng via B4 Relay wrote: > > > > -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. > > If we finally choose to rename kvm_vm_set_mem_attributes() to > kvm_set_vm_mem_attributes(), I think the trace > trace_kvm_vm_set_mem_attributes() needs to be renamed to keep it consistent? Ya, good catch!