From mboxrd@z Thu Jan 1 00:00:00 1970 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 DA526EB8FAF for ; Wed, 6 Sep 2023 06:41:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235180AbjIFGlx (ORCPT ); Wed, 6 Sep 2023 02:41:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241906AbjIFGlv (ORCPT ); Wed, 6 Sep 2023 02:41:51 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4810E58 for ; Tue, 5 Sep 2023 23:41:34 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-31c3df710bdso2584693f8f.1 for ; Tue, 05 Sep 2023 23:41:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1693982493; x=1694587293; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=CDrXgceSRA6nWxSqvxXedEAqqqoYTPyIJVyrWo9VKf8=; b=Lu+UYlga9SneyBsf/voQWHNOp476n6uzhXTP1EYiM5sCPq620kG69QXpZRE98j5Wrm TN8fM/ocUylv4qjKC9AdZhBJkAT/pcL5TtlZb7liB5Np1mQaMUygeFCz3S0oq/rPjy/3 e5z6I6YrQEc06svLucP5y8i26FHIKUm0n+Xtwdq8715DB7Vp8AlJLRiBCLU3K71kFvno B5Q63+AqILSNim4lIHxEiqbtImtlB/FNdSB7m9hRU/DS01sDZgJxgthVBuuFKrNPPyTs g4TQCifUnlErVh5xWmKsdyHlhmEnRTu6Q+QDxxWGg/RfJkmV7QmGqgFMStQJAllAIZs5 IC/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693982493; x=1694587293; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CDrXgceSRA6nWxSqvxXedEAqqqoYTPyIJVyrWo9VKf8=; b=SJidWsJvMtqVYltTWZ+6p0nfRRGYbF6Ndw8iFl1wInqs4PfByLdWe6tbJz8YTfz/oQ oT/dWiXSmRwlHyYGTOJnA2H1eCWoPpdavyN8JV6lP19IAZAoelLqAIOI1pM8hoeLZ24s 4NSdoWYWzwGS+/HYsx1L3E752N2ZXAkfVEU5GbmO14cihyTicILf5ip8rV149meJPh51 49IuvPh3wC1Kvwa1SIlJWn3aA/akA6MDVlRXORCnZn9pchX712Hmd94ABKdsyFqXBsO+ fX+Nts9gegs+YxXshqXmvUlxN/gWP0ihSi6jpNBvtgbj86heCw91At016+VvuS1AsPIy U2RQ== X-Gm-Message-State: AOJu0YxI+G3YUU+qbhaeNnAjCs+tb5OiF75WECk04J+P1SDDOutLgudA uJVxrsMqcvz9/KF9232uCg3qTg== X-Google-Smtp-Source: AGHT+IGX0i5tAkcMDPeTKOwlfoH2ZHWjyq3skD2KqOfwczWV54QzQ/+ExzzCATYleUpKxouAAc9edA== X-Received: by 2002:a5d:6b49:0:b0:31a:ed75:75d6 with SMTP id x9-20020a5d6b49000000b0031aed7575d6mr1639449wrw.15.1693982493183; Tue, 05 Sep 2023 23:41:33 -0700 (PDT) Received: from localhost (cst2-173-16.cust.vodafone.cz. [31.30.173.16]) by smtp.gmail.com with ESMTPSA id m14-20020a056000174e00b0031f3b04e7cdsm11905338wrf.109.2023.09.05.23.41.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Sep 2023 23:41:32 -0700 (PDT) Date: Wed, 6 Sep 2023 08:41:31 +0200 From: Andrew Jones To: Haibo Xu Cc: Haibo Xu , Paul Walmsley , Palmer Dabbelt , Albert Ou , Paolo Bonzini , Shuah Khan , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Anup Patel , Atish Patra , Guo Ren , Conor Dooley , Daniel Henrique Barboza , Greentime Hu , Sean Christopherson , Ricardo Koller , Vishal Annapurve , Aaron Lewis , David Matlack , Vitaly Kuznetsov , Ackerley Tng , Mingwei Zhang , Vipin Sharma , Lei Wang , Like Xu , Peter Gonda , Maxim Levitsky , Thomas Huth , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , David Woodhouse , Michal Luczaj , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm-riscv@lists.infradead.org Subject: Re: [PATCH v2 2/8] KVM: arm64: selftest: Split arch_timer test code Message-ID: <20230906-6996fca9840e6de7b75692ec@orel> References: <20230904-11e853ffe3d8e9cf9ec6079d@orel> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org On Wed, Sep 06, 2023 at 10:14:52AM +0800, Haibo Xu wrote: > On Mon, Sep 4, 2023 at 9:24 PM Andrew Jones wrote: > > > > On Sat, Sep 02, 2023 at 08:59:24PM +0800, Haibo Xu wrote: ... > > > + > > > +#include "kvm_util.h" > > > + > > > +#define NR_VCPUS_DEF 4 > > > +#define NR_TEST_ITERS_DEF 5 > > > +#define TIMER_TEST_PERIOD_MS_DEF 10 > > > +#define TIMER_TEST_ERR_MARGIN_US 100 > > > +#define TIMER_TEST_MIGRATION_FREQ_MS 2 > > > + > > > +#define msecs_to_usecs(msec) ((msec) * 1000LL) > > > > I'd move the above to include/test_util.h > > > > Yes, msecs_to_usecs() macro should be a common API for all the tests. > > > > + > > > +#define GICD_BASE_GPA 0x8000000ULL > > > +#define GICR_BASE_GPA 0x80A0000ULL > > > > These defines belong in aarch64/arch_timer.c > > > > These 2 defines were also defined in other test cases, shall we move them > to an aarch64 specific header file? Maybe > tools/testing/selftests/kvm/include/aarch64/gic.h? Even though currently all the aarch64 tests that use the gic are using these defines for the base addresses, each test is free to choose whatever base addresses it likes. I'd just move them back to aarch64/arch_timer.c for now. Consolidating them into shared, default base addresses, if done at all, is work for another series. Thanks, drew