Re: [RESEND PATCH] x86/devmem: Drop /dev/mem access for confidential guests

From: Pedro Falcato

Date: Tue Nov 24 2026 - 12:12:45 EST


Holy cow the CC list is stale.
Fixing some up.

On Tue, Nov 24, 2026 at 08:36:45AM -0800, Dave Hansen wrote:
> On 11/24/26 08:00, Nikolay Borisov wrote:
> > Resending this with the hope of either getting it accepted or
> > arriving at a consensus what exactly is missing so that I can take
> > it from there and eventually get something merged. As previously
> > mentioned this results in real problems for confidential guests both
> > on TDX as well as SEV-SNP.>
> > arch/x86/Kconfig | 4 ++++
> > mm/char-mem.c | 10 ++++++++++
> > 2 files changed, 14 insertions(+)
>
> I'm still OK with doing this.
>
> But I didn't want to sneak an mm/ change in via the tip tree. Any mm
> acks or naks on this?

For what it's worth, I don't love this fix. Yes, it fixes issues in /dev/mem,
but it:
1) skips any other potential problem spots (I don't know which)
2) open-codes random CC checks in mm, which is kind-of regrettable

OTOH, it's unclear to me why that CC check is needed. If configs select
STRICT_DEVMEM and IO_STRICT_DEVMEM, shouldn't it Just Do The Right thing?
in iomem_is_exclusive, etc. If not, could the CC awareness sit there
instead?

/me doesn't know much about CC other than *if you touch something you shouldn't,
it goes boom*

--
Pedro