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 AB15EC433FE for ; Wed, 27 Apr 2022 20:23:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236153AbiD0U0s (ORCPT ); Wed, 27 Apr 2022 16:26:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235960AbiD0U0r (ORCPT ); Wed, 27 Apr 2022 16:26:47 -0400 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 E2043AD10D for ; Wed, 27 Apr 2022 13:23:32 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id d23-20020a17090a115700b001d2bde6c234so4437401pje.1 for ; Wed, 27 Apr 2022 13:23:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Lf9in1R/IyB6rX6jUJyTZ+zPOwsufKTBlApv7ttWWfI=; b=mkxmR1CbEjd7T2oSqQlrgTQGHLlxZ+wMChlXJfbXaJrep9GBLX60uCfKBbyXYGwQyY KDeQaI/saGyf/LQwrsxRc4jpYpOJDNAOWSHS6RjaaHaFYnWhyYzY0WUVLU0fnQ65rQ1L +IFWWit2h/ta/ZKMcHoXuZFGd2pAt9kJ0eIVPm2WL/+Y2ya5kO2EVd89BcXV+C2iWt2k 8j9H7dPQ2goG7B4GUDT7ajgoo8khiZPhogewkTSA26dLrc9B4lyzV5SLazc217D393SB UOkHV1x8I5ReHmCKZvlenNboSq2xb/YT0q/ccK4jrEv5Sn8UVrX+fSmKgtGjVNIe16lI URhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Lf9in1R/IyB6rX6jUJyTZ+zPOwsufKTBlApv7ttWWfI=; b=6YKLAVIfDOLkGH8+vN6AYlNtJRNPiZQr/xbesIOT2wqdQ/qDXR43h01dd5mUNDV9I7 ayFlnWLp38WP7VH4JTS3wk3Yoe55Wmu2p6ulAKG63lhOonQuzYuz9asYxd0Kf1akztO0 mf2Fak4iF/DH15aGY11QrwhXfhALtzhHJPZtlo+oUAMYekaR4XLXUcs9zqgno+vnh2VY xG/id9+a1T1zVzfPKSK8zf9ek3tzzcN5i9ogm5/j0xyia9deLKX8Ut4IGqaHs2PyYoz6 GtCJV+z3cM3m/ehqBlL8X/laqtw79v/2IDpb5dQGoH54f92dkzlo85+RXjOysznuhnsH /+dQ== X-Gm-Message-State: AOAM531/xZ0OeKwXWEhNL0VfJMUeqKmpgN7p63IPua5C4PeIryz/H53u 9dbtRqRT3oIYwzZZj1A/ytkf2g== X-Google-Smtp-Source: ABdhPJw3HiHU2l0Zxdnl8FI3SE8UUCEm63BOmZlO5wTWpPxNDy3Afc0ad7VVfEKZ63cdvh+uY/IWNA== X-Received: by 2002:a17:902:e8cf:b0:156:36e0:6bcb with SMTP id v15-20020a170902e8cf00b0015636e06bcbmr29286930plg.105.1651091012280; Wed, 27 Apr 2022 13:23:32 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id i23-20020a056a00225700b0050d38d0f58dsm12888790pfu.213.2022.04.27.13.23.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 13:23:31 -0700 (PDT) Date: Wed, 27 Apr 2022 20:23:27 +0000 From: Sean Christopherson To: David Woodhouse Cc: Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Mingwei Zhang , Maxim Levitsky Subject: Re: [PATCH v2 8/8] DO NOT MERGE: Hack-a-test to verify gpc invalidation+refresh Message-ID: References: <20220427014004.1992589-1-seanjc@google.com> <20220427014004.1992589-9-seanjc@google.com> <68b3f18e156391e20aed8e10e974fdf8052b7f47.camel@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <68b3f18e156391e20aed8e10e974fdf8052b7f47.camel@infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 27, 2022, David Woodhouse wrote: > On Wed, 2022-04-27 at 01:40 +0000, Sean Christopherson wrote: > > Add a VM-wide gfn=>pfn cache and a fake MSR to let userspace control the > > cache. On writes, reflect the value of the MSR into the backing page of > > a gfn=>pfn cache so that userspace can detect if a value was written to > > the wrong page, i.e. to a stale mapping. > > > > Spin up 16 vCPUs (arbitrary) to use/refresh the cache, and another thread > > to trigger mmu_notifier events and memslot updates. > > Do you need the MSR hack? Can't you exercise this using Xen interrupt > delivery or runstate information and the same kind of thread setup? Yeah, I asumme it's possible, and medium/long term I definitely want to have a proper test. I went the hack route to get something that could hammer a cache with minimal chance of a test bug. I only have a rough idea of what the Xen stuff does.