public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: "'Kirill A. Shutemov'" <kirill@shutemov.name>,
	Tom Lendacky <thomas.lendacky@amd.com>
Cc: 'Wu Zongyong' <wuzongyong@linux.alibaba.com>,
	"kirill.shutemov@linux.intel.com"
	<kirill.shutemov@linux.intel.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"tony.luck@intel.com" <tony.luck@intel.com>,
	"wutu.xq2@linux.alibaba.com" <wutu.xq2@linux.alibaba.com>
Subject: RE: [RFC PATCH] x86/insn: support decode MOVSXD instruction for MMIO
Date: Fri, 31 Mar 2023 15:59:44 +0000	[thread overview]
Message-ID: <a6a150f332b44914ac286550b63feab0@AcuMS.aculab.com> (raw)
In-Reply-To: <20230331152508.s7phgif3iozbbpqn@box>

From: Kirill A. Shutemov
> Sent: 31 March 2023 16:25
...
> > No, SEV doesn't support userspace MMIO.
> 
> But where do you filter out userspace MMIO? AFAICS, it goes straight from
> from #VC to insn_decode_mmio(). Hm?

Probably by making vm_iomap_memory() fail.

Otherwise MOVSXD is the least of your problems.
You'd need to worry about all the AVX opcodes as well.

Although you might even find kernel code that is using
kernel_fpu_begin/end() to wrap mmio copies that use the
big AVX512 registers.
When each PCIe read takes about 1us (measured into our fpga)
increasing the TLP to 64 bytes (from 8) makes a massive
difference to buffer reads.
(Mostly we try to get the fpga to do writes instead.)

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


  parent reply	other threads:[~2023-03-31 15:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-29  2:59 [RFC PATCH] x86/insn: support decode MOVSXD instruction for MMIO Wu Zongyong
2023-03-29 13:49 ` Tom Lendacky
2023-03-30  2:55   ` Wu Zongyong
2023-03-30 12:39 ` kirill.shutemov
2023-03-31  2:24   ` Wu Zongyong
2023-03-31  8:49     ` David Laight
2023-03-31 10:06       ` Kirill A. Shutemov
2023-03-31 13:40         ` Tom Lendacky
2023-03-31 14:09           ` Kirill A. Shutemov
2023-03-31 14:33             ` Tom Lendacky
2023-03-31 15:25               ` Kirill A. Shutemov
2023-03-31 15:50                 ` Tom Lendacky
2023-03-31 15:59                 ` David Laight [this message]
2023-03-31 15:30 ` Dave Hansen

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=a6a150f332b44914ac286550b63feab0@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.com \
    --cc=tony.luck@intel.com \
    --cc=wutu.xq2@linux.alibaba.com \
    --cc=wuzongyong@linux.alibaba.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