[PATCH v2 12/12] KVM: arm/arm64: remove now obsolete VGIC specific MMIO handling code

Marc Zyngier marc.zyngier at arm.com
Fri Mar 27 02:33:14 PDT 2015


On 23/03/15 15:58, Andre Przywara wrote:
> With all of the virtual GIC emulation code now being registered with
> the kvm_io_bus, we can remove all of the old MMIO handling code and
> its dispatching functionality.
> 
> Signed-off-by: Andre Przywara <andre.przywara at arm.com>
> ---
>  include/kvm/arm_vgic.h      |    2 --
>  virt/kvm/arm/vgic-v2-emul.c |   19 ------------
>  virt/kvm/arm/vgic-v3-emul.c |   39 ------------------------
>  virt/kvm/arm/vgic.c         |   71 -------------------------------------------
>  virt/kvm/arm/vgic.h         |    5 ---
>  5 files changed, 136 deletions(-)

Hi Andre,

I've given this some more thoughts, and one thing really worries me. Up
to now, we've only filled the vcpu->run structure when we were about to
give it to userspace, and would never use it ourselves.

Now, we seem to be using much more extensively at various points in the
code. What if userspace changes it under our feet? What guarantee do we
have that this is always safe?

That makes me feel very uncomfortable. I'd rather see an intermediate
structure being used to pass the parameters around, and only fill run at
the last moment. I'd probably sleep better... ;-)

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...



More information about the linux-arm-kernel mailing list