{"action":"created","issue":{"url":"https://api.github.com/repos/SnabbCo/snabbswitch/issues/455","labels_url":"https://api.github.com/repos/SnabbCo/snabbswitch/issues/455/labels{/name}","comments_url":"https://api.github.com/repos/SnabbCo/snabbswitch/issues/455/comments","events_url":"https://api.github.com/repos/SnabbCo/snabbswitch/issues/455/events","html_url":"https://github.com/SnabbCo/snabbswitch/issues/455","id":72405557,"number":455,"title":"IOMMU requirements are too strict","user":{"login":"lukego","id":13791,"avatar_url":"https://avatars.githubusercontent.com/u/13791?v=3","gravatar_id":"","url":"https://api.github.com/users/lukego","html_url":"https://github.com/lukego","followers_url":"https://api.github.com/users/lukego/followers","following_url":"https://api.github.com/users/lukego/following{/other_user}","gists_url":"https://api.github.com/users/lukego/gists{/gist_id}","starred_url":"https://api.github.com/users/lukego/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukego/subscriptions","organizations_url":"https://api.github.com/users/lukego/orgs","repos_url":"https://api.github.com/users/lukego/repos","events_url":"https://api.github.com/users/lukego/events{/privacy}","received_events_url":"https://api.github.com/users/lukego/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SnabbCo/snabbswitch/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-01T10:47:15Z","updated_at":"2015-05-13T09:27:03Z","closed_at":null,"body":"Snabb Switch needs to play nicer with the IOMMU.\r\n\r\nThe Linux kernel has three IOMMU modes available:\r\n\r\n- `off`: IOMMU disabled.\r\n- `passthrough`: IOMMU used only for passing PCI devices into virtual machines.\r\n- `on`: IOMMU used to control access to hardware on the host.\r\n\r\nCurrently Snabb Switch works with `off` and `passthrough` but not with `on`. This should be fixed so that we work with all three. This is especially important because different OS distributions have different default settings for the IOMMU.\r\n\r\nOne idea would be to write an extremely minimal Lua routine that uses ljsyscall to enable our DMA memory with VFIO when the IOMMU is enabled. If we map the physical addresses to the IOMMU then no other code changes should be needed. It would be sufficient to map all of the HugeTLB memory that we allocate into all of the PCI devices. This could potentially be quite simple and neat.\r\n\r\nI have posted a question on Stack Overflow to fish for more ideas:\r\nhttp://stackoverflow.com/questions/29985296/linux-userspace-dma-with-iommu-on-and-without-vfio\r\n\r\nAnd here is the commit that removed our previous full-scale implementation of VFIO: 773b60c65a13fe86a3446330343cc0befe44d580.\r\n\r\nCC @justincormack @javierguerragiraldez for ideas."},"comment":{"url":"https://api.github.com/repos/SnabbCo/snabbswitch/issues/comments/101589477","html_url":"https://github.com/SnabbCo/snabbswitch/issues/455#issuecomment-101589477","issue_url":"https://api.github.com/repos/SnabbCo/snabbswitch/issues/455","id":101589477,"user":{"login":"justincormack","id":482364,"avatar_url":"https://avatars.githubusercontent.com/u/482364?v=3","gravatar_id":"","url":"https://api.github.com/users/justincormack","html_url":"https://github.com/justincormack","followers_url":"https://api.github.com/users/justincormack/followers","following_url":"https://api.github.com/users/justincormack/following{/other_user}","gists_url":"https://api.github.com/users/justincormack/gists{/gist_id}","starred_url":"https://api.github.com/users/justincormack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justincormack/subscriptions","organizations_url":"https://api.github.com/users/justincormack/orgs","repos_url":"https://api.github.com/users/justincormack/repos","events_url":"https://api.github.com/users/justincormack/events{/privacy}","received_events_url":"https://api.github.com/users/justincormack/received_events","type":"User","site_admin":false},"created_at":"2015-05-13T09:27:03Z","updated_at":"2015-05-13T09:27:03Z","body":"This mail suggests that the performance issue is only with Sandy Bridge machines, more recent ones should be fine, not sure what you are testing on\r\n\r\nhttp://permalink.gmane.org/gmane.comp.networking.dpdk.devel/7409\r\n"}}