From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73]) (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 3A79239657E for ; Fri, 10 Apr 2026 23:58:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775865528; cv=none; b=UonSertXJ+ssR3HczRZ+5MiLRNq4rjz17F7IFtlWRRsEkjBN1czGEFveLsEaxBxobUrLrVqUgWjTMyeQKS8AslgjV9Mwz4hYb5PeKNu7jM5rrCIe4zHtKbH2Qt/UneQY4Iv6gk4mQ/PZRdKjKwH7i+oBEF237kYcRhQwjMWZ6sU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775865528; c=relaxed/simple; bh=u/TVYi6dy6Qj+6oPulgEK6LMoy1OGHMGmyuhm/aNfUc=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=DvlXrABLMkv11IvadLQ8ZAP3e6IwUUctmreJcKUj00GrU7WUPCB3ZdVezP1Edm3AUooIUqAhi3iyWKnZdz8q5W7aKpC6Ha1y/gDrnyKEyLCacCPmpMjL6AXRmVYnHsZVxN3y2gErz0LzNU5S1xI4PWW4LVDvnq8pEy1e5WD8TC4= 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=eoNC1k2R; arc=none smtp.client-ip=209.85.216.73 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="eoNC1k2R" Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-3568090851aso5931949a91.1 for ; Fri, 10 Apr 2026 16:58:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1775865526; x=1776470326; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date:message-id:reply-to; bh=QicLK2txfxlG/AiHSR14AxMdXX8uIvRmjrzql31A1jY=; b=eoNC1k2RzGFNf6ozVhufV9W8Z2uo3Vf9KQKpSjw07fp7eibbybbvpViz6Me8n92Csz oo/+f5hb/PeUtavICrZjWV2Ge5pwoijCINdF/vtF2Roa/3UYL2gHgZ/zdtYqorp/AIJn y2WzrJ5tbueln9z3L3f4D2D+OGKyVrL1qMuxM1eNtxk0w1Iu8ay1XMauu+MWmEXHy+ep KE52LlHaYaVBx8k/I2bb9i/5ia/B05WrcmLhWKqQK8obDi4Z9I1sbhKJ6RXj/M1cmCRZ puzEPEvCAkJBvyYSdCIg3Rq/wuVQuW1oL9PSkOCBvg1AKeIjZr9d0/TN1C4uBh8AsrH1 YPPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775865526; x=1776470326; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QicLK2txfxlG/AiHSR14AxMdXX8uIvRmjrzql31A1jY=; b=YoJszGZw11NRObww1TQWYXODK2QIF3nQnPCh5gCna9r3H5L7yLXe/oDLkCtM+b6uWB kArGmn/Ez9VLN561p0dDrmB5N3jzZf9WXvjFhglEcXFPklNtU28zLLBCSiDQ3vlZaH2i iCnp9tPjrmCY+iMWZMyX29WmoC4MtBiZIE5ENO50DQOks7TxfK5d3rKuTRs8xeVzznhm N5WezVhU6H91oMKpnhgysTRwUTMhJJ//wxMQa0m0BHasxSkdlHSEOuO8J4jTe1U/84Kk X+Lv+vwuaBRMTIPyiYemjpBG1m6SKZyJr/QKxRf25tSKyjjocGPUSguQ26mwmF0RDOtp Fz7A== X-Forwarded-Encrypted: i=1; AJvYcCVbyxdWHdEfd9sb6oOMeJsEuGHfCFN/nzoJLn0SziZqR+GJwJ8btT4BzpkE+JTFRt48p/ylg8KR7xa0vX8=@vger.kernel.org X-Gm-Message-State: AOJu0YyTl7VqEi2ZVoPIAkOm4yPIJlsZ5SKv/74o9VdKJb4RwfGt4n84 7swaKiw76KL0otjZpKiijBNaFl7UX+DYjELmB1cy5dL6hHPnvUnUA8kD+hSlikBwKZ7wPzem65Z b3XMqPQ== X-Received: from pjzm12.prod.google.com ([2002:a17:90b:68c:b0:35c:2c27:e619]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:3dcb:b0:35d:997c:8ec0 with SMTP id 98e67ed59e1d1-35e4282bdb6mr5277022a91.18.1775865526459; Fri, 10 Apr 2026 16:58:46 -0700 (PDT) Reply-To: Sean Christopherson Date: Fri, 10 Apr 2026 16:58:24 -0700 In-Reply-To: <20260410235832.2312342-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: <20260410235832.2312342-1-seanjc@google.com> X-Mailer: git-send-email 2.53.0.1213.gd9a14994de-goog Message-ID: <20260410235832.2312342-6-seanjc@google.com> Subject: [GIT PULL] KVM: x86: MMU changes for 7.1 From: Sean Christopherson To: Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Sean Christopherson Content-Type: text/plain; charset="UTF-8" Fix an amusing UBSAN warning where nx_huge_pages can be read before KVM is fully loaded, optimize the unsync flow, and micro-optimize hugepage splitting in the TDP MMU. The following changes since commit 11439c4635edd669ae435eec308f4ab8a0804808: Linux 7.0-rc2 (2026-03-01 15:39:31 -0800) are available in the Git repository at: https://github.com/kvm-x86/linux.git tags/kvm-x86-mmu-7.1 for you to fetch changes up to b3ae3ceb556945724d0c046ddb4ea0cf492a0ce6: KVM: x86/mmu: KVM: x86/mmu: Skip unsync when large pages are allowed (2026-03-12 10:36:01 -0700) ---------------------------------------------------------------- KVM x86 MMU changes for 7.1 - Fix an undefined behavior warning where a crafty userspace can read kvm.ko's nx_huge_pages before it's fully initialized. - Don't zero-allocate page tables that are used for splitting hugepages in the TDP MMU, as KVM is guaranteed to set all SPTEs in the page table and thus write all bytes. - Bail early when trying to unsync 4KiB mappings if the target gfn can be mapped with a 2MiB hugepage, to avoid the gfn hash lookup. ---------------------------------------------------------------- Gal Pressman (1): KVM: x86/mmu: Fix UBSAN warning when reading nx_huge_pages parameter Lai Jiangshan (1): KVM: x86/mmu: KVM: x86/mmu: Skip unsync when large pages are allowed Sean Christopherson (1): KVM: x86/mmu: Don't zero-allocate page table used for splitting a hugepage arch/x86/kvm/mmu/mmu.c | 14 ++++++++++++++ arch/x86/kvm/mmu/tdp_mmu.c | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-)