diff options
author | Roman Kagan <rkagan@virtuozzo.com> | 2018-07-19 21:59:07 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-08-06 16:24:42 +0200 |
commit | 314b46558cc97578f2edf5e77a65140b63db3fcc (patch) | |
tree | cb53ac0e394dd82c86cdc8456d949b9231e905be /drivers/crypto/padlock-aes.c | |
parent | a1d7ff2496e04bc1b8c3d8cb1ad717b6256098a8 (diff) |
kvm: x86: vmx: fix vpid leak
commit 63aff65573d73eb8dda4732ad4ef222dd35e4862 upstream.
VPID for the nested vcpu is allocated at vmx_create_vcpu whenever nested
vmx is turned on with the module parameter.
However, it's only freed if the L1 guest has executed VMXON which is not
a given.
As a result, on a system with nested==on every creation+deletion of an
L1 vcpu without running an L2 guest results in leaking one vpid. Since
the total number of vpids is limited to 64k, they can eventually get
exhausted, preventing L2 from starting.
Delay allocation of the L2 vpid until VMXON emulation, thus matching its
freeing.
Fixes: 5c614b3583e7b6dab0c86356fa36c2bcbb8322a0
Cc: stable@vger.kernel.org
Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/crypto/padlock-aes.c')
0 files changed, 0 insertions, 0 deletions