From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f202.google.com (mail-pf1-f202.google.com [209.85.210.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 B5CAF42BEAB for ; Tue, 14 Jul 2026 19:29:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784057375; cv=none; b=AeoWCZodDPAu1NzpRzuOdFiNjhv/xS3/+MVqlM9iIfuKhfDyIqzkDaTC+P69NH1XZyFhihlUmZXqL0LjyhW35Pa1c5ZgtgEn8eunX5KptMhw4sYYPUY3vpOyJjc9XQ/5iCk9ZrGtArYMYoUAfuZml0V4gF7EpBXdrUy5y1rykvQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784057375; c=relaxed/simple; bh=5v0pjtg16nOYoh0LqjejD+BH5n9SM/7iCdtqM2SxC9k=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=CIfg13zo2969Q8GlNQgzOzmhH89MlZLy/bpLZhhGzRITSgbDMGq88TZZQzPJrtd1hprE9gGh7v6Dv2YK49q8z23eGhQ8HF6BESrQbscjDAlJ/aaXqEzBfxRl8mcDXEjbAICFgAQUTBMfRurzNxglzRGsTIBSAPnsuf7/Qg4S5gY= 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=IlTDSMGe; arc=none smtp.client-ip=209.85.210.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="IlTDSMGe" Received: by mail-pf1-f202.google.com with SMTP id d2e1a72fcca58-84870e7f498so5464297b3a.3 for ; Tue, 14 Jul 2026 12:29:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1784057373; x=1784662173; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=NaWAefms5g2sZE1zJRpUsheJBiizyXeD+J/SLEPa9K8=; b=IlTDSMGe9vScsqElhWXO8w4mRHJ/2O5URvu2scmA8SCNn98pTofBe8KdnzVk2vYQ64 cfpXijlLwmLgszKZZzs1acdTZRo10cwxtkjlUouTnT7AooCZ2myGxjHNGVGfLUNrLt/q MQL1vqJ5E3i8X8PqB++dtkNWX6yNo8pEfiHnG34AXkQ0bxobPxeNR4tiHS4xr4eb0uBp fGZPDSYxZBsIRDJ7lgVQDFBL2VpPTq+rv2N9ltzmkYzHOp4jF3+Y7EZFgwamrSHx35F5 2Pm33BSTuD1nJA9MBoXaHwPDHo0xwZSlxHD2nebXC7Qk3xt2kTn4WHjXHhSIZR5OWhEs Tjzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784057373; x=1784662173; h=content-type: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:content-type; bh=NaWAefms5g2sZE1zJRpUsheJBiizyXeD+J/SLEPa9K8=; b=XQgJXSpro999TRhqpO2cSVRssB9SlG46MzCJeTKD6UNgT0OSCpGl+IQ1yiHDFLZHhw y9EsDY7bDfh6KrlzsmklD4mqPEO493CdgCNJh1PyNYssyDgaOqcmAnmEeCZSykxz268q 1xAsL9sFILv09mHXuOqyBeFm6DrgurKO+4LPW94O5UbJIXLsfU1PbIFINQ9vExxqd4j+ uMYSPbFk1rPu9aq5BQmcDB9Bo1HPr7fd5MXapI9EFGtVIdPzSIEur6SaGcaRktY0YFx5 KQXUdkT0zEr6LlfimK9jSwUpIBuXLk5bmmS7MMGW9y8DMbBqCJMxDwZsQT5Kj/bPRxSq YtTw== X-Forwarded-Encrypted: i=1; AHgh+Rp9CxfHrF3RZ6+hxi9jXfqxcjfJIf6lBb1KLPC8TewGrjvVnrOAS/Ex+zH3BLOuCZCJFnGiqwDe4Mb85EE=@vger.kernel.org X-Gm-Message-State: AOJu0YzqSrqitVwBK9MkHz53yX7cFSRuU9kLDgIPwRMCUMqChyQK3omH Fa9ZMWZTd5PWFw582SOrlAMWDUoFFUV2u/NJ1uT9iBL9LU4Pz5kCTpbpjCFPS3T4sa2C54FKokp fKk//1A== X-Received: from pfee10.prod.google.com ([2002:a05:6a00:bc8a:b0:847:8fa5:76bc]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:14cd:b0:847:83bd:6671 with SMTP id d2e1a72fcca58-84889667647mr13185570b3a.19.1784057372703; Tue, 14 Jul 2026 12:29:32 -0700 (PDT) Date: Tue, 14 Jul 2026 11:41:25 -0700 In-Reply-To: <20260630213711.479692-1-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260630213711.479692-1-seanjc@google.com> X-Mailer: git-send-email 2.55.0.141.g00534a21ce-goog Message-ID: <178405433333.3142919.4680610079893572404.b4-ty@google.com> Subject: Re: [PATCH v2 0/2] KVM: x86: gmem populate fix and cleanups From: Sean Christopherson To: Sean Christopherson , Paolo Bonzini , Kiryl Shutsemau Cc: Dave Hansen , Rick Edgecombe , kvm@vger.kernel.org, x86@kernel.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org, Sashiko Bot , Joerg Roedel , Yan Zhao , Ackerley Tng Content-Type: text/plain; charset="utf-8" On Tue, 30 Jun 2026 14:37:09 -0700, Sean Christopherson wrote: > Fix a user-triggerable WARN due to KVM not pre-checking that userspace > provided a source page for non-ZERO pages for SNP_LAUNCH_UPDATE, and then > clean up the equivalent TDX code to also explicitly check the incoming > source page *before* calling into guest_memfd, and to return -EINVAL, not > -EOPNOTSUPP. > > v2: > - Rewrite the SNP patch changelog. > - Tweak the code to avoid checking KVM_SEV_SNP_PAGE_TYPE_ZERO twice. > - Drop what is now effectively a sanity check in sev_gmem_post_populate(), > so that we don't have to duplicate the logic when in-place conversion comes > along. > - Tack on the TDX change. > > [...] Applied to kvm-x86 misc, thanks! [1/2] KVM: SEV: Explicitly disallow NULL user address for SNP_LAUNCH_UPDATE https://github.com/kvm-x86/linux/commit/2abe1ff20151 [2/2] KVM: TDX: Return EINVAL, not EOPNOTSUPP, for NULL INIT_MEM_REGION source https://github.com/kvm-x86/linux/commit/eb606a243863 -- https://github.com/kvm-x86/linux/tree/next