[PATCH v3 07/15] KVM: x86: hyper-v: Advertise XMM fast hypercall output

From: David Woodhouse

Date: Fri Nov 27 2026 - 10:29:06 EST


From: David Woodhouse <dwmw@xxxxxxxxxxxx>

A fast hypercall may return its output in XMM registers when the
hypervisor reports HV_X64_HYPERCALL_XMM_OUTPUT_AVAILABLE, and Windows
only uses those forms when the bit is set. KVM does not report it,
although a VMM handling a forwarded fast hypercall can write the output
through the vCPU FPU state.

Report the bit. None of the hypercalls KVM implements itself returns
output, so it only matters for those which the VMM handles.

Signed-off-by: David Woodhouse <dwmw@xxxxxxxxxxxx>
---
arch/x86/kvm/hyperv.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
index 67c9d20547d8..bf0e37d026c0 100644
--- a/arch/x86/kvm/hyperv.c
+++ b/arch/x86/kvm/hyperv.c
@@ -2882,6 +2882,7 @@ int kvm_get_hv_cpuid(struct kvm_vcpu *vcpu, struct kvm_cpuid2 *cpuid,
ent->ebx |= HV_ENABLE_EXTENDED_HYPERCALLS;

ent->edx |= HV_X64_HYPERCALL_XMM_INPUT_AVAILABLE;
+ ent->edx |= HV_X64_HYPERCALL_XMM_OUTPUT_AVAILABLE;
ent->edx |= HV_FEATURE_FREQUENCY_MSRS_AVAILABLE;
ent->edx |= HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE;

--
2.50.1