I have a Ryzen 5 1600x CPU with a MSI X370 Gaming Pro Carbon motherboard, which 100% supports I/O virtualization. When I boot in Ubuntu without Xen I can see:
me:~$ dmesg | grep IOMMU
[ 1.074675] AMD-Vi: IOMMU performance counters supported
[ 1.076696] AMD-Vi: Found IOMMU at 0000:00:00.2 cap 0x40
[ 1.078029] perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4 counters/bank).
[ 1.352681] AMD IOMMUv2 driver by Joerg Roedel <[email protected]>
me:~$ dmesg | grep AMD-V
[ 1.074675] AMD-Vi: IOMMU performance counters supported
[ 1.076696] AMD-Vi: Found IOMMU at 0000:00:00.2 cap 0x40
[ 1.076697] AMD-Vi: Extended features (0xf77ef22294ada):
[ 1.076699] AMD-Vi: Interrupt remapping enabled
[ 1.076700] AMD-Vi: virtual APIC enabled
[ 1.076801] AMD-Vi: Lazy IO/TLB flushing enabled
However, when I boot into Xen I see
.....
(XEN) Detected 3600.165 MHz processor.
(XEN) Initing memory sharing.
(XEN) AMD-Vi: Error initialization
(XEN) I/O virtualisation disabled
(XEN) ENABLING IO-APIC IRQs
(XEN) -> Using new ACK method
(XEN) Platform timer is 14.318MHz HPET
(XEN) Allocated console ring of 32 KiB.
(XEN) HVM: ASIDs enabled.
(XEN) SVM: Supported advanced features:
(XEN) - Nested Page Tables (NPT)
(XEN) - Last Branch Record (LBR) Virtualisation
(XEN) - Next-RIP Saved on #VMEXIT
(XEN) - VMCB Clean Bits
(XEN) - DecodeAssists
(XEN) - Pause-Intercept Filter
(XEN) - TSC Rate MSR
(XEN) HVM: SVM enabled
(XEN) HVM: Hardware Assisted Paging (HAP) detected
(XEN) HVM: HAP page sizes: 4kB, 2MB, 1GB
(XEN) Brought up 12 CPUs
.....
Does anyone have any suggestions on even where to look for why Xen isn't loading AMD-Vi?