Hi David,
One fix in the associated QEMU VSM glue: vsm_glue_reset() stops plane 1
but also needs to make plane 0 runnable.
After a VTL switch, the normal-world vCPU can still be marked
userspace-stopped. Stopping only the higher plane during reset leaves
that state behind, rather than restoring the VTL0 execution path for
the fresh boot.
The functional change from my local QEMU commit is:
diff --git a/target/i386/kvm/hv-vsm-qemu.c b/target/i386/kvm/hv-vsm-qemu.c
--- a/target/i386/kvm/hv-vsm-qemu.c
+++ b/target/i386/kvm/hv-vsm-qemu.c
@@ -974,6 +974,7 @@ static void vsm_glue_reset(void *opaque)
for (uint32_t vp = 0; vp < vsm_glue.nr_vps; vp++) {
if (vsm_glue.plane1_vcpu_fd[vp] >= 0) {
vsm_vcpu_set_run_state(&vsm_glue, 1, vp, false);
+ vsm_vcpu_set_run_state(&vsm_glue, 0, vp, true);
}
}
qemu_mutex_unlock(&vsm_glue.lock);
I also added temporary exception-delivery diagnostics to print the SMM
state, CS selector/base, CR0, and IDT base/limit. Those exposed the
SMM/#GP failure described in my reply to kernel patch 23, but aren't
needed for the reset fix above.
Thanks,
Sriram