From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF603C05027 for ; Sat, 4 Feb 2023 02:32:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230042AbjBDCcw (ORCPT ); Fri, 3 Feb 2023 21:32:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229782AbjBDCcv (ORCPT ); Fri, 3 Feb 2023 21:32:51 -0500 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E4FE783D1 for ; Fri, 3 Feb 2023 18:32:49 -0800 (PST) Received: by mail-pj1-x1036.google.com with SMTP id o13so6794528pjg.2 for ; Fri, 03 Feb 2023 18:32:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=JJbv4yo9z1tKADvI6a3aboLzFFTaY4TL3y4qXVEelc0=; b=Ctz0TWzwdQWLHfmJLuyKsEqy7JnxDb7MCEbgueEzLymTkHOWkAxgNkO4+qaqH8Yctl 2GwGZbsUY7V3SHBpV6JkmrhJ9yYl+7GBWjYmduyXzzzMDGkeNda1WpY8EVErXg9teiuC gf2JLnot74AiLehs21xhCIebWXsmROXY2WctSFuWkPF0y4bSQwCLICGj+VLPjScFuT/7 WkOFKv7ni8wWPcQlchUD61WfLBGVqnAkJ0L3Jn/SEXt8GeQfN02oNyf3p+u5hORrOt7P fMFCZxFEZVut1mwY1rFKDXlx8LBOH12khTISsxzLAMnxM/mVQfBbY5CnSjUFu7jLqlBE aUuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=JJbv4yo9z1tKADvI6a3aboLzFFTaY4TL3y4qXVEelc0=; b=TCj6mDMuZQLrfQqgvUZte/6Ex74kVGwoC4MFJd2N2WlJ7lzio64+Mgp+YUHjW3ax9N GD7fGNxcJj0WKf2AZLroA7MeKHs3c7dEo85pzxd1hZsUa9wQR/rmN6K/gXBqxfom1f6p R6EyKbgiFyaMDMY/vGeQE/KUgjqSt2K6PWwgsRXAGyZYXzkWjG5RmYcXHhsBnSlLsIgq Q6GWw58Lg68RoENfqJcogoxd2OYVooAdPLZgF/l2SgjCIqtvW+lVatKFw2tcwaRYFx2C KSIQSVKXbGGJdXiVzgBej9ju++9AMDtpZ34BREDSLoGQDD7pbx69pxbsVFVaSVQ6B1X4 04Pw== X-Gm-Message-State: AO0yUKW5IvmNGOg9FPUCHYo0bjLocQW+b8NBtsh0h9vTHJX3GfN9SwhZ 8mPNRxjAHp2EmA3iFlkZElVGYBcNCCJBvbEJpEY= X-Google-Smtp-Source: AK7set9ci3NH6OTBikQiPjHIfm+Xp9bgU+h1YrCilT1EqyMOVWawa6TRCT8/tEWDgc88aYNQxAdd4g== X-Received: by 2002:a17:903:22c6:b0:198:af50:e4eb with SMTP id y6-20020a17090322c600b00198af50e4ebmr84078plg.17.1675477968822; Fri, 03 Feb 2023 18:32:48 -0800 (PST) Received: from google.com (7.104.168.34.bc.googleusercontent.com. [34.168.104.7]) by smtp.gmail.com with ESMTPSA id o16-20020a170902d4d000b0019678eb963fsm2290195plg.145.2023.02.03.18.32.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Feb 2023 18:32:48 -0800 (PST) Date: Sat, 4 Feb 2023 02:32:44 +0000 From: Sean Christopherson To: David Woodhouse Cc: Boqun Feng , linux-kernel@vger.kernel.org, rcu@vger.kernel.org, kvm@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long , Lai Jiangshan , "Paul E . McKenney" , Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Paolo Bonzini , Joel Fernandes , Matthew Wilcox , Michal Luczaj Subject: Re: [PATCH 3/3] KVM: selftests: Add EVTCHNOP_send slow path test to xen_shinfo_test Message-ID: References: <20230113065955.815667-1-boqun.feng@gmail.com> <20230113124606.10221-1-dwmw2@infradead.org> <20230113124606.10221-4-dwmw2@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230113124606.10221-4-dwmw2@infradead.org> Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org 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.