Re: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22.06.2012, at 22:06, Stuart Yoder wrote:

> From: Liu Yu-B13201 <Yu.Liu@xxxxxxxxxxxxx>
> 
> Signed-off-by: Liu Yu <yu.liu@xxxxxxxxxxxxx>
> Signed-off-by: Stuart Yoder <stuart.yoder@xxxxxxxxxxxxx>
> ---
> -v11: no changes
> 
> arch/powerpc/include/asm/epapr_hcalls.h |   22 +++++++++---------
> arch/powerpc/include/asm/fsl_hcalls.h   |   36 +++++++++++++++---------------
> 2 files changed, 29 insertions(+), 29 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h
> index 833ce2c..b8d9445 100644
> --- a/arch/powerpc/include/asm/epapr_hcalls.h
> +++ b/arch/powerpc/include/asm/epapr_hcalls.h
> @@ -195,7 +195,7 @@ static inline unsigned int ev_int_set_config(unsigned int interrupt,
> 	r5  = priority;
> 	r6  = destination;
> 
> -	__asm__ __volatile__ ("sc 1"
> +	asm volatile("bl	epapr_hypercall_start"
> 		: "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6)
> 		: : EV_HCALL_CLOBBERS4

Hrm. ePAPR hypercalls are allowed to clobber lr, right? But our hypercall entry code depends on lr staying alive:

.global epapr_hypercall_start
epapr_hypercall_start:
        li      r3, -1
        nop
        nop
        nop
        blr

So I suppose for this to work, we'd have to store lr off to the stack before doing the hypercall in epapr_hypercall_start.


Alex

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux