[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8947174f-ce16-c076-e208-55e743d9fdf0@redhat.com>
Date: Fri, 10 Jul 2020 09:57:02 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>,
tsbogend@...ha.franken.de, paulus@...abs.org, mpe@...erman.id.au,
benh@...nel.crashing.org, borntraeger@...ibm.com,
frankja@...ux.ibm.com, david@...hat.com, cohuck@...hat.com,
heiko.carstens@...ibm.com, gor@...ux.ibm.com,
sean.j.christopherson@...el.com, vkuznets@...hat.com,
wanpengli@...cent.com, jmattson@...gle.com, joro@...tes.org,
tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, x86@...nel.org,
hpa@...or.com, maz@...nel.org, james.morse@....com,
julien.thierry.kdev@...il.com, suzuki.poulose@....com,
christoffer.dall@....com, peterx@...hat.com, thuth@...hat.com,
chenhuacai@...il.com
Cc: kvm@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
kvmarm@...ts.cs.columbia.edu, linux-mips@...r.kernel.org,
kvm-ppc@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 3/5] KVM: PPC: clean up redundant kvm_run parameters in
assembly
On 23/06/20 15:14, Tianjia Zhang wrote:
>
> /* Load non-volatile guest state from the vcpu */
> - VCPU_LOAD_NVGPRS(r4)
> + VCPU_LOAD_NVGPRS(r3)
>
> kvm_start_lightweight:
> /* Copy registers into shadow vcpu so we can access them in real mode */
> - mr r3, r4
> bl FUNC(kvmppc_copy_to_svcpu)
> nop
> - REST_GPR(4, r1)
> + REST_GPR(3, r1)
>
> #ifdef CONFIG_PPC_BOOK3S_64
> /* Get the dcbz32 flag */
> @@ -146,7 +144,7 @@ after_sprg3_load:
Below, there are a bunch of references to r3 and r4 left
rldicl r3, r3, 0, 63 /* r3 &= 1 */
stb r3, HSTATE_RESTORE_HID5(r13)
/* Load up guest SPRG3 value, since it's user readable */
lwz r3, VCPU_SHAREDBE(r4) <<<
cmpwi r3, 0
ld r5, VCPU_SHARED(r4) <<<
where r3 is also destroyed. So I'd rather have three patches:
- one that is as small as possible, changing the prototypes and adding
mr r4, r3
- one that entirely swaps out r3 and r4. This would be the hard one to
review!
- one that cleans up the prologue and epilogue
But overall I think it's simplest to just leave out this patch.
Paolo
Powered by blists - more mailing lists