[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4055BDF753AD6F41A91F928E1B53A9303E8A9E29@ORSMSX111.amr.corp.intel.com>
Date: Mon, 5 Aug 2019 17:50:25 +0000
From: "Lin, Jing" <jing.lin@...el.com>
To: Borislav Petkov <bp@...en8.de>, "Luck, Tony" <tony.luck@...el.com>,
"Jiang, Dave" <dave.jiang@...el.com>
CC: "Kirill A. Shutemov" <kirill@...temov.name>,
Alexey Dobriyan <adobriyan@...il.com>,
"kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"x86@...nel.org" <x86@...nel.org>
Subject: RE: [PATCH] x86/asm: Add support for MOVDIR64B instruction
+Dave, who is the DSA developer.
Thanks,
Jing
-----Original Message-----
From: Borislav Petkov <bp@...en8.de>
Sent: Friday, August 2, 2019 7:41 AM
To: Luck, Tony <tony.luck@...el.com>
Cc: Kirill A. Shutemov <kirill@...temov.name>; Alexey Dobriyan <adobriyan@...il.com>; kirill.shutemov@...ux.intel.com; linux-kernel@...r.kernel.org; Lin, Jing <jing.lin@...el.com>; x86@...nel.org
Subject: Re: [PATCH] x86/asm: Add support for MOVDIR64B instruction
On Thu, Aug 01, 2019 at 10:06:27PM +0000, Luck, Tony wrote:
> > I think Tony's in the right direction. We already do dst "sizing"
> > like that for the compiler in clwb().
>
> The clwb case does look like what we want for movdir64b().
>
> But is it right for clwb() ... that doesn't modify anything, just
> pushes things from cache to memory. So why is it using "+m"?
Here some hints from to my notes, if you want to know more detail, I can ping my gcc guy.
It needs to be an input and an output operand so that it prevents gcc from reordering accesses to it after the insn happens, i.e., you don't want to touch it after CLFLUSH has executed.
And also, you want to make sure it works with all gcc versions and this is, I was told, the right way to do it. For example, some gcc versions consider it not limited to 64 bytes of memory being touched but a full memory clobber.
HTH.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
Powered by blists - more mailing lists