From: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
To: Cornelia Huck <cohuck@redhat.com>
Cc: wanpengli@tencent.com, kvm@vger.kernel.org, david@redhat.com,
benh@kernel.crashing.org, heiko.carstens@de.ibm.com,
peterx@redhat.com, linux-mips@vger.kernel.org, paulus@ozlabs.org,
hpa@zytor.com, kvmarm@lists.cs.columbia.edu,
linux-s390@vger.kernel.org, frankja@linux.ibm.com,
maz@kernel.org, joro@8bytes.org, x86@kernel.org,
borntraeger@de.ibm.com, mingo@redhat.com,
julien.thierry.kdev@gmail.com, thuth@redhat.com,
gor@linux.ibm.com, suzuki.poulose@arm.com,
kvm-ppc@vger.kernel.org, bp@alien8.de, tglx@linutronix.de,
linux-arm-kernel@lists.infradead.org, jmattson@google.com,
tsbogend@alpha.franken.de, christoffer.dall@arm.com,
sean.j.christopherson@intel.com, linux-kernel@vger.kernel.org,
james.morse@arm.com, mpe@ellerman.id.au, pbonzini@redhat.com,
vkuznets@redhat.com, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2 1/7] KVM: s390: clean up redundant 'kvm_run' parameters
Date: Thu, 23 Apr 2020 10:54:35 +0800 [thread overview]
Message-ID: <e115bcf6-edf3-7465-f592-4e93e5ad984c@linux.alibaba.com> (raw)
In-Reply-To: <20200422154543.2efba3dd.cohuck@redhat.com>
On 2020/4/22 21:45, Cornelia Huck wrote:
> On Wed, 22 Apr 2020 20:58:04 +0800
> Tianjia Zhang <tianjia.zhang@linux.alibaba.com> wrote:
>
>> In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu'
>> structure. Earlier than historical reasons, many kvm-related function
>
> s/Earlier than/For/ ?
>
Yes, it should be replaced like this.
>> parameters retain the 'kvm_run' and 'kvm_vcpu' parameters at the same time.
>> This patch does a unified cleanup of these remaining redundant parameters.
>>
>> Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
>> ---
>> arch/s390/kvm/kvm-s390.c | 37 ++++++++++++++++++++++---------------
>> 1 file changed, 22 insertions(+), 15 deletions(-)
>>
>> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
>> index e335a7e5ead7..d7bb2e7a07ff 100644
>> --- a/arch/s390/kvm/kvm-s390.c
>> +++ b/arch/s390/kvm/kvm-s390.c
>> @@ -4176,8 +4176,9 @@ static int __vcpu_run(struct kvm_vcpu *vcpu)
>> return rc;
>> }
>>
>> -static void sync_regs_fmt2(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
>> +static void sync_regs_fmt2(struct kvm_vcpu *vcpu)
>> {
>> + struct kvm_run *kvm_run = vcpu->run;
>> struct runtime_instr_cb *riccb;
>> struct gs_cb *gscb;
>>
>> @@ -4235,7 +4236,7 @@ static void sync_regs_fmt2(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
>> }
>> if (vcpu->arch.gs_enabled) {
>> current->thread.gs_cb = (struct gs_cb *)
>> - &vcpu->run->s.regs.gscb;
>> + &kvm_run->s.regs.gscb;
>
> Not sure if these changes (vcpu->run-> => kvm_run->) are really worth
> it. (It seems they amount to at least as much as the changes advertised
> in the patch description.)
>
> Other opinions?
>
Why not replace `vcpu->run->` to `kvm_run->` ? If not, there will be
both styles of code, which is confusing. I will be confused and think
that this is something different.
Thanks,
Tianjia
>> restore_gs_cb(current->thread.gs_cb);
>> }
>> preempt_enable();
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-04-23 2:54 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-22 12:58 [PATCH v2 0/7] clean up redundant 'kvm_run' parameters Tianjia Zhang
2020-04-22 12:58 ` [PATCH v2 1/7] KVM: s390: " Tianjia Zhang
2020-04-22 13:45 ` Cornelia Huck
2020-04-22 15:58 ` Christian Borntraeger
2020-04-22 16:04 ` Cornelia Huck
2020-04-23 3:01 ` Tianjia Zhang
2020-04-23 10:39 ` Cornelia Huck
2020-04-23 10:58 ` Tianjia Zhang
2020-04-23 11:00 ` Christian Borntraeger
2020-04-23 11:11 ` Tianjia Zhang
2020-04-26 12:59 ` Thomas Huth
2020-04-29 2:20 ` Tianjia Zhang
2020-04-23 3:14 ` Tianjia Zhang
2020-04-23 2:54 ` Tianjia Zhang [this message]
2020-04-22 12:58 ` [PATCH v2 2/7] KVM: arm64: " Tianjia Zhang
2020-04-22 12:58 ` [PATCH v2 3/7] KVM: PPC: Remove redundant kvm_run from vcpu_arch Tianjia Zhang
2020-04-22 12:58 ` [PATCH v2 4/7] KVM: PPC: clean up redundant 'kvm_run' parameters Tianjia Zhang
2020-04-22 12:58 ` [PATCH v2 5/7] KVM: PPC: clean up redundant kvm_run parameters in assembly Tianjia Zhang
2020-04-22 12:58 ` [PATCH v2 6/7] KVM: MIPS: clean up redundant 'kvm_run' parameters Tianjia Zhang
2020-04-22 12:58 ` [PATCH v2 7/7] KVM: MIPS: clean up redundant kvm_run parameters in assembly Tianjia Zhang
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=e115bcf6-edf3-7465-f592-4e93e5ad984c@linux.alibaba.com \
--to=tianjia.zhang@linux.alibaba.com \
--cc=benh@kernel.crashing.org \
--cc=borntraeger@de.ibm.com \
--cc=bp@alien8.de \
--cc=christoffer.dall@arm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=hpa@zytor.com \
--cc=james.morse@arm.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=julien.thierry.kdev@gmail.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maz@kernel.org \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=paulus@ozlabs.org \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=sean.j.christopherson@intel.com \
--cc=suzuki.poulose@arm.com \
--cc=tglx@linutronix.de \
--cc=thuth@redhat.com \
--cc=tsbogend@alpha.franken.de \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--cc=x86@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;
as well as URLs for NNTP newsgroup(s).