From: Claudio Imbrenda <imbrenda@linux.ibm.com>
To: Christoph Schlameuss <schlameuss@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>,
Janosch Frank <frankja@linux.ibm.com>,
David Hildenbrand <david@redhat.com>,
Nina Schoetterl-Glausch <nsg@linux.ibm.com>
Subject: Re: [PATCH v3 1/3] selftests: kvm: s390: Add uc_map_unmap VM test case
Date: Fri, 13 Sep 2024 18:48:02 +0200 [thread overview]
Message-ID: <20240913184802.3365e253@p-imbrenda> (raw)
In-Reply-To: <20240913115248.211071-2-schlameuss@linux.ibm.com>
On Fri, 13 Sep 2024 13:52:46 +0200
Christoph Schlameuss <schlameuss@linux.ibm.com> wrote:
> Add a test case verifying basic running and interaction of ucontrol VMs.
> Fill the segment and page tables for allocated memory and map memory on
> first access.
>
> * uc_map_unmap
> Store and load data to mapped and unmapped memory and use pic segment
> translation handling to map memory on access.
>
> Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
> ---
> .../selftests/kvm/s390x/ucontrol_test.c | 145 +++++++++++++++++-
> 1 file changed, 144 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/kvm/s390x/ucontrol_test.c b/tools/testing/selftests/kvm/s390x/ucontrol_test.c
> index 030c59010fe1..084cea02c2fa 100644
> --- a/tools/testing/selftests/kvm/s390x/ucontrol_test.c
> +++ b/tools/testing/selftests/kvm/s390x/ucontrol_test.c
[...]
>base_gpa + self->code_gpa;
> @@ -222,6 +244,60 @@ TEST(uc_cap_hpage)
> close(kvm_fd);
> }
>
> +/* calculate host virtual addr from guest physical addr */
> +static void *gpa2hva(FIXTURE_DATA(uc_kvm) * self, u64 gpa)
why the space? I would have expected *self
> +{
> + return (void *)(self->base_hva - self->base_gpa + gpa);
> +}
> +
> +/* map / make additional memory available */
[...]
next prev parent reply other threads:[~2024-09-13 16:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-13 11:52 [PATCH v3 0/3] selftests: kvm: s390: Add ucontrol memory selftests Christoph Schlameuss
2024-09-13 11:52 ` [PATCH v3 1/3] selftests: kvm: s390: Add uc_map_unmap VM test case Christoph Schlameuss
2024-09-13 12:52 ` Janosch Frank
2024-09-13 16:48 ` Claudio Imbrenda [this message]
2024-09-16 6:25 ` Christoph Schlameuss
2024-09-16 6:33 ` Janosch Frank
2024-09-16 11:20 ` Christoph Schlameuss
2024-09-13 11:52 ` [PATCH v3 2/3] selftests: kvm: s390: Add uc_skey " Christoph Schlameuss
2024-09-13 13:53 ` Janosch Frank
2024-09-13 11:52 ` [PATCH v3 3/3] selftests: kvm: s390: Verify reject memory region operations for ucontrol VMs Christoph Schlameuss
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=20240913184802.3365e253@p-imbrenda \
--to=imbrenda@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=david@redhat.com \
--cc=frankja@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