OSDN Git Service

spapr: Workaround for broken radix guests
authorSam Bobroff <sam.bobroff@au1.ibm.com>
Sun, 19 Mar 2017 23:46:49 +0000 (10:46 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 26 Apr 2017 02:00:41 +0000 (12:00 +1000)
commite957f6a9b92439a222ecd4ff1c8cdc9700710c72
tree636fa2579717d1b21292ce4010a65a9f22cea749
parent9fb4541f5803f8d2ba116b12113386e26482ba30
spapr: Workaround for broken radix guests

For a little while around 4.9, Linux kernels that saw the radix bit in
ibm,pa-features would attempt to set up the MMU as if they were a
hypervisor, even if they were a guest, which would cause them to
crash.

Work around this by detecting pre-ISA 3.0 guests by their lack of that
bit in option vector 1, and then removing the radix bit from
ibm,pa-features. Note: This now requires regeneration of that node
after CAS negotiation.

Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
[dwg: Fix style nits]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr.c
hw/ppc/spapr_hcall.c
include/hw/ppc/spapr.h
include/hw/ppc/spapr_ovec.h