Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 233
bugwhine Avatar asked Nov 03 '25 11:11

bugwhine


1 Answers

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).

like image 183
maxschlepzig Avatar answered Nov 06 '25 03:11

maxschlepzig



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!