From: jinglin <jing.lin@intel.com>
To: "Kirill A. Shutemov" <kirill@shutemov.name>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
"H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org, "Luck, Tony" <tony.luck@intel.com>,
"Kumar, Sanjay K" <sanjay.k.kumar@intel.com>,
linux-kernel@vger.kernel.org,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Subject: Re: [PATCH] x86/asm: Add support for MOVDIR64B instruction
Date: Tue, 30 Jul 2019 17:24:02 -0700 [thread overview]
Message-ID: <3175cedf-b00b-c87c-1b52-4c9a993a7797@intel.com> (raw)
In-Reply-To: <20190730230554.8291-1-kirill.shutemov@linux.intel.com>
On 7/30/19 4:05 PM, Kirill A. Shutemov wrote:
> Add support for a new instruction MOVDIR64B. The instruction moves
> 64-bytes as direct-store with 64-byte write atomicity from source memory
> address to destination memory address.
>
> MOVDIR64B requires the destination address to be 64-byte aligned. No
> alignment restriction is enforced for source operand.
>
> See Intel Software Developer’s Manual for more information on the
> instruction.
>
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reviewed-by: Jing Lin <jing.lin@intel.com>
> ---
>
> Several upcoming patchsets will make use of the helper.
>
> ---
> arch/x86/include/asm/special_insns.h | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/arch/x86/include/asm/special_insns.h b/arch/x86/include/asm/special_insns.h
> index 219be88a59d2..059e7bd331d2 100644
> --- a/arch/x86/include/asm/special_insns.h
> +++ b/arch/x86/include/asm/special_insns.h
> @@ -248,6 +248,13 @@ static inline void clwb(volatile void *__p)
>
> #define nop() asm volatile ("nop")
>
> +static inline void movdir64b(void *dst, const void *src)
> +{
> + /* movdir64b [rdx], rax */
> + asm volatile(".byte 0x66, 0x0f, 0x38, 0xf8, 0x02"
> + : "=m" (*(char *)dst)
> + : "d" (src), "a" (dst));
> +}
>
> #endif /* __KERNEL__ */
>
next prev parent reply other threads:[~2019-07-31 0:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-30 23:05 Kirill A. Shutemov
2019-07-31 0:24 ` jinglin [this message]
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
2019-08-01 19:43 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
2019-08-01 21:53 ` Alexey Dobriyan
2019-08-02 8:15 ` Peter Zijlstra
2019-08-02 12:58 ` Kirill A. Shutemov
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=3175cedf-b00b-c87c-1b52-4c9a993a7797@intel.com \
--to=jing.lin@intel.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=sanjay.k.kumar@intel.com \
--cc=tglx@linutronix.de \
--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
Powered by JetHome