qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>, qemu-devel@nongnu.org
Cc: Paul Mackerras <paulus@samba.org>, qemu-ppc@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH] PPC: KVM: store SLB slot number
Date: Fri, 31 Jan 2014 10:44:44 +0530	[thread overview]
Message-ID: <87eh3orauz.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <1391135040-14012-1-git-send-email-aik@ozlabs.ru>

Alexey Kardashevskiy <aik@ozlabs.ru> 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 <aik@ozlabs.ru>

Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>

> ---
>  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

  reply	other threads:[~2014-01-31  5:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-31  2:24 [Qemu-devel] [PATCH] PPC: KVM: store SLB slot number Alexey Kardashevskiy
2014-01-31  5:14 ` Aneesh Kumar K.V [this message]
2014-01-31  7:11 ` 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=87eh3orauz.fsf@linux.vnet.ibm.com \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=aik@ozlabs.ru \
    --cc=paulus@samba.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.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).