target/ppc: Implement TIDR

This adds a trivial implementation of the TIDR register added in
POWER9.  This isn't particularly important to qemu directly - it's
used by accelerator modules that we don't emulate.

However, since qemu isn't aware of it, its state is not synchronized
with KVM and therefore not migrated, which can be a problem.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
David Gibson 2017-08-08 13:42:53 +10:00
parent e7bab9a256
commit 650f3287ab
2 changed files with 6 additions and 0 deletions

View file

@ -1451,6 +1451,7 @@ void ppc_compat_add_property(Object *obj, const char *name,
#define SPR_TEXASR (0x082)
#define SPR_TEXASRU (0x083)
#define SPR_UCTRL (0x088)
#define SPR_TIDR (0x090)
#define SPR_MPC_CMPA (0x090)
#define SPR_MPC_CMPB (0x091)
#define SPR_MPC_CMPC (0x092)

View file

@ -8841,6 +8841,11 @@ static void init_proc_POWER9(CPUPPCState *env)
gen_spr_power8_book4(env);
gen_spr_power8_rpr(env);
/* POWER9 Specific registers */
spr_register_kvm(env, SPR_TIDR, "TIDR", NULL, NULL,
spr_read_generic, spr_write_generic,
KVM_REG_PPC_TIDR, 0);
/* env variables */
#if !defined(CONFIG_USER_ONLY)
env->slb_nr = 32;