[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v2 26/29] target/ppc: remove ppc_store_lpcr from CONFIG_USER_
From: |
Matheus Ferst |
Subject: |
[RFC PATCH v2 26/29] target/ppc: remove ppc_store_lpcr from CONFIG_USER_ONLY builds |
Date: |
Tue, 27 Sep 2022 17:15:41 -0300 |
Writes to LPCR are hypervisor privileged.
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
---
The method introduced in the next patch, ppc_maybe_interrupt, will be
called in ppc_store_lpcr and only available in !CONFIG_USER_ONLY builds.
---
target/ppc/cpu.c | 2 ++
target/ppc/cpu.h | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/target/ppc/cpu.c b/target/ppc/cpu.c
index 0ebac04bc4..e95b4c5ee1 100644
--- a/target/ppc/cpu.c
+++ b/target/ppc/cpu.c
@@ -73,6 +73,7 @@ void ppc_store_msr(CPUPPCState *env, target_ulong value)
hreg_store_msr(env, value, 0);
}
+#if !defined(CONFIG_USER_ONLY)
void ppc_store_lpcr(PowerPCCPU *cpu, target_ulong val)
{
PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu);
@@ -82,6 +83,7 @@ void ppc_store_lpcr(PowerPCCPU *cpu, target_ulong val)
/* The gtse bit affects hflags */
hreg_compute_hflags(env);
}
+#endif
static inline void fpscr_set_rounding_mode(CPUPPCState *env)
{
diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
index 9ccd23db04..7b13d4cf86 100644
--- a/target/ppc/cpu.h
+++ b/target/ppc/cpu.h
@@ -1370,9 +1370,9 @@ void ppc_translate_init(void);
#if !defined(CONFIG_USER_ONLY)
void ppc_store_sdr1(CPUPPCState *env, target_ulong value);
+void ppc_store_lpcr(PowerPCCPU *cpu, target_ulong val);
#endif /* !defined(CONFIG_USER_ONLY) */
void ppc_store_msr(CPUPPCState *env, target_ulong value);
-void ppc_store_lpcr(PowerPCCPU *cpu, target_ulong val);
void ppc_cpu_list(void);
--
2.25.1
- [RFC PATCH v2 15/29] target/ppc: remove unused interrupts from p8_deliver_interrupt, (continued)
- [RFC PATCH v2 15/29] target/ppc: remove unused interrupts from p8_deliver_interrupt, Matheus Ferst, 2022/09/27
- [RFC PATCH v2 17/29] target/ppc: move power-saving interrupt masking out of cpu_has_work_POWER8, Matheus Ferst, 2022/09/27
- [RFC PATCH v2 16/29] target/ppc: remove generic architecture checks from p8_deliver_interrupt, Matheus Ferst, 2022/09/27
- [RFC PATCH v2 19/29] target/ppc: create an interrupt masking method for POWER7, Matheus Ferst, 2022/09/27
- [RFC PATCH v2 20/29] target/ppc: remove unused interrupts from p7_pending_interrupt, Matheus Ferst, 2022/09/27
- [RFC PATCH v2 21/29] target/ppc: create an interrupt delivery method for POWER7, Matheus Ferst, 2022/09/27
- [RFC PATCH v2 22/29] target/ppc: remove unused interrupts from p7_deliver_interrupt, Matheus Ferst, 2022/09/27
- [RFC PATCH v2 23/29] target/ppc: remove generic architecture checks from p7_deliver_interrupt, Matheus Ferst, 2022/09/27
- [RFC PATCH v2 24/29] target/ppc: move power-saving interrupt masking out of cpu_has_work_POWER7, Matheus Ferst, 2022/09/27
- [RFC PATCH v2 25/29] target/ppc: add power-saving interrupt masking logic to p7_next_unmasked_interrupt, Matheus Ferst, 2022/09/27
- [RFC PATCH v2 26/29] target/ppc: remove ppc_store_lpcr from CONFIG_USER_ONLY builds,
Matheus Ferst <=
- [RFC PATCH v2 27/29] target/ppc: introduce ppc_maybe_interrupt, Matheus Ferst, 2022/09/27
- [RFC PATCH v2 28/29] target/ppc: unify cpu->has_work based on cs->interrupt_request, Matheus Ferst, 2022/09/27
- [RFC PATCH v2 29/29] target/ppc: move the p*_interrupt_powersave methods to excp_helper.c, Matheus Ferst, 2022/09/27
- Re: [RFC PATCH v2 00/29] PowerPC interrupt rework, Cédric Le Goater, 2022/09/28