简体   繁体   中英

Is there an equivalent register to Intel's MSR_SMI_COUNT on AMD architecture?

On recent Intel CPUs it's possible to count the number of SMIs that have occurred, by reading msr 0x34.

I have checked the manuals at - https://developer.amd.com/resources/developer-guides-manuals/

for an equivalent register/function, without success.

否,但 SMI 计数可用作 AMD 处理器上的 PMC(性能计数器)。

AMD Zen specifies the LsSmiRx performance counter for System Management Interrupts (SMIs) :

 PMCx02B [SMIs Received] (Core::X86::Pmc::Core::LsSmiRx) Counts the number of SMIs received.

( Open-Source Register Reference For AMD Family 17h Processors Models 00h-2Fh. Rev 3.03, 2018, page 153 )

On Linux, you can monitor it like this:

# perf stat -e ls_smi_rx -I 60000

This command prints each minute a count of all newly triggered SMIs aggregated over all CPUs.


That means for monitoring - unlike with the MSR_SMI_COUNT register available on Intel CPUs - you have to actively program a PMU register (to observe the LsSmiRx event).


NB: The above referenced AMD documentation confirms that AMD Zen doesn't support the SMI_COUNT MSR (0x34), since it isn't included in the list of available MSRs (in Chapter 2.1.10, page 77).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM