mbox series

[kvm-unit-tests,0/2] s390x: Improve architectural compliance for diag308

Message ID 20191105162828.2490-1-frankja@linux.ibm.com (mailing list archive)
Headers show
Series s390x: Improve architectural compliance for diag308 | expand

Message

Janosch Frank Nov. 5, 2019, 4:28 p.m. UTC
When testing diag308 subcodes 0/1 on lpar with virtual mem set up, I
experienced spec PGMs and addressing PGMs due to the tests not setting
short psw bit 12 and leaving the DAT bit on.

The problem was not found under KVM/QEMU, because Qemu just ignores
all cpu mask bits... I'm working on a fix for that too.

Janosch Frank (2):
  s390x: Add CR save area
  s390x: Remove DAT and add short indication psw bits on diag308 reset

 lib/s390x/asm-offsets.c  |  3 ++-
 lib/s390x/asm/arch_def.h |  5 +++--
 lib/s390x/interrupt.c    |  4 ++--
 lib/s390x/smp.c          |  2 +-
 s390x/cstart64.S         | 29 ++++++++++++++++++++---------
 5 files changed, 28 insertions(+), 15 deletions(-)

Comments

David Hildenbrand Nov. 5, 2019, 5:34 p.m. UTC | #1
> Am 05.11.2019 um 17:29 schrieb Janosch Frank <frankja@linux.ibm.com>:
> 
> When testing diag308 subcodes 0/1 on lpar with virtual mem set up, I
> experienced spec PGMs and addressing PGMs due to the tests not setting
> short psw bit 12 and leaving the DAT bit on.
> 
> The problem was not found under KVM/QEMU, because Qemu just ignores
> all cpu mask bits... I'm working on a fix for that too.
> 

I don‘t have access to documentation. Is what LPAR does documented behavior or is this completely undocumented and therefore undefined behavior? Then we should remove these test cases completely instead.

> Janosch Frank (2):
>  s390x: Add CR save area
>  s390x: Remove DAT and add short indication psw bits on diag308 reset
> 
> lib/s390x/asm-offsets.c  |  3 ++-
> lib/s390x/asm/arch_def.h |  5 +++--
> lib/s390x/interrupt.c    |  4 ++--
> lib/s390x/smp.c          |  2 +-
> s390x/cstart64.S         | 29 ++++++++++++++++++++---------
> 5 files changed, 28 insertions(+), 15 deletions(-)
> 
> -- 
> 2.20.1
>
Christian Borntraeger Nov. 5, 2019, 6:23 p.m. UTC | #2
On 05.11.19 18:34, David Hildenbrand wrote:
> 
> 
>> Am 05.11.2019 um 17:29 schrieb Janosch Frank <frankja@linux.ibm.com>:
>>
>> When testing diag308 subcodes 0/1 on lpar with virtual mem set up, I
>> experienced spec PGMs and addressing PGMs due to the tests not setting
>> short psw bit 12 and leaving the DAT bit on.
>>
>> The problem was not found under KVM/QEMU, because Qemu just ignores
>> all cpu mask bits... I'm working on a fix for that too.
>>
> 
> I don‘t have access to documentation. Is what LPAR does documented behavior or is this completely undocumented and therefore undefined behavior? Then we should remove these test cases completely instead.

Yes. It was just that KVM/QEMU never looked at the mask and just used a default
one. The short PSW on address 0 clearly contains a mask and we should better set
it.
> 
>> Janosch Frank (2):
>>  s390x: Add CR save area
>>  s390x: Remove DAT and add short indication psw bits on diag308 reset
>>
>> lib/s390x/asm-offsets.c  |  3 ++-
>> lib/s390x/asm/arch_def.h |  5 +++--
>> lib/s390x/interrupt.c    |  4 ++--
>> lib/s390x/smp.c          |  2 +-
>> s390x/cstart64.S         | 29 ++++++++++++++++++++---------
>> 5 files changed, 28 insertions(+), 15 deletions(-)
>>
>> -- 
>> 2.20.1
>>
Janosch Frank Nov. 5, 2019, 6:37 p.m. UTC | #3
On 11/5/19 7:23 PM, Christian Borntraeger wrote:
> 
> 
> On 05.11.19 18:34, David Hildenbrand wrote:
>>
>>
>>> Am 05.11.2019 um 17:29 schrieb Janosch Frank <frankja@linux.ibm.com>:
>>>
>>> When testing diag308 subcodes 0/1 on lpar with virtual mem set up, I
>>> experienced spec PGMs and addressing PGMs due to the tests not setting
>>> short psw bit 12 and leaving the DAT bit on.
>>>
>>> The problem was not found under KVM/QEMU, because Qemu just ignores
>>> all cpu mask bits... I'm working on a fix for that too.
>>>
>>
>> I don‘t have access to documentation. Is what LPAR does documented behavior or is this completely undocumented and therefore undefined behavior? Then we should remove these test cases completely instead.
> 
> Yes. It was just that KVM/QEMU never looked at the mask and just used a default
> one. The short PSW on address 0 clearly contains a mask and we should better set
> it.

Yeah, we're currently reviewing the QEMU patch to fix this, I'll send it
out tomorrow.

>>
>>> Janosch Frank (2):
>>>  s390x: Add CR save area
>>>  s390x: Remove DAT and add short indication psw bits on diag308 reset
>>>
>>> lib/s390x/asm-offsets.c  |  3 ++-
>>> lib/s390x/asm/arch_def.h |  5 +++--
>>> lib/s390x/interrupt.c    |  4 ++--
>>> lib/s390x/smp.c          |  2 +-
>>> s390x/cstart64.S         | 29 ++++++++++++++++++++---------
>>> 5 files changed, 28 insertions(+), 15 deletions(-)
>>>
>>> -- 
>>> 2.20.1
>>>