OSDN Git Service

x86/kvm/hyper-v: add reenlightenment MSRs support
authorVitaly Kuznetsov <vkuznets@redhat.com>
Thu, 1 Mar 2018 14:15:12 +0000 (15:15 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 16 Mar 2018 21:01:31 +0000 (22:01 +0100)
commita2e164e7f45ab21742b2e32c0195b699ae2ebfc0
tree64a0add3637d090b05997a6f1b8cf4f1c208f480
parentddd6f0e94d3153951580d5b88b9d97c7e26a0e00
x86/kvm/hyper-v: add reenlightenment MSRs support

Nested Hyper-V/Windows guest running on top of KVM will use TSC page
clocksource in two cases:
- L0 exposes invariant TSC (CPUID.80000007H:EDX[8]).
- L0 provides Hyper-V Reenlightenment support (CPUID.40000003H:EAX[13]).

Exposing invariant TSC effectively blocks migration to hosts with different
TSC frequencies, providing reenlightenment support will be needed when we
start migrating nested workloads.

Implement rudimentary support for reenlightenment MSRs. For now, these are
just read/write MSRs with no effect.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Roman Kagan <rkagan@virtuozzo.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/hyperv.c
arch/x86/kvm/x86.c