mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
ppc/spapr: Add hotremovable flag on DIMM LMBs on drmem_v2
On reboot, all memory that was previously added using object_add and device_add is placed in this DIMM area. The new SPAPR_LMB_FLAGS_HOTREMOVABLE flag helps Linux to put this memory in the correct memory zone, so no unmovable allocations are made there, allowing the object to be easily hot-removed by device_del and object_del. This new flag was accepted in Power Architecture documentation. Signed-off-by: Leonardo Bras <leobras.c@gmail.com> Reviewed-by: Bharata B Rao <bharata@linux.ibm.com> Message-Id: <20200511200201.58537-1-leobras.c@gmail.com> [dwg: Fixed syntax error spotted by Cédric Le Goater] Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
3c89b8d6ac
commit
0911a60c76
5 changed files with 36 additions and 13 deletions
|
@ -101,7 +101,7 @@ static int powerpc_reset_wakeup(CPUState *cs, CPUPPCState *env, int excp,
|
|||
env->resume_as_sreset = false;
|
||||
|
||||
/* Pretend to be returning from doze always as we don't lose state */
|
||||
*msr |= (0x1ull << (63 - 47));
|
||||
*msr |= SRR1_WS_NOLOSS;
|
||||
|
||||
/* Machine checks are sent normally */
|
||||
if (excp == POWERPC_EXCP_MCHECK) {
|
||||
|
@ -109,25 +109,25 @@ static int powerpc_reset_wakeup(CPUState *cs, CPUPPCState *env, int excp,
|
|||
}
|
||||
switch (excp) {
|
||||
case POWERPC_EXCP_RESET:
|
||||
*msr |= 0x4ull << (63 - 45);
|
||||
*msr |= SRR1_WAKERESET;
|
||||
break;
|
||||
case POWERPC_EXCP_EXTERNAL:
|
||||
*msr |= 0x8ull << (63 - 45);
|
||||
*msr |= SRR1_WAKEEE;
|
||||
break;
|
||||
case POWERPC_EXCP_DECR:
|
||||
*msr |= 0x6ull << (63 - 45);
|
||||
*msr |= SRR1_WAKEDEC;
|
||||
break;
|
||||
case POWERPC_EXCP_SDOOR:
|
||||
*msr |= 0x5ull << (63 - 45);
|
||||
*msr |= SRR1_WAKEDBELL;
|
||||
break;
|
||||
case POWERPC_EXCP_SDOOR_HV:
|
||||
*msr |= 0x3ull << (63 - 45);
|
||||
*msr |= SRR1_WAKEHDBELL;
|
||||
break;
|
||||
case POWERPC_EXCP_HV_MAINT:
|
||||
*msr |= 0xaull << (63 - 45);
|
||||
*msr |= SRR1_WAKEHMI;
|
||||
break;
|
||||
case POWERPC_EXCP_HVIRT:
|
||||
*msr |= 0x9ull << (63 - 45);
|
||||
*msr |= SRR1_WAKEHVI;
|
||||
break;
|
||||
default:
|
||||
cpu_abort(cs, "Unsupported exception %d in Power Save mode\n",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue