cancel
Showing results for 
Search instead for 
Did you mean: 

Processors

Martin_Streller
Journeyman III

APIC virtualization very slow under KVM

Hello,

under virtualization by means of kvm (kvm_amd) we've noticed access to the local apic's (LAPIC) task priority register (TPR) to be very slow. Our proprietary OS makes heavy use of the TPR.
With Intel there's a performant technology for APIC virtualization in-place. Their cpu vmx flags of interest ("cat /proc/cpuinfo") are: apicv vapic vtpr. With those flags in-combo "cat /sys/module/kvm_intel/parameters/enable_apicv" returns "Y" and TPR writes will be lightning fast.
We wonder whether there's a similar technology for AMD available? It ought to be AVIC (advanced virtual interrupt controller), though it doesn't seem to accelerate TPR writes.
Below is an example for cpuinfo where "cat /sys/module/kvm_amd/parameters/avic" returns "Y".
I'm seeking guru and general advice on where to further look for.

Regards,
Martin

processor : 0
vendor_id : AuthenticAMD
cpu family : 23
model : 24
model name : AMD Ryzen 5 PRO 3400G with Radeon Vega Graphics
stepping : 1
microcode : 0x8108109
cpu MHz : 3700.000
cache size : 512 KB
physical id : 0
siblings : 8
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb hw_pstate ssbd ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero irperf xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov succor smca sme sev sev_es
bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass retbleed smt_rsb
bogomips : 7400.14
TLB size : 2560 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 43 bits physical, 48 bits virtual
power management: ts ttp tm hwpstate eff_freq_ro [13] [14]

 

0 Likes
1 Solution
Martin_Streller
Journeyman III

Finally solved by ridding TPR access out of our firmware.

View solution in original post

0 Likes
1 Reply
Martin_Streller
Journeyman III

Finally solved by ridding TPR access out of our firmware.

0 Likes