[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [RFC PATCH v1 6/6] spapr: Fix migration of Radix guests
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [RFC PATCH v1 6/6] spapr: Fix migration of Radix guests |
Date: |
Wed, 17 May 2017 17:20:31 +1000 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
On Wed, May 17, 2017 at 12:45:39PM +0530, Bharata B Rao wrote:
> On Wed, May 17, 2017 at 05:00:49PM +1000, David Gibson wrote:
> > On Wed, May 17, 2017 at 09:19:22AM +0530, Bharata B Rao wrote:
> > > Fix migration of radix guests by ensuring that we issue
> > > KVM_PPC_CONFIGURE_V3_MMU for radix case post migration.
> > >
> > > Reported-by: Nageswara R Sastry <address@hidden>
> > > Signed-off-by: Bharata B Rao <address@hidden>
> > > ---
> > > hw/ppc/spapr.c | 15 +++++++++++++++
> > > hw/ppc/spapr_hcall.c | 1 +
> > > include/hw/ppc/spapr.h | 1 +
> > > 3 files changed, 17 insertions(+)
> > >
> > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> > > index 05abfc1..dd1d687 100644
> > > --- a/hw/ppc/spapr.c
> > > +++ b/hw/ppc/spapr.c
> > > @@ -1443,6 +1443,20 @@ static int spapr_post_load(void *opaque, int
> > > version_id)
> > > err = spapr_rtc_import_offset(&spapr->rtc, spapr->rtc_offset);
> > > }
> > >
> > > + if (spapr->patb_entry) {
> > > + if (kvmppc_has_cap_mmu_radix() && kvm_enabled()) {
> > > + err = kvmppc_configure_v3_mmu(POWERPC_CPU(first_cpu),
> > > + spapr->patb_flags &
> > > + SPAPR_PROC_TABLE_RADIX,
> > > + spapr->patb_flags &
> > > + SPAPR_PROC_TABLE_GTSE,
> >
> > You should be able to work out the things you need here from
> > patb_entry without adding the new patb_flags field.
>
> kvmppc_configure_v3_mmu() needs two bools: radix and gtse. The radix
> bit can be implied from patb_entry, I needed patb_flags to get the
> gtse value. Not immediately obvious of how to get gtse bit from patb_entry,
> but let me take a relook.
Oh, sorry, you can't get GTSE from the patb_entry, but you can get it
from the LPCR.
--
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
signature.asc
Description: PGP signature