[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH for-2.13 04/10] spapr: Set compatibility mode befo
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [PATCH for-2.13 04/10] spapr: Set compatibility mode before the rest of spapr_cpu_reset() |
Date: |
Fri, 20 Apr 2018 20:48:26 +1000 |
User-agent: |
Mutt/1.9.2 (2017-12-15) |
On Fri, Apr 20, 2018 at 11:16:27AM +0200, Greg Kurz wrote:
> On Tue, 17 Apr 2018 17:17:16 +1000
> David Gibson <address@hidden> wrote:
>
> > Although the order doesn't really matter at the moment, it's possible
> > other initializastions could depend on the compatiblity mode, so make sure
> > we set it first in spapr_cpu_reset().
> >
> > While we're at it drop the test against first_cpu. Setting the compat mode
> > to the value it already has is redundant, but harmless, so we might as well
> > make a small simplification to the code.
> >
> > Signed-off-by: David Gibson <address@hidden>
> > ---
>
> Reviewed-by: Greg Kurz <address@hidden>
Ta. This one also doesn't really depend on the others, so I've merged
it into ppc-for-2.13.
>
> > hw/ppc/spapr_cpu_core.c | 11 +++++------
> > 1 file changed, 5 insertions(+), 6 deletions(-)
> >
> > diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c
> > index f39d99a8da..2aab6ccd15 100644
> > --- a/hw/ppc/spapr_cpu_core.c
> > +++ b/hw/ppc/spapr_cpu_core.c
> > @@ -31,6 +31,11 @@ static void spapr_cpu_reset(void *opaque)
> >
> > cpu_reset(cs);
> >
> > + /* Set compatibility mode to match the boot CPU, which was either set
> > + * by the machine reset code or by CAS. This should never fail.
> > + */
> > + ppc_set_compat(cpu, POWERPC_CPU(first_cpu)->compat_pvr, &error_abort);
> > +
> > /* All CPUs start halted. CPU0 is unhalted from the machine level
> > * reset code and the rest are explicitly started up by the guest
> > * using an RTAS call */
> > @@ -43,12 +48,6 @@ static void spapr_cpu_reset(void *opaque)
> > env->spr[SPR_LPCR] &= ~pcc->lpcr_pm;
> > }
> >
> > - /* Set compatibility mode to match the boot CPU, which was either set
> > - * by the machine reset code or by CAS. This should never fail.
> > - */
> > - if (cs != first_cpu) {
> > - ppc_set_compat(cpu, POWERPC_CPU(first_cpu)->compat_pvr,
> > &error_abort);
> > - }
> > }
> >
> > static void spapr_cpu_destroy(PowerPCCPU *cpu)
>
--
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
- Re: [Qemu-ppc] [PATCH for-2.13 02/10] spapr: Remove support for PowerPC 970 with pseries machine type, (continued)
Re: [Qemu-ppc] [PATCH for-2.13 02/10] spapr: Remove support for PowerPC 970 with pseries machine type, Greg Kurz, 2018/04/20
[Qemu-ppc] [PATCH for-2.13 05/10] spapr: Move PAPR mode register initialization to spapr code, David Gibson, 2018/04/17
[Qemu-ppc] [PATCH for-2.13 06/10] target/ppc: Add ppc_store_lpcr() helper, David Gibson, 2018/04/17
[Qemu-ppc] [PATCH for-2.13 04/10] spapr: Set compatibility mode before the rest of spapr_cpu_reset(), David Gibson, 2018/04/17
[Qemu-ppc] [PATCH for-2.13 10/10] spapr: Move PAPR specific cpu logic to pseries machine type, David Gibson, 2018/04/17
[Qemu-ppc] [PATCH for-2.13 08/10] spapr: Clean up handling of LPCR power-saving exit bits, David Gibson, 2018/04/17