[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230906-6996fca9840e6de7b75692ec@orel>
Date: Wed, 6 Sep 2023 08:41:31 +0200
From: Andrew Jones <ajones@...tanamicro.com>
To: Haibo Xu <xiaobo55x@...il.com>
Cc: Haibo Xu <haibo1.xu@...el.com>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>,
Paolo Bonzini <pbonzini@...hat.com>,
Shuah Khan <shuah@...nel.org>, Marc Zyngier <maz@...nel.org>,
Oliver Upton <oliver.upton@...ux.dev>,
James Morse <james.morse@....com>,
Suzuki K Poulose <suzuki.poulose@....com>,
Zenghui Yu <yuzenghui@...wei.com>,
Anup Patel <anup@...infault.org>,
Atish Patra <atishp@...shpatra.org>,
Guo Ren <guoren@...nel.org>,
Conor Dooley <conor.dooley@...rochip.com>,
Daniel Henrique Barboza <dbarboza@...tanamicro.com>,
Greentime Hu <greentime.hu@...ive.com>,
Sean Christopherson <seanjc@...gle.com>,
Ricardo Koller <ricarkol@...gle.com>,
Vishal Annapurve <vannapurve@...gle.com>,
Aaron Lewis <aaronlewis@...gle.com>,
David Matlack <dmatlack@...gle.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Ackerley Tng <ackerleytng@...gle.com>,
Mingwei Zhang <mizhang@...gle.com>,
Vipin Sharma <vipinsh@...gle.com>,
Lei Wang <lei4.wang@...el.com>, Like Xu <likexu@...cent.com>,
Peter Gonda <pgonda@...gle.com>,
Maxim Levitsky <mlevitsk@...hat.com>,
Thomas Huth <thuth@...hat.com>,
Philippe Mathieu-Daudé <philmd@...aro.org>,
David Woodhouse <dwmw@...zon.co.uk>,
Michal Luczaj <mhal@...x.co>, linux-kernel@...r.kernel.org,
linux-riscv@...ts.infradead.org, kvm@...r.kernel.org,
linux-kselftest@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.linux.dev,
kvm-riscv@...ts.infradead.org
Subject: Re: [PATCH v2 2/8] KVM: arm64: selftest: Split arch_timer test code
On Wed, Sep 06, 2023 at 10:14:52AM +0800, Haibo Xu wrote:
> On Mon, Sep 4, 2023 at 9:24 PM Andrew Jones <ajones@...tanamicro.com> 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
Powered by blists - more mailing lists