Re: memory overcomittment with sr-iov device assighment
--- Original Message --- On Tuesday, June 7th, 2022 at 3:04 AM, Andrew Cooper wrote: > But IOMMU violations are not restartable. We can't just take an IOMMU > fault, and shuffle the guests memory, because the PCIe protocol has > timeouts. These aren't generally long enough to even send an interrupt > to request software help, let alone page one part out and another part in. > > For an IOMMU mapping to exists, it must point at real RAM, because any > DMA targetting it cannot be paused and delayed for later. > Thanks for the information! Speaking about IOMMU. Can Xen emulate virtual IOMMU? Just thinking out loud. If Xen exposes a virtual IOMMU to a guest VM, wouldn't it be possible for the hypervisor to pin VM's pages that are mapped (dynamically) by the guest virtual IOMMU? But I guess it will eliminate the performance benefits of direct device assignment.
Re: memory overcomittment with sr-iov device assighment
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
memory overcomittment with sr-iov device assighment
Hello list, 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? 2. Would you please point me to the code that does the pinning? Thanks, Alex