All of lore.kernel.org
 help / color / mirror / Atom feed
From: Janosch Frank <frankja@linux.ibm.com>
To: Thomas Huth <thuth@redhat.com>, kvm@vger.kernel.org
Cc: linux-s390@vger.kernel.org, david@redhat.com,
	borntraeger@de.ibm.com, cohuck@redhat.com,
	imbrenda@linux.ibm.com
Subject: Re: [kvm-unit-tests PATCH 2/3] s390x: skrf: Add exception new skey test and add test to unittests.cfg
Date: Tue, 21 Jul 2020 10:52:18 +0200	[thread overview]
Message-ID: <032c1103-3020-9deb-a307-70ded3bdb55e@linux.ibm.com> (raw)
In-Reply-To: <78da93f7-118d-2c1d-582a-092232f36108@redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 2456 bytes --]

On 7/21/20 9:28 AM, Thomas Huth wrote:
> On 17/07/2020 16.58, Janosch Frank wrote:
>> If a exception new psw mask contains a key a specification exception
>> instead of a special operation exception is presented.
> 
> I have troubles parsing that sentence... could you write that differently?
> (and: "s/a exception/an exception/")

How about:

When an exception psw new with a storage key in its mask is loaded from
lowcore a specification exception is raised instead of the special
operation exception that is normally presented when skrf is active.

> 
>> Let's test
>> that.
>>
>> Also let's add the test to unittests.cfg so it is run more often.
>>
>> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
>> ---
>>  s390x/skrf.c        | 81 +++++++++++++++++++++++++++++++++++++++++++++
>>  s390x/unittests.cfg |  4 +++
>>  2 files changed, 85 insertions(+)
>>
>> diff --git a/s390x/skrf.c b/s390x/skrf.c
>> index 9cae589..9733412 100644
>> --- a/s390x/skrf.c
>> +++ b/s390x/skrf.c
>> @@ -15,6 +15,8 @@
>>  #include <asm/page.h>
>>  #include <asm/facility.h>
>>  #include <asm/mem.h>
>> +#include <asm/sigp.h>
>> +#include <smp.h>
>>  
>>  static uint8_t pagebuf[PAGE_SIZE * 2] __attribute__((aligned(PAGE_SIZE * 2)));
>>  
>> @@ -106,6 +108,84 @@ static void test_tprot(void)
>>  	report_prefix_pop();
>>  }
>>  
>> +#include <asm-generic/barrier.h>
> 
> Can we keep the #includes at the top of the file, please?

Yes

> 
>> +static int testflag = 0;
>> +
>> +static void wait_for_flag(void)
>> +{
>> +	while (!testflag)
>> +		mb();
>> +}
>> +
>> +static void set_flag(int val)
>> +{
>> +	mb();
>> +	testflag = val;
>> +	mb();
>> +}
>> +
>> +static void ecall_cleanup(void)
>> +{
>> +	struct lowcore *lc = (void *)0x0;
>> +
>> +	lc->ext_new_psw.mask = 0x0000000180000000UL;
> 
> Don't we have defines for the PSW values yet?

Pierre dropped that patch because of your old binutils version...

> 
>> +	lc->sw_int_crs[0] = 0x0000000000040000;
>> +
>> +	/*
>> +	 * PGM old contains the ext new PSW, we need to clean it up,
>> +	 * so we don't get a special oepration exception on the lpswe
> 
> operation

fixed

> 
>> +	 * of pgm old.
>> +	 */
>> +	lc->pgm_old_psw.mask = 0x0000000180000000UL;
>> +	lc->pgm_old_psw.addr = (unsigned long)wait_for_flag;
>> +
>> +	check_pgm_int_code(PGM_INT_CODE_SPECIFICATION);
>> +	set_flag(1);
>> +}
> 
>  Thomas
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-07-21  8:52 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17 14:58 [kvm-unit-tests PATCH 0/3] PV tests part 1 Janosch Frank
2020-07-17 14:58 ` [kvm-unit-tests PATCH 1/3] s390x: Add custom pgm cleanup function Janosch Frank
2020-07-20 10:37   ` Claudio Imbrenda
2020-07-21  7:12   ` Thomas Huth
2020-07-23 12:01   ` Cornelia Huck
2020-07-23 12:23     ` Janosch Frank
2020-07-23 12:30       ` Cornelia Huck
2020-07-17 14:58 ` [kvm-unit-tests PATCH 2/3] s390x: skrf: Add exception new skey test and add test to unittests.cfg Janosch Frank
2020-07-20 10:42   ` Claudio Imbrenda
2020-07-21  7:28   ` Thomas Huth
2020-07-21  8:52     ` Janosch Frank [this message]
2020-07-21 14:28       ` Thomas Huth
2020-07-21 15:03         ` Janosch Frank
2020-07-23 12:10           ` Cornelia Huck
2020-07-23 12:19             ` Janosch Frank
2020-07-17 14:58 ` [kvm-unit-tests PATCH 3/3] s390x: Ultavisor guest API test Janosch Frank
2020-07-20 10:49   ` Claudio Imbrenda
2020-07-20 11:42     ` Janosch Frank
2020-07-20 13:24       ` Claudio Imbrenda
2020-07-20 13:35   ` [kvm-unit-tests PATCH v2] " Janosch Frank
2020-07-21  7:36     ` Thomas Huth
2020-07-21  7:32   ` [kvm-unit-tests PATCH 3/3] " Thomas Huth
2020-07-21 12:55   ` Claudio Imbrenda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=032c1103-3020-9deb-a307-70ded3bdb55e@linux.ibm.com \
    --to=frankja@linux.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.