]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SVM: Flush when freeing encrypted pages even on SME_COHERENT CPUs
authorMingwei Zhang <mizhang@google.com>
Thu, 21 Apr 2022 03:14:06 +0000 (03:14 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 21 Apr 2022 17:16:59 +0000 (13:16 -0400)
commit9eae7d193bc7d1346e50a119bcc2c1a4bd1a0635
tree45ec8b9159c81c734d5263ffbdeac9acd7f4ba8d
parent5e5bee3baaf1ddffa3d2754775b6af6ea54cee9b
KVM: SVM: Flush when freeing encrypted pages even on SME_COHERENT CPUs

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: 24d16a27f6b7 ("KVM: SVM: Add support for the SEV-ES VMSA")
Reviewed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Mingwei Zhang <mizhang@google.com>
Message-Id: <20220421031407.2516575-3-mizhang@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/sev.c