Re: [PATCH] x86/tdx: Generate SIGBUS on userspace MMIO

From: Kirill A. Shutemov
Date: Mon Jun 10 2024 - 09:34:45 EST


On Tue, May 28, 2024 at 01:09:19PM +0300, Kirill A. Shutemov wrote:
> Currently, attempting to perform MMIO from userspace in a TDX guest
> leads to a warning about an unexpected #VE and SIGSEGV being delivered
> to the process.
>
> Enlightened userspace may choose to handle MMIO on their own if the
> kernel does not emulate it.
>
> Handle the EPT_VIOLATION exit reason for userspace and deliver SIGBUS
> instead of SIGSEGV. SIGBUS is more appropriate for the MMIO situation.
>
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>

Any feedback?

--
Kiryl Shutsemau / Kirill A. Shutemov