[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200113101403.GD13310@zn.tnic>
Date: Mon, 13 Jan 2020 11:14:03 +0100
From: Borislav Petkov <bp@...en8.de>
To: Dave Jiang <dave.jiang@...el.com>
Cc: dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
vkoul@...nel.org, dan.j.williams@...el.com, tony.luck@...el.com,
jing.lin@...el.com, ashok.raj@...el.com, sanjay.k.kumar@...el.com,
megha.dey@...el.com, jacob.jun.pan@...el.com, yi.l.liu@...el.com,
tglx@...utronix.de, mingo@...hat.com, fenghua.yu@...el.com,
hpa@...or.com
Subject: Re: [PATCH v4 1/9] x86/asm: add iosubmit_cmds512() based on
MOVDIR64B CPU instruction
On Tue, Jan 07, 2020 at 01:40:58PM -0700, Dave Jiang wrote:
> With the introduction of MOVDIR64B instruction, there is now an instruction
> that can write 64 bytes of data atomically.
>
> Quoting from Intel SDM:
> "There is no atomicity guarantee provided for the 64-byte load operation
> from source address, and processor implementations may use multiple
> load operations to read the 64-bytes. The 64-byte direct-store issued
> by MOVDIR64B guarantees 64-byte write-completion atomicity. This means
> that the data arrives at the destination in a single undivided 64-byte
> write transaction."
>
> We have identified at least 3 different use cases for this instruction in
> the format of func(dst, src, count):
> 1) Clear poison / Initialize MKTME memory
> @dst is normal memory.
> @src in normal memory. Does not increment. (Copy same line to all
> targets)
> @count (to clear/init multiple lines)
> 2) Submit command(s) to new devices
> @dst is a special MMIO region for a device. Does not increment.
> @src is normal memory. Increments.
> @count usually is 1, but can be multiple.
> 3) Copy to iomem in big chunks
> @dst is iomem and increments
> @src in normal memory and increments
> @count is number of chunks to copy
>
> Add support for case #2 to support device that will accept commands via
> this instruction. We provide a @count in order to submit a batch of
> preprogrammed descriptors in virtually contiguous memory. This
> allows the caller to submit multiple descriptors to a devices with a single
"to a device"
> submission. The special device requires the entire 64bytes descriptor to
> be written atomically and will accept MOVDIR64B instruction.
>
> Signed-off-by: Dave Jiang <dave.jiang@...el.com>
but the above can be fixed by whoever applies this.
Acked-by: Borislav Petkov <bp@...e.de>
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists