From: Alexander Graf <agraf@suse.de>
To: Mihai Caraman <mihai.caraman@freescale.com>
Cc: linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org,
kvm-ppc@vger.kernel.org
Subject: Re: [PATCH 1/5] KVM: PPC: e500: Move VCPU's MMUCFG register initialization earlier
Date: Thu, 31 Jan 2013 14:21:00 +0100 [thread overview]
Message-ID: <FE5499BE-EC13-47EA-806C-345F7135B677@suse.de> (raw)
In-Reply-To: <1359552584-17861-2-git-send-email-mihai.caraman@freescale.com>
On 30.01.2013, at 14:29, Mihai Caraman wrote:
> VCPU's MMUCFG register initialization should not depend on =
KVM_CAP_SW_TLB
> ioctl call. Move it earlier into tlb initalization phase.
Quite the contrary. The fact that there is an mfspr() in e500_mmu.c =
already tells us that the code is broken. The TLB guest code should only =
depend on input from the SW_TLB configuration. It's completely =
orthogonal to the host capabilities.
Alex
>=20
> Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com>
> ---
> arch/powerpc/kvm/e500_mmu.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>=20
> diff --git a/arch/powerpc/kvm/e500_mmu.c b/arch/powerpc/kvm/e500_mmu.c
> index 5c44759..bb1b2b0 100644
> --- a/arch/powerpc/kvm/e500_mmu.c
> +++ b/arch/powerpc/kvm/e500_mmu.c
> @@ -692,8 +692,6 @@ int kvm_vcpu_ioctl_config_tlb(struct kvm_vcpu =
*vcpu,
> vcpu_e500->gtlb_offset[0] =3D 0;
> vcpu_e500->gtlb_offset[1] =3D params.tlb_sizes[0];
>=20
> - vcpu->arch.mmucfg =3D mfspr(SPRN_MMUCFG) & ~MMUCFG_LPIDSIZE;
> -
> vcpu->arch.tlbcfg[0] &=3D ~(TLBnCFG_N_ENTRY | TLBnCFG_ASSOC);
> if (params.tlb_sizes[0] <=3D 2048)
> vcpu->arch.tlbcfg[0] |=3D params.tlb_sizes[0];
> @@ -781,6 +779,8 @@ int kvmppc_e500_tlb_init(struct kvmppc_vcpu_e500 =
*vcpu_e500)
> if (!vcpu_e500->g2h_tlb1_map)
> goto err;
>=20
> + vcpu->arch.mmucfg =3D mfspr(SPRN_MMUCFG) & ~MMUCFG_LPIDSIZE;
> +
> /* Init TLB configuration register */
> vcpu->arch.tlbcfg[0] =3D mfspr(SPRN_TLB0CFG) &
> ~(TLBnCFG_N_ENTRY | TLBnCFG_ASSOC);
> --=20
> 1.7.4.1
>=20
>=20
> --
> To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-01-31 13:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-30 13:29 [PATCH 0/5] KVM: PPC: e500: Enable FSL e6500 core Mihai Caraman
2013-01-30 13:29 ` [PATCH 1/5] KVM: PPC: e500: Move VCPU's MMUCFG register initialization earlier Mihai Caraman
2013-01-31 13:21 ` Alexander Graf [this message]
2013-01-31 14:56 ` Caraman Mihai Claudiu-B02008
2013-01-31 14:58 ` Alexander Graf
2013-01-31 15:26 ` Caraman Mihai Claudiu-B02008
2013-01-31 16:48 ` Scott Wood
2013-01-30 13:29 ` [PATCH 2/5] KVM: PPC: e500: Emulate TLBnPS registers Mihai Caraman
2013-01-31 13:24 ` Alexander Graf
2013-01-31 13:32 ` Alexander Graf
2013-01-30 13:29 ` [PATCH 3/5] KVM: PPC: e500: Remove E.PT category from VCPUs Mihai Caraman
2013-01-31 13:27 ` Alexander Graf
2013-01-30 13:29 ` [PATCH 4/5] KVM: PPC: e500: Emulate EPTCFG register Mihai Caraman
2013-01-31 13:31 ` Alexander Graf
2013-01-31 14:58 ` Caraman Mihai Claudiu-B02008
2013-01-30 13:29 ` [PATCH 5/5] KVM: PPC: e500mc: Enable e6500 cores Mihai Caraman
2013-01-31 13:31 ` Alexander Graf
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=FE5499BE-EC13-47EA-806C-345F7135B677@suse.de \
--to=agraf@suse.de \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mihai.caraman@freescale.com \
/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).