summaryrefslogtreecommitdiff
path: root/security/min_addr.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2021-04-22 05:11:11 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2021-04-26 12:27:14 +0300
commit3b1902b87bf11f1c6a84368470dc13da6f3da3bd (patch)
tree9fd2f923905d15dd01b880aeca2a26e53bd246e4 /security/min_addr.c
parent4daf2a1c45ace29e3bacabdef0d4c7920e1f1ea4 (diff)
downloadlinux-3b1902b87bf11f1c6a84368470dc13da6f3da3bd.tar.xz
KVM: SVM: Zero out the VMCB array used to track SEV ASID association
Zero out the array of VMCB pointers so that pre_sev_run() won't see garbage when querying the array to detect when an SEV ASID is being associated with a new VMCB. In practice, reading random values is all but guaranteed to be benign as a false negative (which is extremely unlikely on its own) can only happen on CPU0 on the first VMRUN and would only cause KVM to skip the ASID flush. For anything bad to happen, a previous instance of KVM would have to exit without flushing the ASID, _and_ KVM would have to not flush the ASID at any time while building the new SEV guest. Cc: Borislav Petkov <bp@suse.de> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Reviewed-by: Brijesh Singh <brijesh.singh@amd.com> Fixes: 70cd94e60c73 ("KVM: SVM: VMRUN should use associated ASID when SEV is enabled") Signed-off-by: Sean Christopherson <seanjc@google.com> Message-Id: <20210422021125.3417167-2-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'security/min_addr.c')
0 files changed, 0 insertions, 0 deletions