Skip to content
Commit 4bbd693d authored by Mingwei Zhang's avatar Mingwei Zhang Committed by Greg Kroah-Hartman
Browse files

KVM: SVM: Flush when freeing encrypted pages even on SME_COHERENT CPUs

commit d45829b3 upstream.

Use clflush_cache_range() to flush the confidential memory when
SME_COHERENT is supported in AMD CPU. Cache flush is still needed since
SME_COHERENT only support cache invalidation at CPU side. All confidential
cache lines are still incoherent with DMA devices.

Cc: stable@vger.kerel.org

Fixes: add5e2f0

 ("KVM: SVM: Add support for the SEV-ES VMSA")
Reviewed-by: default avatarSean Christopherson <seanjc@google.com>
Signed-off-by: default avatarMingwei Zhang <mizhang@google.com>
Message-Id: <20220421031407.2516575-3-mizhang@google.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8b2da969
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment