linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* AMD SME encrpytion and PCI BAR pages to user space
@ 2020-10-19 15:25 Jason Gunthorpe
  2020-10-19 16:36 ` Tom Lendacky
  0 siblings, 1 reply; 10+ messages in thread
From: Jason Gunthorpe @ 2020-10-19 15:25 UTC (permalink / raw)
  To: Tom Lendacky
  Cc: x86, linux-kernel, linux-arch, linux-mm, kvm,
	Radim Krčmář,
	Arnd Bergmann, Matt Fleming, Konrad Rzeszutek Wilk,
	Andrey Ryabinin, Ingo Molnar, Borislav Petkov, Andy Lutomirski,
	H. Peter Anvin, Paolo Bonzini, Alexander Potapenko,
	Thomas Gleixner, Dmitry Vyukov, Rik van Riel, Larry Woodman,
	Dave Young, Toshimitsu Kani, Michael S. Tsirkin, Brijesh Singh

Hi Tom,

We've found a bug where systems that have the AMD SME turned on are
not able to run RDMA work loads. It seems the kernel is automatically
encrypting VMA's pointing at PCI BAR memory created by
io_remap_pfn_range() - adding a prot_decrypted() causes things to
start working.

To me this is surprising, before I go adding random prot_decrypted()
into the RDMA subsystem can you confirm this is actually how things
are expected to work?

Is RDMA missing something? I don't see anything special in VFIO for
instance and the two are very similar - does VFIO work with SME, eg
DPDK or something unrelated to virtualization?
     
Is there a reason not to just add prot_decrypted() to
io_remap_pfn_range()? Is there use cases where a caller actually wants
encrypted io memory?

I saw your original patch series edited a few drivers this way, but
not nearly enough. So I feel like I'm missing something.. Does vfio
work with SME? I couldn't find any sign of it calling prot_decrypted()
either?

(BTW, I don't have any AMD SME systems to test on here, I'm getting
 this bug report from deployed system, running a distro kernel)

Thanks,
Jason


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-10-27 11:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-19 15:25 AMD SME encrpytion and PCI BAR pages to user space Jason Gunthorpe
2020-10-19 16:36 ` Tom Lendacky
2020-10-19 17:00   ` Jason Gunthorpe
2020-10-19 17:11     ` Tom Lendacky
2020-10-19 17:25       ` Jason Gunthorpe
2020-10-21 11:59   ` Jason Gunthorpe
2020-10-21 15:30     ` Tom Lendacky
2020-10-21 16:03       ` Jason Gunthorpe
2020-10-27  8:43         ` Christoph Hellwig
2020-10-27 11:58           ` Jason Gunthorpe

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).