public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
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 v4 2/4] selftests: kvm: s390: Add uc_skey VM test case
Date: Tue, 17 Sep 2024 16:13:15 +0200	[thread overview]
Message-ID: <3421909f-2177-443d-be52-58f5784f9f23@linux.ibm.com> (raw)
In-Reply-To: <20240917064456.210839-3-schlameuss@linux.ibm.com>

On 9/17/24 8:44 AM, Christoph Schlameuss wrote:
> Add a test case manipulating s390 storage keys from within the ucontrol
> VM.
> 
> Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>

With the nit fixed:
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>

> +	/* SSKE */
> +	sync_regs->gprs[1] = skeyvalue;
> +	run->kvm_dirty_regs |= KVM_SYNC_GPRS;
> +	ASSERT_EQ(0, uc_run_once(self));
> +	ASSERT_EQ(false, uc_handle_exit(self));
> +	ASSERT_EQ(3, sync_regs->gprs[0]);
> +	ASSERT_EQ(skeyvalue, sync_regs->gprs[1]);
> +	uc_assert_diag44(self);
> +
> +	/* RRBE */
> +	sync_regs->gprs[1] = skeyvalue;
> +	run->kvm_dirty_regs |= KVM_SYNC_GPRS;
> +	ASSERT_EQ(0, uc_run_once(self));
> +	ASSERT_EQ(false, uc_handle_exit(self));
> +	ASSERT_EQ(4, sync_regs->gprs[0]);
> +	/* assert R reset but rest of skey unchanged */
> +	ASSERT_EQ(skeyvalue & 0xfa, sync_regs->gprs[1]);
> +	ASSERT_EQ(0x00, sync_regs->gprs[1] & 0x04);

s/0x00/0/

> +	uc_assert_diag44(self);
> +}
> +
>   TEST_HARNESS_MAIN


  reply	other threads:[~2024-09-17 14:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-17  6:44 [PATCH v4 0/4] selftests: kvm: s390: Add ucontrol memory selftests Christoph Schlameuss
2024-09-17  6:44 ` [PATCH v4 1/4] selftests: kvm: s390: Add uc_map_unmap VM test case Christoph Schlameuss
2024-09-17 11:50   ` Janosch Frank
2024-09-17  6:44 ` [PATCH v4 2/4] selftests: kvm: s390: Add uc_skey " Christoph Schlameuss
2024-09-17 14:13   ` Janosch Frank [this message]
2024-09-17  6:44 ` [PATCH v4 3/4] selftests: kvm: s390: Verify reject memory region operations for ucontrol VMs Christoph Schlameuss
2024-09-17  6:44 ` [PATCH v4 4/4] fixup! selftests: kvm: s390: Add VM run test case Christoph Schlameuss
2024-09-17 14:20   ` 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=3421909f-2177-443d-be52-58f5784f9f23@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