Home
last modified time | relevance | path

Searched hist:"1 a5008fc" (Results 1 – 1 of 1) sorted by relevance

/openbmc/qemu/hw/ppc/
H A Dspapr.c1a5008fc Tue Feb 27 09:23:07 CST 2018 Greg Kurz <groug@kaod.org> spapr: harden code that depends on VSMT

VSMT must be set in order to compute VCPU ids. This means that the
following functions must not be called before spapr_set_vsmt_mode()
was called:
- spapr_vcpu_id()
- spapr_is_thread0_in_vcore()
- xics_max_server_number()

We had a recent regression where the latter would be called before VSMT
was set, and broke migration of some old machine types. This patch
adds assert() in the above functions to avoid problems in the future.

Also, since VSMT is really a CPU related thing, spapr_set_vsmt_mode() is
now called from spapr_init_cpus(), just before the first VSMT user.

Signed-off-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>