Skip to content
  • James Morse's avatar
    arm64: hyp/kvm: Make hyp-stub reject kvm_call_hyp() · c94b0cf2
    James Morse authored
    
    
    A later patch implements kvm_arch_hardware_disable(), to remove kvm
    from el2, and re-instate the hyp-stub.
    
    This can happen while guests are running, particularly when kvm_reboot()
    calls kvm_arch_hardware_disable() on each cpu. This can interrupt a guest,
    remove kvm, then allow the guest to be scheduled again. This causes
    kvm_call_hyp() to be run against the hyp-stub.
    
    Change the hyp-stub to return a new exception type when this happens,
    and add code to kvm's handle_exit() to tell userspace we failed to
    enter the guest.
    
    Signed-off-by: default avatarJames Morse <james.morse@arm.com>
    Acked-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    c94b0cf2