Re: [PATCH v2] x86/entry/64: Do not use RDPID in paranoid entry to accomodate KVM

From: Brian Gerst
Date: Tue Aug 25 2020 - 08:11:46 EST


On Tue, Aug 25, 2020 at 6:44 AM Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
>
> On Fri, Aug 21 2020 at 11:35, Brian Gerst wrote:
> > On Fri, Aug 21, 2020 at 10:22 AM Sean Christopherson
> >> > .macro GET_PERCPU_BASE reg:req
> >> > - ALTERNATIVE \
> >> > - "LOAD_CPU_AND_NODE_SEG_LIMIT \reg", \
> >> > - "RDPID \reg", \
> >>
> >> This was the only user of the RDPID macro, I assume we want to yank that out
> >> as well?
> >
> > No. That one should be kept until the minimum binutils version is
> > raised to one that supports the RDPID opcode.
>
> The macro is unused and nothing in the kernel can use RDPID as we just
> established.

It is opencoded in vdso_read_cpunode(), but the RDPID macro can't be
used there. So you are correct, it can be removed.

--
Brian Gerst