diff options
author | Cédric Le Goater <clg@kaod.org> | 2017-09-08 16:33:43 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-09-15 10:29:48 +1000 |
commit | 30bf9ed1684da582e47ae004f8f3cf14fd6f39dd (patch) | |
tree | 4a6a2ced33aae0b25fd65b4eb68c7e25d20a55a5 /hw/ppc/spapr_hcall.c | |
parent | 21f3f8db0e61884ca48e9969b0305d54f1efe24b (diff) |
spapr: fix CAS-generated reset
The OV5_MMU_RADIX_300 requires special handling in the CAS negotiation
process. It is cleared from the option vector of the guest before
evaluating the changes and re-added later. But, when testing for a
possible CAS reset :
spapr->cas_reboot = spapr_ovec_diff(ov5_updates,
ov5_cas_old, spapr->ov5_cas);
the bit OV5_MMU_RADIX_300 will each time be seen as removed from the
previous OV5 set, hence generating a reset loop.
Fix this problem by also clearing the same bit in the ov5_cas_old set.
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/spapr_hcall.c')
-rw-r--r-- | hw/ppc/spapr_hcall.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index 6ab8c188f3..57bb411394 100644 --- a/hw/ppc/spapr_hcall.c +++ b/hw/ppc/spapr_hcall.c @@ -1581,6 +1581,13 @@ static target_ulong h_client_architecture_support(PowerPCCPU *cpu, * to worry about this for now. */ ov5_cas_old = spapr_ovec_clone(spapr->ov5_cas); + + /* also clear the radix/hash bit from the current ov5_cas bits to + * be in sync with the newly ov5 bits. Else the radix bit will be + * seen as being removed and this will generate a reset loop + */ + spapr_ovec_clear(ov5_cas_old, OV5_MMU_RADIX_300); + /* full range of negotiated ov5 capabilities */ spapr_ovec_intersect(spapr->ov5_cas, spapr->ov5, ov5_guest); spapr_ovec_cleanup(ov5_guest); |