Advertisement
Querzion

console-commands

Apr 5th, 2023
565
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 11.68 KB | None | 0 0
  1. This is a note of the different commands used in vm-passthroughs.
  2.  
  3.  
  4. -COMMAND:»
  5.  
  6. ./IOMMU-CHECK.sh
  7.  
  8. -CODE:»
  9.  
  10. #!/bin/bash
  11. shopt -s nullglob
  12. for g in $(find /sys/kernel/iommu_groups/* -maxdepth 0 -type d | sort -V); do
  13.     echo "IOMMU Group ${g##*/}:"
  14.     for d in $g/devices/*; do
  15.         echo -e "\t$(lspci -nns ${d##*/})"
  16.     done;
  17. done;
  18.  
  19. It combines two commands basically, "sudo dmesg | grep -i -e DMAR -e IOMMU" and "lspci -nn".
  20.  
  21.  
  22. -OUTPUT:»
  23.  
  24. IOMMU Group 0:
  25.         00:01.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:14da]
  26. IOMMU Group 1:
  27.         00:01.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:14db]
  28. IOMMU Group 2:
  29.         00:01.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:14db]
  30. IOMMU Group 3:
  31.         00:02.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:14da]
  32. IOMMU Group 4:
  33.         00:02.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:14db]
  34. IOMMU Group 5:
  35.         00:02.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:14db]
  36. IOMMU Group 6:
  37.         00:03.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:14da]
  38. IOMMU Group 7:
  39.         00:04.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:14da]
  40. IOMMU Group 8:
  41.         00:08.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:14da]
  42. IOMMU Group 9:
  43.         00:08.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:14dd]
  44. IOMMU Group 10:
  45.         00:08.3 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:14dd]
  46. IOMMU Group 11:
  47.         00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller [1022:790b] (rev 71)
  48.         00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge [1022:790e] (rev 51)
  49. IOMMU Group 12:
  50.         00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:14e0]
  51.         00:18.1 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:14e1]
  52.         00:18.2 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:14e2]
  53.         00:18.3 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:14e3]
  54.         00:18.4 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:14e4]
  55.         00:18.5 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:14e5]
  56.         00:18.6 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:14e6]
  57.         00:18.7 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:14e7]
  58. IOMMU Group 13:
  59.         01:00.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Upstream Port of PCI Express Switch [1002:1478] (rev c5)
  60. IOMMU Group 14:
  61.         02:00.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Downstream Port of PCI Express Switch [1002:1479]
  62. IOMMU Group 15:
  63.         03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] [1002:73df] (rev c5)
  64. IOMMU Group 16:
  65.         03:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21/23 HDMI/DP Audio Controller [1002:ab28]
  66. IOMMU Group 17:
  67.         04:00.0 Non-Volatile memory controller [0108]: Kingston Technology Company, Inc. KC2000 NVMe SSD [2646:2262] (rev 03)
  68. IOMMU Group 18:
  69.         05:00.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f4] (rev 01)
  70. IOMMU Group 19:
  71.         06:00.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f5] (rev 01)
  72.         07:00.0 Non-Volatile memory controller [0108]: Micron/Crucial Technology P1 NVMe PCIe SSD [c0a9:2263] (rev 03)
  73. IOMMU Group 20:
  74.         06:08.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f5] (rev 01)
  75.         08:00.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f4] (rev 01)
  76.         09:00.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f5] (rev 01)
  77.         09:04.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f5] (rev 01)
  78.         09:05.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f5] (rev 01)
  79.         09:08.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f5] (rev 01)
  80.         09:0c.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f5] (rev 01)
  81.         09:0d.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f5] (rev 01)
  82.         0b:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller [10ec:8125] (rev 05)
  83.         0c:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:b852]
  84.         0e:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f7] (rev 01)
  85.         0f:00.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f6] (rev 01)
  86. IOMMU Group 21:
  87.         06:0c.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f5] (rev 01)
  88.         10:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f7] (rev 01)
  89. IOMMU Group 22:
  90.         06:0d.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f5] (rev 01)
  91.         11:00.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f6] (rev 01)
  92. IOMMU Group 23:
  93.         12:00.0 Non-Volatile memory controller [0108]: Kingston Technology Company, Inc. Device [2646:5017] (rev 03)
  94. IOMMU Group 24:
  95.         13:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Raphael [1002:164e] (rev c2)
  96. IOMMU Group 25:
  97.         13:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt Radeon High Definition Audio Controller [1002:1640]
  98. IOMMU Group 26:
  99.         13:00.2 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] VanGogh PSP/CCP [1022:1649]
  100. IOMMU Group 27:
  101.         13:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Device [1022:15b6]
  102. IOMMU Group 28:
  103.         13:00.4 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Device [1022:15b7]
  104. IOMMU Group 29:
  105.         13:00.6 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio Controller [1022:15e3]
  106. IOMMU Group 30:
  107.         14:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Device [1022:15b8]
  108.  
  109.  
  110.  
  111. -COMMAND:»
  112.  
  113. lscpu -e
  114.  
  115. -OUTPUT:»
  116.  
  117. CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE    MAXMHZ    MINMHZ       MHZ
  118.   0    0      0    0 0:0:0:0          yes 5732,7139 3000,0000 3697,2749
  119.   1    0      0    1 1:1:1:0          yes 5732,7139 3000,0000 3000,0000
  120.   2    0      0    2 2:2:2:0          yes 5732,7139 3000,0000 2926,0840
  121.   3    0      0    3 3:3:3:0          yes 5732,7139 3000,0000 3000,0000
  122.   4    0      0    4 4:4:4:0          yes 5732,7139 3000,0000 2820,3970
  123.   5    0      0    5 5:5:5:0          yes 5732,7139 3000,0000 2864,0291
  124.   6    0      0    6 8:8:8:1          yes 5732,7139 3000,0000 3741,8130
  125.   7    0      0    7 9:9:9:1          yes 5732,7139 3000,0000 3000,0000
  126.   8    0      0    8 10:10:10:1       yes 5732,7139 3000,0000 4013,5259
  127.   9    0      0    9 11:11:11:1       yes 5732,7139 3000,0000 2877,9309
  128.  10    0      0   10 12:12:12:1       yes 5732,7139 3000,0000 2873,8279
  129.  11    0      0   11 13:13:13:1       yes 5732,7139 3000,0000 2900,3301
  130.  12    0      0    0 0:0:0:0          yes 5732,7139 3000,0000 3592,0161
  131.  13    0      0    1 1:1:1:0          yes 5732,7139 3000,0000 3000,0000
  132.  14    0      0    2 2:2:2:0          yes 5732,7139 3000,0000 3000,0000
  133.  15    0      0    3 3:3:3:0          yes 5732,7139 3000,0000 3000,0000
  134.  16    0      0    4 4:4:4:0          yes 5732,7139 3000,0000 3000,0000
  135.  17    0      0    5 5:5:5:0          yes 5732,7139 3000,0000 3000,0000
  136.  18    0      0    6 8:8:8:1          yes 5732,7139 3000,0000 4415,5078
  137.  19    0      0    7 9:9:9:1          yes 5732,7139 3000,0000 3000,0000
  138.  20    0      0    8 10:10:10:1       yes 5732,7139 3000,0000 3000,0000
  139.  21    0      0    9 11:11:11:1       yes 5732,7139 3000,0000 2870,7581
  140.  22    0      0   10 12:12:12:1       yes 5732,7139 3000,0000 2735,6169
  141.  23    0      0   11 13:13:13:1       yes 5732,7139 3000,0000 2798,3369
  142.  
  143. -COMMAND:»
  144.  
  145. lscpu
  146.  
  147. -OUTPUT:»
  148.  
  149. Architecture:            x86_64
  150.   CPU op-mode(s):        32-bit, 64-bit
  151.   Address sizes:         48 bits physical, 48 bits virtual
  152.   Byte Order:            Little Endian
  153. CPU(s):                  24
  154.   On-line CPU(s) list:   0-23
  155. Vendor ID:               AuthenticAMD
  156.   Model name:            AMD Ryzen 9 7900X 12-Core Processor
  157.     CPU family:          25
  158.     Model:               97
  159.     Thread(s) per core:  2
  160.     Core(s) per socket:  12
  161.     Socket(s):           1
  162.     Stepping:            2
  163.     Frequency boost:     enabled
  164.     CPU(s) scaling MHz:  57%
  165.     CPU max MHz:         5732,7139
  166.     CPU min MHz:         3000,0000
  167.     BogoMIPS:            9403,71
  168.     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 amd_lbr_v2 nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl
  169.                           pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 x2apic 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_
  170.                          nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba perfmon_v2 ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni a
  171.                          vx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local avx512_bf16 clzero irperf xsaveerptr rdpru wbnoinvd cppc arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeas
  172.                          sists pausefilter pfthreshold avic v_vmsave_vmload vgif x2avic v_spec_ctrl avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid overflow_recov succor smca fsrm flush_l1d
  173. Virtualization features:
  174.   Virtualization:        AMD-V
  175. Caches (sum of all):    
  176.   L1d:                   384 KiB (12 instances)
  177.   L1i:                   384 KiB (12 instances)
  178.   L2:                    12 MiB (12 instances)
  179.   L3:                    64 MiB (2 instances)
  180. NUMA:                    
  181.   NUMA node(s):          1
  182.   NUMA node0 CPU(s):     0-23
  183. Vulnerabilities:        
  184.   Itlb multihit:         Not affected
  185.   L1tf:                  Not affected
  186.   Mds:                   Not affected
  187.   Meltdown:              Not affected
  188.   Mmio stale data:       Not affected
  189.   Retbleed:              Not affected
  190.   Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl
  191.   Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  192.   Spectre v2:            Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP always-on, RSB filling, PBRSB-eIBRS Not affected
  193.   Srbds:                 Not affected
  194.   Tsx async abort:       Not affected
  195.  
  196. --- -CPU- 'PINNING IN VM OVERVIEW UNDER' </vcpu>
  197.  
  198.   <iothreads>1</iothreads>
  199.   <cputune>
  200.     <vcpupin vcpu="0" cpuset="6"/>
  201.     <vcpupin vcpu="1" cpuset="18"/>
  202.     <vcpupin vcpu="2" cpuset="7"/>
  203.     <vcpupin vcpu="3" cpuset="19"/>
  204.     <vcpupin vcpu="4" cpuset="8"/>
  205.     <vcpupin vcpu="5" cpuset="20"/>
  206.     <vcpupin vcpu="6" cpuset="9"/>
  207.     <vcpupin vcpu="7" cpuset="21"/>
  208.     <vcpupin vcpu="8" cpuset="10"/>
  209.     <vcpupin vcpu="9" cpuset="22"/>
  210.     <vcpupin vcpu="10" cpuset="11"/>
  211.     <vcpupin vcpu="11" cpuset="23"/>
  212.     <emulatorpin cpuset="0-5,12-17"/>
  213.     <iothreadpin iothread="1" cpuset="0-5,12-17"/>
  214.   </cputune>
  215.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement