Skip to content

Fixes for PPC64 CPU emulation#2308

Open
kukrimate wants to merge 2 commits intounicorn-engine:masterfrom
kukrimate:ppc-fix
Open

Fixes for PPC64 CPU emulation#2308
kukrimate wants to merge 2 commits intounicorn-engine:masterfrom
kukrimate:ppc-fix

Conversation

@kukrimate
Copy link

@kukrimate kukrimate commented Mar 10, 2026

The default POWER10 1.0 was pointing to the correct place in the array, but for manually set indices we still need to append the same offset in order to set the correct CPU.

Additionally MSR.HV bit is not actually respected for CPUs that should support it.

The default POWER10 1.0 was pointing to the correct place in the array,
but for manually set indices we still need to append the same offset in
order to set the correct CPU.
Without this, PPC64 models with the HV bit do not work.

hreg_store_msr cannot set MSR.HV to 1 even if alter_hv = 1,
it just takes the value from the environment unless alter_hv = 1
*AND* MSR.HV was already set.

    if (!alter_hv || !(env->msr & MSR_HVB)) {
        value &= ~MSR_HVB;
        value |= env->msr & MSR_HVB;
    }
@kukrimate kukrimate changed the title Fix setting PPC64 CPU model manually Fixes for PPC64 CPU emulation Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant