KVM: x86: hyper-v: HVCALL_SEND_IPI_EX is an XMM fast hypercall
authorVitaly Kuznetsov <vkuznets@redhat.com>
Tue, 22 Feb 2022 15:46:42 +0000 (16:46 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 25 Feb 2022 10:52:22 +0000 (05:52 -0500)
commit47d3e5cdfe607ec6883eb0faa7acf05b8cb3f92a
tree77748cc5aea75479213aac2f3f0c2dc8634b9e40
parent7321f47eada53a395fb3086d49297eebb19e8e58
KVM: x86: hyper-v: HVCALL_SEND_IPI_EX is an XMM fast hypercall

It has been proven on practice that at least Windows Server 2019 tries
using HVCALL_SEND_IPI_EX in 'XMM fast' mode when it has more than 64 vCPUs
and it needs to send an IPI to a vCPU > 63. Similarly to other XMM Fast
hypercalls (HVCALL_FLUSH_VIRTUAL_ADDRESS_{LIST,SPACE}{,_EX}), this
information is missing in TLFS as of 6.0b. Currently, KVM returns an error
(HV_STATUS_INVALID_HYPERCALL_INPUT) and Windows crashes.

Note, HVCALL_SEND_IPI is a 'standard' fast hypercall (not 'XMM fast') as
all its parameters fit into RDX:R8 and this is handled by KVM correctly.

Cc: stable@vger.kernel.org # 5.14.x: 3244867af8c0: KVM: x86: Ignore sparse banks size for an "all CPUs", non-sparse IPI req
Cc: stable@vger.kernel.org # 5.14.x
Fixes: d8f5537a8816 ("KVM: hyper-v: Advertise support for fast XMM hypercalls")
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20220222154642.684285-5-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/hyperv.c