From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOS51-0008FT-5G for qemu-devel@nongnu.org; Fri, 14 Mar 2014 09:23:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WOS4v-0000mB-5t for qemu-devel@nongnu.org; Fri, 14 Mar 2014 09:23:19 -0400 Message-ID: <532302B5.9090605@redhat.com> Date: Fri, 14 Mar 2014 14:23:01 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1394148857-19607-1-git-send-email-agraf@suse.de> <1394148857-19607-126-git-send-email-agraf@suse.de> <5322E783.5030604@redhat.com> <878usc7wk8.fsf@linux.vnet.ibm.com> In-Reply-To: <878usc7wk8.fsf@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL 125/130] target-ppc: Fix page table lookup with kvm enabled List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Aneesh Kumar K.V" , Alexander Graf , qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , Peter Maydell , qemu-ppc@nongnu.org, Greg Kurz Il 14/03/2014 14:13, Aneesh Kumar K.V ha scritto: > diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c > index e999bbaea062..e079be050fc7 100644 > --- a/hw/ppc/spapr_hcall.c > +++ b/hw/ppc/spapr_hcall.c > @@ -118,7 +118,8 @@ static target_ulong h_enter(PowerPCCPU *cpu, sPAPREnvironment *spapr, > if ((ppc_hash64_load_hpte0(env, token, index) & HPTE64_V_VALID) == 0) { > break; > } > - } while (index++); > + index++; > + } while (1); Better use for or while() than do...while, or it could also be token = ppc_hash64_start_access(cpu, pte_index); for (; index < 8; i++, hpte += HASH_PTE_SIZE_64) { ... } ppc_hash64_stop_access(token); if (index == 8) { return H_PTEG_FULL; } Paolo > ppc_hash64_stop_access(token); > } else { > token = ppc_hash64_start_access(cpu, pte_index); > > -aneesh >