]> www.infradead.org Git - users/dwmw2/qemu.git/commit
spapr: Clean up LPCR updates from hypercalls
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 1 May 2018 05:14:52 +0000 (15:14 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Fri, 4 May 2018 05:00:37 +0000 (15:00 +1000)
commit295b6c26aca97c5f6f6609f62d958af6af848454
treebb5d672853e52e3b74ea2cd998c5e9a874eb46d9
parent84369f639ec0ae08b5238f9abe383e8cd4998e98
spapr: Clean up LPCR updates from hypercalls

There are several places in spapr_hcall.c where we need to update the LPCR
value on all CPUs.  We do this with the set_spr() helper.  That's not
really correct because this directly sets the SPR value, without going
through the ppc_store_lpcr() helper which may need to update state based
on the LPCR change.

In fact, set_spr() is only ever used for the LPCR, so replace it with an
explicit LPCR updated which uses the right low-level helper.  While we're
there, move the CPU_FOREACH() which was in every one of the callers into
the new helper: set_all_lpcrs().

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Tested-by: Cédric Le Goater <clg@kaod.org>
hw/ppc/spapr_hcall.c