From nobody Mon Feb 9 02:27:07 2026 Received: from out-180.mta0.migadu.com (out-180.mta0.migadu.com [91.218.175.180]) (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 2166422FE11 for ; Mon, 10 Nov 2025 23:27:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762817230; cv=none; b=A7Oz1IzExOyI+g36O0WTiTq5yBWma02rvPWidyRZ37Cgj7pVRGjXRIoGLevlZHVM6V8Bjm7kHsyWQH9VtTigTYRqhwMdk3nWmQERQmG6ATmhdJ/SpNJH/pp3UlKqdDZGPch8OEBY00RUC3xT0bcfWnKzLoSSPAoTvS9/YwMkHXs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762817230; c=relaxed/simple; bh=WrgPfzyyb/jE9uQS/HLYwnkLtnXNRt0RBtDv5xhqIVI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=c3JWBbsC67OF3GeaXv1bxxHy/csvf/DpDO5UHjnYjpxVDomxNiRi/mxNN+3T3nvyNmZ8UwftT3awqdOEB6G91jHLvTbyqWgx9L0NaLzeeIQ4JISFhByM4DFy134k+ZJ3A7JWeQZWMAnsJlRL1WLmlqiMN2AjAwffs4tZBYJ+dxg= 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=wJ1vlVba; arc=none smtp.client-ip=91.218.175.180 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="wJ1vlVba" 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=1762817224; 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=2+2lG7hu9KlvT0KTN68rDvTTKs1ubRL9Fu8DwYe6/Oc=; b=wJ1vlVbazmoSgF+uhn8+wox7Z8BybdpC4UrtnnMmnm6eikuDigHD8GjNe23KDPfEN+AQ1G e0hLVdJHAeqgoJs6R2Z4p9yhFh8Hhjw76FdVREAsH3+VZa7bBRjPnvX7oH1wP37ulemIUL JlfHaS92P0q7iVtNycn8Lj6hct6Hh2Y= From: Yosry Ahmed To: Sean Christopherson Cc: Paolo Bonzini , Kevin Cheng , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Yosry Ahmed Subject: [PATCH v3 02/14] x86/vmx: Skip vmx_pf_exception_test_fep early if FEP is not available Date: Mon, 10 Nov 2025 23:26:30 +0000 Message-ID: <20251110232642.633672-3-yosry.ahmed@linux.dev> In-Reply-To: <20251110232642.633672-1-yosry.ahmed@linux.dev> References: <20251110232642.633672-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" The check to skip the test is currently performed in the guest code. There a few TEST_ASSERTs that happen before the guest is run, which internally call report_passed(). The latter increases the number of passed tests. Hence, when vmx_pf_exception_test_fep is run, report_summary() does not return a "skip" error code because the total number of tests is larger than the number of skipped tests. Skip early if FEP is not available, before any assertions, such that report_summary() finds exactly 1 skipped test and returns the appropriate error code. Signed-off-by: Yosry Ahmed --- x86/vmx_tests.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c index 0b3cfe50c6142..4f214ebdbe1d9 100644 --- a/x86/vmx_tests.c +++ b/x86/vmx_tests.c @@ -10644,7 +10644,10 @@ static void vmx_pf_exception_test(void) =20 static void vmx_pf_exception_forced_emulation_test(void) { - __vmx_pf_exception_test(NULL, NULL, vmx_pf_exception_forced_emulation_tes= t_guest); + if (is_fep_available) + __vmx_pf_exception_test(NULL, NULL, vmx_pf_exception_forced_emulation_te= st_guest); + else + report_skip("Forced emulation prefix (FEP) not available\n"); } =20 static void invalidate_tlb_no_vpid(void *data) --=20 2.51.2.1041.gc1ab5b90ca-goog