KVM: x86: hyper-v: Check if guest is allowed to use XMM registers for hypercall input
authorVitaly Kuznetsov <vkuznets@redhat.com>
Fri, 30 Jul 2021 12:26:24 +0000 (14:26 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 3 Aug 2021 10:16:40 +0000 (06:16 -0400)
commit4e62aa96d6e55c1b2a4e841f1f8601eae81e81ae
treee7fde0f3c3d99e2c8f032f2642ceb2c079b3657c
parentf5714bbb5b3120b33dfbf3d81ffc0b98ae4cd4c1
KVM: x86: hyper-v: Check if guest is allowed to use XMM registers for hypercall input

TLFS states that "Availability of the XMM fast hypercall interface is
indicated via the “Hypervisor Feature Identification” CPUID Leaf
(0x40000003, see section 2.4.4) ... Any attempt to use this interface
when the hypervisor does not indicate availability will result in a #UD
fault."

Implement the check for 'strict' mode (KVM_CAP_HYPERV_ENFORCE_CPUID).

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Siddharth Chandrasekaran <sidcha@amazon.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210730122625.112848-4-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/hyperv.c