APPLIED: [B/F/I][SRU][PATCH 0/1] Fix vmx_ldtr_test test failure in ubuntu_kvm_unit_tests

Stefan Bader stefan.bader at canonical.com
Wed Apr 13 08:46:21 UTC 2022


On 06.04.22 06:36, Po-Hsu Lin wrote:
> [Impact]
> vmx_ldtr_test in ubuntu_kvm_unit_tests will fail with:
>      FAIL: Expected 0 for L1 LDTR selector (got 50)
> 
> It's a test for commit afc8de01 "KVM: nVMX: Set LDTR to its
> architecturally defined value on nested VM-Exit"
> 
> According to Intel 64 and IA-32 Architectures Software Developer's
> Manual, L1's LDTR should be 0 after an emulated VM-exit from L2.
> 
> [Fix]
> * afc8de01 "KVM: nVMX: Set LDTR to its architecturally defined value
> on nested VM-Exit"
> 
> We already have this patch in Jammy.
> This patch can be cherry-picked into F/F-OEM-5.14/I. But some
> straightforward backport work is required for Bionic, as the code
> snippet for nested KVM haven't been split out to vmx/nested.c
> (55d2375e KVM: nVMX: Move nested code to dedicated files).
> 
> [Test]
> Test kernels can be found here:
> https://people.canonical.com/~phlin/kernel/lp-1956315-vmx-ldtr/
> 
> Tested with:
>   * B (bare-metal / KVM instance)
>   * F (KVM instance)
>   * I (bare-metal / KVM instance)
> 
> With this patched kernel, this test will pass:
>      PASS: Expected 0 for L1 LDTR selector (got 0)
> 
> Also tested with ubuntu_kvm_unit_tests and ubuntu_kvm_smoke_test to
> make sure this is not causing any other regressions.
> 
> [Where problem could occur]
> If the patch is incorrect it might affect the nested KVM functionality
> while existing from L2 to L1.
> 
> Sean Christopherson (1):
>    KVM: nVMX: Set LDTR to its architecturally defined value on nested
>      VM-Exit
> 
>   arch/x86/kvm/vmx/nested.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 

Applied to impish,focal,bionic:linux/master-next. Thanks.

-Stefan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20220413/e9b17f09/attachment.sig>


More information about the kernel-team mailing list