From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-188.mta1.migadu.com (out-188.mta1.migadu.com [95.215.58.188]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2014C2FFF81 for ; Tue, 23 Jun 2026 08:21:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.188 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782202867; cv=none; b=szlqf2FqrakY2k4B8ShaswozhcmymvTLxXZsWzbvWbfG7fhpMNFvRFpsfEr4tBs/Ua5mq6pMWpUjAN6h3hc1rgm45cXaZ+Cn41m9ooeZDSxz3NrJ32dD+og4RE5tWiw+j2kQkYxwqYXRjmohiRMMJ67m7vYSka0ESVj6wywaPgY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782202867; c=relaxed/simple; bh=vWncEwffRc3SYTUhcngGHajaIOMNvIgO6vhdoy3NFQs=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=cVpIuRbMVwYQTFXnz5PazeRtjFwh2jcx3dK6Fb4fCBI3dKyJtXyTQNDt9L1F87ULyzWUbH4Y+8jrE82lpkzOrgCDql1nUpUJsuh5Fkp8KEP4tyX7udyrjPixUueQumdfy+H5ymZUeqt78yfj24wyEP2/P130SvfMqau3MLU4qzI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=xkGb1zqg; arc=none smtp.client-ip=95.215.58.188 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="xkGb1zqg" X-Forwarded-Encrypted: i=1; AFNElJ99l2SQsybI5tLhFAx3jEmwwjg9z1L6+du1JUn/nWjRqIrb/43wV0Ag0cyS8UMUi58VAQ6imNxEhc3F1Kw=@vger.kernel.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1782202864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QXAENCcp5BDbPSOsn4f1upfQaIKMcigDEFtOKnyVkvM=; b=xkGb1zqg3ikXx+Fy7rE8sVtW/Z+Qq1v0hjRxwUxOFfF8e2FxfxcNPrKHzRUcQlLhDFLcA4 F3MBA550noluKUZQw7nAweApzmhmZejH1VR1ltr6kV5n2ByZxxMkfdEkstfibIyAf3NTOj X9AtU+Tx6IdyArqNsl+cNPkii9CFVV0= X-Gm-Message-State: AOJu0YwlpRGQudj5pWrZP6pQIRxFQ2b/cnTuhZjX0jW7P/Eq9qPp3dyt 6LFxRuK2j/UrfWz5mHzldSMCY8xin+mgz4zUgN86QT+/C+nRrw9xSmAVg22H6p6a5hhPP/R/QXn 1iIgx0oP814KqBGldKdmoZjlSymxKoUC/7vNCKMfO X-Received: by 2002:a05:622a:1246:b0:519:f8a0:16b4 with SMTP id d75a77b69052e-51a522c6f26mr6874451cf.14.1782202842728; Tue, 23 Jun 2026 01:20:42 -0700 (PDT) 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-13-9d2959357853@google.com> In-Reply-To: X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Fuad Tabba Date: Tue, 23 Jun 2026 09:20:06 +0100 X-Gmail-Original-Message-ID: X-Gm-Features: AVVi8Cd8AX_ogmuHxl3lyKLs763XEWuLTlPOQRHFThhzmhUCsdYVCq6sKYCvrh8 Message-ID: Subject: Re: [PATCH v8 13/46] KVM: guest_memfd: Add base support for KVM_SET_MEMORY_ATTRIBUTES2 To: Sean Christopherson 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, 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="UTF-8" X-Migadu-Flow: FLOW_OUT On Tue, 23 Jun 2026 at 01:22, Sean Christopherson wrote: > > On Fri, Jun 19, 2026, Fuad Tabba wrote: > > On Fri, 19 Jun 2026 at 01:31, Ackerley Tng via B4 Relay > > wrote: > > > > > > From: Ackerley Tng > > > > > > Introduce base support for KVM_SET_MEMORY_ATTRIBUTES2 in guest_memfd, which > > > just updates attributes tracked by guest_memfd. > > > > > > Validate input fields in general. Guard usage of KVM_SET_MEMORY_ATTRIBUTES2 > > > by making sure requested attributes are supported for this instance of kvm. > > > > > > A new KVM_SET_MEMORY_ATTRIBUTES2 is defined to support writes (unlike > > > KVM_SET_MEMORY_ATTRIBUTES) in addition to reads so it can provide error > > > details to userspace. This will be used in a later patch. > > > > > > The two ioctls use their corresponding structs with no overlap, but > > > backward compatibility is baked in for future support of > > > KVM_SET_MEMORY_ATTRIBUTES2 and struct kvm_memory_attributes2 in the VM > > > ioctl. > > > > > > The process of setting memory attributes is set up such that the later half > > > will not fail due to allocation. Any necessary checks are performed before > > > the point of no return. > > > > > > Co-developed-by: Vishal Annapurve > > > Signed-off-by: Vishal Annapurve > > > Co-developed-by: Sean Christoperson > > > Signed-off-by: Sean Christoperson > > > Reviewed-by: Fuad Tabba > > > Signed-off-by: Ackerley Tng > > > > Note sure if it's user error on my part, if I'm applying this to the > > wrong base, but I found a build break here on patch 13: > > kvm_gmem_invalidate_start() doesn't exist in the base tree. The > > function is kvm_gmem_invalidate_begin() here. The rename > > (190cc5370a8b6) landed via a different merge path and isn't an > > ancestor of the stated base. > > > > Patches 19 and 20 have the same mismatch. Fix for all three is > > s/kvm_gmem_invalidate_start/kvm_gmem_invalidate_begin/. > > Ya, Ackerley used a slightly older kvm/next to send the patches. I at least was > testing against kvm-x86/next, which does have the rename. > > Other than noting that this should be applied against the current kvm/next, I > don't think there's anything else to be done? Agree. Sorry, didn't mean to be nit-picky, but this really threw me off :) Cheers, /fuad