Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Mark Brown <broonie@kernel.org>,
	James Morse <james.morse@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	Julien Thierry <julien.thierry.kdev@gmail.com>
Subject: Re: [PATCH] arm64: kvm: Annotate guest entry/exit as a single function
Date: Mon, 20 Jan 2020 16:58:56 +0000	[thread overview]
Message-ID: <bcd977af14883dc603c52f6d16f8bbfb@kernel.org> (raw)
In-Reply-To: <20200120164522.GA20435@willie-the-truck>

On 2020-01-20 16:45, Will Deacon wrote:
> [+Marc Z]

Thanks for the heads up!

> On Mon, Jan 20, 2020 at 12:47:06PM +0000, Mark Brown wrote:
>> In an effort to clarify and simplify the annotations of assembly
>> functions in the kernel new macros have been introduced replacing 
>> ENTRY
>> and ENDPROC. There are separate annotations SYM_FUNC_ for normal C
>> functions and SYM_CODE_ for other code. Currently __guest_enter and
>> __guest_exit are annotated as standard functions but this is not
>> entirely correct as the former doesn't do a normal return and the 
>> latter
>> is not entered in a normal fashion. From the point of view of the
>> hypervisor the guest entry/exit may be viewed as a single
>> function which happens to have an eret in the middle of it so let's
>> annotate it as such.
>> 
>> Suggested-by: Mark Rutland <mark.rutland@arm.com>
>> Signed-off-by: Mark Brown <broonie@kernel.org>
>> ---
>>  arch/arm64/kvm/hyp/entry.S | 7 +++----
>>  1 file changed, 3 insertions(+), 4 deletions(-)
>> 
>> diff --git a/arch/arm64/kvm/hyp/entry.S b/arch/arm64/kvm/hyp/entry.S
>> index e5cc8d66bf53..5b76a89939b1 100644
>> --- a/arch/arm64/kvm/hyp/entry.S
>> +++ b/arch/arm64/kvm/hyp/entry.S
>> @@ -44,7 +44,7 @@
>>   * u64 __guest_enter(struct kvm_vcpu *vcpu,
>>   *		     struct kvm_cpu_context *host_ctxt);
>>   */
>> -ENTRY(__guest_enter)
>> +SYM_FUNC_START(__guest_enter)
>>  	// x0: vcpu
>>  	// x1: host context
>>  	// x2-x17: clobbered by macros
>> @@ -96,9 +96,8 @@ alternative_else_nop_endif
>>  	// Do not touch any register after this!
>>  	eret
>>  	sb
>> -ENDPROC(__guest_enter)
>> 
>> -ENTRY(__guest_exit)
>> +SYM_INNER_LABEL(__guest_exit, SYM_L_GLOBAL)
>>  	// x0: return code
>>  	// x1: vcpu
>>  	// x2-x29,lr: vcpu regs
>> @@ -192,4 +191,4 @@ abort_guest_exit_end:
>>  	msr	spsr_el2, x4
>>  	orr	x0, x0, x5
>>  1:	ret
>> -ENDPROC(__guest_exit)
>> +SYM_FUNC_END(__guest_enter)
> 
> I wondered what the INNER_LABEL thing was for! Looks good:
> 
> Acked-by: Will Deacon <will@kernel.org>
> 
> Assuming this is going via the kvm tree.

Yup, I've now picked it up.

Thanks,

         M.
-- 
Jazz is not dead. It just smells funny...

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-01-20 16:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-20 12:47 [PATCH] arm64: kvm: Annotate guest entry/exit as a single function Mark Brown
2020-01-20 16:45 ` Will Deacon
2020-01-20 16:58   ` Marc Zyngier [this message]
2020-01-20 17:04   ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bcd977af14883dc603c52f6d16f8bbfb@kernel.org \
    --to=maz@kernel.org \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=james.morse@arm.com \
    --cc=julien.thierry.kdev@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=suzuki.poulose@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox