From: Hariharan Mari <hari55@linux.ibm.com>
To: Christoph Schlameuss <schlameuss@linux.ibm.com>
Cc: kvm@vger.kernel.org,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Janosch Frank <frankja@linux.ibm.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>,
David Hildenbrand <david@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Shuah Khan <shuah@kernel.org>,
linux-s390@vger.kernel.org, linux-kselftest@vger.kernel.org,
Ulrich Weigand <ulrich.weigand@de.ibm.com>,
Dominik Dingel <dingel@linux.vnet.ibm.com>,
Cornelia Huck <cohuck@redhat.com>
Subject: Re: [PATCH v2 4/6] selftests: kvm: s390: Add ucontrol gis routing test
Date: Thu, 19 Dec 2024 16:54:33 +0100 [thread overview]
Message-ID: <0d8a5868b97d02470453b4175f347153@linux.ibm.com> (raw)
In-Reply-To: <20241216092140.329196-5-schlameuss@linux.ibm.com>
On 2024-12-16 10:21, Christoph Schlameuss wrote:
> Add a selftests for the interrupt routing configuration when using
> ucontrol VMs.
>
> Calling the test may trigger a null pointer dereferences on kernels not
> containing the fixes in this patch series.
>
> Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
Reviewed-by: Hariharan Mari <hari55@linux.ibm.com>
> ---
> .../selftests/kvm/s390x/ucontrol_test.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/tools/testing/selftests/kvm/s390x/ucontrol_test.c
> b/tools/testing/selftests/kvm/s390x/ucontrol_test.c
> index b003abda8495..8f306395696e 100644
> --- a/tools/testing/selftests/kvm/s390x/ucontrol_test.c
> +++ b/tools/testing/selftests/kvm/s390x/ucontrol_test.c
> @@ -783,4 +783,23 @@ TEST_F(uc_kvm, uc_flic_attrs)
> close(cd.fd);
> }
>
> +TEST_F(uc_kvm, uc_set_gsi_routing)
> +{
> + struct kvm_irq_routing *routing = kvm_gsi_routing_create();
> + struct kvm_irq_routing_entry ue = {
> + .type = KVM_IRQ_ROUTING_S390_ADAPTER,
> + .gsi = 1,
> + .u.adapter = (struct kvm_irq_routing_s390_adapter) {
> + .ind_addr = 0,
> + },
> + };
> + int rc;
> +
> + routing->entries[0] = ue;
> + routing->nr = 1;
> + rc = ioctl(self->vm_fd, KVM_SET_GSI_ROUTING, routing);
> + ASSERT_EQ(-1, rc) TH_LOG("err %s (%i)", strerror(errno), errno);
> + ASSERT_EQ(EINVAL, errno) TH_LOG("err %s (%i)", strerror(errno),
> errno);
> +}
> +
> TEST_HARNESS_MAIN
next prev parent reply other threads:[~2024-12-19 15:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-16 9:21 [PATCH v2 0/6] selftests: kvm: s390: Reject invalid ioctls on ucontrol VMs Christoph Schlameuss
2024-12-16 9:21 ` [PATCH v2 1/6] kvm: s390: Reject setting flic pfault attributes " Christoph Schlameuss
2024-12-19 10:03 ` Hariharan Mari
2024-12-16 9:21 ` [PATCH v2 2/6] selftests: kvm: s390: Add ucontrol flic attr selftests Christoph Schlameuss
2024-12-18 15:07 ` Hariharan Mari
2024-12-19 15:52 ` Hariharan Mari
2024-12-16 9:21 ` [PATCH v2 3/6] kvm: s390: Reject KVM_SET_GSI_ROUTING on ucontrol VMs Christoph Schlameuss
2024-12-18 15:08 ` Hariharan Mari
2024-12-19 15:53 ` Hariharan Mari
2024-12-16 9:21 ` [PATCH v2 4/6] selftests: kvm: s390: Add ucontrol gis routing test Christoph Schlameuss
2024-12-18 15:08 ` Hariharan Mari
2024-12-19 15:54 ` Hariharan Mari [this message]
2024-12-16 9:21 ` [PATCH v2 5/6] selftests: kvm: s390: Streamline uc_skey test to issue iske after sske Christoph Schlameuss
2024-12-18 15:09 ` Hariharan Mari
2024-12-16 9:21 ` [PATCH v2 6/6] selftests: kvm: s390: Add has device attr check to uc_attr_mem_limit selftest Christoph Schlameuss
2024-12-18 15:09 ` Hariharan Mari
2024-12-16 13:01 ` [PATCH v2 0/6] selftests: kvm: s390: Reject invalid ioctls on ucontrol VMs 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=0d8a5868b97d02470453b4175f347153@linux.ibm.com \
--to=hari55@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=dingel@linux.vnet.ibm.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=pbonzini@redhat.com \
--cc=schlameuss@linux.ibm.com \
--cc=shuah@kernel.org \
--cc=ulrich.weigand@de.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox