Re: [PATCH v3 11/37] KVM: s390: protvirt: Secure memory is not mergeable

Cornelia Huck
2020-02-21T12:49:34Z

On Thu, 20 Feb 2020 05:39:54 -0500
Christian Borntraeger <borntraeger@de.ibm.com> wrote:

> From: Janosch Frank <frankja@linux.ibm.com>
>
> KSM will not work on secure pages, because when the kernel reads a
> secure page, it will be encrypted and hence no two pages will look the
> same.
>
> Let's mark the guest pages as unmergeable when we transition to secure
> mode.
>
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Reviewed-by: David Hildenbrand <david@redhat.com>
> [borntraeger@de.ibm.com: patch merging, splitting, fixing]
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
> arch/s390/include/asm/gmap.h | 1 +
> arch/s390/kvm/kvm-s390.c | 7 +++++++
> arch/s390/mm/gmap.c | 30 ++++++++++++++++++++----------
> 3 files changed, 28 insertions(+), 10 deletions(-)

Reviewed-by: Cornelia Huck <cohuck@redhat.com>