[Qemu-devel] [PATCH v1 RFC 0/6] KVM: s390: cpu model implementation

2014-05-13 Thread Michael Mueller
x27;s will use this cpu configuration. Michael Mueller (6): s390/sclp: add sclp_get_ibc function KVM: s390: split SIE state guest prefix field KVM: s390: use facilities and cpu_id per KVM KVM: s390: add ibc api KVM: s390: initial implementation of soft facilities KVM: s390: add cpu

[Qemu-devel] [PATCH v1 RFC 1/6] s390/sclp: add sclp_get_ibc function

2014-05-13 Thread Michael Mueller
The patch adds functionality to retrieve the IBC configuration by means of function sclp_get_ibc(). Signed-off-by: Michael Mueller Acked-by: Cornelia Huck Acked-by: Heiko Carstens Acked-by: Christian Borntraeger --- arch/s390/include/asm/sclp.h | 1 + drivers/s390/char/sclp_early.c | 12

[Qemu-devel] [PATCH v1 RFC 02/10] QEMU: s390: cpu model cpu class definition

2014-05-13 Thread Michael Mueller
. Signed-off-by: Michael Mueller --- target-s390x/Makefile.objs | 1 + target-s390x/cpu-models.c | 82 ++ target-s390x/cpu-models.h | 67 + target-s390x/cpu-qom.h | 22 + target-s390x/cpu.c | 2

[Qemu-devel] [PATCH v1 RFC 4/6] KVM: s390: add ibc api

2014-05-13 Thread Michael Mueller
The patch addds an internal KVM API to access instruction blocking control. It offers the following functions: - has_ibc() : tests if the system offers instruction blocking control - lowest_ibc() : first level supported - latest_ibc() : latest level supported Signed-off-by: Michael Mueller

[Qemu-devel] [PATCH v1 RFC 06/10] QEMU: s390: cpu model kvm VM attr interface routines

2014-05-13 Thread Michael Mueller
The patch implements routines to set and retrieve processor configuration data and to retrieve machine configuration data. The machine related data will be used to determine the list of supported cpu models of this host. Signed-off-by: Michael Mueller --- target-s390x/cpu-models.h | 21

[Qemu-devel] [PATCH v1 RFC 09/10] QEMU: s390: cpu model QMP query-cpu-model

2014-05-13 Thread Michael Mueller
respective machine type and GA names already during cpu instantiation. Thus, also a cpu name like "host", which is implemented as alias, will return its normalized cpu model name. Signed-off-by: Michael Mueller Acked-by: Cornelia Huck --- include/sysemu/arch_init.h | 1 + qapi-sch

[Qemu-devel] [PATCH v1 RFC 00/10] QEMU: s390: cpu model implementation

2014-05-13 Thread Michael Mueller
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

[Qemu-devel] [PATCH v1 RFC 2/6] KVM: s390: split SIE state guest prefix field

2014-05-13 Thread Michael Mueller
This patch splits the SIE state guest prefix at offset 4 into a prefix bit field. Additionally it provides the access functions: - kvm_s390_get_prefix() - kvm_s390_set_prefix() to access the prefix per vcpu. Signed-off-by: Michael Mueller Reviewed-by: Cornelia Huck Acked-by: Christian

[Qemu-devel] [PATCH v1 RFC 01/10] QEMU: introduce function cpudesc_avail

2014-05-13 Thread Michael Mueller
evaluating the runtime context. Signed-off-by: Michael Mueller Acked-by: Cornelia Huck --- arch_init.c| 8 include/sysemu/arch_init.h | 1 + vl.c | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/arch_init.c b/arch_init.c index

[Qemu-devel] [PATCH v1 RFC 5/6] KVM: s390: initial implementation of soft facilities

2014-05-13 Thread Michael Mueller
This patch implements the new state soft_fac_bits. This state defines which facilities are emulated in kernel and not in processor or millicode. Currently all bits are cleared. Signed-off-by: Michael Mueller --- arch/s390/kvm/Makefile | 2 +- arch/s390/kvm/kvm-s390.h | 3 +++ arch/s390/kvm

[Qemu-devel] [PATCH v1 RFC 07/10] QEMU: s390: cpu model class initialization

2014-05-13 Thread Michael Mueller
set alias for cpu model "host" Signed-off-by: Michael Mueller --- target-s390x/cpu-models.c | 401 ++ target-s390x/cpu-models.h | 25 +++ target-s390x/cpu.c| 26 ++- target-s390x/cpu.h| 3 + 4 files changed, 454 insertions(

[Qemu-devel] [PATCH v1 RFC 05/10] s390: update linux-headers for kvm VM device attributes

2014-05-13 Thread Michael Mueller
Signed-off-by: Michael Mueller --- linux-headers/asm-s390/kvm.h | 26 ++ linux-headers/linux/kvm.h| 1 + 2 files changed, 27 insertions(+) diff --git a/linux-headers/asm-s390/kvm.h b/linux-headers/asm-s390/kvm.h index c003c6a..2fba454 100644 --- a/linux-headers/asm

[Qemu-devel] [PATCH v1 RFC 3/6] KVM: s390: use facilities and cpu_id per KVM

2014-05-13 Thread Michael Mueller
o the already exiting symbol stfl_fac_list in lowcore. Signed-off-by: Michael Mueller Acked-by: Cornelia Huck Reviewed-by: Christian Borntraeger --- arch/s390/include/asm/kvm_host.h | 7 +++ arch/s390/kvm/gaccess.c | 4 +- arch/s390/kvm/kvm-s390.c

[Qemu-devel] [PATCH v1 RFC 03/10] QEMU: s390: cpu model facilities support

2014-05-13 Thread Michael Mueller
: Michael Mueller --- target-s390x/cpu-models.c | 27 +- target-s390x/cpu-models.h | 234 ++ target-s390x/cpu.c| 3 + 3 files changed, 262 insertions(+), 2 deletions(-) diff --git a/target-s390x/cpu-models.c b/target-s390x/cpu-models.c index

[Qemu-devel] [PATCH v1 RFC 6/6] KVM: s390: add cpu model support

2014-05-13 Thread Michael Mueller
. Userspace has to initialize the cpu model before vcpu creation. A cpu model change of running vcpus is currently not possible. Signed-off-by: Michael Mueller --- arch/s390/include/asm/kvm_host.h | 4 +- arch/s390/include/uapi/asm/kvm.h | 23 ++ arch/s390/kvm/kvm-s390.c | 146

[Qemu-devel] [PATCH v1 RFC 08/10] QEMU: s390: cpu model QMP query-cpu-definitions

2014-05-13 Thread Michael Mueller
}, {"name": "2096-ga1"}, {"name": "2094-ga3"}, {"name": "2094-ga2"}, {"name": "2094-ga1"}, {"name": "2086-ga3"}, {"name": "2086-ga2"}, {"name": "2086-ga1&q

[Qemu-devel] [PATCH v1 RFC 04/10] QEMU: s390: cpu model alias support

2014-05-13 Thread Michael Mueller
This patch implements the infrastructure to dynamically add cpu model aliases. Signed-off-by: Michael Mueller Reviewed-by: Cornelia Huck --- target-s390x/cpu-models.c | 64 +++ target-s390x/cpu-models.h | 12 + 2 files changed, 76 insertions

[Qemu-devel] [PATCH v1 RFC 10/10] QEMU: s390: cpu model enablement

2014-05-13 Thread Michael Mueller
-by: Michael Mueller --- hw/s390x/s390-virtio-ccw.c | 2 + hw/s390x/s390-virtio.c | 104 + hw/s390x/s390-virtio.h | 1 + 3 files changed, 107 insertions(+) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 0d4f6ae

Re: [Qemu-devel] [PATCH v1 RFC 09/10] QEMU: s390: cpu model QMP query-cpu-model

2014-05-14 Thread Michael Mueller
On Tue, 13 May 2014 09:29:37 -0600 Eric Blake wrote: Hi Eric, > On 05/13/2014 09:00 AM, Michael Mueller wrote: > > This patch implements a new QMP request named "query-cpu-model". It returns > > the cpu model of cpu 0. eg: > > > > request: '{

Re: [Qemu-devel] [PATCH v1 RFC 3/6] KVM: s390: use facilities and cpu_id per KVM

2014-05-16 Thread Michael Mueller
On Fri, 16 May 2014 13:55:41 +0200 Alexander Graf wrote: > > On 13.05.14 16:58, Michael Mueller wrote: > > The patch introduces facilities and cpu_ids per virtual machine. > > Different virtual machines may want to expose different facilities and > > cpu ids to the guest

Re: [Qemu-devel] [PATCH v1 RFC 0/6] KVM: s390: cpu model implementation

2014-05-16 Thread Michael Mueller
On Fri, 16 May 2014 13:32:09 +0200 Christian Borntraeger wrote: > On 13/05/14 16:58, Michael Mueller wrote: > > The proposed patch set implements S390 cpu model support in kvm. A cpu > > model is defined by a triple comprizing the cpu type , the cpu facility > > set and

Re: [Qemu-devel] [PATCH v1 RFC 6/6] KVM: s390: add cpu model support

2014-05-16 Thread Michael Mueller
On Fri, 16 May 2014 14:08:24 +0200 Alexander Graf wrote: > > On 13.05.14 16:58, Michael Mueller wrote: > > This patch enables cpu model support in kvm/s390 via the vm attribute > > interface. > > > > During KVM initialization, the host properties cpuid, IBC value

Re: [Qemu-devel] [PATCH v1 RFC 3/6] KVM: s390: use facilities and cpu_id per KVM

2014-05-16 Thread Michael Mueller
On Fri, 16 May 2014 16:49:37 +0200 Alexander Graf wrote: > > On 16.05.14 16:46, Michael Mueller wrote: > > On Fri, 16 May 2014 13:55:41 +0200 > > Alexander Graf wrote: > > > >> On 13.05.14 16:58, Michael Mueller wrote: > >>> The patch introduc

Re: [Qemu-devel] [PATCH v1 RFC 3/6] KVM: s390: use facilities and cpu_id per KVM

2014-05-19 Thread Michael Mueller
On Fri, 16 May 2014 22:35:34 +0200 Alexander Graf wrote: > > On 16.05.14 18:09, Michael Mueller wrote: > > On Fri, 16 May 2014 16:49:37 +0200 > > Alexander Graf wrote: > > > >> On 16.05.14 16:46, Michael Mueller wrote: > >>> On Fri, 16 May 20

Re: [Qemu-devel] [PATCH v1 RFC 6/6] KVM: s390: add cpu model support

2014-05-19 Thread Michael Mueller
On Fri, 16 May 2014 22:31:12 +0200 Alexander Graf wrote: > > On 16.05.14 17:39, Michael Mueller wrote: > > On Fri, 16 May 2014 14:08:24 +0200 > > Alexander Graf wrote: > > > >> On 13.05.14 16:58, Michael Mueller wrote: > >>> This patch enables cpu m

Re: [Qemu-devel] [PATCH v1 RFC 3/6] KVM: s390: use facilities and cpu_id per KVM

2014-05-19 Thread Michael Mueller
On Mon, 19 May 2014 12:41:45 +0200 Alexander Graf wrote: > > On 19.05.14 12:13, Michael Mueller wrote: > > On Fri, 16 May 2014 22:35:34 +0200 > > Alexander Graf wrote: > > > >> On 16.05.14 18:09, Michael Mueller wrote: > >>> On Fri, 16 May 20

Re: [Qemu-devel] [PATCH v1 RFC 6/6] KVM: s390: add cpu model support

2014-05-19 Thread Michael Mueller
On Mon, 19 May 2014 13:48:08 +0200 Alexander Graf wrote: > > On 19.05.14 12:53, Michael Mueller wrote: > > On Fri, 16 May 2014 22:31:12 +0200 > > Alexander Graf wrote: > > > >> On 16.05.14 17:39, Michael Mueller wrote: > >>> On Fri, 16 May 20

Re: [Qemu-devel] [PATCH v1 RFC 6/6] KVM: s390: add cpu model support

2014-05-19 Thread Michael Mueller
On Mon, 19 May 2014 16:49:28 +0200 Alexander Graf wrote: > > On 19.05.14 16:18, Michael Mueller wrote: > > On Mon, 19 May 2014 13:48:08 +0200 > > Alexander Graf wrote: > > > >> On 19.05.14 12:53, Michael Mueller wrote: > >>> On Fri, 16 May 20

Re: [Qemu-devel] [PATCH v1 RFC 6/6] KVM: s390: add cpu model support

2014-05-20 Thread Michael Mueller
On Mon, 19 May 2014 22:14:00 +0200 Alexander Graf wrote: > > On 19.05.14 19:03, Michael Mueller wrote: > > On Mon, 19 May 2014 16:49:28 +0200 > > Alexander Graf wrote: > > > >> On 19.05.14 16:18, Michael Mueller wrote: > >>> On Mon, 19 May 20

Re: [Qemu-devel] [PATCH v1 RFC 6/6] KVM: s390: add cpu model support

2014-05-21 Thread Michael Mueller
On Tue, 20 May 2014 12:10:23 +0200 Alexander Graf wrote: > > On 20.05.14 12:02, Michael Mueller wrote: > > On Mon, 19 May 2014 22:14:00 +0200 > > Alexander Graf wrote: > > > >> On 19.05.14 19:03, Michael Mueller wrote: > >>> On Mon, 19 May 20

Re: [Qemu-devel] [PATCH v1 RFC 6/6] KVM: s390: add cpu model support

2014-05-22 Thread Michael Mueller
On Thu, 22 May 2014 10:53:38 +0200 Paolo Bonzini wrote: > Il 22/05/2014 10:23, Michael Mueller ha scritto: > > On Wed, 21 May 2014 15:22:35 +0200 > > Alexander Graf wrote: > > > > I have seen the slides from Eduardo which he presented during this years > > Dev

Re: [Qemu-devel] [PATCH v11 00/34] modify boot order of guest, and take effect after rebooting

2014-10-09 Thread Michael Mueller
On Thu, 09 Oct 2014 11:47:12 +0200 Gerd Hoffmann wrote: > On Mi, 2014-10-08 at 19:00 +0800, Gonglei wrote: > > On 2014/10/7 16:00, Gonglei (Arei) wrote: > > > > > From: Gonglei > > > > > > Changes since v10: > > > 1. add handler for virtio-blk-pci/s390/ccw in PATCH 28. > > > 2. add especial

Re: [Qemu-devel] [RFC PATCH] target-ppc: enable migration within the same CPU family

2014-04-08 Thread Michael Mueller
On Tue, 08 Apr 2014 11:23:14 +1000 Alexey Kardashevskiy wrote: > On 04/08/2014 04:53 AM, Andreas Färber wrote: > > Am 07.04.2014 05:27, schrieb Alexey Kardashevskiy: > >> On 04/04/2014 11:28 PM, Alexander Graf wrote: > >>> On 04/04/2014 07:17 AM, Alexey Kardashevskiy wrote: > On 03/24/2014 0

Re: [Qemu-devel] [RFC PATCH] target-ppc: enable migration within the same CPU family

2014-04-08 Thread Michael Mueller
On Tue, 08 Apr 2014 20:04:42 +1000 Alexey Kardashevskiy wrote: > On 04/08/2014 07:47 PM, Michael Mueller wrote: > > On Tue, 08 Apr 2014 11:23:14 +1000 > > Alexey Kardashevskiy wrote: > > > >> On 04/08/2014 04:53 AM, Andreas Färber wrote: > >>> Am 07.0

Re: [Qemu-devel] [RFC PATCH] target-ppc: enable migration within the same CPU family

2014-04-08 Thread Michael Mueller
On Tue, 08 Apr 2014 21:47:39 +1000 Alexey Kardashevskiy wrote: > On 04/08/2014 08:32 PM, Michael Mueller wrote: > > On Tue, 08 Apr 2014 20:04:42 +1000 > > Alexey Kardashevskiy wrote: > > > >> On 04/08/2014 07:47 PM, Michael Mueller wrote: > >>> On Tu

Re: [Qemu-devel] [RFC PATCH] target-ppc: enable migration within the same CPU family

2014-04-10 Thread Michael Mueller
On Fri, 11 Apr 2014 01:11:10 +1000 Alexey Kardashevskiy wrote: > On 04/04/2014 11:28 PM, Alexander Graf wrote: > > On 04/04/2014 07:17 AM, Alexey Kardashevskiy wrote: > >> On 03/24/2014 04:28 PM, Alexey Kardashevskiy wrote: > >>> Currently only migration fails if CPU version is different even a b

[Qemu-devel] [PATCH RFC 09/11] s390/qemu: cpu model QMP query-cpu-definitions

2013-10-02 Thread Michael Mueller
}, {"name": "2096-ga1"}, {"name": "2094-ga3"}, {"name": "2094-ga2"}, {"name": "2094-ga1"}, {"name": "2086-ga3"}, {"name": "2086-ga2"}, {"na

[Qemu-devel] [PATCH RFC 10/11] s390/qemu: cpu model QMP query-cpu-model

2013-10-02 Thread Michael Mueller
and GA names already during cpu instantiation. Thus, also a cpu name like "host", which is iplemented as alias, will return its normalized cpu model name. Signed-off-by: Michael Mueller --- include/sysemu/arch_init.h | 1 + qapi-schema.json | 23 +++ q

Re: [Qemu-devel] [PATCH RFC 10/11] s390/qemu: cpu model QMP query-cpu-model

2013-10-02 Thread Michael Mueller
On Wed, 02 Oct 2013 06:06:32 -0600 Eric Blake wrote: > On 10/02/2013 05:33 AM, Michael Mueller wrote: > > This patch implements a new QMP request named "cpu-model". It returns > > the cpu model of cpu 0. eg: > > > > request: '{"execute" : &qu

Re: [Qemu-devel] [PATCH RFC 04/11] s390/qemu: cpu model cpu facilitiy support

2013-10-07 Thread Michael Mueller
On Thu, 03 Oct 2013 07:53:02 -0700 Richard Henderson wrote: > On 10/02/2013 04:33 AM, Michael Mueller wrote: > > +/* set a specific bit in facility set */ > > +static void set_facility(unsigned int nr, void *facilities) > > +{ > > +unsigned char

Re: [Qemu-devel] [PATCH RFC 04/11] s390/qemu: cpu model cpu facilitiy support

2013-10-07 Thread Michael Mueller
On Mon, 7 Oct 2013 12:47:53 +0200 Michael Mueller wrote: > On Thu, 03 Oct 2013 07:53:02 -0700 > Richard Henderson wrote: > > > On 10/02/2013 04:33 AM, Michael Mueller wrote: > > > +/* set a specific bit in facility set */ > > > +static void set_facility(

Re: [Qemu-devel] [PATCH RFC 04/11] s390/qemu: cpu model cpu facilitiy support

2013-10-16 Thread Michael Mueller
On Tue, 15 Oct 2013 15:46:57 -0700 Richard Henderson wrote: > On 10/07/2013 03:47 AM, Michael Mueller wrote: > > A second reason for using 2k of memory here is to fully represent the > > facilities as defined > > in the s390x architecture. The SIE state needs it and I want

[Qemu-devel] [RFC PATCH v2 04/15] cpu-model/s390: Introduce S390 CPU models

2015-02-17 Thread Michael Mueller
. In addition the patch introduces the QMP enumeration AccelId. It is used to index certain cpu model poperties per accelerator. Furthermore it extends the existing S390CPUClass by model related properties. Signed-off-by: Michael Mueller Reviewed-by: Thomas Huth --- qapi-schema.json

[Qemu-devel] [RFC PATCH v2 03/15] cpu-model: Introduce stub routine cpu_desc_avail

2015-02-17 Thread Michael Mueller
evaluating the runtime context instead of putting static cpu model information at display. Signed-off-by: Michael Mueller Reviewed-by: Thomas Huth --- include/qemu-common.h | 2 ++ stubs/Makefile.objs| 1 + stubs/cpu-desc-avail.c | 6 ++ vl.c | 2 +- 4 files changed

[Qemu-devel] [RFC PATCH v2 02/15] cpu-model: Introduce option --probe to switch into probe mode

2015-02-17 Thread Michael Mueller
The option --probe allows to switch into probe mode also for machines different from none. If one or more accelerators are specified these accelerators are used to provide probable properties. If no accelerator is given a list of accellerators that support probing is used. Signed-off-by: Michael

[Qemu-devel] [RFC PATCH v2 01/15] cpu-model: Introduce probe mode for machine none

2015-02-17 Thread Michael Mueller
QEMU now switches into "probe mode" when the selected machine is "none" and no specific accelerator(s) has been requested (i.e.: "-machine none"). In probe mode a by "_CONFIG" defines predefined list of accelerators run their init() methods. Sign

[Qemu-devel] [RFC PATCH v2 11/15] cpu-model/s390: Add QMP command query-cpu-model

2015-02-17 Thread Michael Mueller
ng functions: - s390_cpu_typename(), returns the currently selected cpu type name or NULL - s390_cpu_models_used(), returns true if S390 cpu models are in use Signed-off-by: Michael Mueller --- include/sysemu/arch_init.h | 1 + qapi-schema.json | 23 +++ qmp-comm

[Qemu-devel] [RFC PATCH v2 05/15] cpu-model/s390: Introduce S390 CPU facilities

2015-02-17 Thread Michael Mueller
The patch introduces S390 CPU facilities bit numbers and names as well as the architectural facility size limit in bytes. Signed-off-by: Michael Mueller --- target-s390x/cpu-facilities.h | 76 +++ 1 file changed, 76 insertions(+) create mode 100644

[Qemu-devel] [RFC PATCH v2 10/15] cpu-model/s390: Add cpu class initialization routines

2015-02-17 Thread Michael Mueller
pu classes have been initialized - s390_test_facility(), facility bit probe function for QEMU land - s390_probe_mode, test if running in probe mode Signed-off-by: Michael Mueller --- target-s390x/cpu-models.c | 464 ++ target-s390x/cpu-models.h | 27 +++

[Qemu-devel] [RFC PATCH v2 09/15] cpu-model/s390: Add KVM VM attribute interface routines

2015-02-17 Thread Michael Mueller
trace point instrumentation. Signed-off-by: Michael Mueller --- target-s390x/cpu-models.h | 39 ++ target-s390x/kvm.c| 102 ++ trace-events | 3 ++ 3 files changed, 144 insertions(+) diff --git a/target-s390x/cpu

[Qemu-devel] [RFC PATCH v2 07/15] cpu-model/s390: Add cpu model alias definition routines

2015-02-17 Thread Michael Mueller
This patch implements the infrastructure to dynamically add cpu model aliases. Signed-off-by: Michael Mueller Reviewed-by: Cornelia Huck --- target-s390x/cpu-models.c | 77 +++ target-s390x/cpu-models.h | 11 +++ 2 files changed, 88 insertions

[Qemu-devel] [RFC PATCH v2 06/15] cpu-model/s390: Define cpu model specific facility lists

2015-02-17 Thread Michael Mueller
current hosting machine model. The also defined qemu side facility mask allows to implement and enable facilities in QEMU land. Signed-off-by: Michael Mueller --- target-s390x/cpu-models.c | 13 target-s390x/cpu-models.h | 182 ++ target-s390x/cpu.c

[Qemu-devel] [RFC PATCH v2 15/15] cpu-model/s390: Enable S390 cpu model

2015-02-17 Thread Michael Mueller
This patch enables QEMU to instantiate S390 CPUs with cpu model types. Signed-off-by: Michael Mueller --- hw/s390x/s390-virtio.c | 6 ++ target-s390x/helper.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/s390x/s390-virtio.c b/hw/s390x/s390-virtio.c index

[Qemu-devel] [RFC PATCH v2 12/15] cpu-model/s390: Extend QMP command query-cpu-definitions

2015-02-17 Thread Michael Mueller
-ga2","accelerators":[{"name":"kvm","runnable":true,"default":true}]}, {"name":"2827-ga1","accelerators":[{"name":"kvm","runnable":true,"default":false}]}, {"na

[Qemu-devel] [RFC PATCH v2 08/15] cpu-model/s390: Update linux-headers/asm-s390/kvm.h

2015-02-17 Thread Michael Mueller
Signed-off-by: Michael Mueller --- linux-headers/asm-s390/kvm.h | 20 1 file changed, 20 insertions(+) diff --git a/linux-headers/asm-s390/kvm.h b/linux-headers/asm-s390/kvm.h index d36b2fa..e38c942 100644 --- a/linux-headers/asm-s390/kvm.h +++ b/linux-headers/asm-s390

[Qemu-devel] [RFC PATCH v2 00/15] QEMU: s390: cpu model implementation

2015-02-17 Thread Michael Mueller
erception handlers implemented on qemu side. Similar to the facilities enabled by means of the KVM side facility list mask which are handled by kvm/kernel. - Concept of soft facilities has been dropped - Result type of QMP command query-cpu-definitions extended to hold additional information beside the

[Qemu-devel] [RFC PATCH v2 14/15] cpu-model/s390: Add cpu model selection routine

2015-02-17 Thread Michael Mueller
-s390-cpu' If one of the priviously mentioned steps fail, QEMU stores and returns the default cpu model type name: 's390-cpu'. The function has a trace point. Signed-off-by: Michael Mueller --- target-s390x/cpu-models.c | 45 + target-s39

[Qemu-devel] [RFC PATCH v2 13/15] cpu-model/s390: Add processor property routines

2015-02-17 Thread Michael Mueller
This patch implements the functions: - s390_get_proceccor_props() - s390_set_proceccor_props() They can be used to request or retrieve processor related information from an accelerator. That information comprises the cpu identifier, the ICB value and the facility lists. Signed-off-by: Michael

Re: [Qemu-devel] [RFC PATCH v2 11/15] cpu-model/s390: Add QMP command query-cpu-model

2015-02-18 Thread Michael Mueller
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 17 Feb 2015 11:03:11 -0700 Eric Blake wrote: > On 02/17/2015 07:24 AM, Michael Mueller wrote: > > This patch implements a new QMP request named 'query-cpu-model'. > > It returns the cpu model of cpu 0 an

Re: [Qemu-devel] [RFC PATCH v2 02/15] cpu-model: Introduce option --probe to switch into probe mode

2015-02-18 Thread Michael Mueller
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 17 Feb 2015 12:16:20 -0700 Eric Blake wrote: > On 02/17/2015 07:24 AM, Michael Mueller wrote: > > The option --probe allows to switch into probe mode also for machines > > different from none. If one or more accelerators are

Re: [Qemu-devel] [RFC PATCH v2 12/15] cpu-model/s390: Extend QMP command query-cpu-definitions

2015-02-18 Thread Michael Mueller
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 17 Feb 2015 11:09:34 -0700 Eric Blake wrote: > On 02/17/2015 07:24 AM, Michael Mueller wrote: > > This patch implements the QMP command 'query-cpu-definitions' in the S390 > > context. The command returns a in term

Re: [Qemu-devel] [RFC PATCH v2 04/15] cpu-model/s390: Introduce S390 CPU models

2015-02-20 Thread Michael Mueller
On Fri, 20 Feb 2015 14:54:23 +0100 Alexander Graf wrote: > > > > +/* machine related properties */ > > +typedef struct S390CPUMachineProps { > > +uint16_t class; /* machine class */ > > +uint16_t ga; /* availability number of machine */ > > +uint16_t order; /* orde

Re: [Qemu-devel] [RFC PATCH v2 09/15] cpu-model/s390: Add KVM VM attribute interface routines

2015-02-20 Thread Michael Mueller
On Fri, 20 Feb 2015 14:59:20 +0100 Alexander Graf wrote: > > +typedef struct S390ProcessorProps { > > +uint64_t cpuid; > > +uint16_t ibc; > > +uint8_t pad[6]; > > +uint64_t fac_list[S390_ARCH_FAC_LIST_SIZE_UINT64]; > > +} S390ProcessorProps; > > + > > +typedef struct S390MachineP

Re: [Qemu-devel] [RFC PATCH v2 13/15] cpu-model/s390: Add processor property routines

2015-02-20 Thread Michael Mueller
tion comprises the cpu identifier, the ICB value and the > > facility lists. > > > > Signed-off-by: Michael Mueller > > Hrm, I still seem to miss the point of this interface. What do you need > it for? These functions make the internal s390 cpu model API inde

Re: [Qemu-devel] [RFC PATCH v2 04/15] cpu-model/s390: Introduce S390 CPU models

2015-02-20 Thread Michael Mueller
On Fri, 20 Feb 2015 14:55:32 +0100 Alexander Graf wrote: > > /** > > * S390CPUClass: > > * @parent_realize: The parent class' realize handler. > > @@ -52,6 +69,11 @@ typedef struct S390CPUClass { > > void (*load_normal)(CPUState *cpu); > > void (*cpu_reset)(CPUState *cpu); > >

Re: [Qemu-devel] [RFC PATCH v2 04/15] cpu-model/s390: Introduce S390 CPU models

2015-02-20 Thread Michael Mueller
On Fri, 20 Feb 2015 16:22:20 +0100 Alexander Graf wrote: > >> > >> Just make this uint64_t fac_list[2]. That way we don't have to track any > >> messy allocations. > > > > It will be something like "uint64_t > > fac_list[S390_CPU_FAC_LIST_SIZE_UINT64]" and in total 2KB > > not just 16 bytes

Re: [Qemu-devel] [RFC PATCH v2 13/15] cpu-model/s390: Add processor property routines

2015-02-20 Thread Michael Mueller
On Fri, 20 Feb 2015 16:41:49 +0100 Andreas Färber wrote: > Can't you just implement the class-level name-to-ObjectClass callback > that other CPUs have grown for the above use case? If it fulfills the requirements sure. Please point me to an example, sounds that s390_select_cpu_model() is doing

Re: [Qemu-devel] [RFC PATCH v2 13/15] cpu-model/s390: Add processor property routines

2015-02-20 Thread Michael Mueller
On Fri, 20 Feb 2015 16:41:49 +0100 Andreas Färber wrote: > Also a general comment: cpu-model/ is not an existing directory nor one > you add, so please use "target-s390x: Add foo to S390CPU" or so. I will address this with v3, thanks a lot for the hint, I never saw this as directories though...

Re: [Qemu-devel] [RFC PATCH v2 10/15] cpu-model/s390: Add cpu class initialization routines

2015-02-20 Thread Michael Mueller
On Fri, 20 Feb 2015 08:02:42 -0800 Richard Henderson wrote: > > +/** > > + * s390_test_facility - test if given facility bit is set facility list > > + * of given cpu class > > + * @class: address of cpu class to test > > + * @nr: bit number to test > > + * > > + * Returns: t

Re: [Qemu-devel] [RFC PATCH v2 10/15] cpu-model/s390: Add cpu class initialization routines

2015-02-20 Thread Michael Mueller
On Fri, 20 Feb 2015 17:12:49 +0100 Michael Mueller wrote: > Good spot, it's not being used yet. It's planned to be used with a patch that > implements zPCI > related instructions on QEMU side. Maybe you have seen the discussion from > Frank Blaschka in > this e-mail l

Re: [Qemu-devel] [RFC PATCH v2 10/15] cpu-model/s390: Add cpu class initialization routines

2015-02-20 Thread Michael Mueller
On Fri, 20 Feb 2015 17:34:28 +0100 Andreas Färber wrote: > Please note that QEMU uses gtk-doc style, where the description goes > between arguments and Returns:, and the function name gets a ':'. > There's also fancy syntax like #CPUClass, %true, etc. On my TODOs... Thanks, Michael

Re: [Qemu-devel] [RFC PATCH v2 13/15] cpu-model/s390: Add processor property routines

2015-02-20 Thread Michael Mueller
On Fri, 20 Feb 2015 17:28:14 +0100 Andreas Färber wrote: Andreas, > Sorry for my ignorance, but what is proc actually needed for? For > initializing the class, there's .class_init (and cc->fac_list apparently > is initialized here). If you need to pass info to KVM, you can do so in yes, it is c

Re: [Qemu-devel] [RFC PATCH v2 04/15] cpu-model/s390: Introduce S390 CPU models

2015-02-20 Thread Michael Mueller
On Fri, 20 Feb 2015 17:57:52 +0100 Alexander Graf wrote: > Because all CPUs we have in our list only expose 128 bits? Here a STFLE result on a EC12 GA2, already more than 128 bits... Is that model on the list? [mimu@p57lp59 s390xfac]$ ./s390xfac -b fac[0] = 0xfbfbfcfff840 fac[1] = 0xffde00

Re: [Qemu-devel] [RFC PATCH v2 09/15] cpu-model/s390: Add KVM VM attribute interface routines

2015-02-20 Thread Michael Mueller
On Fri, 20 Feb 2015 17:59:14 +0100 Alexander Graf wrote: > But please give a nutshell explanation on what exactly you're patching > at all here. Please don't ask in riddles... :-) S390ProcessorProps are attributes that represent cpu model related properties of the processor. typedef struct S

Re: [Qemu-devel] [RFC PATCH v2 10/15] cpu-model/s390: Add cpu class initialization routines

2015-02-20 Thread Michael Mueller
On Fri, 20 Feb 2015 10:11:55 -0800 Richard Henderson wrote: > > +static inline uint64_t big_endian_bit(unsigned long nr) > > +{ > > +return 1ul << (BITS_PER_LONG - (nr % BITS_PER_LONG)); > > +}; > > This is buggy. NR=0 should map to 63, not 64. I'm sure I was asked to replace my constant

Re: [Qemu-devel] [RFC PATCH v2 13/15] cpu-model/s390: Add processor property routines

2015-02-20 Thread Michael Mueller
On Fri, 20 Feb 2015 18:00:19 +0100 Alexander Graf wrote: > > So above s390_set/get_processor_props() the code is accelerator > > independent. > > Any particular reason you can't do it like PPC? That seems to be a short question... and when I started one year ago, I oriented myself on the PP

Re: [Qemu-devel] [RFC PATCH v2 04/15] cpu-model/s390: Introduce S390 CPU models

2015-02-20 Thread Michael Mueller
On Fri, 20 Feb 2015 18:50:20 +0100 Alexander Graf wrote: > > > > > Am 20.02.2015 um 18:37 schrieb Michael Mueller : > > > > On Fri, 20 Feb 2015 17:57:52 +0100 > > Alexander Graf wrote: > > > >> Because all CPUs we have in our list only ex

Re: [Qemu-devel] [RFC PATCH v2 10/15] cpu-model/s390: Add cpu class initialization routines

2015-02-20 Thread Michael Mueller
On Fri, 20 Feb 2015 20:21:45 +0100 Alexander Graf wrote: > > > > > Am 20.02.2015 um 19:59 schrieb Michael Mueller : > > > > On Fri, 20 Feb 2015 10:11:55 -0800 > > Richard Henderson wrote: > > > >>> +static inline uint64_t big_endian_b

[Qemu-devel] [PATCH v4 04/15] target-s390x: Introduce cpu models

2015-03-30 Thread Michael Mueller
. Furthermore it extends the existing S390CPUClass by model related properties. Signed-off-by: Michael Mueller Reviewed-by: Thomas Huth --- target-s390x/Makefile.objs | 1 + target-s390x/cpu-models.c | 77 ++ target-s390x/cpu-models.h | 72

[Qemu-devel] [PATCH v4 00/15] s390x cpu model implementation

2015-03-30 Thread Michael Mueller
finitions" dropped in commit message (13/16) - comment for AccelCpuInfo type updated (13/16) - routine s390_facility_test() factored out (15/16) v1-v2: - QEMU-side facility list mask introduced: this allows to enable guest facilities that are handled by instruction interception handler

[Qemu-devel] [PATCH v4 09/15] target-s390x: Add cpu class initialization routines

2015-03-30 Thread Michael Mueller
u_aliases(), adds cu model aliases - s390_cpu_classes_initialized(), test if cpu classes have been initialized - s390_fac_list_mask_by_machine(), returns facility list mask by machine - s390_current_fac_list_mask(), returns facility list mask of current machine Signed-off-by: Michael Mueller -

[Qemu-devel] [PATCH v4 14/15] target-s390x: Introduce facility test routine

2015-03-30 Thread Michael Mueller
The patch introduces routine s390_facility_test() which allows to verify a specific facility bit is set. Signed-off-by: Michael Mueller --- target-s390x/cpu-models.c | 29 + target-s390x/cpu-models.h | 1 + 2 files changed, 30 insertions(+) diff --git a/target

[Qemu-devel] [PATCH v4 08/15] target-s390x: Add KVM VM attribute interface for cpu models

2015-03-30 Thread Michael Mueller
trace point instrumentation. Signed-off-by: Michael Mueller --- target-s390x/cpu-models.h | 34 target-s390x/kvm.c| 79 +++ trace-events | 3 ++ 3 files changed, 116 insertions(+) diff --git a/target-s390x/cpu

[Qemu-devel] [PATCH v4 05/15] target-s390x: Define cpu model specific facility lists

2015-03-30 Thread Michael Mueller
current hosting machine model. The also defined qemu side facility mask allows to implement and enable facilities in QEMU land. Signed-off-by: Michael Mueller --- target-s390x/cpu-models.c | 12 target-s390x/cpu-models.h | 8 target-s390x/cpu.c| 1 + 3 files changed

[Qemu-devel] [PATCH v4 03/15] target-s390x: Generate facility defines per cpu model

2015-03-30 Thread Michael Mueller
qemu/foobuild/s390x-softmmu' CCgen-facilities cc1: error: -I/usr/include/pixman-1: No such file or directory [-Werror] cc1: all warnings being treated as errors make[1]: *** [/gen-facilities] Error 1 make[1]: Leaving directory `/home/mimu/REPO/qemu/foobuild/s390x-softmmu' make: *

[Qemu-devel] [PATCH v4 12/15] Add optional parameters to QMP command query-cpu-definitions

2015-03-30 Thread Michael Mueller
The patch adds optional parameters to the QMP command query-cpu-definitions. Thus the signature of routine arch_query_cpu_definitions needs to be changed for the stub function and all target implementations: target-arm target-i386 target-ppc target-s390 Signed-off-by: Michael Mueller

[Qemu-devel] [PATCH v4 02/15] target-s390x: Introduce cpu facilities

2015-03-30 Thread Michael Mueller
The patch introduces S390 CPU facility bit numbers and names as well as the architectural facility size limit in bytes. Signed-off-by: Michael Mueller --- target-s390x/cpu-facilities.h | 86 +++ 1 file changed, 86 insertions(+) create mode 100644 target

[Qemu-devel] [PATCH v4 11/15] target-s390x: New QMP command query-cpu-model

2015-03-30 Thread Michael Mueller
tion: - s390_cpu_models_used(), returns true if S390 cpu models are in use Signed-off-by: Michael Mueller --- include/sysemu/arch_init.h | 1 + qapi-schema.json | 35 +++ qmp-commands.hx| 6 ++ qmp.c | 5 + stub

[Qemu-devel] [PATCH v4 07/15] target-s390x: Update linux-headers/asm-s390/kvm.h

2015-03-30 Thread Michael Mueller
Signed-off-by: Michael Mueller --- linux-headers/asm-s390/kvm.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/linux-headers/asm-s390/kvm.h b/linux-headers/asm-s390/kvm.h index c5a93eb..bfe6925 100644 --- a/linux-headers/asm-s390/kvm.h +++ b/linux-headers

[Qemu-devel] [PATCH v4 06/15] target-s390x: Add cpu model alias definition routines

2015-03-30 Thread Michael Mueller
This patch implements the infrastructure to dynamically add cpu model aliases. Signed-off-by: Michael Mueller Reviewed-by: Cornelia Huck --- target-s390x/cpu-models.c | 89 +++ target-s390x/cpu-models.h | 11 ++ target-s390x/cpu.c| 1

[Qemu-devel] [PATCH v4 10/15] target-s390x: Prepare accelerator during cpu object realization

2015-03-30 Thread Michael Mueller
This patch implements routine s390_cpu_model_init(). It is called by the realize function during instantiation of an cpu object. Its task is to initialize the current accelerator with the properties of the selected processor model. Signed-off-by: Michael Mueller --- target-s390x/cpu-models.c

[Qemu-devel] [PATCH v4 13/15] target-s390x: Extend QMP command query-cpu-definitions

2015-03-30 Thread Michael Mueller
ot;name":"2827-ga1","runnable":true,"is-default":false}, ... {"name":"2064-ga1","runnable":true,"is-default":false} ] } The request arguments are optional and if omitted only the cpu model na

[Qemu-devel] [PATCH v4 15/15] target-s390x: Enable cpu model usage

2015-03-30 Thread Michael Mueller
This patch enables QEMU to instantiate S390 CPUs with cpu model types. Signed-off-by: Michael Mueller --- hw/s390x/s390-virtio.c | 12 +++- target-s390x/helper.c | 9 ++--- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/hw/s390x/s390-virtio.c b/hw/s390x/s390

[Qemu-devel] [PATCH v4 01/15] Introduce stub routine cpu_desc_avail

2015-03-30 Thread Michael Mueller
evaluating the runtime context instead of putting static cpu model information at display. Signed-off-by: Michael Mueller Reviewed-by: Thomas Huth --- include/qemu-common.h | 2 ++ stubs/Makefile.objs| 1 + stubs/cpu-desc-avail.c | 6 ++ vl.c | 2 +- 4 files changed

Re: [Qemu-devel] [PATCH v4 07/15] target-s390x: Update linux-headers/asm-s390/kvm.h

2015-03-31 Thread Michael Mueller
On Mon, 30 Mar 2015 21:36:22 +0200 Christian Borntraeger wrote: > Am 30.03.2015 um 16:28 schrieb Michael Mueller: > > Signed-off-by: Michael Mueller > > --- > > linux-headers/asm-s390/kvm.h | 18 +- > > 1 file changed, 9 insertions(+), 9 deletion

Re: [Qemu-devel] [PATCH v4 12/15] Add optional parameters to QMP command query-cpu-definitions

2015-03-31 Thread Michael Mueller
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, 30 Mar 2015 14:28:01 -0600 Eric Blake wrote: > On 03/30/2015 08:28 AM, Michael Mueller wrote: > > The patch adds optional parameters to the QMP command query-cpu-definitions. > > Thus the signature of routine arch_query_cpu_de

Re: [Qemu-devel] [PATCH v4 11/15] target-s390x: New QMP command query-cpu-model

2015-03-31 Thread Michael Mueller
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, 30 Mar 2015 14:19:27 -0600 Eric Blake wrote: > On 03/30/2015 08:28 AM, Michael Mueller wrote: > > This patch implements a new QMP request named 'query-cpu-model'. > > It returns the cpu model of cpu 0 an

Re: [Qemu-devel] [PATCH v4 11/15] target-s390x: New QMP command query-cpu-model

2015-03-31 Thread Michael Mueller
On Mon, 30 Mar 2015 16:50:20 -0300 Eduardo Habkost wrote: Hello Eduardo, > On Mon, Mar 30, 2015 at 04:28:24PM +0200, Michael Mueller wrote: > [...] > > diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c > > index 829945d..1698b52 100644 > > --- a/target-s390x/cpu.

Re: [Qemu-devel] [PATCH v4 10/15] target-s390x: Prepare accelerator during cpu object realization

2015-03-31 Thread Michael Mueller
On Mon, 30 Mar 2015 16:33:51 -0300 Eduardo Habkost wrote: > On Mon, Mar 30, 2015 at 04:28:23PM +0200, Michael Mueller wrote: > > This patch implements routine s390_cpu_model_init(). It is called by the > > realize function during instantiation of an cpu object. Its task is to >

Re: [Qemu-devel] [PATCH v4 11/15] target-s390x: New QMP command query-cpu-model

2015-03-31 Thread Michael Mueller
On Mon, 30 Mar 2015 17:17:21 -0300 Eduardo Habkost wrote: > On Mon, Mar 30, 2015 at 04:28:24PM +0200, Michael Mueller wrote: > > This patch implements a new QMP request named 'query-cpu-model'. > > It returns the cpu model of cpu 0 and its backing accelerator. > >

  1   2   3   >