Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2013920rwb; Fri, 28 Jul 2023 20:48:53 -0700 (PDT) X-Google-Smtp-Source: APBJJlHgzEuQS1q+H0YG1mXYPA5H96WXLgyR0/QUcV5WfbqouInSKPe+eL9o5AHG5cfschl3pmcQ X-Received: by 2002:a17:906:8471:b0:993:db29:d27d with SMTP id hx17-20020a170906847100b00993db29d27dmr1306823ejc.34.1690602532938; Fri, 28 Jul 2023 20:48:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690602532; cv=none; d=google.com; s=arc-20160816; b=H5aX3eeYQv+3uv5cnZpS7PPRIfN/6kA2+VAPJXDienqzAbkVL2X2F03pXJJ5wqfFny GD4kkEhAorcLPPAzCrhtKIhUk2p9Dz2CEZSW76VHctLxwEGAq2dAREQ7HX3hyubSlddk ZjMDCbg1Hdk9gC97s7EDMl90WnK4RyivtvOpoA+mAVMjR5r5l7wJsUKdqnygLSXZR4yc qBUfB4iS+1qJ19/5ojkuP/5qYPq6rmzXj+EdO6m5pVNZirA9lhAaFGdvgK2fbzvnCtd6 WdxE1EdshSPksvnDRDyvMNRu5lsjivK7OaKAA5wzhes7NdWQNjd9Ygcx2Hl3ZYht+lMP c/bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:reply-to:dkim-signature; bh=Yb5xazjAjbiDk0o4gEkkEuwr9pc6IYfbApM8E9AAcm8=; fh=Ctt0ydInMKwei8YFBFbw7rU4p8H0G/T51ZI/KkO6Md4=; b=MO8Vik6HsDKN0SWtrB3giv0rDTS/J4Y01OgOpFxUk3WwQx7oSQ4BMiFLo1QxuWUtD0 rAhO1Nu5LHMaikzTOkJNk7nP4wYywqRIgRKjdgwgFLxTgyPXOtGym2QvjKknOGh7mevC F9L+WWI0NogYGWWFmUTrqsE06A62jXHbniGgAhv5CNW54FPhNczesKPXPyZIsyjNCBVS INYVe4gzdkaxHPazsmhnHVfRRMjLMReJMn2MNXGMYmIQsNaZxI+RcEfOP/L3Bt7CiTO6 g+T55gQAjVv7p1qv59Mz/E1Xwj6Fth5bRqOprH/XxuzmHiooXQaQdjCb7jAQMlyZOizK R2VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=YO9ijSHO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h12-20020a17090619cc00b00992e26642ddsi3676590ejd.251.2023.07.28.20.48.28; Fri, 28 Jul 2023 20:48:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=YO9ijSHO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236451AbjG2AlA (ORCPT + 99 others); Fri, 28 Jul 2023 20:41:00 -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-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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/tools/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 timer) case PHYSICAL: return read_sysreg(cntpct_el0); default: - GUEST_ASSERT_1(0, timer); + GUEST_FAIL("Unexpected timer type = %u", timer); } /* 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 = %u", timer); } isb(); @@ -72,7 +72,7 @@ static inline uint64_t timer_get_cval(enum arch_timer timer) case PHYSICAL: return read_sysreg(cntp_cval_el0); default: - GUEST_ASSERT_1(0, timer); + GUEST_FAIL("Unexpected timer type = %u", timer); } /* 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 = %u", timer); } 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 = %u", timer); } isb(); @@ -119,7 +119,7 @@ static inline uint32_t timer_get_ctl(enum arch_timer timer) case PHYSICAL: return read_sysreg(cntp_ctl_el0); default: - GUEST_ASSERT_1(0, timer); + GUEST_FAIL("Unexpected timer type = %u", timer); } /* We should not reach here */ diff --git a/tools/testing/selftests/kvm/include/ucall_common.h b/tools/testing/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) -/* FIXME: Drop this alias once the param-based guest asserts are gone. */ -#define GUEST_ASSERT_1(_condition, arg1) \ - __GUEST_ASSERT(_condition, "arg1 = 0x%lx", arg1) - #endif /* SELFTEST_KVM_UCALL_COMMON_H */ -- 2.41.0.487.g6d72f3e995-goog