summaryrefslogtreecommitdiff
path: root/virt
diff options
context:
space:
mode:
authorMaxim Levitsky <mlevitsk@redhat.com>2021-01-14 22:54:47 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-02-03 23:25:57 +0100
commitff5f6de29faf047ca00512c7607bd111ea172820 (patch)
tree53f89415e442a8c8e5bd9296e547ceea1cd9972c /virt
parent2fc14cafefb302d25919678a4f1b74d7e87ff561 (diff)
KVM: nVMX: Sync unsync'd vmcs02 state to vmcs12 on migration
commit d51e1d3f6b4236e0352407d8a63f5c5f71ce193d upstream. Even when we are outside the nested guest, some vmcs02 fields may not be in sync vs vmcs12. This is intentional, even across nested VM-exit, because the sync can be delayed until the nested hypervisor performs a VMCLEAR or a VMREAD/VMWRITE that affects those rarely accessed fields. However, during KVM_GET_NESTED_STATE, the vmcs12 has to be up to date to be able to restore it. To fix that, call copy_vmcs02_to_vmcs12_rare() before the vmcs12 contents are copied to userspace. Fixes: 7952d769c29ca ("KVM: nVMX: Sync rarely accessed guest fields only when needed") Reviewed-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Message-Id: <20210114205449.8715-2-mlevitsk@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions