[PATCH 1/2] arch/powerpc/kvm: kvmppc_hv_entry: remove .global scope

Kautuk Consul kconsul at linux.vnet.ibm.com
Mon Feb 20 20:17:04 AEDT 2023


On Mon, Feb 20, 2023 at 01:41:38PM +0530, Kautuk Consul wrote:
> On Mon, Feb 20, 2023 at 01:31:40PM +0530, Sathvika Vasireddy wrote:
> > 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)

Just one question though. Went through the code again and I think
that this place shouldn't be proper to insert a SYM_FUNC_END
because we haven't entered the guest at this point and the name
of the function is kvmppc_hv_entry which  I think implies that
this SYM_FUNC_END should be at some place after the HRFI_TO_GUEST.

What do you think ?

> > +
> >  kvmppc_got_guest:
> >         /* Increment yield count if they have a VPA */
> >         ld      r3, VCPU_VPA(r4)
> > 
> 
> Thanks! Will send out a v2 after I get some response for
> PATCH 2/2 with comments.
> > 
> > Thanks,
> > Sathvika


More information about the Linuxppc-dev mailing list