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 95E7FEB8FAD for ; Wed, 6 Sep 2023 06:41:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241952AbjIFGlx (ORCPT ); Wed, 6 Sep 2023 02:41:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241926AbjIFGlv (ORCPT ); Wed, 6 Sep 2023 02:41:51 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C310BCFD for ; Tue, 5 Sep 2023 23:41:34 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-31c3df710bdso2584691f8f.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=Wr7xcy73w0pwlCNxmaFVf6cIMUJOEAgd5xzHNLRYD1owLIbaRXyqeos9UDo+5tOTXP WFgDBqAf6Ug+9eCbq7uq/Kj9FrqRM+OnXaSknq+5or6Jwy0byfeJxXsTssQuA+IgTTav ahtwYI38OD9X70ZcxmFQiJQAZisJbkOF//E8I5SljmhwVsNou/4vOwrlmmLaFLhMKaC2 yxlz+0w8Djr+wKpArQhkwswr6YbHGJRuWivTrhO5eG9sRC3GM4luA8EKdV+G8BDy12Sc UuTD7lDnEVnS2+yN+lhD2vxIvfSmqSePQmGF9haDynoR23DfBWyXkV0eTY9MwCNrff5q pg3g== X-Gm-Message-State: AOJu0YwODDlGeYNUIa4djOkv1aAf6ICvf3iZ1S45P64jqGsvpCcl70Kw 1PNPQ5u2y37iINXh0s9bg1Pm8Q== 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: kvm@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