From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796407470; b=k1H8GsNwaP+XdbW9yfp7774qi3OnRUpqPQ1OpzSFVroYK57yBc8DYAZmmGJP7jVvbHT7 IgetIcdCnjNG80Dsad7Mjurfu5JSYGPsSXrkv9h6D5/MT+OTcwvaB4rLATRET2gFHbEIy RPIVXANl09InodG08E1ORCZxglvWQVDuYhhyPTIeaw6kpFwYJNQLDXCfowkmBXc03pPVb gHlFtCx7bd5xX3KAWUT3R8u6cjg0WCjSLIKxpkKI0ZsH5Seiou0sKPJttlpaYFf48Tk9k x/8z5oA9WTwoQV+GR7qn3H9vgGfRfaPdMvF2KGqMK7covgA0pj2cfMiBHOlAv0mexAA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796407470; h=DMARC-Filter:DKIM-Signature:Received:X-MC-Unique: X-Mimecast-MFC-AGG-ID:Received:Received:From:To:Subject:Date: Message-ID:MIME-Version:Content-Transfer-Encoding:X-Scanned-By; bh=th+fJ/PL74q+ZGEEIH1Ib9K0zjeWOnVsqij/kc/WCbU=; b=vHT6FZ2hmTEnQBRZrsso/T6z0u1lIUh929qNBzN7Vp+Y6qmnvEs7CISH6/usOWUt94Vm aYwqnk8PTIEROusj6MnMfqWKndW6m2Jgf2RDlZhlIpySjvP/GOERgy3Wj0FwWQenTZC+M 2bv7FNsZTkO3C+LEnRKCV/64MH4akpEXPj6F5KTI3ukLOpGn5aKD4jiibSrFfkmiul9qU RMZiX3YkO7sY2+Hyt7GUt1KFysSzI1PVMhcD/5gCFOotQF8U3E0BUTdoPb4uuE/+69xN2 tsFx12QfiPhvL6QVqnKRhTVxOapYjGb4Nzqp/TWPZwBxoUBmRfMc7woqTGbJsUT46RQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=aD3ijshq; arc=none smtp.remote-ip=170.10.133.124 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6693C606F91C for ; Fri, 4 Dec 2026 18:04:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6693C606F91C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=aD3ijshq DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1796407469; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=th+fJ/PL74q+ZGEEIH1Ib9K0zjeWOnVsqij/kc/WCbU=; b=aD3ijshqa8sFoU8RkAEK9ZqF7RtE2fk/LGtJpiko2gnCz4yv3WjisXAnT/YuvENm2gqxOJ dcfUuEDe6si28f00OYUxChPtEjN4aFfYhylrIutt4Pv97hmE8a0pJeYwC2e/aOPcdcgMLt qVWnp0U3t1ViimyFFPmbQAcmBSw6VGI= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS with 8BITMIME (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-508-OglCTLI4OzCg8nHBYkbvIw-1; Fri, 4 Dec 2026 18:04:26 +0000 X-MC-Unique: OglCTLI4OzCg8nHBYkbvIw-1 X-Mimecast-MFC-AGG-ID: OglCTLI4OzCg8nHBYkbvIw_1796407465 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 60F3C18F52C6; Fri, 4 Dec 2026 18:04:25 +0000 (UTC) Received: from pbonzini-thinkpadx1carbon6th.rmtit.csb (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 817D63003EA7; Fri, 4 Dec 2026 18:04:24 +0000 (UTC) From: Paolo Bonzini To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: [PATCH 6.1.y 00/24] Fixes for various (mostly x86) KVM vulnerabilities Date: Fri, 4 Dec 2026 19:03:59 +0100 Message-ID: <20261204180423.2168641-1-pbonzini@redhat.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Loongarch: - Flush TLBs *before* dropping mmu_lock RISC-V: - Flush TLBs *before* dropping mmu_lock x86: - Flush TLB *before* dropping mmu_lock, and flush them entirely - Flush TLBs if child SPTE is zapped when splitting a huge SPTE - Pin kvm->mm prior to borrowing mm when setting event channel - Disable hypervisor (VMX Preemption) timer if TSC deadline wraps - Reset local APIC timer metadata on RESET, INIT, and KVM_SET_LAPIC - Ensure guest FPU is resident in hardware when updating actual XFD MSR - Ensure pCPU is valid before sending IPI to deliver posted IRQ Generic: - Invalidate all GFN=>PFN caches when VM and/or its process is dying Paolo Hou Wenlong (3): KVM: x86/mmu: Move round_gfn_for_level() helper into mmu_internal.h KVM: x86/mmu: Fix wrong gfn range of tlb flushing in kvm_set_pte_rmapp() KVM: x86/mmu: Fix wrong start gfn of tlb flushing with range Jun Miao (1): KVM: Fix comments that refer to the non-existent install_new_memslots() Kyle Zeng (1): KVM: x86/mmu: Flush all TLB entries, not a precise range, when yielding Peter Zijlstra (1): ptrace: Convert ptrace_attach() to use lock guards Sean Christopherson (18): KVM: x86: Grab lapic_timer in a local variable to cleanup periodic code KVM: x86/mmu: Flush TLBs if child SPTE is zapped when splitting a huge SPTE KVM: x86/mmu: Propagate the return from kvm_zap_all_rmap_sptes() out of __rmap_add() KVM: x86: Disable hypervisor (VMX Preemption) timer if TSC deadline wraps KVM: x86: Reset local APIC timer metadata on RESET, INIT, and KVM_SET_LAPIC KVM: VMX: Retry APIC-access page reload if invalidation is in-progress KVM: x86: Use standard mmu_notifier invalidate hooks for APIC access page KVM: x86/mmu: Flush TLBs in kvm_unmap_gfn_range() if the unmap may block/yield KVM: x86/xen: Pin kvm->mm prior to borrowing mm when setting event channel KVM: Fold kvm_flush_shadow_all() into kvm_mmu_notifier_release() KVM: WARN if there are dangling MMU invalidations at VM destruction KVM: WARN if there are in-flight memslot updates when a VM's process exits KVM: Set mn_active_invalidate_count when the VM's mm is released KVM: Invalidate all GFN=>PFN caches when VM and/or its process is dying x86/fpu: Bail early from guest XFD update if XFD isn't supported x86/fpu: Clear XSTATE_BV[i] in guest XSAVE state if guest FPU isn't in-use x86/fpu: Ensure guest FPU is resident in hardware when updating actual XFD MSR KVM: VMX: Ensure pCPU is valid before sending IPI to deliver posted IRQ Documentation/virt/kvm/locking.rst | 2 +- arch/x86/kernel/fpu/core.c | 37 ++++--- arch/x86/kvm/lapic.c | 79 ++++++++++----- arch/x86/kvm/mmu/mmu.c | 75 ++++++++++---- arch/x86/kvm/mmu/mmu_internal.h | 14 +++ arch/x86/kvm/mmu/paging_tmpl.h | 5 +- arch/x86/kvm/mmu/tdp_iter.c | 11 +-- arch/x86/kvm/vmx/vmx.c | 53 ++++++++-- arch/x86/kvm/x86.c | 16 +-- arch/x86/kvm/xen.c | 7 +- include/linux/kvm_host.h | 7 +- include/linux/sched/task.h | 2 + include/linux/spinlock.h | 26 +++++ kernel/ptrace.c | 154 ++++++++++++++--------------- virt/kvm/kvm_main.c | 78 +++++++++------ virt/kvm/kvm_mm.h | 2 + virt/kvm/pfncache.c | 12 +++ 17 files changed, 374 insertions(+), 206 deletions(-) -- 2.56.1