lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171104132532.GC8454@krava>
Date:   Sat, 4 Nov 2017 14:25:32 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     Megha Dey <megha.dey@...ux.intel.com>
Cc:     x86@...nel.org, linux-kernel@...r.kernel.org,
        linux-doc@...r.kernel.org, tglx@...utronix.de, mingo@...hat.com,
        hpa@...or.com, andriy.shevchenko@...ux.intel.com,
        kstewart@...uxfoundation.org, yu-cheng.yu@...el.com,
        len.brown@...el.com, gregkh@...uxfoundation.org,
        peterz@...radead.org, acme@...nel.org,
        alexander.shishkin@...ux.intel.com, namhyung@...nel.org,
        vikas.shivappa@...ux.intel.com, pombredanne@...b.com,
        me@...ehuey.com, bp@...e.de, grzegorz.andrejczuk@...el.com,
        tony.luck@...el.com, corbet@....net, ravi.v.shankar@...el.com,
        megha.dey@...el.com
Subject: Re: [PATCH V0 2/3] perf/x86/intel/bm.c: Add Intel Branch Monitoring
 support

On Fri, Nov 03, 2017 at 11:00:05AM -0700, Megha Dey wrote:

SNIP

> +	event->hw.bm_ctrl = (bm_window_size << BM_WINDOW_SIZE_SHIFT) |
> +			    (bm_guest_disable << BM_GUEST_DISABLE_SHIFT) |
> +			    (bm_lbr_freeze << BM_LBR_FREEZE_SHIFT) |
> +			    (bm_window_cnt_sel << BM_WINDOW_CNT_SEL_SHIFT) |
> +			    (bm_cnt_and_mode << BM_CNT_AND_MODE_SHIFT) |
> +								BM_ENABLE;
> +	event->hw.bm_counter_conf = (bm_threshold << BM_THRESHOLD_SHIFT) |
> +			(bm_mispred_evt_cnt << BM_MISPRED_EVT_CNT_SHIFT) |
> +					(cfg << BM_EVENT_TYPE_SHIFT);
> +
> +	wrmsrl(BR_DETECT_COUNTER_CONFIG_BASE + counter_to_use,
> +						event->hw.bm_counter_conf);
> +	wrmsrl(BR_DETECT_STATUS_MSR, 0);
> +	event->id = counter_to_use;

I think you need to add your own id under hw_perf_event::intel_bm

we use event->id as event unique id expected also in perf stat
for group reading or stat record

thanks,
jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ