Re: [PATCH v7 13/15] KVM: s390: add gib_alert_irq_handler()

2019-02-05 Thread Michael Mueller
On 05.02.19 12:38, Pierre Morel wrote: On 31/01/2019 09:52, Michael Mueller wrote: The patch implements a handler for GIB alert interruptions on the host. Its task is to alert guests that interrupts are pending for them. A GIB alert interrupt statistic counter is added as well: $ cat /proc

Re: [PATCH v7 15/15] KVM: s390: test for non NULL gisa origin in pending_irqs()

2019-01-31 Thread Michael Mueller
Ignore this patch please, it has the wrong commit message. The following is the right patch: "KVM: s390: fix possible null pointer dereference in pending_irqs()" On 31.01.19 09:52, Michael Mueller wrote: Assure a GISA is in use before accessing the IPM to avoid a NULL

[PATCH v7 02/15] KVM: s390: make bitmap declaration consistent

2019-01-31 Thread Michael Mueller
Use a consistent bitmap declaration throughout the code. Signed-off-by: Michael Mueller Reviewed-by: Cornelia Huck Reviewed-by: Halil Pasic --- arch/s390/include/asm/kvm_host.h | 2 +- arch/s390/kvm/interrupt.c| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch

[PATCH v7 03/15] KVM: s390: move bitmap idle_mask into arch struct top level

2019-01-31 Thread Michael Mueller
The vcpu idle_mask state is used by but not specific to the emulated floating interruptions. The state is relevant to gisa related interruptions as well. Signed-off-by: Michael Mueller Reviewed-by: Pierre Morel Reviewed-by: Cornelia Huck --- arch/s390/include/asm/kvm_host.h | 2 +- arch/s390

[PATCH v7 06/15] KVM: s390: remove kvm_s390_ from gisa static inline functions

2019-01-31 Thread Michael Mueller
This will shorten the length of code lines. All GISA related static inline functions are local to interrupt.c. Signed-off-by: Michael Mueller Reviewed-by: Cornelia Huck Reviewed-by: Pierre Morel Reviewed-by: Halil Pasic --- arch/s390/kvm/interrupt.c | 27 +-- 1 file

[PATCH v7 01/15] KVM: s390: drop obsolete else path

2019-01-31 Thread Michael Mueller
The explicit else path specified in set_intercept_indicators_io is not required as the function returns in case the first branch is taken anyway. Signed-off-by: Michael Mueller Reviewed-by: Cornelia Huck Reviewed-by: Halil Pasic --- arch/s390/kvm/interrupt.c | 2 +- 1 file changed, 1

[PATCH v7 10/15] KVM: s390: add kvm reference to struct sie_page2

2019-01-31 Thread Michael Mueller
Adding the kvm reference to struct sie_page2 will allow to determine the kvm a given gisa belongs to: container_of(gisa, struct sie_page2, gisa)->kvm This functionality will be required to process a gisa in gib alert interruption context. Signed-off-by: Michael Mueller Reviewed-by: Pie

[PATCH v7 08/15] s390/cio: add function chsc_sgib()

2019-01-31 Thread Michael Mueller
-off-by: Michael Mueller Reviewed-by: Sebastian Ott Reviewed-by: Pierre Morel Reviewed-by: Christian Borntraeger Acked-by: Halil Pasic Acked-by: Janosch Frank Acked-by: Cornelia Huck --- arch/s390/include/asm/cio.h | 1 + drivers/s390/cio/chsc.c | 37

[PATCH v7 11/15] KVM: s390: add functions to (un)register GISC with GISA

2019-01-31 Thread Michael Mueller
support. Signed-off-by: Michael Mueller Acked-by: Pierre Morel Acked-by: Halil Pasic --- arch/s390/include/asm/kvm_host.h | 13 + arch/s390/kvm/interrupt.c| 112 +++ 2 files changed, 125 insertions(+) diff --git a/arch/s390/include/asm/kvm_host.h b

[PATCH v7 15/15] KVM: s390: fix possible null pointer dereference in pending_irqs()

2019-01-31 Thread Michael Mueller
Assure a GISA is in use before accessing the IPM to avoid a null pointer dereference issue. Signed-off-by: Michael Mueller Reported-by: Halil Pasic --- arch/s390/kvm/interrupt.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/s390/kvm/interrupt.c b/arch/s390

[PATCH v7 05/15] KVM: s390: use pending_irqs_no_gisa() where appropriate

2019-01-31 Thread Michael Mueller
Interruption types that are not represented in GISA shall use pending_irqs_no_gisa() to test pending interruptions. Signed-off-by: Michael Mueller Reviewed-by: Cornelia Huck Reviewed-by: Pierre Morel Reviewed-by: Halil Pasic --- arch/s390/kvm/interrupt.c | 4 ++-- 1 file changed, 2

[PATCH v7 09/15] KVM: s390: add the GIB and its related life-cyle functions

2019-01-31 Thread Michael Mueller
Interruption Virtualization Facility is available. The GIB initialization and thus the activation of the related code will be done in an upcoming patch of this series. Signed-off-by: Michael Mueller Reviewed-by: Janosch Frank Reviewed-by: Christian Borntraeger Reviewed-by: Cornelia Huck

[PATCH v7 04/15] KVM: s390: coding style kvm_s390_gisa_init/clear()

2019-01-31 Thread Michael Mueller
The change helps to reduce line length and increases code readability. Signed-off-by: Michael Mueller Reviewed-by: Cornelia Huck Reviewed-by: Pierre Morel Reviewed-by: Halil Pasic --- arch/s390/kvm/interrupt.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff

[PATCH v7 00/15] KVM: s390: make use of the GIB

2019-01-31 Thread Michael Mueller
ored. All other patches are unchanged. Michael Mueller (15): KVM: s390: drop obsolete else path KVM: s390: make bitmap declaration consistent KVM: s390: move bitmap idle_mask into arch struct top level KVM: s390: coding style kvm_s390_gisa_init/clear() KVM: s390: use pending_irqs_no_gisa()

[PATCH v7 14/15] KVM: s390: start using the GIB

2019-01-31 Thread Michael Mueller
By initializing the GIB, it will be used by the kvm host. Signed-off-by: Michael Mueller Reviewed-by: Pierre Morel Reviewed-by: Halil Pasic --- arch/s390/kvm/kvm-s390.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index

[PATCH v7 13/15] KVM: s390: add gib_alert_irq_handler()

2019-01-31 Thread Michael Mueller
... Signed-off-by: Michael Mueller Acked-by: Halil Pasic --- arch/s390/include/asm/irq.h | 1 + arch/s390/include/asm/isc.h | 1 + arch/s390/include/asm/kvm_host.h | 3 + arch/s390/kernel/irq.c | 1 + arch/s390/kvm/interrupt.c| 169

[PATCH v7 12/15] KVM: s390: kvm_s390_gisa_clear() now clears the IPM only

2019-01-31 Thread Michael Mueller
Function kvm_s390_gisa_clear() now clears the Interruption Pending Mask of the GISA asap. If the GISA is in the alert list at this time it stays in the list but is removed by process_gib_alert_list(). Signed-off-by: Michael Mueller --- arch/s390/kvm/interrupt.c | 25 ++--- 1

[PATCH v7 07/15] KVM: s390: introduce struct kvm_s390_gisa_interrupt

2019-01-31 Thread Michael Mueller
Use this struct analog to the kvm interruption structs for kvm emulated floating and local interruptions. GIB handling will add further fields to this structure as required. Signed-off-by: Michael Mueller Reviewed-by: Cornelia Huck Reviewed-by: Halil Pasic --- arch/s390/include/asm

[PATCH v7 15/15] KVM: s390: test for non NULL gisa origin in pending_irqs()

2019-01-31 Thread Michael Mueller
Assure a GISA is in use before accessing the IPM to avoid a NULL pointer de-referencing issue. Reported-by: Halil Pasic Signed-off-by: Michael Mueller --- arch/s390/kvm/interrupt.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/s390/kvm/interrupt.c b/arch

Re: [PATCH v6 12/13] KVM: s390: add gib_alert_irq_handler()

2019-01-30 Thread Michael Mueller
On 30.01.19 17:24, Pierre Morel wrote: On 29/01/2019 16:29, Michael Mueller wrote: On 29.01.19 14:26, Halil Pasic wrote: On Thu, 24 Jan 2019 13:59:38 +0100 Michael Mueller wrote: The patch implements a handler for GIB alert interruptions on the host. Its task is to alert guests

Re: [PATCH v6 07/13] KVM: s390: introduce struct kvm_s390_gisa_interrupt

2019-01-29 Thread Michael Mueller
On 29.01.19 14:22, Cornelia Huck wrote: On Mon, 28 Jan 2019 17:50:54 +0100 Halil Pasic wrote: On Thu, 24 Jan 2019 13:59:33 +0100 Michael Mueller wrote: Use this struct analog to the kvm interruption structs for kvm emulated floating and local interruptions. Further fields will be added

Re: [PATCH v6 12/13] KVM: s390: add gib_alert_irq_handler()

2019-01-29 Thread Michael Mueller
On 29.01.19 14:26, Halil Pasic wrote: On Thu, 24 Jan 2019 13:59:38 +0100 Michael Mueller wrote: The patch implements a handler for GIB alert interruptions on the host. Its task is to alert guests that interrupts are pending for them. A GIB alert interrupt statistic counter is added

Re: [PATCH v6 11/13] KVM: s390: add functions to (un)register GISC with GISA

2019-01-29 Thread Michael Mueller
On 29.01.19 14:09, Cornelia Huck wrote: On Thu, 24 Jan 2019 13:59:37 +0100 Michael Mueller wrote: Add the Interruption Alert Mask (IAM) to the architecture specific kvm struct. This mask in the GISA is used to define for which ISC a GIB alert will be issued. The functions

Re: [PATCH v6 11/13] KVM: s390: add functions to (un)register GISC with GISA

2019-01-28 Thread Michael Mueller
On 28.01.19 16:45, Pierre Morel wrote: On 24/01/2019 13:59, Michael Mueller wrote: Add the Interruption Alert Mask (IAM) to the architecture specific kvm struct. This mask in the GISA is used to define for which ISC a GIB alert will be issued. The functions kvm_s390_gisc_register

Re: [PATCH v6 07/13] KVM: s390: introduce struct kvm_s390_gisa_interrupt

2019-01-24 Thread Michael Mueller
On 24.01.19 16:06, Cornelia Huck wrote: On Thu, 24 Jan 2019 13:59:33 +0100 Michael Mueller wrote: Use this struct analog to the kvm interruption structs for kvm emulated floating and local interruptions. I guess that makes sense. Further fields will be added with this series

[PATCH v6 03/13] KVM: s390: move bitmap idle_mask into arch struct top level

2019-01-24 Thread Michael Mueller
The vcpu idle_mask state is used by but not specific to the emulated floating interruptions. The state is relevant to gisa related interruptions as well. Signed-off-by: Michael Mueller --- arch/s390/include/asm/kvm_host.h | 2 +- arch/s390/kvm/interrupt.c| 11 +-- arch/s390/kvm

[PATCH v6 05/13] KVM: s390: use pending_irqs_no_gisa() where appropriate

2019-01-24 Thread Michael Mueller
Interruption types that are not represented in GISA shall use pending_irqs_no_gisa() to test pending interruptions. Signed-off-by: Michael Mueller Reviewed-by: Cornelia Huck Reviewed-by: Pierre Morel --- arch/s390/kvm/interrupt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH v6 04/13] KVM: s390: coding style kvm_s390_gisa_init/clear()

2019-01-24 Thread Michael Mueller
The change helps to reduce line length and increases code readability. Signed-off-by: Michael Mueller Reviewed-by: Cornelia Huck Reviewed-by: Pierre Morel --- arch/s390/kvm/interrupt.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/s390/kvm

[PATCH v6 07/13] KVM: s390: introduce struct kvm_s390_gisa_interrupt

2019-01-24 Thread Michael Mueller
Use this struct analog to the kvm interruption structs for kvm emulated floating and local interruptions. Further fields will be added with this series as required. Signed-off-by: Michael Mueller --- arch/s390/include/asm/kvm_host.h | 6 - arch/s390/kvm/interrupt.c| 52

[PATCH v6 09/13] KVM: s390: add the GIB and its related life-cyle functions

2019-01-24 Thread Michael Mueller
Interruption Virtualization Facility is available. The GIB initialization and thus the activation of the related code will be done in an upcoming patch of this series. Signed-off-by: Michael Mueller Reviewed-by: Janosch Frank Reviewed-by: Christian Borntraeger Reviewed-by: Cornelia Huck

[PATCH v6 08/13] s390/cio: add function chsc_sgib()

2019-01-24 Thread Michael Mueller
-off-by: Michael Mueller Reviewed-by: Sebastian Ott Reviewed-by: Pierre Morel Reviewed-by: Christian Borntraeger Acked-by: Halil Pasic Acked-by: Janosch Frank Acked-by: Cornelia Huck --- arch/s390/include/asm/cio.h | 1 + drivers/s390/cio/chsc.c | 37

[PATCH v6 10/13] KVM: s390: add kvm reference to struct sie_page2

2019-01-24 Thread Michael Mueller
Adding the kvm reference to struct sie_page2 will allow to determine the kvm a given gisa belongs to: container_of(gisa, struct sie_page2, gisa)->kvm This functionality will be required to process a gisa in gib alert interruption context. Signed-off-by: Michael Mueller Reviewed-by: Pie

[PATCH v6 01/13] KVM: s390: drop obsolete else path

2019-01-24 Thread Michael Mueller
The explicit else path specified in set_intercept_indicators_io is not required as the function returns in case the first branch is taken anyway. Signed-off-by: Michael Mueller --- arch/s390/kvm/interrupt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/kvm

[PATCH v6 11/13] KVM: s390: add functions to (un)register GISC with GISA

2019-01-24 Thread Michael Mueller
support. Signed-off-by: Michael Mueller --- arch/s390/include/asm/kvm_host.h | 13 + arch/s390/kvm/interrupt.c| 117 +++ 2 files changed, 130 insertions(+) diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h index

[PATCH v6 13/13] KVM: s390: start using the GIB

2019-01-24 Thread Michael Mueller
By initializing the GIB, it will be used by the kvm host. Signed-off-by: Michael Mueller Reviewed-by: Pierre Morel --- arch/s390/kvm/kvm-s390.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 0e6ba4d17207..dcf6d62b4e80 100644

[PATCH v6 00/13] KVM: s390: make use of the GIB

2019-01-24 Thread Michael Mueller
kvm_arch_init() now the return code of kvm_s390_gib_init() is honored. All other patches are unchanged. Michael Mueller (13): KVM: s390: drop obsolete else path KVM: s390: make bitmap declaration consitent KVM: s390: move bitmap idle_mask into arch struct top level KVM: s390: coding style kvm

[PATCH v6 02/13] KVM: s390: make bitmap declaration consitent

2019-01-24 Thread Michael Mueller
Use a consistent bitmap declaration throughout the code. Signed-off-by: Michael Mueller --- arch/s390/include/asm/kvm_host.h | 2 +- arch/s390/kvm/interrupt.c| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm

[PATCH v6 12/13] KVM: s390: add gib_alert_irq_handler()

2019-01-24 Thread Michael Mueller
... Signed-off-by: Michael Mueller --- arch/s390/include/asm/irq.h | 1 + arch/s390/include/asm/isc.h | 1 + arch/s390/include/asm/kvm_host.h | 3 + arch/s390/kernel/irq.c | 1 + arch/s390/kvm/interrupt.c| 186 +-- arch/s390

[PATCH v6 06/13] KVM: s390: remove kvm_s390_ from gisa static inline functions

2019-01-24 Thread Michael Mueller
This will shorten the length of code lines. All GISA related static inline functions are local to interrupt.c. Signed-off-by: Michael Mueller --- arch/s390/kvm/interrupt.c | 27 +-- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/arch/s390/kvm/interrupt.c

Re: [PATCH v5 13/15] KVM: s390: add function process_gib_alert_list()

2019-01-08 Thread Michael Mueller
On 08.01.19 13:59, Halil Pasic wrote: On Wed, 19 Dec 2018 20:17:54 +0100 Michael Mueller wrote: This function processes the Gib Alert List (GAL). It is required to run when either a gib alert interruption has been received or a gisa that is in the alert list is cleared or dropped. The GAL

Re: [PATCH v5 10/15] KVM: s390: add functions to (un)register GISC with GISA

2019-01-08 Thread Michael Mueller
On 08.01.19 11:34, Cornelia Huck wrote: On Mon, 7 Jan 2019 18:38:02 +0100 Michael Mueller wrote: On 04.01.19 14:19, Cornelia Huck wrote: On Wed, 2 Jan 2019 18:29:00 +0100 Pierre Morel wrote: On 19/12/2018 20:17, Michael Mueller wrote: Add the IAM (Interruption Alert Mask

Re: [PATCH v5 14/15] KVM: s390: add and wire function gib_alert_irq_handler()

2019-01-08 Thread Michael Mueller
On 03.01.19 16:16, Pierre Morel wrote: On 19/12/2018 20:17, Michael Mueller wrote: The patch implements a handler for GIB alert interruptions on the host. Its task is to alert guests that interrupts are pending for them. A GIB alert interrupt statistic counter is added as well: $ cat /proc

Re: [PATCH v5 15/15] KVM: s390: start using the GIB

2019-01-08 Thread Michael Mueller
On 02.01.19 18:45, Pierre Morel wrote: On 19/12/2018 20:17, Michael Mueller wrote: By initializing the GIB, it will be used by the kvm host. Signed-off-by: Michael Mueller ---   arch/s390/kvm/kvm-s390.c | 8 +++-   1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/s390

Re: [PATCH v5 11/15] KVM: s390: restore IAM in get_ipm() when IPM is clean

2019-01-08 Thread Michael Mueller
On 07.01.19 00:32, Halil Pasic wrote: On Wed, 19 Dec 2018 20:17:52 +0100 Michael Mueller wrote: The patch adds the parameter irq_flags and allows to restore the Interruption Alert Mask (IAM) in the GISA atomically while guaranteeing the IPM is clean. The function returns the IPM

Re: [PATCH v5 13/15] KVM: s390: add function process_gib_alert_list()

2019-01-07 Thread Michael Mueller
On 03.01.19 15:43, Pierre Morel wrote: On 19/12/2018 20:17, Michael Mueller wrote: This function processes the Gib Alert List (GAL). It is required to run when either a gib alert interruption has been received or a gisa that is in the alert list is cleared or dropped. The GAL is build up

Re: [PATCH v5 13/15] KVM: s390: add function process_gib_alert_list()

2019-01-07 Thread Michael Mueller
On 03.01.19 15:43, Pierre Morel wrote: On 19/12/2018 20:17, Michael Mueller wrote: This function processes the Gib Alert List (GAL). It is required to run when either a gib alert interruption has been received or a gisa that is in the alert list is cleared or dropped. The GAL is build up

Re: [PATCH v5 11/15] KVM: s390: restore IAM in get_ipm() when IPM is clean

2019-01-07 Thread Michael Mueller
On 03.01.19 16:06, Pierre Morel wrote: On 19/12/2018 20:17, Michael Mueller wrote: The patch adds the parameter irq_flags and allows to restore the Interruption Alert Mask (IAM) in the GISA atomically while guaranteeing the IPM is clean. The function returns the IPM of the GISA

Re: [PATCH v5 12/15] KVM: s390: do not restore IAM immediately before SIE entry

2019-01-07 Thread Michael Mueller
On 03.01.19 16:00, Pierre Morel wrote: On 19/12/2018 20:17, Michael Mueller wrote: The IAM shall no be restored when deliverable interruptions are delivered to vcpus by means of the PSW swap mechanism. That would trigger the GIB alert millicode although we know that SIE will be able

Re: [PATCH v5 10/15] KVM: s390: add functions to (un)register GISC with GISA

2019-01-07 Thread Michael Mueller
On 04.01.19 14:19, Cornelia Huck wrote: On Wed, 2 Jan 2019 18:29:00 +0100 Pierre Morel wrote: On 19/12/2018 20:17, Michael Mueller wrote: Add the IAM (Interruption Alert Mask) to the architecture specific kvm struct. This mask in the GISA is used to define for which ISC a GIB alert can

Re: [PATCH v5 08/15] KVM: s390: add the GIB and its related life-cyle functions

2019-01-07 Thread Michael Mueller
On 03.01.19 10:49, Pierre Morel wrote: On 19/12/2018 20:17, Michael Mueller wrote: The Guest Information Block (GIB) links the GISA of all guests that have adapter interrupts pending. These interrupts cannot be delivered because no vcpu of these guests is currently running in SIE context

Re: [PATCH v5 02/15] KVM: s390: coding style issue kvm_s390_gisa_init/clear()

2019-01-07 Thread Michael Mueller
On 02.01.19 17:50, Pierre Morel wrote: On 19/12/2018 20:17, Michael Mueller wrote: The change hepls to reduce line length and icreases code readability. Signed-off-by: Michael Mueller ---   arch/s390/kvm/interrupt.c | 20 ++--   1 file changed, 10 insertions(+), 10 deletions

Re: [PATCH v5 05/15] KVM: s390: unify pending_irqs() and pending_irqs_no_gisa()

2018-12-20 Thread Michael Mueller
On 20.12.18 16:43, pierre morel wrote: Le 12/20/18 à 13:33, Michael Mueller a écrit : On 20.12.18 13:21, Cornelia Huck wrote: On Thu, 20 Dec 2018 12:49:56 +0100 Michael Mueller wrote: On 20.12.18 12:06, Cornelia Huck wrote: On Wed, 19 Dec 2018 20:17:46 +0100 Michael Mueller wrote

Re: [PATCH v5 06/15] KVM: s390: remove prefix kvm_s390_gisa_ from static inline functions

2018-12-20 Thread Michael Mueller
On 20.12.18 13:24, Cornelia Huck wrote: On Wed, 19 Dec 2018 20:17:47 +0100 Michael Mueller wrote: This will shorten the length of code lines. All GISA related static inline functions are local to interrupt.c Signed-off-by: Michael Mueller --- arch/s390/kvm/interrupt.c | 26

Re: [PATCH v5 10/15] KVM: s390: add functions to (un)register GISC with GISA

2018-12-20 Thread Michael Mueller
On 19.12.18 20:17, Michael Mueller wrote: Add the IAM (Interruption Alert Mask) to the architecture specific kvm struct. This mask in the GISA is used to define for which ISC a GIB alert can be issued. The functions kvm_s390_gisc_register() and kvm_s390_gisc_unregister() are used to (un

Re: [PATCH v5 05/15] KVM: s390: unify pending_irqs() and pending_irqs_no_gisa()

2018-12-20 Thread Michael Mueller
On 20.12.18 13:21, Cornelia Huck wrote: On Thu, 20 Dec 2018 12:49:56 +0100 Michael Mueller wrote: On 20.12.18 12:06, Cornelia Huck wrote: On Wed, 19 Dec 2018 20:17:46 +0100 Michael Mueller wrote: Use a single function with parameter irq_flags to differentiate between cases. New irq

Re: [PATCH v5 05/15] KVM: s390: unify pending_irqs() and pending_irqs_no_gisa()

2018-12-20 Thread Michael Mueller
On 20.12.18 12:06, Cornelia Huck wrote: On Wed, 19 Dec 2018 20:17:46 +0100 Michael Mueller wrote: Use a single function with parameter irq_flags to differentiate between cases. New irq flag: IRQ_FLAG_LOCAL: include vcpu local interruptions pending IRQ_FLAG_FLOATING: include vcpu

Re: [PATCH v5 05/15] KVM: s390: unify pending_irqs() and pending_irqs_no_gisa()

2018-12-20 Thread Michael Mueller
On 19.12.18 20:17, Michael Mueller wrote: -static inline unsigned long pending_irqs(struct kvm_vcpu *vcpu) -{ - return pending_irqs_no_gisa(vcpu) | - kvm_s390_gisa_get_ipm(vcpu->kvm->arch.gisa) << IRQ_PEND_IO_ISC_7; + if (irq_flags &

Re: [PATCH v5 01/15] KVM: s390: unregister debug feature on failing arch init

2018-12-19 Thread Michael Mueller
On 19.12.18 21:10, Cornelia Huck wrote: On Wed, 19 Dec 2018 20:17:42 +0100 Michael Mueller wrote: Make sure the debug feature and its allocated resources get released upon unsuccessful architecture initialization. A related indication of the issue will be reported as kernel message

[PATCH v5 03/15] KVM: s390: factor out nullify_gisa()

2018-12-19 Thread Michael Mueller
This function will be used by the GISA init and the GISA clear operation. Thus it gets factored out here. Signed-off-by: Michael Mueller Reviewed-by: Pierre Morel Reviewed-by: Janosch Frank Reviewed-by: Cornelia Huck Reviewed-by: David Hildenbrand --- arch/s390/kvm/interrupt.c | 11

[PATCH v5 05/15] KVM: s390: unify pending_irqs() and pending_irqs_no_gisa()

2018-12-19 Thread Michael Mueller
: IRQ_MASK_ALL: include all types IRQ_MASK_NO_GISA: include all types but GISA Examples: pending_irqs(vcpu, IRQ_MASK_ALL) pending_irqs(vcpu, IRQ_MASK_NO_GISA) There will be more irq flags with upcoming patches. Signed-off-by: Michael Mueller --- arch/s390/kvm/interrupt.c | 33

[PATCH v5 04/15] KVM: s390: use pending_irqs_no_gisa() where appropriate

2018-12-19 Thread Michael Mueller
Interruption types that are not represented in GISA shall use pending_irqs_no_gisa() to test pending interruptions. Signed-off-by: Michael Mueller --- arch/s390/kvm/interrupt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm

[PATCH v5 08/15] KVM: s390: add the GIB and its related life-cyle functions

2018-12-19 Thread Michael Mueller
of the related code will be done in an upcoming patch of this series. Signed-off-by: Michael Mueller Reviewed-by: Janosch Frank Reviewed-by: Christian Borntraeger --- arch/s390/include/asm/kvm_host.h | 10 + arch/s390/kvm/interrupt.c| 44 arch

[PATCH v5 09/15] KVM: s390: add kvm reference to struct sie_page2

2018-12-19 Thread Michael Mueller
Adding the kvm reference to struct sie_page2 will allow to determine the kvm a given gisa belongs to: container_of(gisa, struct sie_page2, gisa)->kvm This functionality will be required to process a gisa in gib alert interruption context. Signed-off-by: Michael Mueller Reviewed-by: Pie

[PATCH v5 07/15] s390/cio: add function chsc_sgib()

2018-12-19 Thread Michael Mueller
-off-by: Michael Mueller Reviewed-by: Sebastian Ott Reviewed-by: Pierre Morel Reviewed-by: Christian Borntraeger Acked-by: Halil Pasic Acked-by: Janosch Frank Acked-by: Cornelia Huck --- arch/s390/include/asm/cio.h | 1 + drivers/s390/cio/chsc.c | 37

[PATCH v5 13/15] KVM: s390: add function process_gib_alert_list()

2018-12-19 Thread Michael Mueller
) and an interruption of that class is observed. Signed-off-by: Michael Mueller --- arch/s390/kvm/interrupt.c | 140 ++ 1 file changed, 140 insertions(+) diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index 48a93f5e5333..03e7ba4f215a

[PATCH v5 12/15] KVM: s390: do not restore IAM immediately before SIE entry

2018-12-19 Thread Michael Mueller
The IAM shall no be restored when deliverable interruptions are delivered to vcpus by means of the PSW swap mechanism. That would trigger the GIB alert millicode although we know that SIE will be able to handle the pending interruption on entry. Signed-off-by: Michael Mueller --- arch/s390/kvm

[PATCH v5 15/15] KVM: s390: start using the GIB

2018-12-19 Thread Michael Mueller
By initializing the GIB, it will be used by the kvm host. Signed-off-by: Michael Mueller --- arch/s390/kvm/kvm-s390.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 2d10e175862c..777c8a87d81c 100644 --- a/arch

[PATCH v5 11/15] KVM: s390: restore IAM in get_ipm() when IPM is clean

2018-12-19 Thread Michael Mueller
: IRQ_FLAG_IAM: When set, the IAM is restored if no ISC bit is set in the IPM, i.e. no new airqs are pending. The test and restore operations are done atomically. Signed-off-by: Michael Mueller --- arch/s390/kvm/interrupt.c | 34

[PATCH v5 14/15] KVM: s390: add and wire function gib_alert_irq_handler()

2018-12-19 Thread Michael Mueller
... Signed-off-by: Michael Mueller --- arch/s390/include/asm/irq.h | 1 + arch/s390/include/asm/isc.h | 1 + arch/s390/kernel/irq.c | 1 + arch/s390/kvm/interrupt.c | 36 ++-- 4 files changed, 37 insertions(+), 2 deletions(-) diff --git a/arch/s390

[PATCH v5 10/15] KVM: s390: add functions to (un)register GISC with GISA

2018-12-19 Thread Michael Mueller
support. Signed-off-by: Michael Mueller --- arch/s390/include/asm/kvm_host.h | 9 ++ arch/s390/kvm/interrupt.c| 66 2 files changed, 75 insertions(+) diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h index

[PATCH v5 06/15] KVM: s390: remove prefix kvm_s390_gisa_ from static inline functions

2018-12-19 Thread Michael Mueller
This will shorten the length of code lines. All GISA related static inline functions are local to interrupt.c Signed-off-by: Michael Mueller --- arch/s390/kvm/interrupt.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/s390/kvm/interrupt.c b

[PATCH v5 02/15] KVM: s390: coding style issue kvm_s390_gisa_init/clear()

2018-12-19 Thread Michael Mueller
The change hepls to reduce line length and icreases code readability. Signed-off-by: Michael Mueller --- arch/s390/kvm/interrupt.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index fcb55b02990e

[PATCH v5 01/15] KVM: s390: unregister debug feature on failing arch init

2018-12-19 Thread Michael Mueller
Make sure the debug feature and its allocated resources get released upon unsuccessful architecture initialization. A related indication of the issue will be reported as kernel message. Signed-off-by: Michael Mueller Reviewed-by: Cornelia Huck Reviewed-by: Pierre Morel Reviewed-by: David

[PATCH v5 00/15] KVM: s390: make use of the GIB

2018-12-19 Thread Michael Mueller
only if the GISA is not in alert list patch 12/12: during kvm_arch_init() now the return code of kvm_s390_gib_init() is honored. All other patches are unchanged. Michael Mueller (15): KVM: s390: unregister debug feature on failing arch init KVM: s390: coding style issue

Re: [Qemu-devel] [PATCH v5 11/17] target-s390x: Add KVM VM attribute interface for S390 CPU models

2015-04-27 Thread Michael Mueller
On Mon, 27 Apr 2015 14:19:13 +0200 Cornelia Huck wrote: > > > >> Would it make sense to do the cast here > > > > > > > > cpu_model_get/set() is used to handle both attributes, > > > > KVM_S390_VM_CPU_MACHINE and KVM_S390_VM_CPU_PROCESSOR. > > > > Both require a different type in the

Re: [Qemu-devel] [PATCH v5 11/17] target-s390x: Add KVM VM attribute interface for S390 CPU models

2015-04-27 Thread Michael Mueller
On Mon, 27 Apr 2015 12:52:54 +0200 Christian Borntraeger wrote: > Am 27.04.2015 um 11:43 schrieb Michael Mueller: > > On Mon, 27 Apr 2015 10:15:47 +0200 > > Christian Borntraeger wrote: > > > >> Am 13.04.2015 um 15:56 schrieb Michael Mueller: > >> [...] &

Re: [Qemu-devel] [PATCH v5 06/17] target-s390x: Introduce S390 CPU facilities

2015-04-27 Thread Michael Mueller
On Mon, 27 Apr 2015 12:14:19 +0200 Christian Borntraeger wrote: > +/* z/VM-specific, see: SC24-6179-05 page 953) */ > +FAC_STHYI = 74, picked -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to

Re: [Qemu-devel] [PATCH v5 15/17] target-s390x: Extend arch specific QMP command query-cpu-definitions

2015-04-27 Thread Michael Mueller
On Mon, 27 Apr 2015 10:11:29 +0200 Christian Borntraeger wrote: > > This patch implements the QMP command 'query-cpu-definitions' in the S390 > > context. The command returns a list of cpu definitions in the current host > > context. A runnable and migratable cpu model has the related attributes

Re: [Qemu-devel] [PATCH v5 11/17] target-s390x: Add KVM VM attribute interface for S390 CPU models

2015-04-27 Thread Michael Mueller
On Mon, 27 Apr 2015 10:15:47 +0200 Christian Borntraeger wrote: > Am 13.04.2015 um 15:56 schrieb Michael Mueller: > [...] > > +static int cpu_model_get(KVMState *s, uint64_t attr, uint64_t addr) > > +{ > > +int rc = -ENOSYS; > > +struct kvm_device_attr de

Re: [Qemu-devel] [PATCH v5 09/17] target-s390x: Define S390 CPU model specific facility lists

2015-04-27 Thread Michael Mueller
On Mon, 27 Apr 2015 10:11:40 +0200 Christian Borntraeger wrote: > Am 13.04.2015 um 15:56 schrieb Michael Mueller: > > --- a/target-s390x/cpu-models.c > > +++ b/target-s390x/cpu-models.c > > > @@ -76,3 +87,4 @@ S390_PROC_DEF("2827-ga1", CPU_S390_2827_G

Re: [Qemu-devel] [PATCH v5 06/17] target-s390x: Introduce S390 CPU facilities

2015-04-27 Thread Michael Mueller
On Mon, 27 Apr 2015 10:11:37 +0200 Christian Borntraeger wrote: > Am 13.04.2015 um 15:56 schrieb Michael Mueller: > [...] > > +FAC_TRANSACTIONAL_EXE = 73, > > +/* > > + * The store-hypervisor-information facility #74 is > > +

Re: [Qemu-devel] [PATCH v5 15/17] target-s390x: Extend arch specific QMP command query-cpu-definitions

2015-04-27 Thread Michael Mueller
On Mon, 27 Apr 2015 10:11:29 +0200 Christian Borntraeger borntrae...@de.ibm.com wrote: This patch implements the QMP command 'query-cpu-definitions' in the S390 context. The command returns a list of cpu definitions in the current host context. A runnable and migratable cpu model has the

Re: [Qemu-devel] [PATCH v5 11/17] target-s390x: Add KVM VM attribute interface for S390 CPU models

2015-04-27 Thread Michael Mueller
On Mon, 27 Apr 2015 12:52:54 +0200 Christian Borntraeger borntrae...@de.ibm.com wrote: Am 27.04.2015 um 11:43 schrieb Michael Mueller: On Mon, 27 Apr 2015 10:15:47 +0200 Christian Borntraeger borntrae...@de.ibm.com wrote: Am 13.04.2015 um 15:56 schrieb Michael Mueller: [...] +static

Re: [Qemu-devel] [PATCH v5 06/17] target-s390x: Introduce S390 CPU facilities

2015-04-27 Thread Michael Mueller
On Mon, 27 Apr 2015 10:11:37 +0200 Christian Borntraeger borntrae...@de.ibm.com wrote: Am 13.04.2015 um 15:56 schrieb Michael Mueller: [...] +FAC_TRANSACTIONAL_EXE = 73, +/* + * The store-hypervisor-information facility #74 is + * z/VM related and when

Re: [Qemu-devel] [PATCH v5 06/17] target-s390x: Introduce S390 CPU facilities

2015-04-27 Thread Michael Mueller
On Mon, 27 Apr 2015 12:14:19 +0200 Christian Borntraeger borntrae...@de.ibm.com wrote: +/* z/VM-specific, see: SC24-6179-05 page 953) */ +FAC_STHYI = 74, picked -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a

Re: [Qemu-devel] [PATCH v5 11/17] target-s390x: Add KVM VM attribute interface for S390 CPU models

2015-04-27 Thread Michael Mueller
On Mon, 27 Apr 2015 10:15:47 +0200 Christian Borntraeger borntrae...@de.ibm.com wrote: Am 13.04.2015 um 15:56 schrieb Michael Mueller: [...] +static int cpu_model_get(KVMState *s, uint64_t attr, uint64_t addr) +{ +int rc = -ENOSYS; +struct kvm_device_attr dev_attr

Re: [Qemu-devel] [PATCH v5 09/17] target-s390x: Define S390 CPU model specific facility lists

2015-04-27 Thread Michael Mueller
On Mon, 27 Apr 2015 10:11:40 +0200 Christian Borntraeger borntrae...@de.ibm.com wrote: Am 13.04.2015 um 15:56 schrieb Michael Mueller: --- a/target-s390x/cpu-models.c +++ b/target-s390x/cpu-models.c @@ -76,3 +87,4 @@ S390_PROC_DEF(2827-ga1, CPU_S390_2827_GA1, IBM zEnterprise EC12 GA1

Re: [Qemu-devel] [PATCH v5 11/17] target-s390x: Add KVM VM attribute interface for S390 CPU models

2015-04-27 Thread Michael Mueller
On Mon, 27 Apr 2015 14:19:13 +0200 Cornelia Huck cornelia.h...@de.ibm.com wrote: Would it make sense to do the cast here cpu_model_get/set() is used to handle both attributes, KVM_S390_VM_CPU_MACHINE and KVM_S390_VM_CPU_PROCESSOR. Both require a different type in the

[PATCH v5 08/17] target-s390x: Introduce S390 CPU models

2015-04-13 Thread Michael Mueller
. Furthermore it extends S390CPUClass by model related properties. Signed-off-by: Michael Mueller --- target-s390x/Makefile.objs | 1 + target-s390x/cpu-models.c | 78 ++ target-s390x/cpu-models.h | 72

[PATCH v5 02/17] Add accelerator id and model name to CPUState

2015-04-13 Thread Michael Mueller
The patch defines ids per accelerator and adds the accel_id and the model_name to the CPUState. The accel_id is initialized by common code, the model name needs to be initialized by target specific code. Signed-off-by: Michael Mueller --- include/qom/cpu.h | 5 + qapi-schema.json | 9

[PATCH v5 06/17] target-s390x: Introduce S390 CPU facilities

2015-04-13 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

[PATCH v5 15/17] target-s390x: Extend arch specific QMP command query-cpu-definitions

2015-04-13 Thread Michael Mueller
... { "name": "none", "runnable": true } ] } The request arguments are optional and if omitted lead to different answers. Eventually only the CPU model none gets returned as runnable and as default ... { "nam

[PATCH v5 09/17] target-s390x: Define S390 CPU model specific facility lists

2015-04-13 Thread Michael Mueller
of the 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

[PATCH v5 00/17] s390x cpu model implementation

2015-04-13 Thread Michael Mueller
nitions" 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 handle

[PATCH v5 16/17] target-s390x: Introduce S390 CPU facility test routine

2015-04-13 Thread Michael Mueller
The patch introduces routine s390_facility_test() which allows to verify if 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

[PATCH v5 10/17] target-s390x: Add S390 CPU model alias definition routines

2015-04-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 | 82 +++ target-s390x/cpu-models.h | 13 target-s390x/cpu.c| 1

[PATCH v5 11/17] target-s390x: Add KVM VM attribute interface for S390 CPU models

2015-04-13 Thread Michael Mueller
trace point instrumentation. Signed-off-by: Michael Mueller --- target-s390x/cpu-models.h | 36 - target-s390x/kvm.c| 79 +++ trace-events | 3 ++ 3 files changed, 117 insertions(+), 1 deletion(-) diff --git

[PATCH v5 07/17] target-s390x: Generate facility defines per S390 CPU model

2015-04-13 Thread Michael Mueller
T_CPU_S390_SIZE_UINT64 %PRIu32 FAC_LIST_CPU_S390_MASK_QEMU 0x%016PRIx64,0x%016PRIx64,... FAC_LIST_CPU_S390__GA 0x%016PRIx64,0x%016PRIx64,... Signed-off-by: Michael Mueller --- Makefile.target | 2 +- rules.mak | 1 + target-s390x/Makefile.objs| 20 ++ targe

[PATCH v5 05/17] Add optional parameters to QMP command query-cpu-definitions

2015-04-13 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

[PATCH v5 17/17] target-s390x: Enable S390 CPU model usage

2015-04-13 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

  1   2   3   4   >