lkml.org 
[lkml]   [2021]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 2/2] s390/vfio-ap: control access to PQAP(AQIC) interception handler
From
Date
On 5/25/21 9:26 AM, Jason Gunthorpe wrote:
> On Tue, May 25, 2021 at 09:24:59AM -0400, Jason J. Herne wrote:
>> change the function pointer to point to vfio_ap_ops:handle_pqap(). When we
>> unload the module we change the function pointer back to the stub. The
>> updates should be atomic operations so no lock needed, right?
>
> No
>
> Jason
>

Okay... Would you be willing to elaborate, please? A counter argument, or a simple
explanation would be appreciated. A simple "no" does not really do much to advance the
discussion :).

I'm fairly sure that a 64-bit pointer would be updated atomically. A reader of this value
is either going to see value A or value B, not the high half of A and the low half of B.
Maybe we also need a memory barrier to prevent stale values from being seen on another core?

--
-- Jason J. Herne (jjherne@linux.ibm.com)

\
 
 \ /
  Last update: 2021-05-25 16:09    [W:0.067 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site