From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-174.mta0.migadu.com (out-174.mta0.migadu.com [91.218.175.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EDBF62848AA for ; Fri, 21 Nov 2025 19:32:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763753548; cv=none; b=mm7W2oQfmye/xvKgGWAzx+boR8QcoCR5lpRXAEkjelitiSbDYPCMWQfkJE5L7POeIz8IL/gZfoO4i4La0dmTZFKryyrPf8iJ/XGrUPc761+chpzo/bQH0TbdTZfJjoIuGPzKMfJdg9+XOvSqHGn1UymY7J4ExHenWdL2FGKv+GA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763753548; c=relaxed/simple; bh=P9jNJ6a3XA/UqRlZ8eGhGlpQjAzbM1XS+0upAlCrVd8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=BaZKWQqUKTqXxPR7STJv6Ezpi1Xb5JnJvdMxN93U67a8oYYH9N6iDO4txcy+bKJmQRdHhHpBLI6dg7MsxqD9OrGRCkWtPqWzOyuZ4F/2JLUi3cLbWtIpyLchvFAnlHsOVcxxhnnpELLrNF01V5oAUPE5ZMfVusi3UH9w3s3Kw3I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=mMeWsbl2; arc=none smtp.client-ip=91.218.175.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="mMeWsbl2" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1763753543; 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=Xr+O/n1EInaOTF07XuoTaSXKQkI1H4ZJzwKjfgbigFw=; b=mMeWsbl25KHS9MRNl2Hs/cZktY9qIupTtzvOwEqiKUU6ecpH8pn+3qnPCiC3vVg6QGh0zP LZsQwLtpUlvHsxxq4CmX72ULT/RZX1fxSM+5IoDp5dD/4Z5zvSIjSzbT5GXvYicqF45T52 qjwyxUVML33bccaPrvmxQVl7vfFYsss= From: Yosry Ahmed To: Sean Christopherson Cc: Paolo Bonzini , Ken Hofsass , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Yosry Ahmed Subject: [PATCH 0/3] KVM: x86: Accelerate reading CR3 for guest debug Date: Fri, 21 Nov 2025 19:32:01 +0000 Message-ID: <20251121193204.952988-1-yosry.ahmed@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Some guest debuggers use the value of CR3 to attribute a debug event to a guest process. Providing CR3 in the debug info makes this significantly faster than doing KVM_GET_SREGS every time, so add support for that. Also extend the debug_regs selftest to cover this. Yosry Ahmed (3): KVM: x86: Add CR3 to guest debug info KVM: selftests: Use TEST_ASSERT_EQ() in debug_regs KVM: selftests: Verify CR3 in debug_regs arch/x86/include/uapi/asm/kvm.h | 1 + arch/x86/kvm/svm/svm.c | 2 + arch/x86/kvm/vmx/vmx.c | 2 + arch/x86/kvm/x86.c | 3 + include/uapi/linux/kvm.h | 1 + tools/testing/selftests/kvm/x86/debug_regs.c | 82 ++++++++++---------- 6 files changed, 48 insertions(+), 43 deletions(-) base-commit: d209f1ea367750edfcba7db8d199a856e4186511 -- 2.52.0.rc2.455.g230fcf2819-goog