Re: [PATCH v3 2/2] kvm: arm64: set io memory s2 pte as normalnc for vfio pci devices

From: Jason Gunthorpe
Date: Mon Jan 08 2024 - 08:19:04 EST


On Mon, Jan 08, 2024 at 11:04:47AM +0000, Catalin Marinas wrote:

> If we want to keep this decision strictly in user space, we can do it
> with some ioctl(). The downside is that the host kernel now puts more
> trust in the user VMM, so my preference would be to keep this in the
> vfio driver. Or we can do both, vfio-pci allows the relaxation, the VMM
> tells KVM to go for a more relaxed stage 2 via an ioctl().

What is the point? We'd need a use case for why the VMM should have
the ability to create a more restrictive MMIO mapping.

I can't think of one.

So I'd go the other way, if someday we find out we need more
restrictive then the VMM should ask for more restrictive (not weirdly
ask for less restrictive)

Jason