Skip to content

Instantly share code, notes, and snippets.

@niw
Last active June 6, 2023 01:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save niw/9fa3b86403d315ebf6db72e8ebc67f95 to your computer and use it in GitHub Desktop.
Save niw/9fa3b86403d315ebf6db72e8ebc67f95 to your computer and use it in GitHub Desktop.
Lazy patch to boot Windows 10 ARM on M1 Mac on current QEMU master (5f99210)
diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c
index bff3e0cde7..a0ce7b2dfc 100644
--- a/target/arm/hvf/hvf.c
+++ b/target/arm/hvf/hvf.c
@@ -1211,7 +1211,6 @@ int hvf_vcpu_exec(CPUState *cpu)
break;
case EC_AA64_SMC:
cpu_synchronize_state(cpu);
- if (arm_cpu->psci_conduit == QEMU_PSCI_CONDUIT_SMC) {
advance_pc = true;
if (!hvf_handle_psci_call(cpu)) {
@@ -1219,10 +1218,6 @@ int hvf_vcpu_exec(CPUState *cpu)
/* SMCCC 1.3 section 5.2 says every unknown SMCCC call returns -1 */
env->xregs[0] = -1;
}
- } else {
- trace_hvf_unknown_smc(env->xregs[0]);
- hvf_raise_exception(cpu, EXCP_UDEF, syn_uncategorized());
- }
break;
default:
cpu_synchronize_state(cpu);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment