From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f202.google.com (mail-pl1-f202.google.com [209.85.214.202]) (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 5C4C4346A10 for ; Wed, 10 Jun 2026 22:23:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781130200; cv=none; b=HiTBCe3RkzeDs3e/mO3fbPTflVnQ+/Lhyl8bjDnBIg5u/EmaFqQ5hLBUidfSCVdZL9UuPBu2sSoTtVDuRwpvzA1xxsGSBKtLJ17LKmN/kI62ZVBf+YUzAxTLdXaz8FJtcsMCu7XERtn6TwnYCsO1xnXqTwJ99mCqXzWFVTLQGBk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781130200; c=relaxed/simple; bh=qAjd2/KUhCE05aLK86qBIKOiIpOhNXWGC/5z6iGv760=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=ZJmKBUHuSXYAIBQTU7QzVEhRlairulx3hRurZHI2KPGnIApMFCryPeuy5QMbqsOjnT6a2y2zhz7WST6F+/Z8sAN8FNcrxXQGISmEdwm8NF6IXJ2VADVlyETVjs2fj8mMvgaGUIyEEVIqBKvb2vOuDFwL8TJGX7GhsVx18kdyp1o= 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=v/y78KOp; arc=none smtp.client-ip=209.85.214.202 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="v/y78KOp" Received: by mail-pl1-f202.google.com with SMTP id d9443c01a7336-2bf11699875so3294825ad.1 for ; Wed, 10 Jun 2026 15:23:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1781130198; x=1781734998; 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=98nQEvZDyKKcPdn3AcVzWFv9XYmn8L+0P9K+2v5L7Fk=; b=v/y78KOpMM8Epdinj0Xd1ajiQGJ9nvLmAuLlvnNN5mC4ejiucVZcg1iGoZf/12aAoa ten+bmESuXsdcP+YVqnpO7vMWHm7dOm7LxSCrDZH9Qm/3AtgtBAVQhA7/N8RirUKtbxd wyiW5hY2MiniyOnEqEKUh6fBTZPo2FvpttmZylPFqs9nh9mE9EnwJ6LKdSSwItCt2xiF FBbGo4j9qn8cAH1sqgrtZ8Kfs6vyBwlVdV2l9LiYQskgBRd4w2or4xutpD/CTi+xGa6s riN21OgqjBNctSNpy/6f2xk4rYgNsXb8fGoIStUcoB31NggKGLXJVp71Om83RhR26I4E Qv8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781130198; x=1781734998; 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=98nQEvZDyKKcPdn3AcVzWFv9XYmn8L+0P9K+2v5L7Fk=; b=DwqYME4+CwW41V033RPW+MG+y0FRTEpo7EeqbCvIy13qOo/x7k5nhvZkqBkEx9B+LX aPsQryjNXJNd8Og+idfC3R7gtQcHJsgmecUmxXHeBDE+JjvMyA+u32txhzc+DHR3FaS1 EpwYm3UPfsh7S4l982x73T37VR6fqwNOAmLZv/0+zXMw5LrLiSA/PYzALVYLoHOmuxl4 1hjrHJ8OEDyaAkdIoH8d1wK/IJLcgrkGVZim4ZLszTjnmjlR4O6Hows5JV4i+Z2CDjPo K7QtXmnU50xUO1TLFqtf/NA2G3/NlpMasGBqWZiXG0ZWOKCm5uZqfJuoYFvxOOEA5+k7 MLOQ== X-Forwarded-Encrypted: i=1; AFNElJ858vJ/x5SdEy8PfI+Bkur1FE6iH+D4CZio3vDDeor3s2yvJ4UDmgarpVuJFUqNlEFh2MO7dOXaJvWm17k=@vger.kernel.org X-Gm-Message-State: AOJu0YywYJzi8Epv+GUPmy4J3JE/OXV32ob5StKEuQDnL1YeHVLRFdvH jw+pWagnHUVR9cfa8ziZ02yLPjxctkRf1FnELa3+2DnKG6jFgoVjmCu+W+QliiWP7ssJkCAyyXo btGBBrw== X-Received: from plpv10.prod.google.com ([2002:a17:902:9a0a:b0:2bf:224f:daf]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:903:3c6f:b0:2bf:1aa9:6c8a with SMTP id d9443c01a7336-2c2dce83fd5mr4806375ad.12.1781130197572; Wed, 10 Jun 2026 15:23:17 -0700 (PDT) Date: Wed, 10 Jun 2026 15:23:16 -0700 In-Reply-To: <20260522-gmem-inplace-conversion-v7-6-2f0fae496530@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260522-gmem-inplace-conversion-v7-0-2f0fae496530@google.com> <20260522-gmem-inplace-conversion-v7-6-2f0fae496530@google.com> Message-ID: Subject: Re: [PATCH v7 06/42] KVM: guest_memfd: Update kvm_gmem_populate() to use gmem attributes From: Sean Christopherson To: Ackerley Tng Cc: aik@amd.com, andrew.jones@linux.dev, binbin.wu@linux.intel.com, brauner@kernel.org, chao.p.peng@linux.intel.com, david@kernel.org, ira.weiny@intel.com, 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 , Baoquan He , Barry Song , Axel Rasmussen , Yuanchu Xie , Wei Xu , Youngjun Park , Qi Zheng , Shakeel Butt , Kiryl Shutsemau , 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 Fri, May 22, 2026, Ackerley Tng wrote: > Update the guest_memfd populate() flow to pull memory attributes from the > gmem instance instead of the VM when KVM is not configured to track > shared/private status in the VM. > > Rename the per-VM API to make it clear that it retrieves per-VM > attributes, i.e. is not suitable for use outside of flows that are > specific to generic per-VM attributes. > > Co-developed-by: Sean Christopherson > Signed-off-by: Sean Christopherson > Reviewed-by: Fuad Tabba > Signed-off-by: Ackerley Tng We should squash this in with the previous patch, i.e. wire up PRIVATE to gmem in a single patch (sans the ioctl support). I had a hell of time figure out how the range-based lookup was supposed to work when revisiting the "wire up" patch, until I realized populate() was handled in the next patch.