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

2020-08-25 Thread Brian Gerst
On Tue, Aug 25, 2020 at 6:44 AM Thomas Gleixner 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", \ > >> > -

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

2020-08-25 Thread Thomas Gleixner
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 RDPI

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

2020-08-21 Thread Brian Gerst
On Fri, Aug 21, 2020 at 10:22 AM Sean Christopherson wrote: > > On Fri, Aug 21, 2020 at 06:52:29AM -0400, Paolo Bonzini wrote: > > From: Sean Christopherson > > > > Don't use RDPID in the paranoid entry flow, as it can consume a KVM > > guest's MSR_TSC_AUX value if an NMI arrives during KVM's run

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

2020-08-21 Thread Sean Christopherson
On Fri, Aug 21, 2020 at 06:52:29AM -0400, Paolo Bonzini wrote: > From: Sean Christopherson > > Don't use RDPID in the paranoid entry flow, as it can consume a KVM > guest's MSR_TSC_AUX value if an NMI arrives during KVM's run loop. > > In general, the kernel does not need TSC_AUX because it can

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

2020-08-21 Thread Brian Gerst
On Fri, Aug 21, 2020 at 6:56 AM Paolo Bonzini wrote: > > From: Sean Christopherson > > Don't use RDPID in the paranoid entry flow, as it can consume a KVM > guest's MSR_TSC_AUX value if an NMI arrives during KVM's run loop. > > In general, the kernel does not need TSC_AUX because it can just use

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

2020-08-21 Thread Paolo Bonzini
From: Sean Christopherson Don't use RDPID in the paranoid entry flow, as it can consume a KVM guest's MSR_TSC_AUX value if an NMI arrives during KVM's run loop. In general, the kernel does not need TSC_AUX because it can just use __this_cpu_read(cpu_number) to read the current processor id. It