From: Sathvika Vasireddy <sv@linux.ibm.com>
To: Kautuk Consul <kconsul@linux.vnet.ibm.com>
Cc: Sathvika Vasireddy <sv@linux.ibm.com>, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 1/2] arch/powerpc/kvm: kvmppc_hv_entry: remove .global scope
Date: Mon, 20 Feb 2023 13:31:40 +0530 [thread overview]
Message-ID: <9ee1f333-9cb7-d7fe-4e3f-ded4990030de@linux.ibm.com> (raw)
In-Reply-To: <Y/MhON/N6vG8wYWq@li-a450e7cc-27df-11b2-a85c-b5a9ac31e8ef.ibm.com>
On 20/02/23 12:58, Kautuk Consul wrote:
> Hi Sathvika,
>
> (Sorry didn't include list in earlier email.)
>
> On Mon, Feb 20, 2023 at 12:35:09PM +0530, Sathvika Vasireddy wrote:
>> Hi Kautuk,
>>
>> On 20/02/23 10:53, Kautuk Consul wrote:
>>> kvmppc_hv_entry isn't called from anywhere other than
>>> book3s_hv_rmhandlers.S itself. Removing .global scope for
>>> this function.
>>>
>>> Signed-off-by: Kautuk Consul <kconsul@linux.vnet.ibm.com>
>>> ---
>>> arch/powerpc/kvm/book3s_hv_rmhandlers.S | 1 -
>>> 1 file changed, 1 deletion(-)
>>>
>>> diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
>>> index acf80915f406..7e063fde7adc 100644
>>> --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
>>> +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
>>> @@ -502,7 +502,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
>>> * *
>>> *****************************************************************************/
>>> -.global kvmppc_hv_entry
>>> kvmppc_hv_entry:
>>> /* Required state:
>> I see the following objtool warning with this patch applied.
>> arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0x48:
>> unannotated intra-function call
>>
>> Annotating kvmppc_hv_entry symbol with SYM_FUNC_START_LOCAL and SYM_FUNC_END
>> macros should help fix this warning.
> Not sure where to put the SYM_FUNC_END annotation.
> Will the following do:
> <snip>
> ld r0, VCPU_GPR(R0)(r4)
> ld r2, VCPU_GPR(R2)(r4)
> ld r3, VCPU_GPR(R3)(r4)
> ld r4, VCPU_GPR(R4)(r4)
> HRFI_TO_GUEST
> b .
>
> SYM_FUNC_END(kvmppc_hv_entry)
>
> secondary_too_late:
> li r12, 0
>
> ?
>
> Thanks.
Placing SYM_FUNC_END(kvmppc_hv_entry) before kvmppc_got_guest() should do:
@@ -502,12 +500,10 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
* *
*****************************************************************************/
-.global kvmppc_hv_entry
-kvmppc_hv_entry:
+SYM_FUNC_START_LOCAL(kvmppc_hv_entry)
/* Required state:
*
- * R4 = vcpu pointer (or NULL)
* MSR = ~IR|DR
* R13 = PACA
* R1 = host R1
@@ -525,6 +521,8 @@ kvmppc_hv_entry:
li r6, KVM_GUEST_MODE_HOST_HV
stb r6, HSTATE_IN_GUEST(r13)
+ ld r4, HSTATE_KVM_VCPU(r13)
+
#ifdef CONFIG_KVM_BOOK3S_HV_P8_TIMING
/* Store initial timestamp */
cmpdi r4, 0
@@ -619,6 +617,8 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
/* Do we have a guest vcpu to run? */
10: cmpdi r4, 0
beq kvmppc_primary_no_guest
+SYM_FUNC_END(kvmppc_hv_entry)
+
kvmppc_got_guest:
/* Increment yield count if they have a VPA */
ld r3, VCPU_VPA(r4)
Thanks,
Sathvika
next prev parent reply other threads:[~2023-02-20 8:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-20 5:23 [PATCH 0/2] Improving calls to kvmppc_hv_entry Kautuk Consul
2023-02-20 5:23 ` [PATCH 1/2] arch/powerpc/kvm: kvmppc_hv_entry: remove .global scope Kautuk Consul
2023-02-20 7:05 ` Sathvika Vasireddy
2023-02-20 7:28 ` Kautuk Consul
2023-02-20 8:01 ` Sathvika Vasireddy [this message]
2023-02-20 8:11 ` Kautuk Consul
2023-02-20 9:17 ` Kautuk Consul
2023-02-23 5:09 ` Kautuk Consul
2023-02-24 11:15 ` Sathvika Vasireddy
2023-03-06 12:22 ` Kautuk Consul
2023-02-20 5:23 ` [PATCH 2/2] arch/powerpc/kvm: kvmppc_hv_entry: remove r4 argument Kautuk Consul
2023-03-06 12:24 ` Kautuk Consul
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=9ee1f333-9cb7-d7fe-4e3f-ded4990030de@linux.ibm.com \
--to=sv@linux.ibm.com \
--cc=kconsul@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.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;
as well as URLs for NNTP newsgroup(s).