[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211214143859.111602-1-vkuznets@redhat.com>
Date: Tue, 14 Dec 2021 15:38:54 +0100
From: Vitaly Kuznetsov <vkuznets@...hat.com>
To: kvm@...r.kernel.org, Paolo Bonzini <pbonzini@...hat.com>
Cc: Sean Christopherson <seanjc@...gle.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Maxim Levitsky <mlevitsk@...hat.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 0/5] KVM: nVMX: Fix Windows 11 + WSL2 + Enlightened VMCS
Windows 11 with enabled Hyper-V role doesn't boot on KVM when Enlightened
VMCS interface is provided to it. The observed behavior doesn't conform to
Hyper-V TLFS. In particular, I'm observing 'VMREAD' instructions trying to
access field 0x4404 ("VM-exit interruption information"). TLFS, however, is
very clear this should not be happening:
"Any VMREAD or VMWRITE instructions while an enlightened VMCS is active is
unsupported and can result in unexpected behavior."
Microsoft confirms this is a bug in Hyper-V which is supposed to get fixed
eventually. For the time being, implement a workaround in KVM allowing
VMREAD instructions to read from the currently loaded Enlightened VMCS.
Patches 1-2 are unrelated fixes to VMX feature MSR filtering when eVMCS is
enabled. Patches 3 and 4 are preparatory changes, patch 5 implements the
workaround.
Vitaly Kuznetsov (5):
KVM: nVMX: Also filter MSR_IA32_VMX_TRUE_PINBASED_CTLS when eVMCS
KVM: nVMX: eVMCS: Filter out VM_EXIT_SAVE_VMX_PREEMPTION_TIMER
KVM: nVMX: Rename vmcs_to_field_offset{,_table} to
vmcs12_field_offset{,_table}
KVM: nVMX: Implement evmcs_field_offset() suitable for handle_vmread()
KVM: nVMX: Allow VMREAD when Enlightened VMCS is in use
arch/x86/kvm/vmx/evmcs.c | 4 ++--
arch/x86/kvm/vmx/evmcs.h | 48 +++++++++++++++++++++++++++++++--------
arch/x86/kvm/vmx/nested.c | 42 ++++++++++++++++++++++++----------
arch/x86/kvm/vmx/vmcs12.c | 4 ++--
arch/x86/kvm/vmx/vmcs12.h | 6 ++---
5 files changed, 76 insertions(+), 28 deletions(-)
--
2.33.1
Powered by blists - more mailing lists