From: Cornelia Huck <cohuck@redhat.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: wanpengli@tencent.com, kvm@vger.kernel.org, david@redhat.com,
heiko.carstens@de.ibm.com, peterx@redhat.com,
linux-mips@vger.kernel.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, 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,
Tianjia Zhang <tianjia.zhang@linux.alibaba.com>,
christoffer.dall@arm.com, sean.j.christopherson@intel.com,
linux-kernel@vger.kernel.org, james.morse@arm.com,
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: Wed, 22 Apr 2020 18:04:03 +0200 [thread overview]
Message-ID: <20200422180403.03f60b0c.cohuck@redhat.com> (raw)
In-Reply-To: <dc5e0fa3-558b-d606-bda9-ed281cf9e9ae@de.ibm.com>
On Wed, 22 Apr 2020 17:58:04 +0200
Christian Borntraeger <borntraeger@de.ibm.com> wrote:
> On 22.04.20 15: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/ ?
> >
> >> 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?
>
> Agreed. It feels kind of random. Maybe just do the first line (move kvm_run from the
> function parameter list into the variable declaration)? Not sure if this is better.
>
There's more in this patch that I cut... but I think just moving
kvm_run from the parameter list would be much less disruptive.
next prev parent reply other threads:[~2020-04-22 16:15 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 [this message]
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
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=20200422180403.03f60b0c.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=bp@alien8.de \
--cc=christoffer.dall@arm.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=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=tianjia.zhang@linux.alibaba.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).