From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Cc: wanpengli@tencent.com, kvm@vger.kernel.org, david@redhat.com,
benh@kernel.crashing.org, heiko.carstens@de.ibm.com,
linux-kernel@vger.kernel.org, paulus@ozlabs.org, hpa@zytor.com,
kvmarm@lists.cs.columbia.edu, linux-s390@vger.kernel.org,
frankja@linux.ibm.com, chenhuacai@gmail.com, mpe@ellerman.id.au,
joro@8bytes.org, x86@kernel.org, borntraeger@de.ibm.com,
mingo@redhat.com, thuth@redhat.com, gor@linux.ibm.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@linux.alibaba.com,
cohuck@redhat.com, linux-mips@vger.kernel.org,
sean.j.christopherson@intel.com, maz@kernel.org,
pbonzini@redhat.com, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v4 3/7] KVM: PPC: Remove redundant kvm_run from vcpu_arch
Date: Wed, 29 Apr 2020 14:23:42 +0200 [thread overview]
Message-ID: <87lfmeh44x.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <20200427043514.16144-4-tianjia.zhang@linux.alibaba.com>
Tianjia Zhang <tianjia.zhang@linux.alibaba.com> writes:
> The 'kvm_run' field already exists in the 'vcpu' structure, which
> is the same structure as the 'kvm_run' in the 'vcpu_arch' and
> should be deleted.
>
> Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
> ---
> arch/powerpc/include/asm/kvm_host.h | 1 -
> arch/powerpc/kvm/book3s_hv.c | 6 ++----
> arch/powerpc/kvm/book3s_hv_nested.c | 3 +--
> 3 files changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h
> index 1dc63101ffe1..2745ff8faa01 100644
> --- a/arch/powerpc/include/asm/kvm_host.h
> +++ b/arch/powerpc/include/asm/kvm_host.h
> @@ -795,7 +795,6 @@ struct kvm_vcpu_arch {
> struct mmio_hpte_cache_entry *pgfault_cache;
>
> struct task_struct *run_task;
> - struct kvm_run *kvm_run;
>
> spinlock_t vpa_update_lock;
> struct kvmppc_vpa vpa;
> diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
> index 93493f0cbfe8..413ea2dcb10c 100644
> --- a/arch/powerpc/kvm/book3s_hv.c
> +++ b/arch/powerpc/kvm/book3s_hv.c
> @@ -2934,7 +2934,7 @@ static void post_guest_process(struct kvmppc_vcore *vc, bool is_master)
>
> ret = RESUME_GUEST;
> if (vcpu->arch.trap)
> - ret = kvmppc_handle_exit_hv(vcpu->arch.kvm_run, vcpu,
> + ret = kvmppc_handle_exit_hv(vcpu->run, vcpu,
> vcpu->arch.run_task);
>
> vcpu->arch.ret = ret;
> @@ -3920,7 +3920,6 @@ static int kvmppc_run_vcpu(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu)
> spin_lock(&vc->lock);
> vcpu->arch.ceded = 0;
> vcpu->arch.run_task = current;
> - vcpu->arch.kvm_run = kvm_run;
> vcpu->arch.stolen_logged = vcore_stolen_time(vc, mftb());
> vcpu->arch.state = KVMPPC_VCPU_RUNNABLE;
> vcpu->arch.busy_preempt = TB_NIL;
> @@ -3973,7 +3972,7 @@ static int kvmppc_run_vcpu(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu)
> if (signal_pending(v->arch.run_task)) {
> kvmppc_remove_runnable(vc, v);
> v->stat.signal_exits++;
> - v->arch.kvm_run->exit_reason = KVM_EXIT_INTR;
> + v->run->exit_reason = KVM_EXIT_INTR;
> v->arch.ret = -EINTR;
> wake_up(&v->arch.cpu_run);
> }
> @@ -4049,7 +4048,6 @@ int kvmhv_run_single_vcpu(struct kvm_run *kvm_run,
> vc = vcpu->arch.vcore;
> vcpu->arch.ceded = 0;
> vcpu->arch.run_task = current;
> - vcpu->arch.kvm_run = kvm_run;
> vcpu->arch.stolen_logged = vcore_stolen_time(vc, mftb());
> vcpu->arch.state = KVMPPC_VCPU_RUNNABLE;
> vcpu->arch.busy_preempt = TB_NIL;
> diff --git a/arch/powerpc/kvm/book3s_hv_nested.c b/arch/powerpc/kvm/book3s_hv_nested.c
> index dc97e5be76f6..5a3987f3ebf3 100644
> --- a/arch/powerpc/kvm/book3s_hv_nested.c
> +++ b/arch/powerpc/kvm/book3s_hv_nested.c
> @@ -290,8 +290,7 @@ long kvmhv_enter_nested_guest(struct kvm_vcpu *vcpu)
> r = RESUME_HOST;
> break;
> }
> - r = kvmhv_run_single_vcpu(vcpu->arch.kvm_run, vcpu, hdec_exp,
> - lpcr);
> + r = kvmhv_run_single_vcpu(vcpu->run, vcpu, hdec_exp, lpcr);
> } while (is_kvmppc_resume_guest(r));
>
> /* save L2 state for return */
FWIW,
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
--
Vitaly
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
next prev parent reply other threads:[~2020-04-29 16:58 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-27 4:35 [PATCH v4 0/7] clean up redundant 'kvm_run' parameters Tianjia Zhang
2020-04-27 4:35 ` [PATCH v4 1/7] KVM: s390: " Tianjia Zhang
2020-04-29 12:03 ` Vitaly Kuznetsov
2020-04-27 4:35 ` [PATCH v4 2/7] KVM: arm64: " Tianjia Zhang
2020-04-29 12:07 ` Vitaly Kuznetsov
2020-05-05 8:39 ` Marc Zyngier
2020-05-07 13:04 ` Tianjia Zhang
2020-04-27 4:35 ` [PATCH v4 3/7] KVM: PPC: Remove redundant kvm_run from vcpu_arch Tianjia Zhang
2020-04-29 12:23 ` Vitaly Kuznetsov [this message]
2020-05-26 4:36 ` Paul Mackerras
2020-05-27 4:20 ` Paul Mackerras
2020-05-27 5:23 ` Tianjia Zhang
2020-04-27 4:35 ` [PATCH v4 4/7] KVM: PPC: clean up redundant 'kvm_run' parameters Tianjia Zhang
2020-04-29 12:32 ` Vitaly Kuznetsov
2020-05-26 5:49 ` Paul Mackerras
2020-04-27 4:35 ` [PATCH v4 5/7] KVM: PPC: clean up redundant kvm_run parameters in assembly Tianjia Zhang
2020-05-26 5:59 ` Paul Mackerras
2020-07-13 3:07 ` Tianjia Zhang
2020-04-27 4:35 ` [PATCH v4 6/7] KVM: MIPS: clean up redundant 'kvm_run' parameters Tianjia Zhang
2020-04-27 5:40 ` Huacai Chen
2020-05-27 6:24 ` Tianjia Zhang
2020-05-29 9:48 ` Paolo Bonzini
2020-06-16 11:54 ` Tianjia Zhang
2020-04-27 4:35 ` [PATCH v4 7/7] KVM: MIPS: clean up redundant kvm_run parameters in assembly Tianjia Zhang
2020-04-27 5:36 ` Huacai Chen
2020-05-05 4:15 ` [PATCH v4 0/7] clean up redundant 'kvm_run' parameters Tianjia Zhang
2020-06-23 9:42 ` Paolo Bonzini
2020-06-23 10:00 ` Tianjia Zhang
2020-06-23 10:24 ` Paolo Bonzini
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=87lfmeh44x.fsf@vitty.brq.redhat.com \
--to=vkuznets@redhat.com \
--cc=benh@kernel.crashing.org \
--cc=borntraeger@de.ibm.com \
--cc=bp@alien8.de \
--cc=chenhuacai@gmail.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=jmattson@google.com \
--cc=joro@8bytes.org \
--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=sean.j.christopherson@intel.com \
--cc=tglx@linutronix.de \
--cc=thuth@redhat.com \
--cc=tianjia.zhang@linux.alibaba.com \
--cc=tsbogend@alpha.franken.de \
--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).