Hi David,

Thanks for posting this. I've been trying the series and the QEMU VSM
implementation in my local integration trees. With the fixes below,
Windows now reports "Virtualization-based security: Running" in msinfo32.

This was on a v7.3-based kernel tree with existing local VM-planes/LVBS
changes, rather than an otherwise unmodified copy of your v7.1-rc7-based
tree. I don't want to imply that all of the integration changes were
defects in the posted series.

The main runtime issue I found was descriptor-table interception while
OVMF was executing in SMM. hv_divert_dt_write() was diverting firmware
descriptor-table writes through the VTL register-intercept path. The
failure trace showed a reflected #GP delivered in SMM with IDT base and
limit both zero, followed by a triple fault/reset. Adding an is_smm()
exclusion to the helper fixed that boot failure. I'll reply to patch 23
with the change.

On the QEMU side, I also changed vsm_glue_reset() to make plane 0 runnable
when stopping plane 1. Otherwise a reset following a VTL switch can leave
the normal-world vCPU userspace-stopped. I'll send that change separately
in this thread, since the QEMU glue isn't part of the kernel posting.

Two build/header items from the newer kernel integration:

  - In patch 49, I used cpu_feature_enabled(X86_FEATURE_DECODEASSISTS)
    instead of static_cpu_has(), matching the current SVM code.
  - I synchronized the tools UAPI header with the PLANE_PROT/INSN_VALID
    flags and their field-validity comments, and the capability-version
    requirement for KVM_HV_HCALL_RESULT_RAISE_UD.

I also encountered an issue in the underlying planes dependency:
"kvm: Make KVM_SIGNAL_MSI per plane" guards the VM-fd and plane-fd ioctl
dispatch with CONFIG_HAVE_KVM_MSI. Those guards need to use __KVM_HAVE_MSI;
otherwise KVM_SIGNAL_MSI is compiled out and returns ENOTTY. The existing
test_plane_msi case exposed this in my tree. This isn't introduced by one
of the 55 patches here.

Finally, my older LVBS tree had raised the default plane count to two.
I reverted that local change to respect the KVM_CAP_PLANES opt-in contract
and added early opt-in for my LVBS userspace path. Your QEMU VSM path
already has its own opt-in, so I am not reporting that as a missing VSM
change.

My runtime result here is the msinfo32 VBS-running status; I am not
claiming separate Credential Guard, migration, or hibernate/resume
validation.

Thanks,
Sriram

Reply via email to