lkml.org 
[lkml]   [2020]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: x2apic_wrmsr_fence vs. Intel manual
From
Date
On 04.03.20 19:27, Dave Hansen wrote:
> On 3/2/20 8:11 AM, Jan Kiszka wrote:
>> The former dates back to ce4e240c279a, but that commit does not mention
>> why lfence is not needed. Did the manual read differently back then? Or
>> why are we safe? To my reading of lfence, it also has a certain
>> instruction serializing effect that mfence does not have.
>
> I asked around Intel about this.
>
> The old "SFENCE, or MFENCE" recommendation was deemed insufficient
> because it has no impact on the ordering of WRMSR since it is not a
> "load or store instruction". LFENCE's instruction-ordering semantic is
> needed because it ensures later ordering of all instructions, not just
> loads and stores.
>
> Jan, do you think you're seeing a bug resulting from WRMSR ordering?
>

Nope, not so far. I'm hunting a race between two guests over Jailhouse
where the kick (sent as IPI) seems to come before the data, but changing
the fences didn't solve it, unfortunately. Along that, I was reading
code and manuals up and down and ran into this inconsistency. That's the
story.

Jan

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

\
 
 \ /
  Last update: 2020-03-04 19:41    [W:0.379 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site