lkml.org 
[lkml]   [2020]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 07/11] kvm: arm64: Duplicate arm64_ssbd_callback_required for nVHE hyp
> >  		u64 *ptr;
> >
> > - ptr = per_cpu_ptr(&arm64_ssbd_callback_required, cpu);
> > + ptr = per_cpu_ptr_nvhe(arm64_ssbd_callback_required, cpu);
> > err = create_hyp_mappings(ptr, ptr + 1, PAGE_HYP);
> > if (err)
> > return err;
> > +
> > + /* Copy value from kernel to hyp. */
> > + *ptr = per_cpu(arm64_ssbd_callback_required, cpu);
>
> Hmm. Is this correct for late arriving CPUs, where we don't know whether
> a callback is required at the point we do the copy?
>
> That sounds fiddly to resolve, but this _might_ all be moot because I'm
> about to post a series that allows us to remove the hyp mapping of this
> variable entirely. So leave this for now, but maybe stick a comment in
> that it doesn't work for late cpus.

Ah, good point. I'll move the value copy at the end of cpu_init_hyp_mode().
It must be known at that point. And if your series gets rid of this completely,
even better.

\
 
 \ /
  Last update: 2020-09-22 20:09    [W:0.065 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site