lkml.org 
[lkml]   [2022]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] locking/atomic/x86: Introduce try_cmpxchg64
On Mon, May 16, 2022, Maxim Levitsky wrote:
> On Wed, 2022-05-11 at 21:54 +0200, Uros Bizjak wrote:
> > On Wed, May 11, 2022 at 6:04 PM Sean Christopherson <seanjc@google.com> wrote:
> > > On Wed, May 11, 2022, Uros Bizjak wrote:
> > > > On Wed, May 11, 2022 at 9:54 AM Peter Zijlstra <peterz@infradead.org> wrote:
> > > > > Still, does 32bit actually support that stuff?
> > > >
> > > > Unfortunately, it does:
> > > >
> > > > kvm-intel-y += vmx/vmx.o vmx/vmenter.o vmx/pmu_intel.o vmx/vmcs12.o \
> > > > vmx/evmcs.o vmx/nested.o vmx/posted_intr.o
> > > >
> > > > And when existing cmpxchg64 is substituted with cmpxchg, the
> > > > compilation dies for 32bits with:
> > >
> > > ...
> > >
> > > > > Anyway, your patch looks about right, but I find it *really* hard to
> > > > > care about 32bit code these days.
> > > >
> > > > Thanks, this is also my sentiment, but I hope the patch will enable
> > > > better code and perhaps ease similar situation I have had elsewhere.
> > >
> > > IMO, if we merge this it should be solely on the benefits to 64-bit code. Yes,
> > > KVM still supports 32-bit kernels, but I'm fairly certain the only people that
> > > run 32-bit KVM are KVM developers. 32-bit KVM has been completely broken for
> > > multiple releases at least once, maybe twice, and no one ever complained.
> >
> > Yes, the idea was to improve cmpxchg64 with the implementation of
> > try_cmpxchg64 for 64bit targets. However, the issue with 32bit targets
> > stood in the way, so the effort with 32-bit implementation was mainly
> > to unblock progression for 64-bit targets.
>
> Would that allow tdp mmu to work on 32 bit?

From a purely technical perspective, there's nothing that prevents enabling the
TDP MMU on 32-bit kernels. The TDP MMU is 64-bit only to simplify the implementation
and to reduce the maintenance and validation costs.

\
 
 \ /
  Last update: 2022-05-16 16:08    [W:0.230 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site