From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W96RX-0001Fn-1C for qemu-devel@nongnu.org; Fri, 31 Jan 2014 00:15:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W96RL-0000QN-Ml for qemu-devel@nongnu.org; Fri, 31 Jan 2014 00:15:06 -0500 Received: from e28smtp02.in.ibm.com ([122.248.162.2]:42508) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W96RL-0000Pw-1p for qemu-devel@nongnu.org; Fri, 31 Jan 2014 00:14:55 -0500 Received: from /spool/local by e28smtp02.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 31 Jan 2014 10:44:49 +0530 From: "Aneesh Kumar K.V" In-Reply-To: <1391135040-14012-1-git-send-email-aik@ozlabs.ru> References: <1391135040-14012-1-git-send-email-aik@ozlabs.ru> Date: Fri, 31 Jan 2014 10:44:44 +0530 Message-ID: <87eh3orauz.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH] PPC: KVM: store SLB slot number List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy , qemu-devel@nongnu.org Cc: Paul Mackerras , qemu-ppc@nongnu.org Alexey Kardashevskiy writes: > When ppc_store_slb() is called from kvm_arch_get_registers(), it stores > a SLB in CPUPPCState::slb[slot]. However it drops the slot number from > ESID so when kvm_arch_put_registers() puts SLBs back to KVM, they do not > have correct "index" field anymore. This broke migration with LPCR_AIR > enabled as now the guest is handling interrupts in virtual mode and unable > to reconstruct correct SLBs anymore. > > This adds "index" field for valid SLBs when putting them to KVM. > > Signed-off-by: Alexey Kardashevskiy Reviewed-by: Aneesh Kumar K.V > --- > target-ppc/kvm.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c > index 26e854a..380f933 100644 > --- a/target-ppc/kvm.c > +++ b/target-ppc/kvm.c > @@ -819,6 +819,9 @@ int kvm_arch_put_registers(CPUState *cs, int level) > #ifdef TARGET_PPC64 > for (i = 0; i < ARRAY_SIZE(env->slb); i++) { > sregs.u.s.ppc64.slb[i].slbe = env->slb[i].esid; > + if (env->slb[i].esid & SLB_ESID_V) { > + sregs.u.s.ppc64.slb[i].slbe |= i; > + } > sregs.u.s.ppc64.slb[i].slbv = env->slb[i].vsid; > } > #endif > -- > 1.8.4.rc4