target/ppc: Add Directed Privileged Door-bell Exception State (DPDES) SPR
DPDES stores a status of a doorbell message and if it is lost in migration, the destination CPU won't receive it. This does not hit us much as IPIs complete too quick to catch a pending one and even if we missed one, broadcasts happen often enough to wake that CPU. This defines DPDES and registers with KVM for migration. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Message-Id: <20190816061733.53572-1-aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
f55750e4e4
commit
cfc61ba62f
@ -1466,6 +1466,7 @@ typedef PowerPCCPU ArchCPU;
|
||||
#define SPR_MPC_ICTRL (0x09E)
|
||||
#define SPR_MPC_BAR (0x09F)
|
||||
#define SPR_PSPB (0x09F)
|
||||
#define SPR_DPDES (0x0B0)
|
||||
#define SPR_DAWR (0x0B4)
|
||||
#define SPR_RPR (0x0BA)
|
||||
#define SPR_CIABR (0x0BB)
|
||||
|
@ -8198,6 +8198,18 @@ static void gen_spr_power8_pspb(CPUPPCState *env)
|
||||
KVM_REG_PPC_PSPB, 0);
|
||||
}
|
||||
|
||||
static void gen_spr_power8_dpdes(CPUPPCState *env)
|
||||
{
|
||||
#if !defined(CONFIG_USER_ONLY)
|
||||
/* Directed Privileged Door-bell Exception State, used for IPI */
|
||||
spr_register_kvm_hv(env, SPR_DPDES, "DPDES",
|
||||
SPR_NOACCESS, SPR_NOACCESS,
|
||||
&spr_read_generic, SPR_NOACCESS,
|
||||
&spr_read_generic, &spr_write_generic,
|
||||
KVM_REG_PPC_DPDES, 0x00000000);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void gen_spr_power8_ic(CPUPPCState *env)
|
||||
{
|
||||
#if !defined(CONFIG_USER_ONLY)
|
||||
@ -8629,6 +8641,7 @@ static void init_proc_POWER8(CPUPPCState *env)
|
||||
gen_spr_power8_pmu_user(env);
|
||||
gen_spr_power8_tm(env);
|
||||
gen_spr_power8_pspb(env);
|
||||
gen_spr_power8_dpdes(env);
|
||||
gen_spr_vtb(env);
|
||||
gen_spr_power8_ic(env);
|
||||
gen_spr_power8_book4(env);
|
||||
@ -8817,6 +8830,7 @@ static void init_proc_POWER9(CPUPPCState *env)
|
||||
gen_spr_power8_pmu_user(env);
|
||||
gen_spr_power8_tm(env);
|
||||
gen_spr_power8_pspb(env);
|
||||
gen_spr_power8_dpdes(env);
|
||||
gen_spr_vtb(env);
|
||||
gen_spr_power8_ic(env);
|
||||
gen_spr_power8_book4(env);
|
||||
|
Loading…
Reference in New Issue
Block a user