Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1324214
| From | Christoffer Dall <christoffer.dall@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 06/21] arm64: KVM: VHE: Patch out use of HVC |
| Date | 2016-02-02 16:50 +0100 |
| Message-ID | <qXLnl-55B-35@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <qXmS0-3vq-33@gated-at.bofh.it> <qXoK5-4Sy-3@gated-at.bofh.it> <qXpwt-5xp-1@gated-at.bofh.it> <qXq9b-62X-1@gated-at.bofh.it> <qXqsx-6bL-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Feb 01, 2016 at 05:28:32PM +0000, Marc Zyngier wrote: > On 01/02/16 17:08, Ard Biesheuvel wrote: > > On 1 February 2016 at 17:20, Marc Zyngier <marc.zyngier@arm.com> wrote: > >> On 01/02/16 15:36, Catalin Marinas wrote: > >>> On Mon, Feb 01, 2016 at 01:34:16PM +0000, Marc Zyngier wrote: > >>>> On 01/02/16 13:16, Christoffer Dall wrote: > >>>>> On Mon, Jan 25, 2016 at 03:53:40PM +0000, Marc Zyngier wrote: > >>>>>> diff --git a/arch/arm64/kvm/hyp/hyp-entry.S b/arch/arm64/kvm/hyp/hyp-entry.S > >>>>>> index 93e8d983..9e0683f 100644 > >>>>>> --- a/arch/arm64/kvm/hyp/hyp-entry.S > >>>>>> +++ b/arch/arm64/kvm/hyp/hyp-entry.S > >>>>>> @@ -38,6 +38,32 @@ > >>>>>> ldp x0, x1, [sp], #16 > >>>>>> .endm > >>>>>> > >>>>>> +.macro do_el2_call > >>>>>> + /* > >>>>>> + * Shuffle the parameters before calling the function > >>>>>> + * pointed to in x0. Assumes parameters in x[1,2,3]. > >>>>>> + */ > >>>>>> + stp lr, xzr, [sp, #-16]! > >>>>> > >>>>> remind me why this pair isn't just doing "str" instead of "stp" with the > >>>>> xzr ? > >>>> > >>>> Because SP has to be aligned on a 16 bytes boundary at all times. > >>> > >>> You could do something like: > >>> > >>> sub sp, sp, #16 > >>> str lr, [sp] > >>> > >> > >> Ah, fair enough. I'll fold that in. > >> > > > > Since we're micro-reviewing: what's wrong with > > > > str lr, [sp, #-16]! > > > > ? > > > > I suspect that on most micro-architectures, a register writeback is > going to be slower than doing the sub independently. > > I may be wrong, though. > For the record, I don't mind it the way it was in the original patch either, I was just curious about the store of xzr and had forgottten the stack alignment thing. -Christoffer
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v2 06/21] arm64: KVM: VHE: Patch out use of HVC Christoffer Dall <christoffer.dall@linaro.org> - 2016-02-01 14:20 +0100
Re: [PATCH v2 06/21] arm64: KVM: VHE: Patch out use of HVC Marc Zyngier <marc.zyngier@arm.com> - 2016-02-01 14:40 +0100
Re: [PATCH v2 06/21] arm64: KVM: VHE: Patch out use of HVC Catalin Marinas <catalin.marinas@arm.com> - 2016-02-01 16:40 +0100
Re: [PATCH v2 06/21] arm64: KVM: VHE: Patch out use of HVC Marc Zyngier <marc.zyngier@arm.com> - 2016-02-01 17:30 +0100
Re: [PATCH v2 06/21] arm64: KVM: VHE: Patch out use of HVC Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-02-01 18:10 +0100
Re: [PATCH v2 06/21] arm64: KVM: VHE: Patch out use of HVC Marc Zyngier <marc.zyngier@arm.com> - 2016-02-01 18:30 +0100
Re: [PATCH v2 06/21] arm64: KVM: VHE: Patch out use of HVC Christoffer Dall <christoffer.dall@linaro.org> - 2016-02-02 16:50 +0100
Re: [PATCH v2 06/21] arm64: KVM: VHE: Patch out use of HVC Christoffer Dall <christoffer.dall@linaro.org> - 2016-02-01 16:40 +0100
csiph-web