On Thu, 20 Feb 2020 05:39:54 -0500 Christian Borntraeger <borntraeger@xxxxxxxxxx> wrote: > From: Janosch Frank <frankja@xxxxxxxxxxxxx> > > 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@xxxxxxxxxxxxx> > Reviewed-by: Thomas Huth <thuth@xxxxxxxxxx> > Reviewed-by: David Hildenbrand <david@xxxxxxxxxx> > [borntraeger@xxxxxxxxxx: patch merging, splitting, fixing] > Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx> > --- > 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@xxxxxxxxxx>