From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f201.google.com (mail-pg1-f201.google.com [209.85.215.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 725921F4176 for ; Tue, 23 Jun 2026 00:22:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782174153; cv=none; b=SrWoD2HB3Yfol0SlKzEGORt2h426Gvjzs8VAxCHTP91iC5A5D9GKG7A7Ma7QU6ImYHnF2x+V4paZeb80urzuFdA88R2cs8L+mPHS0/rNsD3Ji6FzVJJx7hjGFVYs5+mxt2mWZ2rCgHAT6tK16t0Q+RzIk2y17yZmda2He27T4d0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782174153; c=relaxed/simple; bh=hET3RaJtC6ro7NYZPXmQUq8MQF1p6emzxm3gNcm+1IE=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=RviBGmMDNo75qko9uNbFedxal2qq0j2vHb3KZ3l9xb0vc197rmLKe3W9HSjS4TaKkCSJP2hSM+9CsMWbQjVdSqEc6FH+xfpGrD8i5eyPkJuug9yFU+RzKww8rBbMeMjtUgC6nDP3vr8j/QU5J+Z7vBa+F/y0JRbHjXN0m0SMLpg= 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=wllk+GYm; arc=none smtp.client-ip=209.85.215.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="wllk+GYm" Received: by mail-pg1-f201.google.com with SMTP id 41be03b00d2f7-c88fc985a65so3100734a12.2 for ; Mon, 22 Jun 2026 17:22:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1782174152; x=1782778952; 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=oQLsIF+iVXLuEt9X7AENLYAj3zuZSbHkrs731kL+O+A=; b=wllk+GYm+EcPaLMqRAaxpHRRtRZ0Q/IyHzUTSmFlbcacCXQtWC8B+jka/SO7+rasPH IvJZt3iJORGm6GWMR6ppQvXrCZYe3NODpAb1VHkl81ygp8TwuTBZFou0JKx0xy0S6Wbx eNIK4953Mv6nu4rmza73z6JWCn7kAP6qLAmMXDJbtRTJyDM2cRvT/+hbWdn8m8xbNg9e SxeYaXQLGAXn3a3n3XmBcFcUotqTGjnKAhRZBvfhW409OTYhcCKlOsmC9/caJ7GL0nRr beQe6huDjy2ytOl44Tof/kOk7zrPADRCETaCBu3kf95UGEA1UjnKfevPtUiQ6s9sCOor qgYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782174152; x=1782778952; 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=oQLsIF+iVXLuEt9X7AENLYAj3zuZSbHkrs731kL+O+A=; b=PuYIDvtuttAqSyrGRBml5n9B3Wsf0e84VJPitovDqKwbBCVD4crABbyQ2oOdLubNop 5Rq02cb8r4XfIcrE25GQG93/2j0NLnw7PB29OuUIZ/7eh+OwmoAnn5owXyIIS5QvDQ42 mKsBc1hRkQRJLLtg8e2Rxg1tUrIfKSAucYNPSAH1kPHpGHjzqgBVMdbVn78OiTh+saZe yMSdrkCjYxfOsWIfg0HcYJx7sKNseY5lxreiBLhitpH3mKJSN8IiB2NjsJP92S4Onlmq IGfrc3y73FcTkiLgCbX0PoZdzJsAMbGTw2Zc/4YDjHtN5Rp7kjHg0STryAu0PwNnTy0y OxYw== X-Forwarded-Encrypted: i=1; AFNElJ+X6c9KHIjOnMCJVqK78FLxnaGIa/ZCywe5zdbZsfXIwu5L8AsZPK+RrJEXLMhQ1H/VMUg=@vger.kernel.org X-Gm-Message-State: AOJu0YxaFpFwLu2WYshUSiefyiAhwSIBSapgS9RTQHLBlzvpzSIaZ5Yg UskMoaEtoG3+KrjS2sHXv/lpKoXq91W8ZBTdq3J6rGwYF17wtX1YCUTzc9JCtge2Yms7+da6VbD TnnOiSw== X-Received: from pfbk14.prod.google.com ([2002:a05:6a00:b00e:b0:82f:8cba:4285]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:855:b0:842:3be7:4d55 with SMTP id d2e1a72fcca58-84597094577mr199419b3a.11.1782174151143; Mon, 22 Jun 2026 17:22:31 -0700 (PDT) Date: Mon, 22 Jun 2026 17:22:30 -0700 In-Reply-To: Precedence: bulk X-Mailing-List: kvm@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> Message-ID: Subject: Re: [PATCH v8 13/46] KVM: guest_memfd: Add base support for KVM_SET_MEMORY_ATTRIBUTES2 From: Sean Christopherson To: Fuad Tabba 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="us-ascii" 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?