From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkEC5-00075w-BD for qemu-devel@nongnu.org; Tue, 13 May 2014 11:00:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkEBw-0002ej-87 for qemu-devel@nongnu.org; Tue, 13 May 2014 11:00:37 -0400 Received: from e06smtp18.uk.ibm.com ([195.75.94.114]:40971) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkEBv-0002eQ-Vj for qemu-devel@nongnu.org; Tue, 13 May 2014 11:00:28 -0400 Received: from /spool/local by e06smtp18.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 13 May 2014 16:00:26 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 6AADF1B08070 for ; Tue, 13 May 2014 16:00:39 +0100 (BST) Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by b06cxnps4076.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s4DF0PL71245452 for ; Tue, 13 May 2014 15:00:25 GMT Received: from d06av09.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s4DF0OSi007421 for ; Tue, 13 May 2014 09:00:25 -0600 From: Michael Mueller Date: Tue, 13 May 2014 17:00:12 +0200 Message-Id: <1399993222-16339-1-git-send-email-mimu@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH v1 RFC 00/10] QEMU: s390: cpu model implementation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, kvm@vger.kernel.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Cc: mimu@linux.vnet.ibm.com, Gleb Natapov , Alexander Graf , Christian Borntraeger , "Jason J. Herne" , Cornelia Huck , Paolo Bonzini , Andreas Faerber , Richard Henderson This patch set in combination with its kernel kvm patch set proposes an implementation of S390 cpu models. The origin of this item is to provide a means for management interfaces like libvirt to draw decisions if life guest migration to a target hypervisor is reasonable. A migration constraint is that a target hypervisor is capable to run a guest with the same S390 cpu model as the source hypervisor does. To verify this condition, the administration interface employes the existing QMP command "query-cpu-definitions" which returns a list of all currently supported S390 cpu models of a given host system. Together with the newly defined QMP command "query-cpu-model", which returns the current active S390 cpu model of a guest, a conclusion can be drawn if a migration is possible. A S390 cpu model is defined as a triple of machine type, cpu facility set and IBC value. Each historic, current and future triple receives a name composed of the machine type and its general availability counter. This name forms the cpu model name (e.g.: "2817-GA2".) With means of the Instruction Blocking Control feature (IBC), the instruction set available to a given guest is limitable. Michael Mueller (10): QEMU: introduce function cpudesc_avail QEMU: s390: cpu model cpu class definition QEMU: s390: cpu model facilities support QEMU: s390: cpu model alias support s390: update linux-headers for kvm VM device attributes QEMU: s390: cpu model kvm VM attr interface routines QEMU: s390: cpu model class initialization QEMU: s390: cpu model QMP query-cpu-definitions QEMU: s390: cpu model QMP query-cpu-model QEMU: s390: cpu model enablement arch_init.c | 8 + hw/s390x/s390-virtio-ccw.c | 2 + hw/s390x/s390-virtio.c | 104 ++++++++ hw/s390x/s390-virtio.h | 1 + include/sysemu/arch_init.h | 2 + linux-headers/asm-s390/kvm.h | 26 ++ linux-headers/linux/kvm.h | 1 + qapi-schema.json | 23 ++ qmp-commands.hx | 6 + qmp.c | 5 + stubs/Makefile.objs | 1 + stubs/arch-query-cpu-mod.c | 9 + target-s390x/Makefile.objs | 1 + target-s390x/cpu-models.c | 586 +++++++++++++++++++++++++++++++++++++++++++ target-s390x/cpu-models.h | 362 ++++++++++++++++++++++++++ target-s390x/cpu-qom.h | 22 ++ target-s390x/cpu.c | 171 ++++++++++++- target-s390x/cpu.h | 3 + target-s390x/kvm.c | 66 +++++ vl.c | 2 +- 20 files changed, 1395 insertions(+), 6 deletions(-) create mode 100644 stubs/arch-query-cpu-mod.c create mode 100644 target-s390x/cpu-models.c create mode 100644 target-s390x/cpu-models.h -- 1.8.3.1