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 44109A55 for ; Sat, 21 Feb 2026 00:07:36 +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=1771632457; cv=none; b=oYjqI+6op4cgQQF9JJV/Svvzi0gXmlXGdNOimuV4xtqE9lOu3FkwcayXXswfGP5iwlQsfQRptv4VbJdSovvk2hkckXsViQiXfm1Djbe4SoKQRqMYxL8IGOt9LKALIyUjesxt3sCk5e1Nn4sRjDMEikvk5x9+NgH3JEA+Q3MQY/0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771632457; c=relaxed/simple; bh=x9fruw5mw4/z7zPmhPy0VfmkN7OYHIHgvYEFztICfPE=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=MXyybUApfwUHxhlVPfCPXgz/Oh30jsoLDrKLeffvDzb9cO+pJO5kYagW2lLYNNfKqpTrVybi9Aq/MBk8SGsRYxjX93w5JoLQsJVRgJIt7lkADgGdbDmqVxzHp9WkOf6G/sFWPaO9A0qWmUZ6IxOrLSaSPe3dj8qj8iY48pR31cY= 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=tav/cQDA; 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="tav/cQDA" Received: by mail-pl1-f202.google.com with SMTP id d9443c01a7336-2a7b7f04a11so172842435ad.3 for ; Fri, 20 Feb 2026 16:07:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1771632456; x=1772237256; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=axJOs1drKDzZYs1ENBmQ4eIAMLxj6lPtQgyCBtlbw3s=; b=tav/cQDAhZRPsVkf0mkqpOkRj6WtLehMUywxhryfG2NdniLh3joRn0iVMRWbNe9EMb 0keN23c+FbJxa8Yt54AngLIQkT1SFEPYPGzGNHEa7R9QGm81Q2VBavzkPgsdRZY/JFOx Fq/09Girin37tiqFJY6/YTO9YfP7FDc/YYc2/qlh/e9e6ujcWmr6yjYuzGzToBtbB3qs F/b8jBmzybPmPu9x9Diy7qTKfKPNZc4gAIKqAzbD7iIXMKnlLqEPDrwQdEghnV/3ysqv Tk8F8/i++7CZV0g5P6sBk6Vws3N4oE8BG5uwNNxQN4AHCAz5tKN8AFc97o2HtiJWPvkG gYAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771632456; x=1772237256; h=content-transfer-encoding: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=axJOs1drKDzZYs1ENBmQ4eIAMLxj6lPtQgyCBtlbw3s=; b=lcH59aYumwhlDWXEC60X+24NJPjzyLL2qZQavsmVDJLnZXPkSaX40ms/O/cg+aUpe0 K+FK5akIzL2YqZtPWPhdl5KLlZWvtDEp/8x35cYvN5fLVP5Fm3JWmMiW4TAHTci4ndoX yn+fmjBFUcJEUwepRptYpRPZXFQZ/W9pCGO5rpeXCDRtzZ4R/Ebgj4BAVuzydOFtlXmQ li2domtd8dQmO8p2IHpaL48JfmJvqVBhsXlADp3vjAq+8ub7Az7d6m87uFRzVD8hLIEj VIn4uooQ1ICn24uIoc9OUITFVCJhvrv4RUXks6/1H9H0ukSlsX8kRxXzijWw7JIhm3dR BVJQ== X-Gm-Message-State: AOJu0YzXt7ZqpFW2xhF0nJZIpXMB3WzxMPARn43nDx93BDgsvV4Sxty2 v12p7l4rrx8h4NvIdvnFiw+SDFuE4mYttQes4SXJwi1A9vN9V6/9HeqFvEIt+uf/dKSQ8JPUL0M Vp4sO+Q== X-Received: from plbba11.prod.google.com ([2002:a17:902:720b:b0:2aa:e480:c392]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:e752:b0:2aa:ec1b:d3c3 with SMTP id d9443c01a7336-2ad7453735bmr12958125ad.43.1771632455592; Fri, 20 Feb 2026 16:07:35 -0800 (PST) Date: Fri, 20 Feb 2026 16:07:34 -0800 In-Reply-To: Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260219002241.2908563-1-seanjc@google.com> Message-ID: Subject: Re: [PATCH] KVM: x86/mmu: Don't create SPTEs for addresses that aren't mappable From: Sean Christopherson To: Rick P Edgecombe Cc: "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Sat, Feb 21, 2026, Rick P Edgecombe wrote: > On Fri, 2026-02-20 at 16:54 +0000, Sean Christopherson wrote: > > > =C2=A0 Which meshes with a logical analysis as well: KVM only needs t= o flush when > > > > removing/changing an entry, and so should always derive the to-be-f= lushed > > > > ranges using the gfn that was used to make the change. > > >=20 > > > And the "bad" gfn can never have TLB entries, because KVM never creat= es > > > > mappings. >=20 > Oh. I was under the impression that the fault gets its GPA bits stripped = and > ends up mapping the page table mapping at a wrong different GPA.=20 It does (by KVM, not by hardware). The above is juyst trying to clarify th= at we don't have to worry about the GFN from the fault, either. > So if some optimized GFN targeting flush was pointed at the unstripped GP= A > then it could miss the GPA that actually got mapped and made it into the = TLB. > Anyway, it seems moot. Yeah, we're on the same page. =20