Re: [Qemu-devel] [PATCH v5 00/12] KVM Support for MIPS32 Processors

Paolo Bonzini
2014-07-10T12:47:29Z

Il 10/07/2014 14:17, Peter Maydell ha scritto:
>
> More generally, there doesn't really seem to be provision in the
> KVM KVM_EXIT_MMIO API for returning "this access failed".
> I guess in theory userspace could do all the "figure out how
> to adjust CPU state to do exception entry and then run VCPU",
> but that seems like quite a lot of work which the kernel already
> knows how to do; is there some way to provide a simpler API
> that lets userspace just inform the kernel that it needs to
> fault the access?

There are 3 free padding bytes in struct kvm_run's mmio field. It's
possible to add a per-VM capability and have the kernel check one of
these bytes when the capability is set.

Paolo