[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/7] target/ppc: Add SPR ASDR
From: |
Cédric Le Goater |
Subject: |
[PATCH 3/7] target/ppc: Add SPR ASDR |
Date: |
Thu, 28 Nov 2019 14:46:56 +0100 |
From: Suraj Jitindar Singh <address@hidden>
The Access Segment Descriptor Register (ASDR) provides information about
the storage element when taking a hypervisor storage interrupt. When
performing nested radix address translation, this is normally the guest
real address. This register is present on POWER9 processors and later.
Implement the ADSR, note read and write access is limited to the
hypervisor.
Signed-off-by: Suraj Jitindar Singh <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: Cédric Le Goater <address@hidden>
---
target/ppc/cpu.h | 1 +
target/ppc/translate_init.inc.c | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
index 9128dbefbdb0..646a94370dba 100644
--- a/target/ppc/cpu.h
+++ b/target/ppc/cpu.h
@@ -1780,6 +1780,7 @@ typedef PowerPCCPU ArchCPU;
#define SPR_MPC_MD_DBRAM1 (0x32A)
#define SPR_RCPU_L2U_RA3 (0x32B)
#define SPR_TAR (0x32F)
+#define SPR_ASDR (0x330)
#define SPR_IC (0x350)
#define SPR_VTB (0x351)
#define SPR_MMCRC (0x353)
diff --git a/target/ppc/translate_init.inc.c b/target/ppc/translate_init.inc.c
index 6105e74e9dc6..a3cf1d8a450c 100644
--- a/target/ppc/translate_init.inc.c
+++ b/target/ppc/translate_init.inc.c
@@ -8290,6 +8290,12 @@ static void gen_spr_power9_mmu(CPUPPCState *env)
SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_ptcr,
KVM_REG_PPC_PTCR, 0x00000000);
+ /* Address Segment Descriptor Register */
+ spr_register_hv(env, SPR_ASDR, "ASDR",
+ SPR_NOACCESS, SPR_NOACCESS,
+ SPR_NOACCESS, SPR_NOACCESS,
+ &spr_read_generic, &spr_write_generic,
+ 0x0000000000000000);
#endif
}
--
2.21.0
- [PATCH 0/7] target/ppc: Implement KVM support under TCG (final steps), Cédric Le Goater, 2019/11/28
- [PATCH 1/7] target/ppc: Implement the VTB for HV access, Cédric Le Goater, 2019/11/28
- [PATCH 2/7] target/ppc: Work [S]PURR implementation and add HV support, Cédric Le Goater, 2019/11/28
- [PATCH 3/7] target/ppc: Add SPR ASDR,
Cédric Le Goater <=
- [PATCH 4/7] target/ppc: Add SPR TBU40, Cédric Le Goater, 2019/11/28
- [PATCH 5/7] target/ppc: Add privileged message send facilities, Cédric Le Goater, 2019/11/28
- [PATCH 6/7] target/ppc: add support for Hypervisor Facility Unavailable Exception, Cédric Le Goater, 2019/11/28
- [PATCH 7/7] target/ppc: Enforce that the root page directory size must be at least 5, Cédric Le Goater, 2019/11/28