On 07.06.2022 05:59, alex.nln...@proton.me wrote: > I looked into Xen documentation and also Xen wiki and I could't find a > definitive answer if Xen supports memory over-commitment when VMs use SR-IOV > device assignment (passthrough). Memory over-commitment I mean giving VMs > more RAM than is available in the host. > > I know that ESX doesn't support it, and also QEMU/KVM pins all RAM when a > device is directly assigned to a VM (VFIO_IOMMU_MAP_DMA ioctl). I have two > questions: > > 1. Does Xen supports memory over commitment when all VMs are using direct > device assignment e.g., SR-IOV?
What you describe looks to match mem-paging / mem-sharing in Xen. Neither is compatible with device pass-through (SR-IOV or not is irrelevant), and both are only in "experimental" state anyway. > 2. Would you please point me to the code that does the pinning? That's a KVM concept with no direct equivalent in Xen (largely due to Xen being a type-1 hypervisor, while KVM is a type-2 one). Jan