I've upgraded my home server for hosting virtual machines from Ivy-Bridge Xeons to EPYC Milan 7413 (dual) and, bad surprise, I find there is no Virtual Interrupt Controller (i.e. AVIC or GAMSup). I check for avic with lscpu:
# dmidecode | grep -A3 "Base Board Information"
Base Board Information
Manufacturer: Supermicro
Product Name: H12DSi-N6
Version: 1.02
# lscpu | cat
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 48 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 96
On-line CPU(s) list: 0-95
Vendor ID: AuthenticAMD
BIOS Vendor ID: Advanced Micro Devices, Inc.
Model name: AMD EPYC 7413 24-Core Processor
BIOS Model name: AMD EPYC 7413 24-Core Processor
CPU family: 25
Model: 1
Thread(s) per core: 2
Core(s) per socket: 24
Socket(s): 2
Stepping: 1
Frequency boost: enabled
CPU max MHz: 3630.8101
CPU min MHz: 1500.0000
BogoMIPS: 5300.34
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 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 invpcid_single hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 invpcid cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd amd_ppin arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload vgif v_spec_ctrl umip pku ospke vaes vpclmulqdq rdpid overflow_recov succor smca
Virtualization: AMD-V
L1d cache: 1.5 MiB (48 instances)
L1i cache: 1.5 MiB (48 instances)
L2 cache: 24 MiB (48 instances)
L3 cache: 256 MiB (8 instances)
NUMA node(s): 2
NUMA node0 CPU(s): 0-23,48-71
NUMA node1 CPU(s): 24-47,72-95
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP always-on, RSB filling
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
# lscpu | grep avic
1 #
As seen above, this yield nothing (should be listed in CPU Flags).
Without AVIC, the interrupt latency in virtual guests causes problems e.g. crackling sound in VFIO (i.e. IOMMU) guests. I have configured both avic and npt feature and expect AVIC to be enabled by the kernel, but due to the feature not being reported by the CPU this is not happening.
# cat /etc/modprobe.d/kvm.conf
options kvm ignore_msrs=0
options kvm_amd nested=0 avic=1 npt=1
# grep -RHE '*' /sys/module/kvm_amd/parameters/
/sys/module/kvm_amd/parameters/sev_es:N
/sys/module/kvm_amd/parameters/vls:1
/sys/module/kvm_amd/parameters/pause_filter_count_max:65535
/sys/module/kvm_amd/parameters/nrips:1
/sys/module/kvm_amd/parameters/pause_filter_count_grow:2
/sys/module/kvm_amd/parameters/pause_filter_count_shrink:0
/sys/module/kvm_amd/parameters/npt:Y
/sys/module/kvm_amd/parameters/sev:N
/sys/module/kvm_amd/parameters/vgif:1
/sys/module/kvm_amd/parameters/nested:0
/sys/module/kvm_amd/parameters/dump_invalid_vmcb:N
/sys/module/kvm_amd/parameters/pause_filter_thresh:128
/sys/module/kvm_amd/parameters/pause_filter_count:3000
/sys/module/kvm_amd/parameters/intercept_smi:Y
/sys/module/kvm_amd/parameters/avic:N
I played with various settings in BIOS to no avail, however I keep Secure Nested Pages disabled (from what I read at https://www.amd.com/system/files/TechDocs/56683-PUB_1.04.pdf , page 40 this setting would disable AVIC).
My motherboard is Supermicro H12-DSi-N6 and have also asked Supermicro for help, but so far nothing.
System information:
CPU information, as reported by BIOS:
The above is reporting microcode 1143, but I am also loading microcode 1144 at the OS boot time.
Example CPU configuration I tried in BIOS:
Example North Bridge configuration I tried in BIOS:
Any ideas how can I enable avic feature on this processor?