From nobody Mon Dec 1 22:32:52 2025 Received: from out-179.mta0.migadu.com (out-179.mta0.migadu.com [91.218.175.179]) (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 88EE7238D5A for ; Thu, 27 Nov 2025 01:35:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764207309; cv=none; b=hv8VU5WfddeqRBIp4bZg/F9V1vnExLMgue0Nuk4cSuCWyvamRYAhED2R67dIVDL07XU+dfH1oltlRV9b+9/FjDI2YRt6cg1wvwTxTp6rt9dlGv0C1nq7yVnnxAn+kvWnBsXkYNg235a7FXLXGbyk8JtN/AxiXMO78uR6Lhf5aIY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764207309; c=relaxed/simple; bh=UV0zQexRvvdY6sr4DDe35YyGuYRdEJphSxkjaenYDhA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=llKtkzPGn0DOLmIC4HyQi+Qd6Z4a/MaE+qSn5sK8Ddb/+owge/IMLZ4NPUsZ3TXVWMztqU09t3m4ic91dWEr1Km/AWJ56ZWmGlgkqeHAt9ouzhtbYPpJ////cGplZuNsHCeT753A40w3DSsBg8W7Qj5VyFIIAVBKtxz5x1p4VK0= 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=kaNhqMns; arc=none smtp.client-ip=91.218.175.179 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="kaNhqMns" 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=1764207305; 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: in-reply-to:in-reply-to:references:references; bh=X+eMCiC+Ad/t5DRqhycrkMjOhIHljfy9tanTohxdWII=; b=kaNhqMnsPU0QxtPij8W3K1dQ2nrF61cQxdUMsFw7HS6H/z40sFAkXa9JeNpteXwD8LUB5Q EHM2seIuc9A9Lj8KWDOJqpYDP2tprhCfKv5eqy+s/DekBhvvhM7FakxQDmzh2oGVedLavL 6TXoVr0QXhEGamKAUzLhLUD3DvP0NbU= From: Yosry Ahmed To: Sean Christopherson Cc: Paolo Bonzini , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Yosry Ahmed Subject: [PATCH v3 05/16] KVM: selftests: Stop setting AD bits on nested EPTs on creation Date: Thu, 27 Nov 2025 01:34:29 +0000 Message-ID: <20251127013440.3324671-6-yosry.ahmed@linux.dev> In-Reply-To: <20251127013440.3324671-1-yosry.ahmed@linux.dev> References: <20251127013440.3324671-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: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" When new nested EPTs are created, the AD bits are set. This was introduced by commit 094444204570 ("selftests: kvm: add test for dirty logging inside nested guests"), which introduced vmx_dirty_log_test. It's unclear why that was needed at the time, but regardless, the test seems to pass without them so probably no longer needed. dirty_log_perf_test (with -n to run in L2) also passes, and these are the only tests currently using nested EPT mappings. Signed-off-by: Yosry Ahmed --- tools/testing/selftests/kvm/lib/x86/vmx.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tools/testing/selftests/kvm/lib/x86/vmx.c b/tools/testing/self= tests/kvm/lib/x86/vmx.c index 85043bb1ec4d..a3e2eae981da 100644 --- a/tools/testing/selftests/kvm/lib/x86/vmx.c +++ b/tools/testing/selftests/kvm/lib/x86/vmx.c @@ -432,14 +432,6 @@ void __tdp_pg_map(struct vmx_pages *vmx, struct kvm_vm= *vm, =20 pt =3D addr_gpa2hva(vm, pte->address * vm->page_size); } - - /* - * For now mark these as accessed and dirty because the only - * testcase we have needs that. Can be reconsidered later. - */ - pte->accessed =3D true; - pte->dirty =3D true; - } =20 void tdp_pg_map(struct vmx_pages *vmx, struct kvm_vm *vm, --=20 2.52.0.158.g65b55ccf14-goog