Re: [PATCH v6 0/6] x86/tdx: Allow MMIO instructions from userspace

From: Kirill A. Shutemov
Date: Thu Sep 12 2024 - 05:45:29 EST


On Wed, Sep 11, 2024 at 09:19:04AM -0700, Sean Christopherson wrote:
> Yep. Based on the original report[*], it sounds like the userspace program is
> doing a memcpy(), so it's hard to even argue that userspace is being silly.

The kernel does MMIO accesses using special helpers that use well-known
instructions. I believe we should educate userspace to do the same by
rejecting emulation of anything more complex than plain loads and stores.
Otherwise these asks will keep coming.

--
Kiryl Shutsemau / Kirill A. Shutemov