From: Janosch Frank <frankja@linux.ibm.com>
To: Christoph Schlameuss <schlameuss@linux.ibm.com>, kvm@vger.kernel.org
Cc: 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: Wed, 31 Jul 2024 16:37:19 +0200 [thread overview]
Message-ID: <59ab0ce7-9434-4f99-9fb5-dcf6bf90fb2f@linux.ibm.com> (raw)
In-Reply-To: <20240730072413.143556-7-schlameuss@linux.ibm.com>
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
> + 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?
> + 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;
> +}
next prev parent reply other threads:[~2024-07-31 14:37 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 [this message]
2024-08-01 7:05 ` Christoph Schlameuss
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=59ab0ce7-9434-4f99-9fb5-dcf6bf90fb2f@linux.ibm.com \
--to=frankja@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=david@redhat.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=schlameuss@linux.ibm.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