Re: [V3 10/11] KVM: selftests: Add ucall pool based implementation

From: Sean Christopherson
Date: Fri Aug 19 2022 - 16:52:21 EST


On Fri, Aug 19, 2022, Sean Christopherson wrote:
> Or can we just say that it's always immediate after memslot0? That would allow
> us to delete the searching code in ARM's ucall_arch_init().

I have this coded up, will test on x86 and arm64 and send out a series (essentially
all of the non-SEV bits in this series).

Prescribing an MMIO address from __vm_create() has a some nice side effects.

1) KVM treats writes to read-only memslots as MMIO, so a future cleanup would
be to have __vm_create() create a memslot for the MMIO range to prevent
silently clobbering the address. I'll leave this for later because selftests
currently assumes they can use all memslots except memslot0.

2) It will simplify wwitching x86 and RISC-V to a common MMIO implementation,
if we ever want to do that. I.e. have common code for everything except s390.