You need to sign in or sign up before continuing.
  • Paul Mackerras's avatar
    KVM: PPC: Book3S HV: Restructure kvmppc_hv_entry to be a subroutine · 218309b7
    Paul Mackerras authored
    
    
    We have two paths into and out of the low-level guest entry and exit
    code: from a vcpu task via kvmppc_hv_entry_trampoline, and from the
    system reset vector for an offline secondary thread on POWER7 via
    kvm_start_guest.  Currently both just branch to kvmppc_hv_entry to
    enter the guest, and on guest exit, we test the vcpu physical thread
    ID to detect which way we came in and thus whether we should return
    to the vcpu task or go back to nap mode.
    
    In order to make the code flow clearer, and to keep the code relating
    to each flow together, this turns kvmppc_hv_entry into a subroutine
    that follows the normal conventions for call and return.  This means
    that kvmppc_hv_entry_trampoline() and kvmppc_hv_entry() now establish
    normal stack frames, and we use the normal stack slots for saving
    return addresses rather than local_paca->kvm_hstate.vmhandler.  Apart
    from that this is mostly moving code around unchanged.
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
    218309b7
book3s_hv_rmhandlers.S 44.9 KB