Re: [patch 00/15] x86/tlb: Unexport per-CPU tlbstate
From: Sean Christopherson
Date: Tue Apr 21 2020 - 20:42:16 EST
On Tue, Apr 21, 2020 at 11:09:07AM +0200, Thomas Gleixner wrote:
> Sean Christopherson <sean.j.christopherson@xxxxxxxxx> writes:
>
> > On Mon, Apr 20, 2020 at 07:27:06PM +0200, Thomas Gleixner wrote:
> >> Christoph Hellwig <hch@xxxxxxxxxxxxx> writes:
> >> > Just looking over some exports at the end of the series (and thus
> >> > ignoring bisection issues):
> >> >
> >> > - Is there any good reason to keep __flush_tlb_all inline vs moving it
> >> > out of line and kill the flush_tlb_local and flush_tlb_global exports.
> >> > Also there is just a single modular users in SVM, I wonder if there is
> >> > any way to get rid of that one as well.
> >>
> >> I'll have a look again.
> >
> > Regarding the SVM case, the only usage is for a TLB errata. At a glance,
> > svm_init_erratum_383() and is_erratum_383() don't use any KVM hooks, i.e. I
> > don't see anything that would prevent moving those to .../kernel/cpu/amd.c.
>
> Right, but that would trade one export vs. two SVM errata specific
> exports. Not really a win.
True. I was thinking the svm_init_erratum_383() call could be moved to
init_amd(), assuming the MSR's magic bit 47 is "safe" outside of SVM
enabled, but that's probably not worth risking the potential for breakage
unless you really want to hide __flush_tlb_all().