From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46775) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkKVT-0000zv-G2 for qemu-devel@nongnu.org; Wed, 14 Sep 2016 20:26:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bkKVN-0004dR-AY for qemu-devel@nongnu.org; Wed, 14 Sep 2016 20:26:22 -0400 Date: Thu, 15 Sep 2016 10:15:57 +1000 From: David Gibson Message-ID: <20160915001557.GC15077@voom.fritz.box> References: <1473832442-17762-1-git-send-email-nikunj@linux.vnet.ibm.com> <1473832442-17762-2-git-send-email-nikunj@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4D0iojmU0rbTyz/6" Content-Disposition: inline In-Reply-To: <1473832442-17762-2-git-send-email-nikunj@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [PATCH v4 1/3] target-ppc: add TLB_NEED_LOCAL_FLUSH flag List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nikunj A Dadhania Cc: qemu-ppc@nongnu.org, benh@kernel.crashing.org, alex.bennee@linaro.org, qemu-devel@nongnu.org, rth@twiddle.net --4D0iojmU0rbTyz/6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 14, 2016 at 11:24:00AM +0530, Nikunj A Dadhania wrote: You need some sort of commit message here. I'd ignore and apply anyway, except that there are some other things in later patches that will need a respin. > Signed-off-by: Nikunj A Dadhania > --- > target-ppc/cpu.h | 1 + > target-ppc/helper_regs.h | 4 ++-- > target-ppc/mmu-hash64.c | 4 ++-- > target-ppc/mmu_helper.c | 6 +++--- > 4 files changed, 8 insertions(+), 7 deletions(-) >=20 > diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h > index 1e808c8..71111dc 100644 > --- a/target-ppc/cpu.h > +++ b/target-ppc/cpu.h > @@ -1009,6 +1009,7 @@ struct CPUPPCState { > bool tlb_dirty; /* Set to non-zero when modifying TLB = */ > bool kvm_sw_tlb; /* non-zero if KVM SW TLB API is active = */ > uint32_t tlb_need_flush; /* Delayed flush needed */ > +#define TLB_NEED_LOCAL_FLUSH 0x1 > #endif > =20 > /* Other registers */ > diff --git a/target-ppc/helper_regs.h b/target-ppc/helper_regs.h > index 3d279f1..69204a5 100644 > --- a/target-ppc/helper_regs.h > +++ b/target-ppc/helper_regs.h > @@ -157,9 +157,9 @@ static inline int hreg_store_msr(CPUPPCState *env, ta= rget_ulong value, > static inline void check_tlb_flush(CPUPPCState *env) > { > CPUState *cs =3D CPU(ppc_env_get_cpu(env)); > - if (env->tlb_need_flush) { > - env->tlb_need_flush =3D 0; > + if (env->tlb_need_flush & TLB_NEED_LOCAL_FLUSH) { > tlb_flush(cs, 1); > + env->tlb_need_flush &=3D ~TLB_NEED_LOCAL_FLUSH; > } > } > #else > diff --git a/target-ppc/mmu-hash64.c b/target-ppc/mmu-hash64.c > index 8118143..1f52b64 100644 > --- a/target-ppc/mmu-hash64.c > +++ b/target-ppc/mmu-hash64.c > @@ -110,7 +110,7 @@ void helper_slbia(CPUPPCState *env) > * and we still don't have a tlb_flush_mask(env, n, mas= k) > * in QEMU, we just invalidate all TLBs > */ > - env->tlb_need_flush =3D 1; > + env->tlb_need_flush |=3D TLB_NEED_LOCAL_FLUSH; > } > } > } > @@ -132,7 +132,7 @@ void helper_slbie(CPUPPCState *env, target_ulong addr) > * and we still don't have a tlb_flush_mask(env, n, mask) > * in QEMU, we just invalidate all TLBs > */ > - env->tlb_need_flush =3D 1; > + env->tlb_need_flush |=3D TLB_NEED_LOCAL_FLUSH; > } > } > =20 > diff --git a/target-ppc/mmu_helper.c b/target-ppc/mmu_helper.c > index 696bb03..d59d2f8 100644 > --- a/target-ppc/mmu_helper.c > +++ b/target-ppc/mmu_helper.c > @@ -1965,7 +1965,7 @@ void ppc_tlb_invalidate_one(CPUPPCState *env, targe= t_ulong addr) > * we just mark the TLB to be flushed later (context synchronizi= ng > * event or sync instruction on 32-bit). > */ > - env->tlb_need_flush =3D 1; > + env->tlb_need_flush |=3D TLB_NEED_LOCAL_FLUSH; > break; > #if defined(TARGET_PPC64) > case POWERPC_MMU_64B: > @@ -1979,7 +1979,7 @@ void ppc_tlb_invalidate_one(CPUPPCState *env, targe= t_ulong addr) > * and we still don't have a tlb_flush_mask(env, n, mask) i= n QEMU, > * we just invalidate all TLBs > */ > - env->tlb_need_flush =3D 1; > + env->tlb_need_flush |=3D TLB_NEED_LOCAL_FLUSH; > break; > #endif /* defined(TARGET_PPC64) */ > default: > @@ -2065,7 +2065,7 @@ void helper_store_sr(CPUPPCState *env, target_ulong= srnum, target_ulong value) > } > } > #else > - env->tlb_need_flush =3D 1; > + env->tlb_need_flush |=3D TLB_NEED_LOCAL_FLUSH; > #endif > } > } --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --4D0iojmU0rbTyz/6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJX2eg9AAoJEGw4ysog2bOSmCoP/iBlNbB+2bzGgJ7ReO/VI2tu LdpOLt6UD/Rr0sMfO12RaHsXLhasus9f1Fi+TRaiNwooGT11Jme3HWj52PbmBrUm 1H61ltN6JmKXYBFWZWq1PFFNI8LI1aAHKi9d1xAzXjzPjRcG+b8UmL2Y53LcyTsR j7ULcHlcb1qub7fZN/uIfAvsk0majm0HaA4VCtDu82j9vkuLCo7V6F/kCpsN1RPz 2DQsDQh/J8hkYTDCUEGx+lxQKtSI2lEB5l0m+aiOG2Bm7zbKpzZ4+cxpczzd2k6d MUfXdOfI6x+P82J7YeOfyg9lyYSuypq9Lp8XccjDO408hq4YDh/GZ4LNhKz7a6X8 jLDGv/lmoh0lezlv8pt5MwvOd/rHe3724d5kL9iMeMR771VbmwStg7w6FlfYPiyP oEjEdnwTqbbAKdXIb0+uUIRzi+z2rxus8UdtPBXL7Odo/2xtFVA5B6lwVfBOdyiW RJ4Q2O7jrzQBtBpiz7X1MygzfMHM22X//mDeZ0KP09brZcILQJAkBn1Wo5E+tOct AIViHXe3YX4L8Tu5kBwzPWUzNIqUWLgNNjUUHohUftIJJSo4VLHfJB0z99siA+wQ 3iNhEy/Ip0rmI4y+1oNCU67NyoXfsRqeJhHGJyKQm6Emc5okzJZ/qZmUVzGsCj4Q C39sryvCQ7l+VvifPh2T =jH7g -----END PGP SIGNATURE----- --4D0iojmU0rbTyz/6--