linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Lin, Jing" <jing.lin@intel.com>
To: Borislav Petkov <bp@alien8.de>,
	"Luck, Tony" <tony.luck@intel.com>,
	"Jiang, Dave" <dave.jiang@intel.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	"kirill.shutemov@linux.intel.com"
	<kirill.shutemov@linux.intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"x86@kernel.org" <x86@kernel.org>
Subject: RE: [PATCH] x86/asm: Add support for MOVDIR64B instruction
Date: Mon, 5 Aug 2019 17:50:25 +0000	[thread overview]
Message-ID: <4055BDF753AD6F41A91F928E1B53A9303E8A9E29@ORSMSX111.amr.corp.intel.com> (raw)
In-Reply-To: <20190802144056.GC30661@zn.tnic>

+Dave, who is the DSA developer. 

Thanks,
Jing 

-----Original Message-----
From: Borislav Petkov <bp@alien8.de> 
Sent: Friday, August 2, 2019 7:41 AM
To: Luck, Tony <tony.luck@intel.com>
Cc: Kirill A. Shutemov <kirill@shutemov.name>; Alexey Dobriyan <adobriyan@gmail.com>; kirill.shutemov@linux.intel.com; linux-kernel@vger.kernel.org; Lin, Jing <jing.lin@intel.com>; x86@kernel.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.

  reply	other threads:[~2019-08-05 17:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-01 19:43 [PATCH] x86/asm: Add support for MOVDIR64B instruction Alexey Dobriyan
2019-08-01 19:49 ` Luck, Tony
2019-08-01 20:28   ` Kirill A. Shutemov
2019-08-01 20:36     ` Borislav Petkov
2019-08-01 22:06       ` Luck, Tony
2019-08-02 14:40         ` Borislav Petkov
2019-08-05 17:50           ` Lin, Jing [this message]
2019-08-01 21:53   ` Alexey Dobriyan
2019-08-02  8:15   ` Peter Zijlstra
2019-08-02 12:58     ` Kirill A. Shutemov
  -- strict thread matches above, loose matches on Subject: below --
2019-07-30 23:05 Kirill A. Shutemov
2019-07-31  0:24 ` jinglin
2019-08-01 10:03 ` Borislav Petkov
2019-08-01 11:03   ` Kirill A. Shutemov
2019-08-01 19:20   ` Luck, Tony
2019-08-01 19:36     ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4055BDF753AD6F41A91F928E1B53A9303E8A9E29@ORSMSX111.amr.corp.intel.com \
    --to=jing.lin@intel.com \
    --cc=adobriyan@gmail.com \
    --cc=bp@alien8.de \
    --cc=dave.jiang@intel.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).