From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claudio Imbrenda Subject: [PATCH v2 0/2] KVM: s390: fix storage attributes migration Date: Thu, 18 Jan 2018 13:56:36 +0100 Message-ID: <1516280198-25386-1-git-send-email-imbrenda@linux.vnet.ibm.com> Cc: borntraeger@de.ibm.com, cohuck@redhat.com, pbonzini@redhat.com, david@redhat.com, schwidefsky@de.ibm.com, frankja@linux.vnet.ibm.com To: kvm@vger.kernel.org Return-path: Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:35980 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754707AbeARM4n (ORCPT ); Thu, 18 Jan 2018 07:56:43 -0500 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w0ICscpk078259 for ; Thu, 18 Jan 2018 07:56:43 -0500 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 2fjtb0d4q9-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 18 Jan 2018 07:56:42 -0500 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 18 Jan 2018 12:56:40 -0000 Sender: kvm-owner@vger.kernel.org List-ID: This patchset fixes the migration of storage attributes. Each memory slot has a bitmap, with 2 bits per page, used to keep track of dirty pages during migration. We only use one bit, the other would be wasted. With this patch, the second bit is now used to keep track of dirty storage attributes. This means that we do not need anymore to allocate and manage the additional bitmap, and no extra work is needed to keep track of memory slots. The code does get a little bit more complicated when accounting for the memory slots, but overall it should be more robust. The first patch simply introduces two auxiliary functions, while the second patch does the actual job. v1 -> v2 * renamed _cmma_bitmap to cmma_bitmap and moved it to kvm-s390.h * renamed and/or removed some variables to improve readability * added some comments inline * simplified the code flow to improve readability Claudio Imbrenda (2): KVM: s390x: some utility functions for migration KVM: s390: Fix storage attributes migration with memory slots arch/s390/include/asm/kvm_host.h | 9 +- arch/s390/kvm/kvm-s390.c | 297 ++++++++++++++++++++++++--------------- arch/s390/kvm/kvm-s390.h | 6 + arch/s390/kvm/priv.c | 26 ++-- 4 files changed, 206 insertions(+), 132 deletions(-) -- 2.7.4