• Suresh Warrier's avatar
    KVM: PPC: Book3S HV: Convert kvmppc_read_intr to a C function · 37f55d30
    Suresh Warrier authored
    Modify kvmppc_read_intr to make it a C function.  Because it is called
    from kvmppc_check_wake_reason, any of the assembler code that calls
    either kvmppc_read_intr or kvmppc_check_wake_reason now has to assume
    that the volatile registers might have been modified.
    
    This also adds in the optimization of clearing saved_xirr in the case
    where we completely handle and EOI an IPI.  Without this, the next
    device interrupt will require two trips through the host interrupt
    handling code.
    
    [paulus@ozlabs.org - made kvmppc_check_wake_reason create a stack frame
     when it is calling kvmppc_read_intr, which means we can set r12 to
     the trap number (0x500) after the call to kvmppc_read_intr, instead
     of using r31.  Also moved the deliver_guest_interrupt label so as to
     restore XER and CTR, plus other minor tweaks.]
    Signed-off-by: default avatarSuresh Warrier <warrier@linux.vnet.ibm.com>
    Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
    37f55d30
book3s_hv_rmhandlers.S 66.9 KB