public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Schlameuss <schlameuss@linux.ibm.com>
To: Janosch Frank <frankja@linux.ibm.com>
Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org,
	linux-kselftest@vger.kernel.org,
	Paolo Bonzini <pbonzini@redhat.com>,
	Shuah Khan <shuah@kernel.org>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Claudio Imbrenda <imbrenda@linux.ibm.com>,
	David Hildenbrand <david@redhat.com>,
	Nina Schoetterl-Glausch <nsg@linux.ibm.com>
Subject: Re: [PATCH v3 06/10] selftests: kvm: s390: Add VM run test case
Date: Thu, 1 Aug 2024 09:05:22 +0200	[thread overview]
Message-ID: <20240801090522.1e92849e.schlameuss@linux.ibm.com> (raw)
In-Reply-To: <59ab0ce7-9434-4f99-9fb5-dcf6bf90fb2f@linux.ibm.com>

On Wed, 31 Jul 2024 16:37:19 +0200
Janosch Frank <frankja@linux.ibm.com> wrote:

> On 7/30/24 9:24 AM, Christoph Schlameuss wrote:
> > Add test case running code interacting with registers within a
> > ucontrol VM.
> > 
> > * Add uc_gprs test case
> > 
> > The test uses the same VM setup using the fixture and debug macros
> > introduced in earlier patches in this series.
> > 
> > Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
> > ---
> >   .../selftests/kvm/s390x/ucontrol_test.c       | 126 ++++++++++++++++++
> >   1 file changed, 126 insertions(+)
> > 
> > diff --git a/tools/testing/selftests/kvm/s390x/ucontrol_test.c b/tools/testing/selftests/kvm/s390x/ucontrol_test.c
> > index 029233374465..817b1e08559c 100644
> > --- a/tools/testing/selftests/kvm/s390x/ucontrol_test.c
> > +++ b/tools/testing/selftests/kvm/s390x/ucontrol_test.c
> > @@ -41,6 +41,23 @@ void require_ucontrol_admin(void)
> >   	TEST_REQUIRE(kvm_has_cap(KVM_CAP_S390_UCONTROL));
> >   }  
> [...]
> > +/* verify SIEIC exit
> > + * * reset stop requests
> > + * * fail on codes not expected in the test cases
> > + */
> > +static bool uc_handle_sieic(FIXTURE_DATA(uc_kvm) * self)
> > +{
> > +	struct kvm_s390_sie_block *sie_block = self->sie_block;
> > +	struct kvm_run *run = self->run;
> > +
> > +	/* check SIE interception code */
> > +	pr_info("sieic: 0x%2x 0x%4x 0x%4x\n",  
> 
> I don't think there should be a space before the 4:
> sieic: 0x 4 0x8300 0x440000
> 
> We can automatically add in the missing 0
> 0x%02x
> 

At some point I considered that easier to read without the leading
zeroes, but even that is not even true for me any more. I will change
that to "sieic: 0x%.2x 0x%.4x 0x%.4x\n".

> > +		run->s390_sieic.icptcode,
> > +		run->s390_sieic.ipa,
> > +		run->s390_sieic.ipb);
> > +	switch (run->s390_sieic.icptcode) {
> > +	case ICPT_STOP:
> > +		/* stopped via sie V P --> ignore */
> > +		/* reset stop request */
> > +		sie_block->cpuflags = sie_block->cpuflags & ~CPUSTAT_STOP_INT;
> > +		pr_info("sie V P - cleared %.4x\n", sie_block->cpuflags);
> > +		break;  
> 
> With the added code that removes the P bit this shouldn't be called 
> anymore, no?
> 

Yes, you are right this is no longer needed. And I will remove it.

> > +	case ICPT_INST:
> > +		/* end execution in caller on intercepted instruction */
> > +		return false;
> > +	default:
> > +		TEST_FAIL("UNEXPECTED SIEIC CODE %d", run->s390_sieic.icptcode);
> > +	}
> > +	return true;
> > +}  
> 


  reply	other threads:[~2024-08-01  7:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-30  7:24 [PATCH v3 00/10] selftests: kvm: s390: Add s390x ucontrol selftests Christoph Schlameuss
2024-07-30  7:24 ` [PATCH v3 01/10] selftests: kvm: s390: Define page sizes in shared header Christoph Schlameuss
2024-07-30  7:24 ` [PATCH v3 02/10] selftests: kvm: s390: Add kvm_s390_sie_block definition for userspace tests Christoph Schlameuss
2024-07-30 12:04   ` Janosch Frank
2024-07-30  7:24 ` [PATCH v3 03/10] selftests: kvm: s390: Add s390x ucontrol test suite with hpage test Christoph Schlameuss
2024-07-30 13:14   ` Janosch Frank
2024-07-30  7:24 ` [PATCH v3 04/10] selftests: kvm: s390: Add test fixture and simple VM setup tests Christoph Schlameuss
2024-07-30  7:24 ` [PATCH v3 05/10] selftests: kvm: s390: Add debug print functions Christoph Schlameuss
2024-08-01  8:44   ` Janosch Frank
2024-07-30  7:24 ` [PATCH v3 06/10] selftests: kvm: s390: Add VM run test case Christoph Schlameuss
2024-07-31 14:37   ` Janosch Frank
2024-08-01  7:05     ` Christoph Schlameuss [this message]
2024-07-30  7:24 ` [PATCH v3 07/10] selftests: kvm: s390: Add uc_map_unmap VM " Christoph Schlameuss
2024-08-01  9:08   ` Janosch Frank
2024-08-01 15:06     ` Christoph Schlameuss
2024-07-30  7:24 ` [PATCH v3 08/10] selftests: kvm: s390: Add uc_skey " Christoph Schlameuss
2024-07-30  7:24 ` [PATCH v3 09/10] selftests: kvm: s390: Verify reject memory region operations for ucontrol VMs Christoph Schlameuss
2024-08-01  9:11   ` Janosch Frank
2024-07-30  7:24 ` [PATCH v3 10/10] s390: Enable KVM_S390_UCONTROL config in debug_defconfig Christoph Schlameuss
2024-08-01 10:40   ` Janosch Frank

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=20240801090522.1e92849e.schlameuss@linux.ibm.com \
    --to=schlameuss@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=nsg@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=shuah@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox