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=1793710181; b=qo2Hj8OvH75ykcA+KNZ/bVEB5av2iUjsZETznQwIsCsjPt9+LS8lbqN2M0942conldrs u2hJdhzaeCe8viCOZs5eLnV9qDd1Lgb8vM4QBgOBoTAIAG5gdD/fkh2oOflIeAL75+tvA RDNoIAvb1XEIpYRLho8/kiy9+CpzZ3jRF6OS2r8WupNYC8SE/PuvkM57dspDzHdgbO0cd xoqJz09Uusq6fZWzXkQgvPup0REkQ1/UYwlp/5fp8KqSacBhENoNV62r8UeSofaa6LH7z qxY2ieXzQgmpwximwp49JwVM56dPY5jbF7EzaNwc4ouX5ZcNI93kCI/ZoXvN0FpTv5Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793710181; h=DMARC-Filter:DKIM-Signature:Received:X-MC-Unique: X-Mimecast-MFC-AGG-ID:Received:Received:From:To:Cc:Subject:Date: Message-ID:MIME-Version:Content-Transfer-Encoding:X-Scanned-By; bh=a0Lm1vXPbpXrZZMrNcubolRKf55hgxzUId1YVKIzCUk=; b=BeaJRnBagYD8hNuJ5yCmChAqRR5RJ3WrN4UDMgeDYg08+VAxqrp22+KsAUFfnWbIIwSI BeMsjQONiUPKX2AD5jzh2aqn84681lJWKK1hzYdUK39cY/oFSqBUgiGBmEDRywioZyc98 MPL6Nu186BqhQ7fzZHQY3UwKttx3dWUbDnIq2CrqYEHITK6tX/D4Fq8iufTY7j0finHiv g6D7dziVavi1hndbAxpTBcnZeZdvoX++MlUib3sZoxAWavT0n/mF7omXulgEqkHhrQ2SW tITZtGyh+ihbXoQh8g4Lc5Drg8B2hi8pAkxMYSzindpPMzWSD1EQtOHed+SJE2PJYIA== 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=TF6O8n8q; 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 05E46606A324 for ; Tue, 3 Nov 2026 12:49:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 05E46606A324 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, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=TF6O8n8q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1793710179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=a0Lm1vXPbpXrZZMrNcubolRKf55hgxzUId1YVKIzCUk=; b=TF6O8n8q6vdx3YUNohulaNGLgLo7P1UruW9o5XUVwF9lrNyaSyEcXGxeSNmXqg3Yd4DsSn 99h1WHq7trpj2MgfVPDWtCdNOp665FmPAl55sS0NMQG8+PT/UTZXvb5N1bpU1yE/Z9CQhz q2ynT0cbhjpcJWv2L8Cw4B4QWvuxrkI= Received: from mx-prod-mc-05.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 (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-428-IqaLT1HiMjmdCfHLKqsn8Q-1; Tue, 03 Nov 2026 07:49:35 -0500 X-MC-Unique: IqaLT1HiMjmdCfHLKqsn8Q-1 X-Mimecast-MFC-AGG-ID: IqaLT1HiMjmdCfHLKqsn8Q_1793710174 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id BEF571955D95; Tue, 3 Nov 2026 12:49:33 +0000 (UTC) Received: from pbonzini-thinkpadx1carbon6th.rmtit.csb (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A66271956087; Tue, 3 Nov 2026 12:49:31 +0000 (UTC) From: Paolo Bonzini To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: Sean Christopherson , Hillf Danton , Steven Rostedt , Harry Yoo Subject: [PATCH 0/2] KVM: remove the dummy allocation case from async page fault handling Date: Tue, 3 Nov 2026 13:49:28 +0100 Message-ID: <20261103124930.2278671-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.0 on 10.30.177.12 Asynchronous page fault handling is supposedly able to detect page ready notifications that are sent before the waiter is registered, but this code is broken for PREEMPT_RT because it tries to allocate in hardirq-disabled context. This code however is almost dead, because page ready notification will happen on the same vCPU as the waiter and not until after the waiter enables interrupts. Outside guest mode, interrupts are only enabled once the waiter has registered itself, and this guarantees that an outstanding (non-spurious) waiter will always be found. This unfortunately is not the case for asynchronous page faults that are delivered while in guest mode, but that can be fixed and the dubious code removed. Paolo Paolo Bonzini (2): KVM: register asynchronous page fault waits with interrupts disabled x86: KVM: remove the dummy allocation case from async page fault handling arch/x86/include/asm/kvm_host.h | 1 + arch/x86/include/asm/kvm_para.h | 20 ++++++- arch/x86/kernel/kvm.c | 97 +++++++++------------------------ arch/x86/kvm/mmu.h | 14 +++++ arch/x86/kvm/mmu/mmu.c | 4 +- arch/x86/kvm/svm/svm.c | 3 +- arch/x86/kvm/vmx/main.c | 2 +- 7 files changed, 65 insertions(+), 76 deletions(-) -- 2.56.0