[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y93DzL77oRCWbJOB@google.com>
Date: Sat, 4 Feb 2023 02:32:44 +0000
From: Sean Christopherson <seanjc@...gle.com>
To: David Woodhouse <dwmw2@...radead.org>
Cc: Boqun Feng <boqun.feng@...il.com>, linux-kernel@...r.kernel.org,
rcu@...r.kernel.org, kvm@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
Waiman Long <longman@...hat.com>,
Lai Jiangshan <jiangshanlai@...il.com>,
"Paul E . McKenney" <paulmck@...nel.org>,
Josh Triplett <josh@...htriplett.org>,
Steven Rostedt <rostedt@...dmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Joel Fernandes <joel@...lfernandes.org>,
Matthew Wilcox <willy@...radead.org>,
Michal Luczaj <mhal@...x.co>
Subject: Re: [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.
Powered by blists - more mailing lists