All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Peter Zijlstra <peterz@infradead.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Jiri Olsa <jolsa@redhat.com>,
	linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, kvm@vger.kernel.org,
	H Peter Anvin <hpa@zytor.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Sean Christopherson <seanjc@google.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Leo Yan <leo.yan@linaro.org>
Subject: [PATCH 4/5] perf/x86/intel/pt: Fix address filter config for 32-bit kernel
Date: Mon, 31 Jan 2022 09:24:52 +0200	[thread overview]
Message-ID: <20220131072453.2839535-5-adrian.hunter@intel.com> (raw)
In-Reply-To: <20220131072453.2839535-1-adrian.hunter@intel.com>

Change from shifting 'unsigned long' to 'u64' to prevent the config bits
being lost on a 32-bit kernel.

Fixes: eadf48cab4b6b0 ("perf/x86/intel/pt: Add support for address range filtering in PT")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
 arch/x86/events/intel/pt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/events/intel/pt.c b/arch/x86/events/intel/pt.c
index 4015c1364463..aa66c0c7b18b 100644
--- a/arch/x86/events/intel/pt.c
+++ b/arch/x86/events/intel/pt.c
@@ -490,7 +490,7 @@ static u64 pt_config_filters(struct perf_event *event)
 			pt->filters.filter[range].msr_b = filter->msr_b;
 		}
 
-		rtit_ctl |= filter->config << pt_address_ranges[range].reg_off;
+		rtit_ctl |= (u64)filter->config << pt_address_ranges[range].reg_off;
 	}
 
 	return rtit_ctl;
-- 
2.25.1


  parent reply	other threads:[~2022-01-31  7:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-31  7:24 [PATCH 0/5] perf/core: Address filter fixes / changes Adrian Hunter
2022-01-31  7:24 ` [PATCH 1/5] perf/x86/intel/pt: Relax address filter validation Adrian Hunter
2022-02-03 14:33   ` [tip: perf/core] " tip-bot2 for Adrian Hunter
2022-01-31  7:24 ` [PATCH 2/5] x86: Share definition of __is_canonical_address() Adrian Hunter
2022-02-03 14:33   ` [tip: perf/core] " tip-bot2 for Adrian Hunter
2022-01-31  7:24 ` [PATCH 3/5] perf/core: Fix address filter parser for multiple filters Adrian Hunter
2022-02-03 14:33   ` [tip: perf/core] " tip-bot2 for Adrian Hunter
2022-01-31  7:24 ` Adrian Hunter [this message]
2022-02-03 14:33   ` [tip: perf/core] perf/x86/intel/pt: Fix address filter config for 32-bit kernel tip-bot2 for Adrian Hunter
2022-01-31  7:24 ` [PATCH 5/5] perf/core: Allow kernel address filter when not filtering the kernel Adrian Hunter
2022-02-03 14:33   ` [tip: perf/core] " tip-bot2 for Adrian Hunter
2022-02-01 13:25 ` [PATCH 0/5] perf/core: Address filter fixes / changes Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220131072453.2839535-5-adrian.hunter@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=leo.yan@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=seanjc@google.com \
    --cc=suzuki.poulose@arm.com \
    --cc=tglx@linutronix.de \
    --cc=vkuznets@redhat.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.