qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 02/11] target/ppc: moved ppc_store_sdr1 to cpu.c


From: Richard Henderson
Subject: Re: [PATCH 02/11] target/ppc: moved ppc_store_sdr1 to cpu.c
Date: Wed, 12 May 2021 11:54:52 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

On 5/12/21 9:08 AM, Bruno Larsen (billionai) wrote:
Moved this function that is required in !TCG cases into a
common code file

Signed-off-by: Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br>

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


+void ppc_store_sdr1(CPUPPCState *env, target_ulong value)
+{
+    PowerPCCPU *cpu = env_archcpu(env);
+    qemu_log_mask(CPU_LOG_MMU, "%s: " TARGET_FMT_lx "\n", __func__, value);
+    assert(!cpu->vhyp);
+#if defined(TARGET_PPC64)
+    if (mmu_is_64bit(env->mmu_model)) {
+        target_ulong sdr_mask = SDR_64_HTABORG | SDR_64_HTABSIZE;
+        target_ulong htabsize = value & SDR_64_HTABSIZE;
+
+        if (value & ~sdr_mask) {
+            error_report("Invalid bits 0x"TARGET_FMT_lx" set in SDR1",
+                         value & ~sdr_mask);

As a separate cleanup patch, this should not use error_report but qemu_log(LOG_GUEST_ERROR, ...).


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]