• Maxim Levitsky's avatar
    KVM: nSVM: fix few bugs in the vmcb02 caching logic · c74ad08f
    Maxim Levitsky authored
    * Define and use an invalid GPA (all ones) for init value of last
      and current nested vmcb physical addresses.
    * Reset the current vmcb12 gpa to the invalid value when leaving
      the nested mode, similar to what is done on nested vmexit.
    * Reset	the last seen vmcb12 address when disabling the nested SVM,
      as it relies on vmcb02 fields which are freed at that point.
    Fixes: 4995a368
     ("KVM: SVM: Use a separate vmcb for the nested L2 guest")
    Signed-off-by: default avatarMaxim Levitsky <mlevitsk@redhat.com>
    Message-Id: <20210503125446.1353307-3-mlevitsk@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>