On Tue, 8 Mar 2022, at 12:13 PM, Bronek Kozicki wrote: > On Mon, 7 Mar 2022, at 10:33 PM, Alex Williamson wrote: >> On Mon, 07 Mar 2022 22:13:01 +0000 >> "Bronek Kozicki" <b...@incorrekt.com> wrote: >> >>> I know, this is such an old topic ... >>> >>> I have today upgraded my hypervisor from intel Ivy-Bridge to AMD Epyc >>> Milan and, after making the necessary adjustments in vfio >>> configuration to make my virtual machines work again, I found that >>> there's immense amount of crackling (like, many times per second) in >>> audio, both in Linux and in Windows guests. The audio is USB DAC >>> connected through USB, and USB is on passed-through PCI (dedicated >>> for guest). >>> >>> The host has two AMD 7413 CPUs, with lots of cores dedicated to >>> guests: >>> >>> video=efifb:off iommu=pt amd_iommu=on add_efi_memmap >>> nohz_full=6-35,54-83 rcu_nocbs=6-35,54-83 isolcpus=6-35,54-83 >>> nvme.poll_queues=12 >>> >> >> Getting interrupt bypass to work on AMD (AVIC) is rather more finicky >> than the equivalent on Intel (APICv). Have a look at this pointer and >> see if you can get it working: >> >> https://forum.level1techs.com/t/svm-avic-iommu-avic-improves-interrupt-performance-on-zen-2-etc-based-processors/155226 >> >> When working correctly, you should essentially stop seeing interrupt >> counts increase in /proc/interrupts on the host for any vfio MSI >> vectors. Thanks, > > > Hello Alex - thanks a lot for your help! > > I had no idea about AVIC. I went through all the steps in the guide you > pointed me to, but it seems my kernels does not want to enable it. I > think I need your help figuring out why. > > The effective kvm_amd parameters are: > > root@gdansk /sys/module/kvm_amd/parameters # grep -E '*' * > avic:N > dump_invalid_vmcb:N > intercept_smi:Y > nested:0 > npt:Y > nrips:1 > pause_filter_count:3000 > pause_filter_count_grow:2 > pause_filter_count_max:65535 > pause_filter_count_shrink:0 > pause_filter_thresh:128 > sev:N > sev_es:N > vgif:1 > vls:1 >
FWIW My CPU is root@gdansk ~ # lscpu 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.12 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; Full AMD retpoline, IBPB conditional, IBRS_FW, STIBP always-on, RSB filling Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected B. -- Bronek Kozicki b...@incorrekt.com _______________________________________________ vfio-users mailing list vfio-users@redhat.com https://listman.redhat.com/mailman/listinfo/vfio-users