Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2426367ybg; Sat, 19 Oct 2019 15:09:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqy9ScfB0Q+wxlDFyDpLITVjXtnR81qjjtV5xeEP3eI+biUQnVIUBIIT9j5l6DsyTN6pb/PL X-Received: by 2002:a50:9fcd:: with SMTP id c71mr16950823edf.139.1571522946630; Sat, 19 Oct 2019 15:09:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571522946; cv=none; d=google.com; s=arc-20160816; b=trRafuwj7RoFebjP91PwcnepZESNHB0qQ87ZAH7IBCQF8Gd/Nt+Ea9eGI+3aQVMEqh 4h7M1xced+eC9QRfqYpmD/19Co9EQZxJwYIiWKxe975QbryrzHeLC+j3atirHEjd9n9l 2oGY9LEwIEL5FoqwX4nAI+OXcby+RfCwUQ+RGwWVj1nO7Iq1hnrWOAEeZgPK6HxB+QuY xG5ohPchJyYBZ0nMrVP5P2FYXD007hunKgyjz+C9s3kN5COd+SVKgDQj3IprBvDXjeKz 8O3x3liYE4Ke298ZHqQYBs+cBh0WAJ0hIR9geesVkfVPR59RtGp+HwzPdxnkYFq+kqwW gdPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=6a0br34QXzyEFpFD5xZm0ZgKib0vKLCEG1+vd1mZh2s=; b=SlCUEPocahcQGF/8lI+8jtuB/+bmT0iA4CUrmU6zOyqyanwgfzV7uyGI2qkgOE9oOz NcxOsCFV+jKrsR3K6qYN7jd/XCbKHESiTt9iob3Bn7icCDvhz/1ld2AITywukVfK2x0n yy7cH4X84/qwG3Y99oVZA68A8XkndH09lxFh9/0PCWj34kxGG8dTCbAMIeHnb4ns/KWk aKDomL+6b5E33ZLGR50IJFaKjp0FLgiCMfLzWulUqPnyIRQ7VakIh42+Do/aOeMrKGh8 vgxVQyKcMfhC9EtRuQgnI4lJVmbZo5EkglfneJYyuVELuf1oX5yGaoMW6DuvnAN5vRnK PZnA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f57si7078554edb.165.2019.10.19.15.08.43; Sat, 19 Oct 2019 15:09:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726217AbfJSWHe convert rfc822-to-8bit (ORCPT + 99 others); Sat, 19 Oct 2019 18:07:34 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:47043 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726143AbfJSWHe (ORCPT ); Sat, 19 Oct 2019 18:07:34 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-134-nL5Y94MiNzGK8GvS41-CuQ-1; Sat, 19 Oct 2019 18:07:30 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5AAB1800D4E; Sat, 19 Oct 2019 22:07:29 +0000 (UTC) Received: from krava.redhat.com (ovpn-204-25.brq.redhat.com [10.40.204.25]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5033E19C7F; Sat, 19 Oct 2019 22:07:27 +0000 (UTC) From: Jiri Olsa To: Peter Zijlstra Cc: Jan Stancek , lkml , Ingo Molnar , Alexander Shishkin , Arnaldo Carvalho de Melo , Andi Kleen , Michael Petlan Subject: [PATCH] perf/x86/intel/pt: Fix base for single entry topa Date: Sun, 20 Oct 2019 00:07:26 +0200 Message-Id: <20191019220726.12213-1-jolsa@kernel.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: nL5Y94MiNzGK8GvS41-CuQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jan reported failing ltp test for pt. It looks like the reason is commit 38bb8d77d0b9, that did not keep the TOPA_SHIFT for entry base, adding it back. [1] https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/tracing/pt_test/pt_test.c Reported-by: Jan Stancek Fixes: 38bb8d77d0b9 ("perf/x86/intel/pt: Split ToPA metadata and page layout") Signed-off-by: Jiri Olsa --- 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 74e80ed9c6c4..05e43d0f430b 100644 --- a/arch/x86/events/intel/pt.c +++ b/arch/x86/events/intel/pt.c @@ -627,7 +627,7 @@ static struct topa *topa_alloc(int cpu, gfp_t gfp) * link as the 2nd entry in the table */ if (!intel_pt_validate_hw_cap(PT_CAP_topa_multiple_entries)) { - TOPA_ENTRY(&tp->topa, 1)->base = page_to_phys(p); + TOPA_ENTRY(&tp->topa, 1)->base = page_to_phys(p) >> TOPA_SHIFT; TOPA_ENTRY(&tp->topa, 1)->end = 1; } -- 2.21.0