whpx: arm: fix -cpu host
PATCH 1/2 whpx: arm: fix -cpu host
"hw/arm/virt: Register valid CPU types dynamically" went under my radar, so fix this for WHPX.
Signed-off-by Mohamed Mediouni <[email protected]>
--- hw/arm/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/virt.c +1 -1
@@ -3477,7 +3477,7 @@ static GPtrArray *virt_get_valid_cpu_types(const MachineState *ms)if (target_aarch64 ()) {g_ptr_array_add (vct,g_strdup (ARM_CPU_TYPE_NAME ("cortex-a53" )));g_ptr_array_add (vct,g_strdup (ARM_CPU_TYPE_NAME ("cortex-a57" ))); -if (kvm_enabled () ||hvf_enabled ()) { +if (kvm_enabled () ||hvf_enabled () ||whpx_enabled ()) {g_ptr_array_add (vct,g_strdup (ARM_CPU_TYPE_NAME ("host" ))); } }
Signature · 1 line
2.50.1 (Apple Git-155)
PATCH 2/2 whpx: arm: add EC_DATAABORT assert for WHvRunVpExitReasonGpaIntercept/UnmappedGpa
If we get anything else from Hyper-V there's a problem, so enforce this.
Signed-off-by Mohamed Mediouni <[email protected]>
Suggested-by Alex Bennée <[email protected]>
--- target/arm/whpx/whpx-all.c | 1 + 1 file changed, 1 insertion(+)
target/arm/whpx/whpx-all.c +1 -0
@@ -439,6 +439,7 @@ int whpx_vcpu_run(CPUState *cpu)switch (vcpu->exit_ctx.ExitReason) {case WHvRunVpExitReasonGpaIntercept:case WHvRunVpExitReasonUnmappedGpa: +assert (syn_get_ec (vcpu->exit_ctx.MemoryAccess.Syndrome) ==EC_DATAABORT ); advance_pc = true;if (vcpu->exit_ctx.MemoryAccess.Syndrome &BIT (8 )) {
Signature · 1 line
2.50.1 (Apple Git-155)