lkml.org 
[lkml]   [2023]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] KVM: selftests: Add EVTCHNOP_send slow path test to xen_shinfo_test
On Fri, Jan 13, 2023, David Woodhouse wrote:
> @@ -57,6 +60,7 @@ enum {
> TEST_EVTCHN_SLOWPATH,
> TEST_EVTCHN_SEND_IOCTL,
> TEST_EVTCHN_HCALL,
> + TEST_EVTCHN_HCALL_SLOWPATH,
> TEST_EVTCHN_HCALL_EVENTFD,
> TEST_TIMER_SETUP,
> TEST_TIMER_WAIT,
> @@ -270,6 +274,20 @@ static void guest_code(void)
>
> guest_wait_for_irq();
>
> + GUEST_SYNC(TEST_EVTCHN_HCALL_SLOWPATH);
> +
> + /* Same again, but this time the host has messed with memslots
> + * so it should take the slow path in kvm_xen_set_evtchn(). */

/*
* https://lore.kernel.org/all/CA+55aFyQYJerovMsSoSKS7PessZBr4vNp-3QUUwhqk4A4_jcbg@mail.gmail.com
*/

> + __asm__ __volatile__ ("vmcall" :
> + "=a" (rax) :
> + "a" (__HYPERVISOR_event_channel_op),
> + "D" (EVTCHNOP_send),
> + "S" (&s));
> +
> + GUEST_ASSERT(rax == 0);

There's a lot of copy+paste in this file, and we really should do VMMCALL when
running on AMD. That's easy to do with some changes that are in the queue for
6.3. I'll repost these selftest patches on top of a few patches to add helpers for
doing hypercalls using the Xen ABI.

\
 
 \ /
  Last update: 2023-03-27 00:09    [W:0.050 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site