[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJve8o=uZGovGBdtYYxiodGnXO-kE9jj=8pkc5+_Tk+dirQO1Q@mail.gmail.com>
Date: Fri, 15 Sep 2023 14:08:41 +0800
From: Haibo Xu <xiaobo55x@...il.com>
To: Andrew Jones <ajones@...tanamicro.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>,
Sean Christopherson <seanjc@...gle.com>,
Ricardo Koller <ricarkol@...gle.com>,
Vishal Annapurve <vannapurve@...gle.com>,
Vipin Sharma <vipinsh@...gle.com>,
David Matlack <dmatlack@...gle.com>,
Thomas Huth <thuth@...hat.com>,
Aaron Lewis <aaronlewis@...gle.com>,
Colton Lewis <coltonlewis@...gle.com>,
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 v3 4/9] tools: riscv: Add header file csr.h
On Thu, Sep 14, 2023 at 4:14 PM Andrew Jones <ajones@...tanamicro.com> wrote:
>
> On Thu, Sep 14, 2023 at 09:36:58AM +0800, Haibo Xu wrote:
> > Borrow the csr definitions and operations from kernel's
> > arch/riscv/include/asm/csr.h to tools/ for riscv. Since
> > only 64bit was supported for RISC-V KVM selftests, add
> > CONFIG_64BIT definition in kvm/Makefile to ensure only
> > 64bit registers were available in csr.h.
> >
> > Suggested-by: Andrew Jones <ajones@...tanamicro.com>
> > Signed-off-by: Haibo Xu <haibo1.xu@...el.com>
> > Reviewed-by: Andrew Jones <ajones@...tanamicro.com>
> > ---
> > tools/arch/riscv/include/asm/csr.h | 521 +++++++++++++++++++++++++++
> > tools/testing/selftests/kvm/Makefile | 3 +
> > 2 files changed, 524 insertions(+)
> > create mode 100644 tools/arch/riscv/include/asm/csr.h
> >
> > diff --git a/tools/arch/riscv/include/asm/csr.h b/tools/arch/riscv/include/asm/csr.h
> > new file mode 100644
> > index 000000000000..4e86c82aacbd
> > --- /dev/null
> > +++ b/tools/arch/riscv/include/asm/csr.h
> ...
> > diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile
> > index 0102a0297b84..89ecee2fdb73 100644
> > --- a/tools/testing/selftests/kvm/Makefile
> > +++ b/tools/testing/selftests/kvm/Makefile
> > @@ -222,6 +222,9 @@ CFLAGS += -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99 \
> > ifeq ($(ARCH),s390)
> > CFLAGS += -march=z10
> > endif
> > +ifeq ($(ARCH),riscv)
> > + CFLAGS += -DCONFIG_64BIT
> > +endif
>
> This should be a separate patch, since the "import csr.h to tools" should
> be completely separate from anything else. Also, all architectures that
> KVM selftests supports are 64-bit, so, as another completely separate
> patch, I think we should just add CONFIG_64BIT to CFLAGS for all builds,
> especially since there's a chance some of the includes the other
> architectures are using may need it. Of course we'll need sign-off and
> testing from the other arch maintainers.
>
Sure. Will fix it in V4.
Thanks,
Haibo
> Thanks,
> drew
Powered by blists - more mailing lists