qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] spapr: fix CPU device tree nodes
@ 2018-01-17  9:20 Greg Kurz
  2018-01-17  9:20 ` [Qemu-devel] [PATCH 1/3] spapr: drop duplicate variable in spapr_core_plug() Greg Kurz
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Greg Kurz @ 2018-01-17  9:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-ppc, David Gibson

When a compatibility mode is requested on the command line,
only the boot CPU core is correctly advertised in the device
tree. Any other CPU core, either hot-plugged or cold-plugged,
appears to be in raw mode with the host PVR.

Guest started on a POWER8 host with:
     -smp cores=2 -machine pseries,max-cpu-compat=compat7

# dtc -f -I fs -O dts /proc/device-tree | egrep 'cpu-version|pa-features'
                        ibm,pa-features = [18 00 f6 3f c7 c0 80 f0 80 00
 00 00 00 00 00 00 00 00 80 00 80 00 80 00 00 00];
                        cpu-version = <0x4d0200>;

                               ^^^
                        second CPU core

                        ibm,pa-features = <0x600f63f 0xc70080c0>;
                        cpu-version = <0xf000003>;

                               ^^^
                          boot CPU core

This happens because the compatibility mode for any CPU but
the boot one is set after the device tree was populated, and
exposed to the guest.

This series fixes the issue by setting the compatibility mode
during CPU reset. This is done in the last patch.

The first two patches are preliminary cleanup of the CPU reset
and CPU hotplug paths. They are not strictly needed, but I
think they are valuable anyway.

--
Greg

---

Greg Kurz (3):
      spapr: drop duplicate variable in spapr_core_plug()
      spapr_cpu_core: don't reset CPUs during realization
      spapr: fix device tree properties when using compatibility mode


 hw/ppc/spapr.c                  |   30 ++++++++++++++++++------------
 hw/ppc/spapr_cpu_core.c         |   15 +++++++++++++--
 hw/ppc/spapr_rtas.c             |    9 ---------
 include/hw/ppc/spapr_cpu_core.h |    2 ++
 4 files changed, 33 insertions(+), 23 deletions(-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-01-18 23:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-17  9:20 [Qemu-devel] [PATCH 0/3] spapr: fix CPU device tree nodes Greg Kurz
2018-01-17  9:20 ` [Qemu-devel] [PATCH 1/3] spapr: drop duplicate variable in spapr_core_plug() Greg Kurz
2018-01-18  0:31   ` David Gibson
2018-01-17  9:20 ` [Qemu-devel] [PATCH 2/3] spapr_cpu_core: don't reset CPUs during realization Greg Kurz
2018-01-18  3:43   ` David Gibson
2018-01-18 15:39     ` Greg Kurz
2018-01-18 18:45       ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2018-01-18 23:30       ` [Qemu-devel] " David Gibson
2018-01-17  9:20 ` [Qemu-devel] [PATCH 3/3] spapr: fix device tree properties when using compatibility mode Greg Kurz
2018-01-18  4:07   ` David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).