RE: [PATCH v4 2/5] x86/hyper-v: Add synthetic debugger definitions

Michael Kelley
2020-03-12T19:32:51Z

From: Jon Doron <arilou@gmail.com> Sent: Thursday, March 12, 2020 12:12 PM
>
> On 12/03/2020, Michael Kelley wrote:
> >From: Vitaly Kuznetsov <vkuznets@redhat.com> Sent: Thursday, March 12, 2020 6:51 AM
> >>
> >> Michael Kelley <mikelley@microsoft.com> writes:
> >>
> >> > I'm flexible, and trying to not be a pain-in-the-neck. :-) What would
> >> > the KVM guys think about putting the definitions in a KVM specific
> >> > #include file, and clearly marking them as deprecated, mostly
> >> > undocumented, and used only to support debugging old Windows
> >> > versions?
> >>
> >> I *think* we should do the following: defines which *are* present in
> >> TLFS doc (e.g. HV_FEATURE_DEBUG_MSRS_AVAILABLE,
> >> HV_STATUS_OPERATION_DENIED, ...) go to asm/hyperv-tlfs.h, the rest
> >> (syndbg) stuff goes to kvm-specific include (I'd suggest we just use
> >> hyperv.h we already have).
> >>
> >> What do you think?
> >>
> >
> >I could live with this proposal, since they *are* in the TLFS v6.0 as it
> >exists today. However, v6.0 seems inconsistent in what parts of this
> >debugging functionality it exposes, probably just because someone
> >hasn't thought comprehensively about the topic across the whole
> >document. I'll make sure that it gets looked at in the next revision
> >(which should be a lot sooner that the 2+ years it took to get the v6.0
> >revision done). But I won't be surprised if the remaining vestiges are
> >removed at that time, in which case we would want to move the
> >definitions from hyperv-tlfs.h to KVM's hyper.h.
> >
> >Michael
>
> Hi guys, just a quick note I went over the old HyperV TLFS and it seems
> like all the Syndbg MSRs are documented (under Appendix F: Hypervisor
> Synthetic MSRs, from v5.0b).
>
> It seems like the undocumented stuff is HV_X64_MSR_SYNDBG_OPTIONS which
> seems kinda odd because that's how you enable the hypercalls debugging
> interface which is documented.
>
> And the syndbg CPUID leafs are not documented as well.
>
> So would you like me to put all the MSRs in the tlfs omitting the
> HV_X64_MSR_SYNDBG_OPTIONS.
>
> So in hyperv.h we will have HV_X64_MSR_SYNDBG_OPTIONS and the CPUID
> leafs.
>

Could you make the decision based on the new v6.0 of the Hyper-V TLFS?
See https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/tlfs
to get a copy. I think some of the synthetic debugger stuff has been dropped
from the v6.0 version compared with the earlier v5.0 versions, and I'd like the
updates to hyperv-tlfs.h to reflect that newest version.

Michael