mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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>
This commit is contained in:
parent
9fb4541f58
commit
e957f6a9b9
4 changed files with 21 additions and 4 deletions
|
@ -89,6 +89,7 @@ struct sPAPRMachineState {
|
|||
sPAPROptionVector *ov5; /* QEMU-supported option vectors */
|
||||
sPAPROptionVector *ov5_cas; /* negotiated (via CAS) option vectors */
|
||||
bool cas_reboot;
|
||||
bool cas_legacy_guest_workaround;
|
||||
|
||||
Notifier epow_notifier;
|
||||
QTAILQ_HEAD(, sPAPREventLogEntry) pending_events;
|
||||
|
|
|
@ -43,6 +43,9 @@ typedef struct sPAPROptionVector sPAPROptionVector;
|
|||
|
||||
#define OV_BIT(byte, bit) ((byte - 1) * BITS_PER_BYTE + bit)
|
||||
|
||||
/* option vector 1 */
|
||||
#define OV1_PPC_3_00 OV_BIT(3, 0) /* guest supports PowerPC 3.00? */
|
||||
|
||||
/* option vector 5 */
|
||||
#define OV5_DRCONF_MEMORY OV_BIT(2, 2)
|
||||
#define OV5_FORM1_AFFINITY OV_BIT(5, 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue