All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] kvm/s390 patches for 3.6
@ 2012-06-11 14:06 Cornelia Huck
  2012-06-11 14:06 ` [PATCH 1/3] s390/kvm: Set CPU in stopped state on initial cpu reset Cornelia Huck
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Cornelia Huck @ 2012-06-11 14:06 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti
  Cc: Christian Borntraeger, Carsten Otte, Alexander Graf,
	Heiko Carstens, Martin Schwidefsky, KVM, linux-s390

Avi, Marcelo,

here are some s390 patches for the next release. A bugfix, a tracing
related update (real tracing support for s390 will follow once we
have sorted out the architectural vs. internal tracepoint split),
and a patch used for console detection.

Christian Borntraeger (1):
  s390/kvm: Set CPU in stopped state on initial cpu reset

Cornelia Huck (1):
  kvm: trace events: update list of exit reasons

Heinz Graalfs (1):
  s390/kvm: Perform early event mask processing during boot.

 arch/s390/include/asm/sclp.h  |    2 ++
 arch/s390/kernel/setup.c      |   12 +++++++++---
 arch/s390/kvm/kvm-s390.c      |    1 +
 drivers/s390/char/sclp.c      |   10 ----------
 drivers/s390/char/sclp.h      |   10 ++++++++++
 drivers/s390/char/sclp_cmd.c  |   38 ++++++++++++++++++++++++++++++++++++++
 drivers/s390/kvm/kvm_virtio.c |    3 ++-
 include/trace/events/kvm.h    |    3 ++-
 8 files changed, 64 insertions(+), 15 deletions(-)

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/3] s390/kvm: Set CPU in stopped state on initial cpu reset
  2012-06-11 14:06 [PATCH 0/3] kvm/s390 patches for 3.6 Cornelia Huck
@ 2012-06-11 14:06 ` Cornelia Huck
  2012-06-11 16:46   ` Alexander Graf
  2012-06-11 14:06 ` [PATCH 2/3] kvm: trace events: update list of exit reasons Cornelia Huck
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 17+ messages in thread
From: Cornelia Huck @ 2012-06-11 14:06 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti
  Cc: Christian Borntraeger, Carsten Otte, Alexander Graf,
	Heiko Carstens, Martin Schwidefsky, KVM, linux-s390

From: Christian Borntraeger <borntraeger@de.ibm.com>

The initial cpu reset sets the cpu in the stopped state.
Several places check for the cpu state (e.g. sigp set prefix) and
not setting the STOPPED state triggered errors with newer guest
kernels after reboot.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
 arch/s390/kvm/kvm-s390.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 664766d..ace9360 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -347,6 +347,7 @@ static void kvm_s390_vcpu_initial_reset(struct kvm_vcpu *vcpu)
 	vcpu->arch.guest_fpregs.fpc = 0;
 	asm volatile("lfpc %0" : : "Q" (vcpu->arch.guest_fpregs.fpc));
 	vcpu->arch.sie_block->gbea = 1;
+	atomic_set_mask(CPUSTAT_STOPPED, &vcpu->arch.sie_block->cpuflags);
 }
 
 int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu)
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/3] kvm: trace events: update list of exit reasons
  2012-06-11 14:06 [PATCH 0/3] kvm/s390 patches for 3.6 Cornelia Huck
  2012-06-11 14:06 ` [PATCH 1/3] s390/kvm: Set CPU in stopped state on initial cpu reset Cornelia Huck
@ 2012-06-11 14:06 ` Cornelia Huck
  2012-06-11 15:39   ` Alexander Graf
  2012-06-11 14:06 ` [PATCH 3/3] s390/kvm: Perform early event mask processing during boot Cornelia Huck
  2012-06-13 23:54 ` [PATCH 0/3] kvm/s390 patches for 3.6 Marcelo Tosatti
  3 siblings, 1 reply; 17+ messages in thread
From: Cornelia Huck @ 2012-06-11 14:06 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti
  Cc: Christian Borntraeger, Carsten Otte, Alexander Graf,
	Heiko Carstens, Martin Schwidefsky, KVM, linux-s390

Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
 include/trace/events/kvm.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h
index 46e3cd8..3df5925 100644
--- a/include/trace/events/kvm.h
+++ b/include/trace/events/kvm.h
@@ -13,7 +13,8 @@
 	ERSN(DEBUG), ERSN(HLT), ERSN(MMIO), ERSN(IRQ_WINDOW_OPEN),	\
 	ERSN(SHUTDOWN), ERSN(FAIL_ENTRY), ERSN(INTR), ERSN(SET_TPR),	\
 	ERSN(TPR_ACCESS), ERSN(S390_SIEIC), ERSN(S390_RESET), ERSN(DCR),\
-	ERSN(NMI), ERSN(INTERNAL_ERROR), ERSN(OSI)
+	ERSN(NMI), ERSN(INTERNAL_ERROR), ERSN(OSI), ERSN(PAPR_HCALL),	\
+	ERSN(S390_UCONTROL)
 
 TRACE_EVENT(kvm_userspace_exit,
 	    TP_PROTO(__u32 reason, int errno),
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 3/3] s390/kvm: Perform early event mask processing during boot.
  2012-06-11 14:06 [PATCH 0/3] kvm/s390 patches for 3.6 Cornelia Huck
  2012-06-11 14:06 ` [PATCH 1/3] s390/kvm: Set CPU in stopped state on initial cpu reset Cornelia Huck
  2012-06-11 14:06 ` [PATCH 2/3] kvm: trace events: update list of exit reasons Cornelia Huck
@ 2012-06-11 14:06 ` Cornelia Huck
  2012-06-11 16:46   ` Alexander Graf
  2012-06-13 23:54 ` [PATCH 0/3] kvm/s390 patches for 3.6 Marcelo Tosatti
  3 siblings, 1 reply; 17+ messages in thread
From: Cornelia Huck @ 2012-06-11 14:06 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti
  Cc: Christian Borntraeger, Carsten Otte, Alexander Graf,
	Heiko Carstens, Martin Schwidefsky, KVM, linux-s390,
	Heinz Graalfs

From: Heinz Graalfs <graalfs@linux.vnet.ibm.com>

For processing under KVM it is required to detect
the actual SCLP console type in order to set it as
preferred console.

Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
 arch/s390/include/asm/sclp.h  |    2 ++
 arch/s390/kernel/setup.c      |   12 +++++++++---
 drivers/s390/char/sclp.c      |   10 ----------
 drivers/s390/char/sclp.h      |   10 ++++++++++
 drivers/s390/char/sclp_cmd.c  |   38 ++++++++++++++++++++++++++++++++++++++
 drivers/s390/kvm/kvm_virtio.c |    3 ++-
 6 files changed, 61 insertions(+), 14 deletions(-)

diff --git a/arch/s390/include/asm/sclp.h b/arch/s390/include/asm/sclp.h
index bf238c5..173f07a 100644
--- a/arch/s390/include/asm/sclp.h
+++ b/arch/s390/include/asm/sclp.h
@@ -55,5 +55,7 @@ int sclp_chp_configure(struct chp_id chpid);
 int sclp_chp_deconfigure(struct chp_id chpid);
 int sclp_chp_read_info(struct sclp_chp_info *info);
 void sclp_get_ipl_info(struct sclp_ipl_info *info);
+bool sclp_has_linemode(void);
+bool sclp_has_vt220(void);
 
 #endif /* _ASM_S390_SCLP_H */
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 489d1d8..e86bca6 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -63,6 +63,7 @@
 #include <asm/kvm_virtio.h>
 #include <asm/diag.h>
 #include <asm/os_info.h>
+#include <asm/sclp.h>
 #include "entry.h"
 
 long psw_kernel_bits	= PSW_DEFAULT_KEY | PSW_MASK_BASE | PSW_ASC_PRIMARY |
@@ -138,9 +139,14 @@ __setup("condev=", condev_setup);
 
 static void __init set_preferred_console(void)
 {
-	if (MACHINE_IS_KVM)
-		add_preferred_console("hvc", 0, NULL);
-	else if (CONSOLE_IS_3215 || CONSOLE_IS_SCLP)
+	if (MACHINE_IS_KVM) {
+		if (sclp_has_vt220())
+			add_preferred_console("ttyS", 1, NULL);
+		else if (sclp_has_linemode())
+			add_preferred_console("ttyS", 0, NULL);
+		else
+			add_preferred_console("hvc", 0, NULL);
+	} else if (CONSOLE_IS_3215 || CONSOLE_IS_SCLP)
 		add_preferred_console("ttyS", 0, NULL);
 	else if (CONSOLE_IS_3270)
 		add_preferred_console("tty3270", 0, NULL);
diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c
index 30f29a0..3fcc000 100644
--- a/drivers/s390/char/sclp.c
+++ b/drivers/s390/char/sclp.c
@@ -654,16 +654,6 @@ sclp_remove_processed(struct sccb_header *sccb)
 
 EXPORT_SYMBOL(sclp_remove_processed);
 
-struct init_sccb {
-	struct sccb_header header;
-	u16 _reserved;
-	u16 mask_length;
-	sccb_mask_t receive_mask;
-	sccb_mask_t send_mask;
-	sccb_mask_t sclp_receive_mask;
-	sccb_mask_t sclp_send_mask;
-} __attribute__((packed));
-
 /* Prepare init mask request. Called while sclp_lock is locked. */
 static inline void
 __sclp_make_init_req(u32 receive_mask, u32 send_mask)
diff --git a/drivers/s390/char/sclp.h b/drivers/s390/char/sclp.h
index 49a1bb5..d7e97ae 100644
--- a/drivers/s390/char/sclp.h
+++ b/drivers/s390/char/sclp.h
@@ -88,6 +88,16 @@ struct sccb_header {
 	u16	response_code;
 } __attribute__((packed));
 
+struct init_sccb {
+	struct sccb_header header;
+	u16 _reserved;
+	u16 mask_length;
+	sccb_mask_t receive_mask;
+	sccb_mask_t send_mask;
+	sccb_mask_t sclp_receive_mask;
+	sccb_mask_t sclp_send_mask;
+} __attribute__((packed));
+
 extern u64 sclp_facilities;
 #define SCLP_HAS_CHP_INFO	(sclp_facilities & 0x8000000000000000ULL)
 #define SCLP_HAS_CHP_RECONFIG	(sclp_facilities & 0x2000000000000000ULL)
diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c
index 766cb7b..71ea923c 100644
--- a/drivers/s390/char/sclp_cmd.c
+++ b/drivers/s390/char/sclp_cmd.c
@@ -48,6 +48,7 @@ struct read_info_sccb {
 	u8	_reserved5[4096 - 112];	/* 112-4095 */
 } __attribute__((packed, aligned(PAGE_SIZE)));
 
+static struct init_sccb __initdata early_event_mask_sccb __aligned(PAGE_SIZE);
 static struct read_info_sccb __initdata early_read_info_sccb;
 static int __initdata early_read_info_sccb_valid;
 
@@ -104,6 +105,19 @@ static void __init sclp_read_info_early(void)
 	}
 }
 
+static void __init sclp_event_mask_early(void)
+{
+	struct init_sccb *sccb = &early_event_mask_sccb;
+	int rc;
+
+	do {
+		memset(sccb, 0, sizeof(*sccb));
+		sccb->header.length = sizeof(*sccb);
+		sccb->mask_length = sizeof(sccb_mask_t);
+		rc = sclp_cmd_sync_early(SCLP_CMDW_WRITE_EVENT_MASK, sccb);
+	} while (rc == -EBUSY);
+}
+
 void __init sclp_facilities_detect(void)
 {
 	struct read_info_sccb *sccb;
@@ -119,6 +133,30 @@ void __init sclp_facilities_detect(void)
 	rnmax = sccb->rnmax ? sccb->rnmax : sccb->rnmax2;
 	rzm = sccb->rnsize ? sccb->rnsize : sccb->rnsize2;
 	rzm <<= 20;
+
+	sclp_event_mask_early();
+}
+
+bool __init sclp_has_linemode(void)
+{
+	struct init_sccb *sccb = &early_event_mask_sccb;
+
+	if (sccb->header.response_code != 0x20)
+		return 0;
+	if (sccb->sclp_send_mask & (EVTYP_MSG_MASK | EVTYP_PMSGCMD_MASK))
+		return 1;
+	return 0;
+}
+
+bool __init sclp_has_vt220(void)
+{
+	struct init_sccb *sccb = &early_event_mask_sccb;
+
+	if (sccb->header.response_code != 0x20)
+		return 0;
+	if (sccb->sclp_send_mask & EVTYP_VT220MSG_MASK)
+		return 1;
+	return 0;
 }
 
 unsigned long long sclp_get_rnmax(void)
diff --git a/drivers/s390/kvm/kvm_virtio.c b/drivers/s390/kvm/kvm_virtio.c
index d74e9ae..d3bdae4 100644
--- a/drivers/s390/kvm/kvm_virtio.c
+++ b/drivers/s390/kvm/kvm_virtio.c
@@ -25,6 +25,7 @@
 #include <asm/io.h>
 #include <asm/kvm_para.h>
 #include <asm/kvm_virtio.h>
+#include <asm/sclp.h>
 #include <asm/setup.h>
 #include <asm/irq.h>
 
@@ -468,7 +469,7 @@ static __init int early_put_chars(u32 vtermno, const char *buf, int count)
 
 static int __init s390_virtio_console_init(void)
 {
-	if (!MACHINE_IS_KVM)
+	if (sclp_has_vt220() || sclp_has_linemode())
 		return -ENODEV;
 	return virtio_cons_early_init(early_put_chars);
 }
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/3] kvm: trace events: update list of exit reasons
  2012-06-11 14:06 ` [PATCH 2/3] kvm: trace events: update list of exit reasons Cornelia Huck
@ 2012-06-11 15:39   ` Alexander Graf
  2012-06-11 16:00       ` Cornelia Huck
  0 siblings, 1 reply; 17+ messages in thread
From: Alexander Graf @ 2012-06-11 15:39 UTC (permalink / raw)
  To: Cornelia Huck
  Cc: Avi Kivity, Marcelo Tosatti, Christian Borntraeger, Carsten Otte,
	Heiko Carstens, Martin Schwidefsky, KVM, linux-s390

Patch description missing.

On 06/11/2012 04:06 PM, Cornelia Huck wrote:
> Reviewed-by: Christian Borntraeger<borntraeger@de.ibm.com>
> Signed-off-by: Cornelia Huck<cornelia.huck@de.ibm.com>
> ---
>   include/trace/events/kvm.h |    3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h
> index 46e3cd8..3df5925 100644
> --- a/include/trace/events/kvm.h
> +++ b/include/trace/events/kvm.h
> @@ -13,7 +13,8 @@
>   	ERSN(DEBUG), ERSN(HLT), ERSN(MMIO), ERSN(IRQ_WINDOW_OPEN),	\
>   	ERSN(SHUTDOWN), ERSN(FAIL_ENTRY), ERSN(INTR), ERSN(SET_TPR),	\
>   	ERSN(TPR_ACCESS), ERSN(S390_SIEIC), ERSN(S390_RESET), ERSN(DCR),\
> -	ERSN(NMI), ERSN(INTERNAL_ERROR), ERSN(OSI)
> +	ERSN(NMI), ERSN(INTERNAL_ERROR), ERSN(OSI), ERSN(PAPR_HCALL),	\

PAPR?


Alex

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/3] kvm: trace events: update list of exit reasons
  2012-06-11 15:39   ` Alexander Graf
@ 2012-06-11 16:00       ` Cornelia Huck
  0 siblings, 0 replies; 17+ messages in thread
From: Cornelia Huck @ 2012-06-11 16:00 UTC (permalink / raw)
  To: Alexander Graf
  Cc: Avi Kivity, Marcelo Tosatti, Christian Borntraeger, Carsten Otte,
	Heiko Carstens, Martin Schwidefsky, KVM, linux-s390

On Mon, 11 Jun 2012 17:39:38 +0200
Alexander Graf <agraf@suse.de> wrote:

> Patch description missing.

Hm, I'd have thought $SUBJECT was enough?

> 
> On 06/11/2012 04:06 PM, Cornelia Huck wrote:
> > Reviewed-by: Christian Borntraeger<borntraeger@de.ibm.com>
> > Signed-off-by: Cornelia Huck<cornelia.huck@de.ibm.com>
> > ---
> >   include/trace/events/kvm.h |    3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h
> > index 46e3cd8..3df5925 100644
> > --- a/include/trace/events/kvm.h
> > +++ b/include/trace/events/kvm.h
> > @@ -13,7 +13,8 @@
> >   	ERSN(DEBUG), ERSN(HLT), ERSN(MMIO), ERSN(IRQ_WINDOW_OPEN),	\
> >   	ERSN(SHUTDOWN), ERSN(FAIL_ENTRY), ERSN(INTR), ERSN(SET_TPR),	\
> >   	ERSN(TPR_ACCESS), ERSN(S390_SIEIC), ERSN(S390_RESET), ERSN(DCR),\
> > -	ERSN(NMI), ERSN(INTERNAL_ERROR), ERSN(OSI)
> > +	ERSN(NMI), ERSN(INTERNAL_ERROR), ERSN(OSI), ERSN(PAPR_HCALL),	\
> 
> PAPR?

From include/linux/kvm.h:

#define KVM_EXIT_PAPR_HCALL       19

No idea what it is, though :)

Cornelia

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/3] kvm: trace events: update list of exit reasons
@ 2012-06-11 16:00       ` Cornelia Huck
  0 siblings, 0 replies; 17+ messages in thread
From: Cornelia Huck @ 2012-06-11 16:00 UTC (permalink / raw)
  To: Alexander Graf
  Cc: Avi Kivity, Marcelo Tosatti, Christian Borntraeger, Carsten Otte,
	Heiko Carstens, Martin Schwidefsky, KVM, linux-s390

On Mon, 11 Jun 2012 17:39:38 +0200
Alexander Graf <agraf@suse.de> wrote:

> Patch description missing.

Hm, I'd have thought $SUBJECT was enough?

> 
> On 06/11/2012 04:06 PM, Cornelia Huck wrote:
> > Reviewed-by: Christian Borntraeger<borntraeger@de.ibm.com>
> > Signed-off-by: Cornelia Huck<cornelia.huck@de.ibm.com>
> > ---
> >   include/trace/events/kvm.h |    3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h
> > index 46e3cd8..3df5925 100644
> > --- a/include/trace/events/kvm.h
> > +++ b/include/trace/events/kvm.h
> > @@ -13,7 +13,8 @@
> >   	ERSN(DEBUG), ERSN(HLT), ERSN(MMIO), ERSN(IRQ_WINDOW_OPEN),	\
> >   	ERSN(SHUTDOWN), ERSN(FAIL_ENTRY), ERSN(INTR), ERSN(SET_TPR),	\
> >   	ERSN(TPR_ACCESS), ERSN(S390_SIEIC), ERSN(S390_RESET), ERSN(DCR),\
> > -	ERSN(NMI), ERSN(INTERNAL_ERROR), ERSN(OSI)
> > +	ERSN(NMI), ERSN(INTERNAL_ERROR), ERSN(OSI), ERSN(PAPR_HCALL),	\
> 
> PAPR?

>From include/linux/kvm.h:

#define KVM_EXIT_PAPR_HCALL       19

No idea what it is, though :)

Cornelia


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/3] kvm: trace events: update list of exit reasons
  2012-06-11 16:00       ` Cornelia Huck
  (?)
@ 2012-06-11 16:21       ` Alexander Graf
  2012-06-11 16:33         ` Cornelia Huck
  2012-06-11 16:39         ` [PATCH 2/3] kvm: trace events: update list of exit reasons (v2) Cornelia Huck
  -1 siblings, 2 replies; 17+ messages in thread
From: Alexander Graf @ 2012-06-11 16:21 UTC (permalink / raw)
  To: Cornelia Huck
  Cc: Avi Kivity, Marcelo Tosatti, Christian Borntraeger, Carsten Otte,
	Heiko Carstens, Martin Schwidefsky, KVM, linux-s390

On 06/11/2012 06:00 PM, Cornelia Huck wrote:
> On Mon, 11 Jun 2012 17:39:38 +0200
> Alexander Graf<agraf@suse.de>  wrote:
>
>> Patch description missing.
> Hm, I'd have thought $SUBJECT was enough?

Only when it's totally obvious what you're doing. As my comment tells 
you, that wasn't the case here :).

>
>> On 06/11/2012 04:06 PM, Cornelia Huck wrote:
>>> Reviewed-by: Christian Borntraeger<borntraeger@de.ibm.com>
>>> Signed-off-by: Cornelia Huck<cornelia.huck@de.ibm.com>
>>> ---
>>>    include/trace/events/kvm.h |    3 ++-
>>>    1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h
>>> index 46e3cd8..3df5925 100644
>>> --- a/include/trace/events/kvm.h
>>> +++ b/include/trace/events/kvm.h
>>> @@ -13,7 +13,8 @@
>>>    	ERSN(DEBUG), ERSN(HLT), ERSN(MMIO), ERSN(IRQ_WINDOW_OPEN),	\
>>>    	ERSN(SHUTDOWN), ERSN(FAIL_ENTRY), ERSN(INTR), ERSN(SET_TPR),	\
>>>    	ERSN(TPR_ACCESS), ERSN(S390_SIEIC), ERSN(S390_RESET), ERSN(DCR),\
>>> -	ERSN(NMI), ERSN(INTERNAL_ERROR), ERSN(OSI)
>>> +	ERSN(NMI), ERSN(INTERNAL_ERROR), ERSN(OSI), ERSN(PAPR_HCALL),	\
>> PAPR?
>  From include/linux/kvm.h:
>
> #define KVM_EXIT_PAPR_HCALL       19
>
> No idea what it is, though :)

That's the PowerPC hypercall :). I just now realized that this is 
generic code, sorry.


Alex

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/3] kvm: trace events: update list of exit reasons
  2012-06-11 16:21       ` Alexander Graf
@ 2012-06-11 16:33         ` Cornelia Huck
  2012-06-11 16:39         ` [PATCH 2/3] kvm: trace events: update list of exit reasons (v2) Cornelia Huck
  1 sibling, 0 replies; 17+ messages in thread
From: Cornelia Huck @ 2012-06-11 16:33 UTC (permalink / raw)
  To: Alexander Graf
  Cc: Avi Kivity, Marcelo Tosatti, Christian Borntraeger, Carsten Otte,
	Heiko Carstens, Martin Schwidefsky, KVM, linux-s390

On Mon, 11 Jun 2012 18:21:33 +0200
Alexander Graf <agraf@suse.de> wrote:

> On 06/11/2012 06:00 PM, Cornelia Huck wrote:
> > On Mon, 11 Jun 2012 17:39:38 +0200
> > Alexander Graf<agraf@suse.de>  wrote:
> >
> >> Patch description missing.
> > Hm, I'd have thought $SUBJECT was enough?
> 
> Only when it's totally obvious what you're doing. As my comment tells 
> you, that wasn't the case here :).

Stuff you wrote yourself is always totally obvious :)

Patch with updated description upcoming.

Cornelia

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 2/3] kvm: trace events: update list of exit reasons (v2)
  2012-06-11 16:21       ` Alexander Graf
  2012-06-11 16:33         ` Cornelia Huck
@ 2012-06-11 16:39         ` Cornelia Huck
  2012-06-11 16:45           ` Alexander Graf
  1 sibling, 1 reply; 17+ messages in thread
From: Cornelia Huck @ 2012-06-11 16:39 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti
  Cc: Alexander Graf, Christian Borntraeger, Carsten Otte,
	Heiko Carstens, Martin Schwidefsky, KVM, linux-s390

The list of exit reasons for the kvm_userspace_exit event was
missing recent additions; bring it into sync again.

Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
 include/trace/events/kvm.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h
index 46e3cd8..3df5925 100644
--- a/include/trace/events/kvm.h
+++ b/include/trace/events/kvm.h
@@ -13,7 +13,8 @@
 	ERSN(DEBUG), ERSN(HLT), ERSN(MMIO), ERSN(IRQ_WINDOW_OPEN),	\
 	ERSN(SHUTDOWN), ERSN(FAIL_ENTRY), ERSN(INTR), ERSN(SET_TPR),	\
 	ERSN(TPR_ACCESS), ERSN(S390_SIEIC), ERSN(S390_RESET), ERSN(DCR),\
-	ERSN(NMI), ERSN(INTERNAL_ERROR), ERSN(OSI)
+	ERSN(NMI), ERSN(INTERNAL_ERROR), ERSN(OSI), ERSN(PAPR_HCALL),	\
+	ERSN(S390_UCONTROL)
 
 TRACE_EVENT(kvm_userspace_exit,
 	    TP_PROTO(__u32 reason, int errno),
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/3] kvm: trace events: update list of exit reasons (v2)
  2012-06-11 16:39         ` [PATCH 2/3] kvm: trace events: update list of exit reasons (v2) Cornelia Huck
@ 2012-06-11 16:45           ` Alexander Graf
  0 siblings, 0 replies; 17+ messages in thread
From: Alexander Graf @ 2012-06-11 16:45 UTC (permalink / raw)
  To: Cornelia Huck
  Cc: Avi Kivity, Marcelo Tosatti, Christian Borntraeger, Carsten Otte,
	Heiko Carstens, Martin Schwidefsky, KVM, linux-s390

On 06/11/2012 06:39 PM, Cornelia Huck wrote:
> The list of exit reasons for the kvm_userspace_exit event was
> missing recent additions; bring it into sync again.
>
> Reviewed-by: Christian Borntraeger<borntraeger@de.ibm.com>
> Signed-off-by: Cornelia Huck<cornelia.huck@de.ibm.com>

Reviewed-by: Alexander Graf <agraf@suse.de>

Alex

> ---
>   include/trace/events/kvm.h |    3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h
> index 46e3cd8..3df5925 100644
> --- a/include/trace/events/kvm.h
> +++ b/include/trace/events/kvm.h
> @@ -13,7 +13,8 @@
>   	ERSN(DEBUG), ERSN(HLT), ERSN(MMIO), ERSN(IRQ_WINDOW_OPEN),	\
>   	ERSN(SHUTDOWN), ERSN(FAIL_ENTRY), ERSN(INTR), ERSN(SET_TPR),	\
>   	ERSN(TPR_ACCESS), ERSN(S390_SIEIC), ERSN(S390_RESET), ERSN(DCR),\
> -	ERSN(NMI), ERSN(INTERNAL_ERROR), ERSN(OSI)
> +	ERSN(NMI), ERSN(INTERNAL_ERROR), ERSN(OSI), ERSN(PAPR_HCALL),	\
> +	ERSN(S390_UCONTROL)
>
>   TRACE_EVENT(kvm_userspace_exit,
>   	    TP_PROTO(__u32 reason, int errno),

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 3/3] s390/kvm: Perform early event mask processing during boot.
  2012-06-11 14:06 ` [PATCH 3/3] s390/kvm: Perform early event mask processing during boot Cornelia Huck
@ 2012-06-11 16:46   ` Alexander Graf
  2012-06-11 18:41     ` Christian Borntraeger
  0 siblings, 1 reply; 17+ messages in thread
From: Alexander Graf @ 2012-06-11 16:46 UTC (permalink / raw)
  To: Cornelia Huck
  Cc: Avi Kivity, Marcelo Tosatti, Christian Borntraeger, Carsten Otte,
	Heiko Carstens, Martin Schwidefsky, KVM, linux-s390,
	Heinz Graalfs

On 06/11/2012 04:06 PM, Cornelia Huck wrote:
> From: Heinz Graalfs<graalfs@linux.vnet.ibm.com>
>
> For processing under KVM it is required to detect
> the actual SCLP console type in order to set it as
> preferred console.
>
> Signed-off-by: Heinz Graalfs<graalfs@linux.vnet.ibm.com>
> Acked-by: Heiko Carstens<heiko.carstens@de.ibm.com>
> Acked-by: Peter Oberparleiter<peter.oberparleiter@de.ibm.com>
> Signed-off-by: Cornelia Huck<cornelia.huck@de.ibm.com>

Any chance we could get this into -stable?


Acked-by: Alexander Graf <agraf@suse.de>

Alex

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/3] s390/kvm: Set CPU in stopped state on initial cpu reset
  2012-06-11 14:06 ` [PATCH 1/3] s390/kvm: Set CPU in stopped state on initial cpu reset Cornelia Huck
@ 2012-06-11 16:46   ` Alexander Graf
  2012-06-11 19:11     ` Christian Borntraeger
  0 siblings, 1 reply; 17+ messages in thread
From: Alexander Graf @ 2012-06-11 16:46 UTC (permalink / raw)
  To: Cornelia Huck
  Cc: Avi Kivity, Marcelo Tosatti, Christian Borntraeger, Carsten Otte,
	Heiko Carstens, Martin Schwidefsky, KVM, linux-s390

On 06/11/2012 04:06 PM, Cornelia Huck wrote:
> From: Christian Borntraeger<borntraeger@de.ibm.com>
>
> The initial cpu reset sets the cpu in the stopped state.
> Several places check for the cpu state (e.g. sigp set prefix) and
> not setting the STOPPED state triggered errors with newer guest
> kernels after reboot.
>
> Signed-off-by: Christian Borntraeger<borntraeger@de.ibm.com>
> Signed-off-by: Cornelia Huck<cornelia.huck@de.ibm.com>

Is this only broken as of now or has this been broken before? So do we 
need to send this to -stable for anyone? And what happens on RESET?


Alex

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 3/3] s390/kvm: Perform early event mask processing during boot.
  2012-06-11 16:46   ` Alexander Graf
@ 2012-06-11 18:41     ` Christian Borntraeger
  2012-06-11 19:45       ` Alexander Graf
  0 siblings, 1 reply; 17+ messages in thread
From: Christian Borntraeger @ 2012-06-11 18:41 UTC (permalink / raw)
  To: Alexander Graf
  Cc: Cornelia Huck, Avi Kivity, Marcelo Tosatti, Carsten Otte,
	Heiko Carstens, Martin Schwidefsky, KVM, linux-s390,
	Heinz Graalfs, Jens Freimann

On 11/06/12 18:46, Alexander Graf wrote:
> On 06/11/2012 04:06 PM, Cornelia Huck wrote:
>> From: Heinz Graalfs<graalfs@linux.vnet.ibm.com>
>>
>> For processing under KVM it is required to detect
>> the actual SCLP console type in order to set it as
>> preferred console.
>>
>> Signed-off-by: Heinz Graalfs<graalfs@linux.vnet.ibm.com>
>> Acked-by: Heiko Carstens<heiko.carstens@de.ibm.com>
>> Acked-by: Peter Oberparleiter<peter.oberparleiter@de.ibm.com>
>> Signed-off-by: Cornelia Huck<cornelia.huck@de.ibm.com>
> 
> Any chance we could get this into -stable?
> 
> 
> Acked-by: Alexander Graf <agraf@suse.de>

We scheduled this for 3.6, to give it some time to settle, but it has been tested 
internally on 3.4 with the sclp console patches that we submitted last week against
qemu and on lpar/zvm. (this reminds me: can you have a look at the qemu patches
that Jens sent last week?)

If you can testify that this also works on a SLES system we can ask Avi/Marcelo,
to consider this for 3.5. The current setup of assuming virtio console if running
under KVM is obviously not correct, so it makes sense to check for the existing consoles
before activating them.

Christian

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/3] s390/kvm: Set CPU in stopped state on initial cpu reset
  2012-06-11 16:46   ` Alexander Graf
@ 2012-06-11 19:11     ` Christian Borntraeger
  0 siblings, 0 replies; 17+ messages in thread
From: Christian Borntraeger @ 2012-06-11 19:11 UTC (permalink / raw)
  To: Alexander Graf
  Cc: Cornelia Huck, Avi Kivity, Marcelo Tosatti, Carsten Otte,
	Heiko Carstens, Martin Schwidefsky, KVM, linux-s390

On 11/06/12 18:46, Alexander Graf wrote:
> On 06/11/2012 04:06 PM, Cornelia Huck wrote:
>> From: Christian Borntraeger<borntraeger@de.ibm.com>
>>
>> The initial cpu reset sets the cpu in the stopped state.
>> Several places check for the cpu state (e.g. sigp set prefix) and
>> not setting the STOPPED state triggered errors with newer guest
>> kernels after reboot.
>>
>> Signed-off-by: Christian Borntraeger<borntraeger@de.ibm.com>
>> Signed-off-by: Cornelia Huck<cornelia.huck@de.ibm.com>
> 
> Is this only broken as of now or has this been broken before? So do we need to send this to -stable for anyone? And what happens on RESET?

Looks like this problem appeared as a combination of newer guest kernels
(something like >=3.2 or so) with a reworked SMP bringup behaviour and a 
host fix (151104a7b3a82f9c56d636595ae58084049d2559 KVM: s390: make sigp 
restart return busy when stop pending)
which both are correct in itself but uncovered this third problem.

With this patch I have a qemu/kernel combination which works reliably with different
guest kernels for guest initiated resets as well as qemu monitor system_reset
as well as system_shutdown+system_reset+cont. It will probably not be the last
fix (e.g. initial reset should also take care of pending CPU local interrupts)
but we are making progress.

Christian

PS: The working combination has two patches pending for qemu which need some
cleanup, will send soon

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 3/3] s390/kvm: Perform early event mask processing during boot.
  2012-06-11 18:41     ` Christian Borntraeger
@ 2012-06-11 19:45       ` Alexander Graf
  0 siblings, 0 replies; 17+ messages in thread
From: Alexander Graf @ 2012-06-11 19:45 UTC (permalink / raw)
  To: Christian Borntraeger
  Cc: Cornelia Huck, Avi Kivity, Marcelo Tosatti, Carsten Otte,
	Heiko Carstens, Martin Schwidefsky, KVM, linux-s390,
	Heinz Graalfs, Jens Freimann



On 11.06.2012, at 20:41, Christian Borntraeger <borntraeger@de.ibm.com> wrote:

> On 11/06/12 18:46, Alexander Graf wrote:
>> On 06/11/2012 04:06 PM, Cornelia Huck wrote:
>>> From: Heinz Graalfs<graalfs@linux.vnet.ibm.com>
>>> 
>>> For processing under KVM it is required to detect
>>> the actual SCLP console type in order to set it as
>>> preferred console.
>>> 
>>> Signed-off-by: Heinz Graalfs<graalfs@linux.vnet.ibm.com>
>>> Acked-by: Heiko Carstens<heiko.carstens@de.ibm.com>
>>> Acked-by: Peter Oberparleiter<peter.oberparleiter@de.ibm.com>
>>> Signed-off-by: Cornelia Huck<cornelia.huck@de.ibm.com>
>> 
>> Any chance we could get this into -stable?
>> 
>> 
>> Acked-by: Alexander Graf <agraf@suse.de>
> 
> We scheduled this for 3.6, to give it some time to settle, but it has been tested 
> internally on 3.4 with the sclp console patches that we submitted last week against
> qemu and on lpar/zvm. (this reminds me: can you have a look at the qemu patches
> that Jens sent last week?)

It's on my todo list, yeah :). These were easier to review, so I quickly did them.

> 
> If you can testify that this also works on a SLES system we can ask Avi/Marcelo,
> to consider this for 3.5. The current setup of assuming virtio console if running
> under KVM is obviously not correct, so it makes sense to check for the existing consoles
> before activating them.

Right, but I'd be more interested in a 3.0 backport than 3.5 ;).

Alex

> 
> Christian
> 

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/3] kvm/s390 patches for 3.6
  2012-06-11 14:06 [PATCH 0/3] kvm/s390 patches for 3.6 Cornelia Huck
                   ` (2 preceding siblings ...)
  2012-06-11 14:06 ` [PATCH 3/3] s390/kvm: Perform early event mask processing during boot Cornelia Huck
@ 2012-06-13 23:54 ` Marcelo Tosatti
  3 siblings, 0 replies; 17+ messages in thread
From: Marcelo Tosatti @ 2012-06-13 23:54 UTC (permalink / raw)
  To: Cornelia Huck
  Cc: Avi Kivity, Christian Borntraeger, Carsten Otte, Alexander Graf,
	Heiko Carstens, Martin Schwidefsky, KVM, linux-s390

On Mon, Jun 11, 2012 at 04:06:56PM +0200, Cornelia Huck wrote:
> Avi, Marcelo,
> 
> here are some s390 patches for the next release. A bugfix, a tracing
> related update (real tracing support for s390 will follow once we
> have sorted out the architectural vs. internal tracepoint split),
> and a patch used for console detection.
> 
> Christian Borntraeger (1):
>   s390/kvm: Set CPU in stopped state on initial cpu reset
> 
> Cornelia Huck (1):
>   kvm: trace events: update list of exit reasons
> 
> Heinz Graalfs (1):
>   s390/kvm: Perform early event mask processing during boot.
> 
>  arch/s390/include/asm/sclp.h  |    2 ++
>  arch/s390/kernel/setup.c      |   12 +++++++++---
>  arch/s390/kvm/kvm-s390.c      |    1 +
>  drivers/s390/char/sclp.c      |   10 ----------
>  drivers/s390/char/sclp.h      |   10 ++++++++++
>  drivers/s390/char/sclp_cmd.c  |   38 ++++++++++++++++++++++++++++++++++++++
>  drivers/s390/kvm/kvm_virtio.c |    3 ++-
>  include/trace/events/kvm.h    |    3 ++-
>  8 files changed, 64 insertions(+), 15 deletions(-)

Applied all to queue, thanks.

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2012-06-13 23:54 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-11 14:06 [PATCH 0/3] kvm/s390 patches for 3.6 Cornelia Huck
2012-06-11 14:06 ` [PATCH 1/3] s390/kvm: Set CPU in stopped state on initial cpu reset Cornelia Huck
2012-06-11 16:46   ` Alexander Graf
2012-06-11 19:11     ` Christian Borntraeger
2012-06-11 14:06 ` [PATCH 2/3] kvm: trace events: update list of exit reasons Cornelia Huck
2012-06-11 15:39   ` Alexander Graf
2012-06-11 16:00     ` Cornelia Huck
2012-06-11 16:00       ` Cornelia Huck
2012-06-11 16:21       ` Alexander Graf
2012-06-11 16:33         ` Cornelia Huck
2012-06-11 16:39         ` [PATCH 2/3] kvm: trace events: update list of exit reasons (v2) Cornelia Huck
2012-06-11 16:45           ` Alexander Graf
2012-06-11 14:06 ` [PATCH 3/3] s390/kvm: Perform early event mask processing during boot Cornelia Huck
2012-06-11 16:46   ` Alexander Graf
2012-06-11 18:41     ` Christian Borntraeger
2012-06-11 19:45       ` Alexander Graf
2012-06-13 23:54 ` [PATCH 0/3] kvm/s390 patches for 3.6 Marcelo Tosatti

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.