From nobody Thu Dec 18 04:15:00 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77D12EB64DD for ; Sat, 29 Jul 2023 00:41:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236578AbjG2AlB (ORCPT ); Fri, 28 Jul 2023 20:41:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236685AbjG2AkV (ORCPT ); Fri, 28 Jul 2023 20:40:21 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06DCB44B0 for ; Fri, 28 Jul 2023 17:38:42 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-c6dd0e46a52so2457084276.2 for ; Fri, 28 Jul 2023 17:38:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1690591072; x=1691195872; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date:message-id:reply-to; bh=Yb5xazjAjbiDk0o4gEkkEuwr9pc6IYfbApM8E9AAcm8=; b=YO9ijSHOh5J1cVuChDXZrdsVMawU/dKC3CusW0Frvs07EOOTfINmzinv3GCCjT5pnx rOBnaYJ1R1OxykK+OmmG9x2M32byq/ygaqkkxRor1oohX534+fRV0Fzb/g+Z9GJAAFnW jexdmXQtuj7Yuu1Yap+4hcJXPNpYrAz7Y0Iw6sVCZTa347oPpKJaGpHJFiBeeTjF0raL UHcE4kvGQCnvr0Q42EmvlTszcZBmYKHtuPzFuNbbVtZFsYxggy0fjjFWI9bye8ZychB7 V+Xqe9MeAa+YJY+J/TBov5lI1fOh7IPV6YbaCwxhJGiYJp20yNxXDngwT0t7StyBgLNo R6Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690591072; x=1691195872; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Yb5xazjAjbiDk0o4gEkkEuwr9pc6IYfbApM8E9AAcm8=; b=KzR60b6cmaKFAIiPKKgHsHTyin3u1ILk03KSM7zUkDRR5B8VQl0AciO2zB0JesgIWP ovgvynVvwHF37stuwwWnYrPU5jvTLn1i0jvezOHVfN3kzaFJrLXLFdmlfPnOmD+27vi9 aY7JL/MKZaSWDEA2qkYgIawD3wEO25nxvW6BhmAWgeEWsenQI/IjoBHonngsHw9gtE4t VWDODxfEars+521wmiak/34Eoh+kxwZP0JJp863HnfBt9+2zR/Otd678+DSKEKtunHEW BzLVMFV80ymucaYGlm6OSCwEl2eQp3HogPQ9EcwyZd2jycKbrthStnjfY3qb7VqfLXEM bJjw== X-Gm-Message-State: ABy/qLafpLtxWbVigRa1tKsGSUkt6eLNNpx9JFkaLidDz6vuAGCiOqgZ vTLSZ69YIseYvKo0qvv0xDZhadatj4A= X-Google-Smtp-Source: APBJJlHAddbDc2cMcbZUidB0HowWy2488J/QjMe6Knuj2J162JyE2GJ2xbHLQj0Pd31iUQBNjID5BYp2vlY= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a05:6902:1582:b0:d0a:353b:b93b with SMTP id k2-20020a056902158200b00d0a353bb93bmr18375ybu.3.1690591071769; Fri, 28 Jul 2023 17:37:51 -0700 (PDT) Reply-To: Sean Christopherson Date: Fri, 28 Jul 2023 17:36:43 -0700 In-Reply-To: <20230729003643.1053367-1-seanjc@google.com> Mime-Version: 1.0 References: <20230729003643.1053367-1-seanjc@google.com> X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog Message-ID: <20230729003643.1053367-35-seanjc@google.com> Subject: [PATCH v4 34/34] KVM: selftests: Use GUEST_FAIL() in ARM's arch timer helpers From: Sean Christopherson To: Paolo Bonzini , Marc Zyngier , Oliver Upton , Christian Borntraeger , Janosch Frank , Claudio Imbrenda Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, Sean Christopherson , Thomas Huth , "=?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?=" , Aaron Lewis Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use GUEST_FAIL() in ARM's arch timer helpers now that printf-based guest asserts are the default (and only) style of guest asserts, and say goodbye to the GUEST_ASSERT_1() alias. Signed-off-by: Sean Christopherson --- .../selftests/kvm/include/aarch64/arch_timer.h | 12 ++++++------ tools/testing/selftests/kvm/include/ucall_common.h | 4 ---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/tools/testing/selftests/kvm/include/aarch64/arch_timer.h b/too= ls/testing/selftests/kvm/include/aarch64/arch_timer.h index cb7c03de3a21..b3e97525cb55 100644 --- a/tools/testing/selftests/kvm/include/aarch64/arch_timer.h +++ b/tools/testing/selftests/kvm/include/aarch64/arch_timer.h @@ -41,7 +41,7 @@ static inline uint64_t timer_get_cntct(enum arch_timer ti= mer) case PHYSICAL: return read_sysreg(cntpct_el0); default: - GUEST_ASSERT_1(0, timer); + GUEST_FAIL("Unexpected timer type =3D %u", timer); } =20 /* We should not reach here */ @@ -58,7 +58,7 @@ static inline void timer_set_cval(enum arch_timer timer, = uint64_t cval) write_sysreg(cval, cntp_cval_el0); break; default: - GUEST_ASSERT_1(0, timer); + GUEST_FAIL("Unexpected timer type =3D %u", timer); } =20 isb(); @@ -72,7 +72,7 @@ static inline uint64_t timer_get_cval(enum arch_timer tim= er) case PHYSICAL: return read_sysreg(cntp_cval_el0); default: - GUEST_ASSERT_1(0, timer); + GUEST_FAIL("Unexpected timer type =3D %u", timer); } =20 /* We should not reach here */ @@ -89,7 +89,7 @@ static inline void timer_set_tval(enum arch_timer timer, = uint32_t tval) write_sysreg(tval, cntp_tval_el0); break; default: - GUEST_ASSERT_1(0, timer); + GUEST_FAIL("Unexpected timer type =3D %u", timer); } =20 isb(); @@ -105,7 +105,7 @@ static inline void timer_set_ctl(enum arch_timer timer,= uint32_t ctl) write_sysreg(ctl, cntp_ctl_el0); break; default: - GUEST_ASSERT_1(0, timer); + GUEST_FAIL("Unexpected timer type =3D %u", timer); } =20 isb(); @@ -119,7 +119,7 @@ static inline uint32_t timer_get_ctl(enum arch_timer ti= mer) case PHYSICAL: return read_sysreg(cntp_ctl_el0); default: - GUEST_ASSERT_1(0, timer); + GUEST_FAIL("Unexpected timer type =3D %u", timer); } =20 /* We should not reach here */ diff --git a/tools/testing/selftests/kvm/include/ucall_common.h b/tools/tes= ting/selftests/kvm/include/ucall_common.h index b7e964b3182e..4cf69fa8bfba 100644 --- a/tools/testing/selftests/kvm/include/ucall_common.h +++ b/tools/testing/selftests/kvm/include/ucall_common.h @@ -102,8 +102,4 @@ do { \ (const char *)(ucall).args[GUEST_FILE], \ (ucall).args[GUEST_LINE], "%s", (ucall).buffer) =20 -/* FIXME: Drop this alias once the param-based guest asserts are gone. */ -#define GUEST_ASSERT_1(_condition, arg1) \ - __GUEST_ASSERT(_condition, "arg1 =3D 0x%lx", arg1) - #endif /* SELFTEST_KVM_UCALL_COMMON_H */ --=20 2.41.0.487.g6d72f3e995-goog