Re: [RFC PATCH 00/55] KVM: x86: Hyper-V VSM (Virtual Trust Levels) on VM planes

From
Sriram Nambakam <hidden>
Date
2026-11-04 06:55:49
Also in
kvm
Reply to
David Woodhouse, 2026-10-17
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
Thread (61 messages) 61 messages, 2 authors, last reply 9d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help