From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8C7491FAC4E for ; Thu, 9 Jan 2025 19:48:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736452138; cv=none; b=fmS41LC/7X7sye3A18iHfnxmvGmyQtR+3gpep/Q/ZTszsNLOhdU6SNupkWj2dqkirWjXwvDPi0s0lTIOxjWmJ6PS78cGXjqdYPnTeCpDhtg0p+FHfRpD8MHEjQACuTy/81D821FzyjBVfbXJ5S2+S2CqeOUw3d+yQD5Kk0hUVkA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736452138; c=relaxed/simple; bh=R3htTwJk+vZ2zNqsXn4VlqB2l7GIqaPrfKbUAVg5VAg=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=ZDvXgNikTKxxyS1h16TEOJ41BPXY8J0jwpgWFhlY2jX9TeD9giHqdBc2dfX4T39yLxKTTcc4eRve1TkHPJ5YO/8cEpuskZy002nilXkRJ6Up8vMxInoHjkHSuElv0jFnzbxUvUSXsKT08imMH4F9rfnexFrtfbZ7/XyrieRqFrE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=kYEZ+2iP; arc=none smtp.client-ip=209.85.216.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="kYEZ+2iP" Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-2ee46799961so3246831a91.2 for ; Thu, 09 Jan 2025 11:48:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1736452137; x=1737056937; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=lfhaSmxpTuw/GN3P4+eLipeQYHEKMeL/J6VjlNwuwjU=; b=kYEZ+2iPQ0bTK6pgt4WHPezLL7XsltFwBaXm7VDGfZQkKkKDkbJj77ZPuD1E4xr/AN /QwmbY9z6Tu/QfztDga+zvFSIQzgbFsXikmFhSpP2JG35JArwmotqQ9DAHlbI8YryAFN p/SJvAaL8MacSGNog+UP5MQAnvRFz7oT7mATDO4IsRf1SI+YI5OegCjnryQJp3Pm3Ex4 EWBdXKDPP4uujxvvg06ezwh4wNJFtBJ4MJ3kjMtvLCPg3JZoS6/6vD+rtl8d/1X9Q+46 rykQCDiecXNcxfVeMSEYw6S80HhFUVG9XmD1cDF0vBA4fxodCgYOvw5sESx+zR+9ANl8 cP4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736452137; x=1737056937; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lfhaSmxpTuw/GN3P4+eLipeQYHEKMeL/J6VjlNwuwjU=; b=eSscFuUeR5lTayPvMuF7KLRF48iHRZvpx2zHJT8JnyhJqM/55bquS6azG0AsZ2taST F0WbPq28I+Kh07e8flt/yqgnxJAxS1+MrakrRUipW7OAgVQ0TGcQvs8P3CEyoavnJ7qs ECM8ch2tUhC+QbG3IcJBA4updRI0e/qoVW8AKjgb4FOKV3m4j0WAg0DYFfNc/zMiQC/i vCkPl2ugsAM6JTHs0Xc5gf1VswAexZqePGop3bQctcYO0Of74B5H8VIsd6yFtwVLD+b2 5uMG2HLmDwQ4Spuzo2rMF7Js32Y7dXsQmS5o2lr0EPBd5V6wkoUPNuCKlwvrAz7gb0/W bKKw== X-Forwarded-Encrypted: i=1; AJvYcCX0HuM7z6tm8m/qi/LaVmHH7MWOpTb045T0TOueSzJ4mOhGz2wFAo6j+ucBmyaa8D4frfdEDhmd+9HQs/g=@vger.kernel.org X-Gm-Message-State: AOJu0YyRItKTRO49FTZr2PJNSC6R5T1pfQBsGIdxYnxJ3+0eC9kTZSCW kaJjEO/ip4qTntT70IYGyBe8B/0dori92uQZDTXmQB48oWoPsLFWLYeNxP0WpD3DL5XTigPWynZ PIA== X-Google-Smtp-Source: AGHT+IFbTlnPjI66cIHitJkLWroDgxiUG5mQj5U4MmwDZ1U5pip9Yd89a2hABhhURKE1bT5VGQeRfLDUeHs= X-Received: from pfus6.prod.google.com ([2002:a05:6a00:8c6:b0:728:e1a0:2e73]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:b89:b0:726:f7c9:7b28 with SMTP id d2e1a72fcca58-72d21f383abmr13826859b3a.8.1736452136968; Thu, 09 Jan 2025 11:48:56 -0800 (PST) Date: Thu, 9 Jan 2025 11:47:17 -0800 In-Reply-To: <20241127235627.4049619-1-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20241127235627.4049619-1-seanjc@google.com> X-Mailer: git-send-email 2.47.1.613.gc27f4b7a9f-goog Message-ID: <173645118101.885497.8247079551108053264.b4-ty@google.com> Subject: Re: [PATCH] KVM: selftests: Use data load to trigger LLC references/misses in Intel PMU From: Sean Christopherson To: Sean Christopherson , Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Maxim Levitsky Content-Type: text/plain; charset="utf-8" On Wed, 27 Nov 2024 15:56:27 -0800, Sean Christopherson wrote: > In the PMU counters test, add a data load in the measured loop and target > the data with CLFLUSH{OPT} in order to (try to) guarantee the loop > generates LLC misses and fills. Per the SDM, some hardware prefetchers > are allowed to omit relevant PMU events, and Emerald Rapids (and possibly > Sapphire Rapids) appears to have gained an instruction prefetcher that > bypasses event counts. E.g. the test will consistently fail on EMR CPUs, > but then pass with seemingly benign changes to the code. > > [...] Applied to kvm-x86 selftests, thanks! [1/1] KVM: selftests: Use data load to trigger LLC references/misses in Intel PMU https://github.com/kvm-x86/linux/commit/7803339fa929 -- https://github.com/kvm-x86/linux/tree/next