* [kvm-unit-tests PATCH v2 0/5] s390x: sie and uv cleanups
@ 2021-07-06 12:17 Janosch Frank
2021-07-06 12:17 ` [kvm-unit-tests PATCH v2 1/5] s390x: sie: Add missing includes Janosch Frank
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Janosch Frank @ 2021-07-06 12:17 UTC (permalink / raw)
To: kvm; +Cc: linux-s390, imbrenda, david, thuth, cohuck
The UV and SIE additions brought in some minor problems which I want
to address now.
v2:
* Dropped UV int type patch
* Fixed uv_query reserved field name
* Fixed sie info print if
* Added patch to remove an old print in the pgm handler
Janosch Frank (5):
s390x: sie: Add missing includes
s390x: sie: Fix sie.h integer types
lib: s390x: uv: Add offset comments to uv_query and extend it
lib: s390x: Print if a pgm happened while in SIE
lib: s390x: Remove left behing PGM report
lib/s390x/asm/uv.h | 33 +++++++++++++++++----------------
lib/s390x/interrupt.c | 14 ++++++++------
lib/s390x/sie.h | 11 +++++++----
3 files changed, 32 insertions(+), 26 deletions(-)
--
2.30.2
^ permalink raw reply [flat|nested] 9+ messages in thread
* [kvm-unit-tests PATCH v2 1/5] s390x: sie: Add missing includes
2021-07-06 12:17 [kvm-unit-tests PATCH v2 0/5] s390x: sie and uv cleanups Janosch Frank
@ 2021-07-06 12:17 ` Janosch Frank
2021-07-06 12:17 ` [kvm-unit-tests PATCH v2 2/5] s390x: sie: Fix sie.h integer types Janosch Frank
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Janosch Frank @ 2021-07-06 12:17 UTC (permalink / raw)
To: kvm; +Cc: linux-s390, imbrenda, david, thuth, cohuck
arch_def.h is needed for struct psw.
stdint.h is needed for the uint*_t types.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
lib/s390x/sie.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/s390x/sie.h b/lib/s390x/sie.h
index db30d61..b4bb78c 100644
--- a/lib/s390x/sie.h
+++ b/lib/s390x/sie.h
@@ -2,6 +2,9 @@
#ifndef _S390X_SIE_H_
#define _S390X_SIE_H_
+#include <stdint.h>
+#include <asm/arch_def.h>
+
#define CPUSTAT_STOPPED 0x80000000
#define CPUSTAT_WAIT 0x10000000
#define CPUSTAT_ECALL_PEND 0x08000000
--
2.30.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [kvm-unit-tests PATCH v2 2/5] s390x: sie: Fix sie.h integer types
2021-07-06 12:17 [kvm-unit-tests PATCH v2 0/5] s390x: sie and uv cleanups Janosch Frank
2021-07-06 12:17 ` [kvm-unit-tests PATCH v2 1/5] s390x: sie: Add missing includes Janosch Frank
@ 2021-07-06 12:17 ` Janosch Frank
2021-07-06 12:17 ` [kvm-unit-tests PATCH v2 3/5] lib: s390x: uv: Add offset comments to uv_query and extend it Janosch Frank
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Janosch Frank @ 2021-07-06 12:17 UTC (permalink / raw)
To: kvm; +Cc: linux-s390, imbrenda, david, thuth, cohuck
Let's only use the uint*_t types.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
lib/s390x/sie.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/s390x/sie.h b/lib/s390x/sie.h
index b4bb78c..6ba858a 100644
--- a/lib/s390x/sie.h
+++ b/lib/s390x/sie.h
@@ -173,9 +173,9 @@ struct kvm_s390_sie_block {
} __attribute__((packed));
struct vm_save_regs {
- u64 grs[16];
- u64 fprs[16];
- u32 fpc;
+ uint64_t grs[16];
+ uint64_t fprs[16];
+ uint32_t fpc;
};
/* We might be able to nestle all of this into the stack frame. But
@@ -191,7 +191,7 @@ struct vm {
struct kvm_s390_sie_block *sblk;
struct vm_save_area save_area;
/* Ptr to first guest page */
- u8 *guest_mem;
+ uint8_t *guest_mem;
};
extern void sie_entry(void);
--
2.30.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [kvm-unit-tests PATCH v2 3/5] lib: s390x: uv: Add offset comments to uv_query and extend it
2021-07-06 12:17 [kvm-unit-tests PATCH v2 0/5] s390x: sie and uv cleanups Janosch Frank
2021-07-06 12:17 ` [kvm-unit-tests PATCH v2 1/5] s390x: sie: Add missing includes Janosch Frank
2021-07-06 12:17 ` [kvm-unit-tests PATCH v2 2/5] s390x: sie: Fix sie.h integer types Janosch Frank
@ 2021-07-06 12:17 ` Janosch Frank
2021-07-06 12:59 ` Cornelia Huck
2021-07-06 12:17 ` [kvm-unit-tests PATCH v2 4/5] lib: s390x: Print if a pgm happened while in SIE Janosch Frank
2021-07-06 12:17 ` [kvm-unit-tests PATCH v2 5/5] lib: s390x: Remove left behing PGM report Janosch Frank
4 siblings, 1 reply; 9+ messages in thread
From: Janosch Frank @ 2021-07-06 12:17 UTC (permalink / raw)
To: kvm; +Cc: linux-s390, imbrenda, david, thuth, cohuck
The struct is getting longer, let's add offset comments so we know
where we change things when we add struct members.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
---
lib/s390x/asm/uv.h | 33 +++++++++++++++++----------------
1 file changed, 17 insertions(+), 16 deletions(-)
diff --git a/lib/s390x/asm/uv.h b/lib/s390x/asm/uv.h
index dc3e02d..ec10d1c 100644
--- a/lib/s390x/asm/uv.h
+++ b/lib/s390x/asm/uv.h
@@ -84,22 +84,23 @@ struct uv_cb_init {
} __attribute__((packed)) __attribute__((aligned(8)));
struct uv_cb_qui {
- struct uv_cb_header header;
- u64 reserved08;
- u64 inst_calls_list[4];
- u64 reserved30[2];
- u64 uv_base_stor_len;
- u64 reserved48;
- u64 conf_base_phys_stor_len;
- u64 conf_base_virt_stor_len;
- u64 conf_virt_var_stor_len;
- u64 cpu_stor_len;
- u32 reserved70[3];
- u32 max_num_sec_conf;
- u64 max_guest_stor_addr;
- u8 reserved88[158 - 136];
- u16 max_guest_cpus;
- u8 reserveda0[200 - 160];
+ struct uv_cb_header header; /* 0x0000 */
+ u64 reserved08; /* 0x0008 */
+ u64 inst_calls_list[4]; /* 0x0010 */
+ u64 reserved30[2]; /* 0x0030 */
+ u64 uv_base_stor_len; /* 0x0040 */
+ u64 reserved48; /* 0x0048 */
+ u64 conf_base_phys_stor_len; /* 0x0050 */
+ u64 conf_base_virt_stor_len; /* 0x0058 */
+ u64 conf_virt_var_stor_len; /* 0x0060 */
+ u64 cpu_stor_len; /* 0x0068 */
+ u32 reserved70[3]; /* 0x0070 */
+ u32 max_num_sec_conf; /* 0x007c */
+ u64 max_guest_stor_addr; /* 0x0080 */
+ u8 reserved88[158 - 136]; /* 0x0088 */
+ uint16_t max_guest_cpus; /* 0x009e */
+ u64 uv_feature_indications; /* 0x00a0 */
+ u8 reserveda8[200 - 168]; /* 0x00a8 */
} __attribute__((packed)) __attribute__((aligned(8)));
struct uv_cb_cgc {
--
2.30.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [kvm-unit-tests PATCH v2 4/5] lib: s390x: Print if a pgm happened while in SIE
2021-07-06 12:17 [kvm-unit-tests PATCH v2 0/5] s390x: sie and uv cleanups Janosch Frank
` (2 preceding siblings ...)
2021-07-06 12:17 ` [kvm-unit-tests PATCH v2 3/5] lib: s390x: uv: Add offset comments to uv_query and extend it Janosch Frank
@ 2021-07-06 12:17 ` Janosch Frank
2021-07-06 13:00 ` Cornelia Huck
2021-07-06 12:17 ` [kvm-unit-tests PATCH v2 5/5] lib: s390x: Remove left behing PGM report Janosch Frank
4 siblings, 1 reply; 9+ messages in thread
From: Janosch Frank @ 2021-07-06 12:17 UTC (permalink / raw)
To: kvm; +Cc: linux-s390, imbrenda, david, thuth, cohuck
For debugging it helps if you know if the PGM happened while being in
SIE or not.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
---
lib/s390x/interrupt.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/lib/s390x/interrupt.c b/lib/s390x/interrupt.c
index b627942..109f290 100644
--- a/lib/s390x/interrupt.c
+++ b/lib/s390x/interrupt.c
@@ -141,10 +141,15 @@ static void print_int_regs(struct stack_frame_int *stack)
static void print_pgm_info(struct stack_frame_int *stack)
{
+ bool in_sie;
+
+ in_sie = (lc->pgm_old_psw.addr >= (uintptr_t)sie_entry &&
+ lc->pgm_old_psw.addr <= (uintptr_t)sie_exit);
+
printf("\n");
- printf("Unexpected program interrupt: %d on cpu %d at %#lx, ilen %d\n",
- lc->pgm_int_code, stap(), lc->pgm_old_psw.addr,
- lc->pgm_int_id);
+ printf("Unexpected program interrupt %s: %d on cpu %d at %#lx, ilen %d\n",
+ in_sie ? "in SIE" : "",
+ lc->pgm_int_code, stap(), lc->pgm_old_psw.addr, lc->pgm_int_id);
print_int_regs(stack);
dump_stack();
report_summary();
--
2.30.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [kvm-unit-tests PATCH v2 5/5] lib: s390x: Remove left behing PGM report
2021-07-06 12:17 [kvm-unit-tests PATCH v2 0/5] s390x: sie and uv cleanups Janosch Frank
` (3 preceding siblings ...)
2021-07-06 12:17 ` [kvm-unit-tests PATCH v2 4/5] lib: s390x: Print if a pgm happened while in SIE Janosch Frank
@ 2021-07-06 12:17 ` Janosch Frank
2021-07-06 13:01 ` Cornelia Huck
4 siblings, 1 reply; 9+ messages in thread
From: Janosch Frank @ 2021-07-06 12:17 UTC (permalink / raw)
To: kvm; +Cc: linux-s390, imbrenda, david, thuth, cohuck
When I added the backtrace support I forgot to remove the PGM report.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
---
lib/s390x/interrupt.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/lib/s390x/interrupt.c b/lib/s390x/interrupt.c
index 109f290..785b735 100644
--- a/lib/s390x/interrupt.c
+++ b/lib/s390x/interrupt.c
@@ -162,9 +162,6 @@ void handle_pgm_int(struct stack_frame_int *stack)
/* Force sclp_busy to false, otherwise we will loop forever */
sclp_handle_ext();
print_pgm_info(stack);
- report_abort("Unexpected program interrupt: %d on cpu %d at %#lx, ilen %d\n",
- lc->pgm_int_code, stap(), lc->pgm_old_psw.addr,
- lc->pgm_int_id);
}
pgm_int_expected = false;
--
2.30.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [kvm-unit-tests PATCH v2 3/5] lib: s390x: uv: Add offset comments to uv_query and extend it
2021-07-06 12:17 ` [kvm-unit-tests PATCH v2 3/5] lib: s390x: uv: Add offset comments to uv_query and extend it Janosch Frank
@ 2021-07-06 12:59 ` Cornelia Huck
0 siblings, 0 replies; 9+ messages in thread
From: Cornelia Huck @ 2021-07-06 12:59 UTC (permalink / raw)
To: Janosch Frank, kvm; +Cc: linux-s390, imbrenda, david, thuth
On Tue, Jul 06 2021, Janosch Frank <frankja@linux.ibm.com> wrote:
> The struct is getting longer, let's add offset comments so we know
> where we change things when we add struct members.
>
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
> ---
> lib/s390x/asm/uv.h | 33 +++++++++++++++++----------------
> 1 file changed, 17 insertions(+), 16 deletions(-)
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [kvm-unit-tests PATCH v2 4/5] lib: s390x: Print if a pgm happened while in SIE
2021-07-06 12:17 ` [kvm-unit-tests PATCH v2 4/5] lib: s390x: Print if a pgm happened while in SIE Janosch Frank
@ 2021-07-06 13:00 ` Cornelia Huck
0 siblings, 0 replies; 9+ messages in thread
From: Cornelia Huck @ 2021-07-06 13:00 UTC (permalink / raw)
To: Janosch Frank, kvm; +Cc: linux-s390, imbrenda, david, thuth
On Tue, Jul 06 2021, Janosch Frank <frankja@linux.ibm.com> wrote:
> For debugging it helps if you know if the PGM happened while being in
> SIE or not.
>
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
> ---
> lib/s390x/interrupt.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [kvm-unit-tests PATCH v2 5/5] lib: s390x: Remove left behing PGM report
2021-07-06 12:17 ` [kvm-unit-tests PATCH v2 5/5] lib: s390x: Remove left behing PGM report Janosch Frank
@ 2021-07-06 13:01 ` Cornelia Huck
0 siblings, 0 replies; 9+ messages in thread
From: Cornelia Huck @ 2021-07-06 13:01 UTC (permalink / raw)
To: Janosch Frank, kvm; +Cc: linux-s390, imbrenda, david, thuth
On Tue, Jul 06 2021, Janosch Frank <frankja@linux.ibm.com> wrote:
> When I added the backtrace support I forgot to remove the PGM report.
>
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
> ---
> lib/s390x/interrupt.c | 3 ---
> 1 file changed, 3 deletions(-)
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-07-06 13:02 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-06 12:17 [kvm-unit-tests PATCH v2 0/5] s390x: sie and uv cleanups Janosch Frank
2021-07-06 12:17 ` [kvm-unit-tests PATCH v2 1/5] s390x: sie: Add missing includes Janosch Frank
2021-07-06 12:17 ` [kvm-unit-tests PATCH v2 2/5] s390x: sie: Fix sie.h integer types Janosch Frank
2021-07-06 12:17 ` [kvm-unit-tests PATCH v2 3/5] lib: s390x: uv: Add offset comments to uv_query and extend it Janosch Frank
2021-07-06 12:59 ` Cornelia Huck
2021-07-06 12:17 ` [kvm-unit-tests PATCH v2 4/5] lib: s390x: Print if a pgm happened while in SIE Janosch Frank
2021-07-06 13:00 ` Cornelia Huck
2021-07-06 12:17 ` [kvm-unit-tests PATCH v2 5/5] lib: s390x: Remove left behing PGM report Janosch Frank
2021-07-06 13:01 ` Cornelia Huck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).