[{"id":1776251,"web_url":"http://patchwork.ozlabs.org/comment/1776251/","msgid":"<0062ede1-54d4-7e13-2986-374ec62c0a2a@caviumnetworks.com>","list_archive_url":null,"date":"2017-09-27T11:07:20","subject":"Re: [Qemu-devel] [RFC v4 00/16] VIRTIO-IOMMU device","submitter":{"id":72364,"url":"http://patchwork.ozlabs.org/api/people/72364/","name":"Tomasz Nowicki","email":"tnowicki@caviumnetworks.com"},"content":"Hi Eric,\n\nOut of curiosity, I compared your SMMUv3 full emulation against \nvirtio-iommu. For virtio-net device behind the virtio-iommu I get 50% \nperformance of what I can get for SMMUv3 emulation.\n\nDo you have similar observations? Since there is no need to emulate HW \nbehaviour in QEMU I expected virtio-iommu to be faster. I will run some \nmore benchmarks.\n\nThanks,\nTomasz\n\nOn 19.09.2017 09:46, Eric Auger wrote:\n> This series implements the virtio-iommu device.\n> \n> This v4 is an upgrade to v0.4 spec [1] and applies on QEMU v2.10.0.\n> - probe request support although no reserved region is returned at\n>    the moment\n> - unmap semantics less strict, as specified in v0.4\n> - device registration, attach/detach revisited\n> - split into smaller patches to ease review\n> - propose a way to inform the IOMMU mr about the page_size_mask\n>    of underlying HW IOMMU, if any\n> - remove warning associated with the translation of the MSI doorbell\n> \n> The device gets instantiated using the \"-device virtio-iommu-device\"\n> option. It currently works with ARM virt machine only, as the machine\n> must handle the dt binding between the virtio-mmio \"iommu\" node and\n> the PCI host bridge node.\n> \n> The associated VHOST/VFIO adaptation is available on the branch\n> below but is not officially delivered as part of this series.\n> \n> Best Regards\n> \n> Eric\n> \n> This series can be found at:\n> https://github.com/eauger/qemu/tree/v2.10.0-virtio-iommu-v4\n> \n> References:\n> [1] [RFC] virtio-iommu version 0.4\n>      git://linux-arm.org/virtio-iommu.git branch viommu/v0.4\n> \n> Testing:\n> - guest kernel with v0.4 virtio-iommu driver (4kB page)\n> - tested with guest using virtio-pci-net and vhost-net\n>    (,vhost=on/off,iommu_platform,disable-modern=off,disable-legacy=on  )\n> - tested with VFIO and guest assigned with 2 VFs\n> - tested with DPDK on guest with 2 assigned VFs\n> \n> Not tested:\n> - hot-plug/hot-unplug of EP: not implemented\n> \n> History:\n> v2-> v4:\n> - see above\n> \n> v2 -> v3:\n> - rebase on top of 2.10-rc0 and especially\n>    [PATCH qemu v9 0/2] memory/iommu: QOM'fy IOMMU MemoryRegion\n> - add mutex init\n> - fix as->mappings deletion using g_tree_ref/unref\n> - when a dev is attached whereas it is already attached to\n>    another address space, first detach it\n> - fix some error values\n> - page_sizes = TARGET_PAGE_MASK;\n> - I haven't changed the unmap() semantics yet, waiting for the\n>    next virtio-iommu spec revision.\n> \n> v1 -> v2:\n> - fix redifinition of viommu_as typedef\n> \n> Eric Auger (16):\n>    update-linux-headers: import virtio_iommu.h\n>    linux-headers: Update for virtio-iommu\n>    virtio-iommu: add skeleton\n>    virtio-iommu: Decode the command payload\n>    virtio-iommu: Add the iommu regions\n>    virtio-iommu: Register attached devices\n>    virtio-iommu: Implement attach/detach command\n>    virtio-iommu: Implement map/unmap\n>    virtio-iommu: Implement translate\n>    virtio-iommu: Implement probe request\n>    hw/arm/virt: Add 2.11 machine type\n>    hw/arm/virt: Add virtio-iommu to the virt board\n>    memory.h: Add set_page_size_mask IOMMUMemoryRegion callback\n>    hw/vfio/common: Set the IOMMUMemoryRegion supported page sizes\n>    virtio-iommu: Implement set_page_size_mask\n>    hw/vfio/common: Do not print error when viommu translates into an mmio\n>      region\n> \n>   hw/arm/virt.c                                 | 115 +++-\n>   hw/vfio/common.c                              |   7 +-\n>   hw/virtio/Makefile.objs                       |   1 +\n>   hw/virtio/trace-events                        |  24 +\n>   hw/virtio/virtio-iommu.c                      | 923 ++++++++++++++++++++++++++\n>   include/exec/memory.h                         |   4 +\n>   include/hw/arm/virt.h                         |   5 +\n>   include/hw/vfio/vfio-common.h                 |   1 +\n>   include/hw/virtio/virtio-iommu.h              |  61 ++\n>   include/standard-headers/linux/virtio_ids.h   |   1 +\n>   include/standard-headers/linux/virtio_iommu.h | 177 +++++\n>   linux-headers/linux/virtio_iommu.h            |   1 +\n>   scripts/update-linux-headers.sh               |   3 +\n>   13 files changed, 1312 insertions(+), 11 deletions(-)\n>   create mode 100644 hw/virtio/virtio-iommu.c\n>   create mode 100644 include/hw/virtio/virtio-iommu.h\n>   create mode 100644 include/standard-headers/linux/virtio_iommu.h\n>   create mode 100644 linux-headers/linux/virtio_iommu.h\n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=CAVIUMNETWORKS.onmicrosoft.com\n\theader.i=@CAVIUMNETWORKS.onmicrosoft.com header.b=\"gbqfGzvK\"; \n\tdkim-atps=neutral","spf=none (sender IP is )\n\tsmtp.mailfrom=Tomasz.Nowicki@cavium.com; "],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y2FRp5wGPz9sNr\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 27 Sep 2017 21:08:22 +1000 (AEST)","from localhost ([::1]:54032 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dxACS-0005t2-VT\n\tfor incoming@patchwork.ozlabs.org; Wed, 27 Sep 2017 07:08:20 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:51295)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <Tomasz.Nowicki@cavium.com>) id 1dxABn-0005fL-Ep\n\tfor qemu-devel@nongnu.org; Wed, 27 Sep 2017 07:07:40 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <Tomasz.Nowicki@cavium.com>) id 1dxABm-0008Az-7R\n\tfor qemu-devel@nongnu.org; Wed, 27 Sep 2017 07:07:39 -0400","from mail-bl2nam02on0042.outbound.protection.outlook.com\n\t([104.47.38.42]:31712\n\thelo=NAM02-BL2-obe.outbound.protection.outlook.com)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <Tomasz.Nowicki@cavium.com>)\n\tid 1dxABh-00088q-05; Wed, 27 Sep 2017 07:07:33 -0400","from [192.168.46.112] (12.108.191.226) by\n\tCY4PR0701MB3649.namprd07.prod.outlook.com (2603:10b6:910:93::12) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7;\n\tWed, 27 Sep 2017 11:07:25 +0000"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com;\n\th=From:Date:Subject:Message-ID:Content-Type:MIME-Version;\n\tbh=CPYCRfRhjJHPJJmxAGmcTBN/KCkayOE6F7IsvpHSQyQ=;\n\tb=gbqfGzvKBicJo0QyMQtTJ6/Ts0Uj4LMY77QOQ1oSepu54YR0BjeHvBWQ5lRqHuazMI18qncMfBiftHfUjvWQdYBZdTAZiCN3Fgw80nx6A9oJhnV7jgppr24AqH0jB95KoQNcudy98g9jLAJSzVc70G3eyG0LJCn0sAFJZjs36PI=","To":"Eric Auger <eric.auger@redhat.com>, eric.auger.pro@gmail.com,\n\tpeter.maydell@linaro.org, alex.williamson@redhat.com, mst@redhat.com, \n\tqemu-arm@nongnu.org, qemu-devel@nongnu.org, jean-philippe.brucker@arm.com","References":"<1505807208-9063-1-git-send-email-eric.auger@redhat.com>","From":"Tomasz Nowicki <tnowicki@caviumnetworks.com>","Message-ID":"<0062ede1-54d4-7e13-2986-374ec62c0a2a@caviumnetworks.com>","Date":"Wed, 27 Sep 2017 13:07:20 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tFirefox/52.0 Thunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<1505807208-9063-1-git-send-email-eric.auger@redhat.com>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Language":"en-GB","Content-Transfer-Encoding":"7bit","X-Originating-IP":"[12.108.191.226]","X-ClientProxiedBy":"MWHPR2201CA0024.namprd22.prod.outlook.com\n\t(2603:10b6:301:28::37) To CY4PR0701MB3649.namprd07.prod.outlook.com\n\t(2603:10b6:910:93::12)","X-MS-PublicTrafficType":"Email","X-MS-Office365-Filtering-Correlation-Id":"fb5b821f-18fb-40b6-caad-08d50597f22b","X-Microsoft-Antispam":"UriScan:; BCL:0; PCL:0;\n\tRULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075);\n\tSRVR:CY4PR0701MB3649; ","X-Microsoft-Exchange-Diagnostics":["1; CY4PR0701MB3649;\n\t3:WnQU2hp3fseEjz71NLataJ4G+M60z9Rcc+hjRAcKWAgbuO6vHyCvBE88D6R7Pgy8F5a+VWpxBfD9i/kAkBozCenigE+PxpiLsPitvwZOLgcBLA5axAhT+UdMYV3PipsGfU+xaVRcBgifyEG9jktNW5BT2itGbdXPhx310ynYRK7VHynpT5tMdE82CgwN8CKyldHJ9aI7PL6+7giagTeMhhRDCmAG+XpoJanAblpIJmuSHNQlWQa7DjPbuXh9gdwd;\n\t25:Me0+RbOKZl86aDF3cVK8XZ5o62dPSH+ARDW6Y6TxtYYXkfjzCwnbnjGBYEtrJuFJs5pSfYoxD7RrtrKayjc9MXCk7cK3FdSe0OLSyQxcpqhESDutYE4Wn4/2SBaFN2AJjCVwgeDQVjVL6/Fa2xO8LttoPNnCmUxzYCqKAW6yYPWY06NZ0Pqx4Rs19Erx9j7YPi0KDWmEIFqUXw/Ic8MNK/6rR42cb4kONY6lgtJ2LwykSXRmW3Q8RekAwaPEidzDk4xiLE91nz3i1/TiXAuXDs3rHsZyPjrJk5m67Y4PivQxZDO/NYYT2ylq7RLxtgPqp3IqJIQqSHfTQOZd88Bo+g==;\n\t31:/LKD5QI9KfHTGyGW3d7lgmVX8CWoVrq5Wocx4ye+utIVZ+2p4AmnPDm3s0T0KM5JFCrgtdeM1JX/MBzelqIBZ+wp/2T/k93sV+oOcIE/PFGDKfeBLnX44Xeb04GeJdRBQaVZ5SCfikdkfrOcvaaZKi5+/6X5JEg20ZcicPhUQ5iNftum6D8znce3MPgitmDLQWMeOdI6ya9Q3SUq1m/o6qjyFuaeHeZFs7hOHB2tGFI=","1; CY4PR0701MB3649;\n\t20:FF/dIllW91eEZM/A59ro0ncsUzo32IRXMUEp9NnGnzEq/WT+ogDs8nSXHFuJX8SEcpjzbMPVugEIiUrC/TYbnFsIz6iK0Q04+7xenuGj0QqoOOQKvgU0lq203XnD5IS5vVMgcIHDe2dpEKl9SO4IllS8y5baNoXeFKpMMH1D03XhEhL/WTztZuhDwn/oQPK4xCIuT7OLJNCAsgUfrrh1Q7yN6MKWwqDMkBk+GG+DsDrhR+1CK/9J4WCFDt8XezbH424C9x3fiH5kw6BpD4HaxWHoz9bcrGpA80LCw5xAM6/Wl9PMH2aYShTmEffjsH/fqvbmVJ2ruks8FrJOF9pblH6jiTCKksKas7QC5RTu02YG6Zb2K6Ih/hpHspxLu688tief2MJJc2pDvBvdpYdEEFp9wsJjXN3JyPcH7UmUVw3rFsN8NAmBhyjYduWWaWsUXn0nQMyoHnhtR0L7fy/iS4zef6sdtVxaga1qH7NI0AGSPcJi/tuc1WdW4JO3K63ScCoM+GGgbIPA3BoInLdK2ycLKsKZLZOwb2EA9/MTIr0RgeFJcGTMNu3ppN5BSWVw/FHV10Ivo522iZZ1zznOSYBLXdTw31o5X8QbEBJcsRU=;\n\t4:1IwRWF0A5681gDgnBRxkcfB918WulxPS72HcvVJNjCJ2veAlIhZzouLUlKjcgCtWaICdxZdNZzX78ix1/wAo8wRrZ4/fH9VFiqvJpHI8in78MsGeGlUfL8j45NV03UP2tlup2BtHVr7vZiqLzuYKgLme8Crs1EMDFHxb83dSOAY2Ecim8Yn8pAwyas0ssalJRDqxaB+ULD2P9Mz1rwnC22OjT+zjehVMbEcFRseictfRT7AY66kt3Oqr18r64Cks7feQoCO6FWlfYnpF0RkfhF/Ftagb+42yQUmW7JhWUQc=","=?utf-8?q?1=3BCY4PR0701MB3649=3B23=3AGB?=\n\t=?utf-8?q?OjKr2WE/ziouHAnmt7aDZ15iCUR8KOZNv/y7CwaTtTGsOPauX+y+JAI+?=\n\t=?utf-8?q?Uu45FNsvGbgI/IabvFjfgsw9GVaw0hxrPrGNEBkjL7eCHVx3lZbn7aes?=\n\t=?utf-8?q?1qfMuwvFeIcXKivDnF+eHBKSk1iR0gByo81xYBaIK/lkcRKvU68xiisF?=\n\t=?utf-8?q?4jHU2QLmh6USWhsEggDJYSSOA0SQmoF0JCbS+Ve2bJnnEpqvCvo1mAYr?=\n\t=?utf-8?q?PEWEcBDzJWSJuyWMC5RVtqoxA+CmOovMhHoMWCeUE5MJljFo95UKIe+I?=\n\t=?utf-8?q?fO/fnqk6LJ4YMK5fdYWKWMbxjTvI40kh/6HT8w9Gx0WreewGmN6SU8nZ?=\n\t=?utf-8?q?E9IJKbiHwQtu0hr10RXnrTsfPaRYIBDd/fvygRLyxK8LpTrqwqjM17aB?=\n\t=?utf-8?q?j2xY5mVlOn+OS5WC9qxC5UP7B9pBJg68RQcyCitWOJ4TVlqLZRJlsTXs?=\n\t=?utf-8?q?DzMXhZtAaiOKPWsWSlXo/F47xEA2vY8MjkNxyPvttQ6839apcFiaJFi2?=\n\t=?utf-8?q?e181tji0Ozf6BkE9A2yG064pQJN7pU7hBHMkLg2Fra4AAEjc4Z0bxBRC?=\n\t=?utf-8?q?hfdBHkB60YiN1bjXqeCucFYPoekKJ5OWKTYyWLn7tcTYwkyE4Q4/g/tI?=\n\t=?utf-8?q?eh7WaKbybo1ivkh+/qCbCgw4ADf2tavNJzVkWsT4ClxVzs2iI2ddytem?=\n\t=?utf-8?q?uMzfIhjeDlDCy9w39qKbKNlQklLHz05WP5RD+xsxm7niVPYGnxR9pAIb?=\n\t=?utf-8?q?RmSmA4ZtGtX7PbMSO86DeiX6eRpDktFShQ4aqk3z7MQND6dbyP9V6WZr?=\n\t=?utf-8?q?M5M3z9S48l7Q7OyTCGC6/4YjrKi4fXIqEDEHFSieD9Ny7GUY6m+OynDl?=\n\t=?utf-8?q?aG/3hzN88bOwhxHM4lXzkjxVP1XhUP68gpTbNrP3Cd6QUzemUbxQKwyn?=\n\t=?utf-8?q?q//keZkKxtgFmy+C/zW3IeUE47OlZFsOG5v0aDP2Jvb7ekzWLuMaRIc/?=\n\t=?utf-8?q?H+Xx4CUNNhmTzvNi80eih/MIbMwqxajDdrCwN05SwRmZ6szg0NH/u8ac?=\n\t=?utf-8?q?rPAJ1vUbd0RlvkYbrbXW0JgFvH9WWmYYRyg56X86Wc3XdnQ9d8Tf9j2F?=\n\t=?utf-8?q?w64HomsTIjCK3nybUGdKAR+/nR1+n0KxWM590jHTa2DU1PtA+t9ucYdL?=\n\t=?utf-8?q?/OZE5Afe8kgG4NNLnTj/m2o6iLoLzmUlVWPyXuWUshhNDqubm/C56ITZ?=\n\t=?utf-8?q?vn2Cs56pFAdPEucoOjr0F7xQQpAIKE3hopAS8mE7EhWUbAfodvNy9DcR?=\n\t=?utf-8?q?Tkxd4kqpBwNNvoZqPBKikRcvfMqjDN9tzNV0yxIBxO2I+Nk1nKn44XlD?=\n\t=?utf-8?q?hhB+W1S7I50UOnsKb1kk/1l3VeHwocF7AZF9CO613CB2IGJB22YA4+mf?=\n\t=?utf-8?q?yn6AWrx1J7LWebmuBma6+Wk47n0eZL8lRLbHaeJPNzGT1ccD1Sp1LTyl?=\n\t=?utf-8?q?cRrygxOIIKSsAYF0S8pcD7amuxWQ=3D=3D?=","1; CY4PR0701MB3649;\n\t6:Oh26jZBpwo5g8Mqk1GtLUnvjLeLVhCUXmW8lwz1HO8NJ8aP24/NQa0jbvz1TPpfx3c7STfB3LJqun9yAzBUvCJwt7yhH9Z93BE0MSWByIBJsxT+R5TkdYgt3gWmO2xJShv+s9ZU3gcqGyd+UQ/BkoaecO2KFfJrkqPo9u2hX8EV+lCZMBKpU0qsHhKEPgnvwZ8G2o0TieHreUBw5fgHZEoVKSx7EiSMxNQsW541RKBzzeigvO8sLImSykdFqZVIw+TVHnbVPK400Lm7awjUUDnf3AxkdY18sf+6qzBaegOLQ5qtYB6nl+civ9hJ1/5A/MAFkTIlWEVAK5EONXsEP1g==;\n\t5:vW6FaTOSS53vGxJesT+PbqP0MKWNab7kiLwzAdqN+5SWdb8M/DQkeUJH7zrPFqv8n530NIU8KKq/kr/9FswwOGoHhb7XwSFDzA5XZ+bKzasuZ61zKBvvUm7m7AbRKOhRwHrEkEg1dD+ziFJxA4uJNw==;\n\t24:TycWS/5zZBblX1VidUjOfhgEtFnKd9HinWhprwSmGXFH+ida9FeXbgdZHxEW5vSFwQnPdqUO9ODQWsY9GXhLsqGDWpGSOJ2+J7m5Z7XJ8MM=;\n\t7:uAmTqiy31VGS3K8I/rCoFfOXpSRXXVh5sAOovXo453lwDdKbb6NkYw31dXcLIolTSUon71Dvtid20GGLHd0cCJPvpXoaLhG/2+1tMbayAYztvyv2cPB5SL5zIDzl1p29z3+Rv78ZtadVoJkRfjx7iXwuVcMy1UVaAf/0d8OZc10+yTi8pcsh77l2NLuQ8iRU6kX4+KzcoN1OMBqiji46jA7zCC/d/KC0xhzwk4k4HNg="],"X-MS-TrafficTypeDiagnostic":"CY4PR0701MB3649:","X-Exchange-Antispam-Report-Test":"UriScan:(166708455590820);","X-Microsoft-Antispam-PRVS":"<CY4PR0701MB36494011861E93B7128C1DC5FE780@CY4PR0701MB3649.namprd07.prod.outlook.com>","X-Exchange-Antispam-Report-CFA-Test":"BCL:0; PCL:0;\n\tRULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(100000703101)(100105400095)(6041248)(20161123564025)(20161123562025)(20161123560025)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);\n\tSRVR:CY4PR0701MB3649; BCL:0; PCL:0;\n\tRULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);\n\tSRVR:CY4PR0701MB3649; ","X-Forefront-PRVS":"04433051BF","X-Forefront-Antispam-Report":"SFV:NSPM;\n\tSFS:(10009020)(6009001)(6049001)(346002)(376002)(189002)(24454002)(199003)(76176999)(50986999)(966005)(8656003)(6306002)(54356999)(31696002)(101416001)(23676002)(6666003)(2950100002)(42882006)(97736004)(39060400002)(3846002)(6116002)(230700001)(58126008)(189998001)(8936002)(64126003)(4326008)(72206003)(5890100001)(68736007)(33646002)(478600001)(316002)(16576012)(16526017)(8676002)(81166006)(81156014)(36756003)(5660300001)(25786009)(229853002)(53936002)(66066001)(65956001)(47776003)(6246003)(106356001)(50466002)(53546010)(7416002)(305945005)(77096006)(6486002)(31686004)(7736002)(117156002)(2906002)(83506001)(105586002);\n\tDIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR0701MB3649;\n\tH:[192.168.46.112]; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1;\n\tLANG:en; ","Received-SPF":"None (protection.outlook.com: cavium.com does not designate\n\tpermitted sender hosts)","SpamDiagnosticOutput":"1:99","SpamDiagnosticMetadata":"NSPM","X-OriginatorOrg":"caviumnetworks.com","X-MS-Exchange-CrossTenant-OriginalArrivalTime":"27 Sep 2017 11:07:25.8012\n\t(UTC)","X-MS-Exchange-CrossTenant-FromEntityHeader":"Hosted","X-MS-Exchange-CrossTenant-Id":"711e4ccf-2e9b-4bcf-a551-4094005b6194","X-MS-Exchange-Transport-CrossTenantHeadersStamped":"CY4PR0701MB3649","X-detected-operating-system":"by eggs.gnu.org: Windows 7 or 8 [fuzzy]","X-Received-From":"104.47.38.42","Subject":"Re: [Qemu-devel] [RFC v4 00/16] VIRTIO-IOMMU device","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"wei@redhat.com, kevin.tian@intel.com, marc.zyngier@arm.com,\n\twill.deacon@arm.com, drjones@redhat.com, peterx@redhat.com,\n\tlinuc.decode@gmail.com, bharat.bhushan@nxp.com,\n\tchristoffer.dall@linaro.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1776434,"web_url":"http://patchwork.ozlabs.org/comment/1776434/","msgid":"<25c896c5-81db-e64a-92b0-7b2e270f530e@redhat.com>","list_archive_url":null,"date":"2017-09-27T15:38:47","subject":"Re: [Qemu-devel] [RFC v4 00/16] VIRTIO-IOMMU device","submitter":{"id":69187,"url":"http://patchwork.ozlabs.org/api/people/69187/","name":"Eric Auger","email":"eric.auger@redhat.com"},"content":"Hi Tomasz\n\nOn 27/09/2017 13:07, Tomasz Nowicki wrote:\n> Hi Eric,\n> \n> Out of curiosity, I compared your SMMUv3 full emulation against\n> virtio-iommu. For virtio-net device behind the virtio-iommu I get 50%\n> performance of what I can get for SMMUv3 emulation.\n> \n> Do you have similar observations? Since there is no need to emulate HW\n> behaviour in QEMU I expected virtio-iommu to be faster. I will run some\n> more benchmarks.\n\nNo I don't have formal comparative figures at the moment. Benchmarking\nis also on the top of my todo list though.\n\nOne reason could be that virtio-iommu sends requests for each map\noperations whereas this does not happen for vsmmuv3 (in non caching\nmode). You could try to turn the vsmmuv3 caching-mode option and I guess\nyou should have more similar perf figures between virtio-iommu and\nvsmuv3.\n\nThanks\n\nEric\n> \n> Thanks,\n> Tomasz\n> \n> On 19.09.2017 09:46, Eric Auger wrote:\n>> This series implements the virtio-iommu device.\n>>\n>> This v4 is an upgrade to v0.4 spec [1] and applies on QEMU v2.10.0.\n>> - probe request support although no reserved region is returned at\n>>    the moment\n>> - unmap semantics less strict, as specified in v0.4\n>> - device registration, attach/detach revisited\n>> - split into smaller patches to ease review\n>> - propose a way to inform the IOMMU mr about the page_size_mask\n>>    of underlying HW IOMMU, if any\n>> - remove warning associated with the translation of the MSI doorbell\n>>\n>> The device gets instantiated using the \"-device virtio-iommu-device\"\n>> option. It currently works with ARM virt machine only, as the machine\n>> must handle the dt binding between the virtio-mmio \"iommu\" node and\n>> the PCI host bridge node.\n>>\n>> The associated VHOST/VFIO adaptation is available on the branch\n>> below but is not officially delivered as part of this series.\n>>\n>> Best Regards\n>>\n>> Eric\n>>\n>> This series can be found at:\n>> https://github.com/eauger/qemu/tree/v2.10.0-virtio-iommu-v4\n>>\n>> References:\n>> [1] [RFC] virtio-iommu version 0.4\n>>      git://linux-arm.org/virtio-iommu.git branch viommu/v0.4\n>>\n>> Testing:\n>> - guest kernel with v0.4 virtio-iommu driver (4kB page)\n>> - tested with guest using virtio-pci-net and vhost-net\n>>    (,vhost=on/off,iommu_platform,disable-modern=off,disable-legacy=on  )\n>> - tested with VFIO and guest assigned with 2 VFs\n>> - tested with DPDK on guest with 2 assigned VFs\n>>\n>> Not tested:\n>> - hot-plug/hot-unplug of EP: not implemented\n>>\n>> History:\n>> v2-> v4:\n>> - see above\n>>\n>> v2 -> v3:\n>> - rebase on top of 2.10-rc0 and especially\n>>    [PATCH qemu v9 0/2] memory/iommu: QOM'fy IOMMU MemoryRegion\n>> - add mutex init\n>> - fix as->mappings deletion using g_tree_ref/unref\n>> - when a dev is attached whereas it is already attached to\n>>    another address space, first detach it\n>> - fix some error values\n>> - page_sizes = TARGET_PAGE_MASK;\n>> - I haven't changed the unmap() semantics yet, waiting for the\n>>    next virtio-iommu spec revision.\n>>\n>> v1 -> v2:\n>> - fix redifinition of viommu_as typedef\n>>\n>> Eric Auger (16):\n>>    update-linux-headers: import virtio_iommu.h\n>>    linux-headers: Update for virtio-iommu\n>>    virtio-iommu: add skeleton\n>>    virtio-iommu: Decode the command payload\n>>    virtio-iommu: Add the iommu regions\n>>    virtio-iommu: Register attached devices\n>>    virtio-iommu: Implement attach/detach command\n>>    virtio-iommu: Implement map/unmap\n>>    virtio-iommu: Implement translate\n>>    virtio-iommu: Implement probe request\n>>    hw/arm/virt: Add 2.11 machine type\n>>    hw/arm/virt: Add virtio-iommu to the virt board\n>>    memory.h: Add set_page_size_mask IOMMUMemoryRegion callback\n>>    hw/vfio/common: Set the IOMMUMemoryRegion supported page sizes\n>>    virtio-iommu: Implement set_page_size_mask\n>>    hw/vfio/common: Do not print error when viommu translates into an mmio\n>>      region\n>>\n>>   hw/arm/virt.c                                 | 115 +++-\n>>   hw/vfio/common.c                              |   7 +-\n>>   hw/virtio/Makefile.objs                       |   1 +\n>>   hw/virtio/trace-events                        |  24 +\n>>   hw/virtio/virtio-iommu.c                      | 923\n>> ++++++++++++++++++++++++++\n>>   include/exec/memory.h                         |   4 +\n>>   include/hw/arm/virt.h                         |   5 +\n>>   include/hw/vfio/vfio-common.h                 |   1 +\n>>   include/hw/virtio/virtio-iommu.h              |  61 ++\n>>   include/standard-headers/linux/virtio_ids.h   |   1 +\n>>   include/standard-headers/linux/virtio_iommu.h | 177 +++++\n>>   linux-headers/linux/virtio_iommu.h            |   1 +\n>>   scripts/update-linux-headers.sh               |   3 +\n>>   13 files changed, 1312 insertions(+), 11 deletions(-)\n>>   create mode 100644 hw/virtio/virtio-iommu.c\n>>   create mode 100644 include/hw/virtio/virtio-iommu.h\n>>   create mode 100644 include/standard-headers/linux/virtio_iommu.h\n>>   create mode 100644 linux-headers/linux/virtio_iommu.h\n>>\n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx08.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx08.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=eric.auger@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y2MTh0frkz9tXb\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 28 Sep 2017 01:40:22 +1000 (AEST)","from localhost ([::1]:55279 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dxERg-0007wX-7Y\n\tfor incoming@patchwork.ozlabs.org; Wed, 27 Sep 2017 11:40:20 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:39614)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <eric.auger@redhat.com>) id 1dxERG-0007uS-LQ\n\tfor qemu-devel@nongnu.org; Wed, 27 Sep 2017 11:39:59 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <eric.auger@redhat.com>) id 1dxERD-00040u-T2\n\tfor qemu-devel@nongnu.org; Wed, 27 Sep 2017 11:39:54 -0400","from mx1.redhat.com ([209.132.183.28]:56498)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <eric.auger@redhat.com>)\n\tid 1dxER8-0003ut-JE; Wed, 27 Sep 2017 11:39:46 -0400","from smtp.corp.redhat.com\n\t(int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 4DEFEC0079A5;\n\tWed, 27 Sep 2017 15:39:45 +0000 (UTC)","from localhost.localdomain (ovpn-116-163.ams2.redhat.com\n\t[10.36.116.163])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id AAA7981EFB;\n\tWed, 27 Sep 2017 15:38:54 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 4DEFEC0079A5","To":"Tomasz Nowicki <tnowicki@caviumnetworks.com>, eric.auger.pro@gmail.com, \n\tpeter.maydell@linaro.org, alex.williamson@redhat.com, mst@redhat.com,\n\tqemu-arm@nongnu.org, qemu-devel@nongnu.org, jean-philippe.brucker@arm.com","References":"<1505807208-9063-1-git-send-email-eric.auger@redhat.com>\n\t<0062ede1-54d4-7e13-2986-374ec62c0a2a@caviumnetworks.com>","From":"Auger Eric <eric.auger@redhat.com>","Message-ID":"<25c896c5-81db-e64a-92b0-7b2e270f530e@redhat.com>","Date":"Wed, 27 Sep 2017 17:38:47 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101\n\tThunderbird/45.4.0","MIME-Version":"1.0","In-Reply-To":"<0062ede1-54d4-7e13-2986-374ec62c0a2a@caviumnetworks.com>","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.16","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.32]);\n\tWed, 27 Sep 2017 15:39:45 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [RFC v4 00/16] VIRTIO-IOMMU device","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"wei@redhat.com, kevin.tian@intel.com, marc.zyngier@arm.com,\n\twill.deacon@arm.com, drjones@redhat.com, peterx@redhat.com,\n\tlinuc.decode@gmail.com, bharat.bhushan@nxp.com,\n\tchristoffer.dall@linaro.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1784720,"web_url":"http://patchwork.ozlabs.org/comment/1784720/","msgid":"<CAFEAcA-0MK18DakmNPRXCNYbDpBvzE0h12nNjg7zr+F_m0EnDw@mail.gmail.com>","list_archive_url":null,"date":"2017-10-11T14:56:59","subject":"Re: [Qemu-devel] [RFC v4 00/16] VIRTIO-IOMMU device","submitter":{"id":5111,"url":"http://patchwork.ozlabs.org/api/people/5111/","name":"Peter Maydell","email":"peter.maydell@linaro.org"},"content":"On 19 September 2017 at 08:46, Eric Auger <eric.auger@redhat.com> wrote:\n> This series implements the virtio-iommu device.\n>\n> This v4 is an upgrade to v0.4 spec [1] and applies on QEMU v2.10.0.\n> - probe request support although no reserved region is returned at\n>   the moment\n> - unmap semantics less strict, as specified in v0.4\n> - device registration, attach/detach revisited\n> - split into smaller patches to ease review\n> - propose a way to inform the IOMMU mr about the page_size_mask\n>   of underlying HW IOMMU, if any\n> - remove warning associated with the translation of the MSI doorbell\n>\n> The device gets instantiated using the \"-device virtio-iommu-device\"\n> option. It currently works with ARM virt machine only, as the machine\n> must handle the dt binding between the virtio-mmio \"iommu\" node and\n> the PCI host bridge node.\n\nCould this work on x86, or is it inherently arm-only?\n\nthanks\n-- PMM","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"WKWN1fmb\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yBxtC3rbXz9s2G\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 12 Oct 2017 01:57:55 +1100 (AEDT)","from localhost ([::1]:41345 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1e2ISH-00032j-Lr\n\tfor incoming@patchwork.ozlabs.org; Wed, 11 Oct 2017 10:57:53 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:56724)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <peter.maydell@linaro.org>) id 1e2IRl-00031Q-Kt\n\tfor qemu-devel@nongnu.org; Wed, 11 Oct 2017 10:57:22 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <peter.maydell@linaro.org>) id 1e2IRk-0007tE-RE\n\tfor qemu-devel@nongnu.org; Wed, 11 Oct 2017 10:57:21 -0400","from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]:50520)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <peter.maydell@linaro.org>)\n\tid 1e2IRk-0007sI-L1\n\tfor qemu-devel@nongnu.org; Wed, 11 Oct 2017 10:57:20 -0400","by mail-wm0-x236.google.com with SMTP id u138so5524195wmu.5\n\tfor <qemu-devel@nongnu.org>; Wed, 11 Oct 2017 07:57:20 -0700 (PDT)","by 10.223.128.207 with HTTP; Wed, 11 Oct 2017 07:56:59 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=+Rt+BfYejWZ3EqVqfl91ng8hym3OFP00p7asNVVbx5g=;\n\tb=WKWN1fmbddOsiThsFXwRgJ8svIveVMxhivEfWqAgEkn2kaux5M0zvbh15pj4ao6s7x\n\t6TelV/7WOhfO4qNY6g8FFz4aqe1fptZdfHea+SAQSHyJCVXIPt8zL5YDOgosuGbFjFxm\n\tTc39oDFADYxbtfrKzIVt3LOv5M4puactiyfRo=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=+Rt+BfYejWZ3EqVqfl91ng8hym3OFP00p7asNVVbx5g=;\n\tb=sfiLF0I+cIOsSkYpA2fUuY8AqlF4E5zxPv6ofknkZLgJBRh465fyWwgwnU81p8jEHg\n\t8lIzNZ78Kh4oXxT0PeEsp19jlmDJV+5ug9Hpt9c3H/VCOk65jTPO82asndl8/zp7lXRy\n\tUPkTwR4wB4uGlfxUa99EgYf9sF2PjtLS++j6pWPGA0He2u29RlU6SyOVQYs5QQmgHoPV\n\tLg0RV+uGXdYurVRQhkMzRSWBwkikvCtB5TUHhW1QtMTKlk+umCo3MCJwcKe+YXiQCBW0\n\tXJ0IlBs89tqQyZAzfkqRXqTqdnURYz8+g/TZJMOMhXIimZ4Pvx+ev7Ts0yxFVP8mCNXR\n\t8yyA==","X-Gm-Message-State":"AMCzsaWil5YegSz1tkBTmm6LNit3QFRAcDi/w6eWjEJrHXnA97f5sn/9\n\tgr5a7vfgUBnT86I5Cipwq4q3Hmv3kM5gcNH04U6DJQ==","X-Google-Smtp-Source":"AOwi7QBY4Npn08pSNAl+53Kwv7i8I5HQp+/tDiKUk+kJuFY0Stz2WuZe/+nbKmXuAgn6GSB4Ot3ANeiZs9QAWLQS+ns=","X-Received":"by 10.223.186.201 with SMTP id w9mr15526394wrg.230.1507733839561;\n\tWed, 11 Oct 2017 07:57:19 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<1505807208-9063-1-git-send-email-eric.auger@redhat.com>","References":"<1505807208-9063-1-git-send-email-eric.auger@redhat.com>","From":"Peter Maydell <peter.maydell@linaro.org>","Date":"Wed, 11 Oct 2017 15:56:59 +0100","Message-ID":"<CAFEAcA-0MK18DakmNPRXCNYbDpBvzE0h12nNjg7zr+F_m0EnDw@mail.gmail.com>","To":"Eric Auger <eric.auger@redhat.com>","Content-Type":"text/plain; charset=\"UTF-8\"","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2a00:1450:400c:c09::236","Subject":"Re: [Qemu-devel] [RFC v4 00/16] VIRTIO-IOMMU device","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Wei Huang <wei@redhat.com>, \"Tian, Kevin\" <kevin.tian@intel.com>,\n\tAndrew Jones <drjones@redhat.com>,\n\t\"Michael S. Tsirkin\" <mst@redhat.com>, \n\tjean-philippe.brucker@arm.com, Tomasz Nowicki <tn@semihalf.com>,\n\tWill Deacon <will.deacon@arm.com>,\n\tQEMU Developers <qemu-devel@nongnu.org>, \n\tPeter Xu <peterx@redhat.com>, Marc Zyngier <marc.zyngier@arm.com>,\n\tAlex Williamson <alex.williamson@redhat.com>,\n\tqemu-arm <qemu-arm@nongnu.org>, linuc.decode@gmail.com,\n\tBharat Bhushan <bharat.bhushan@nxp.com>,\n\tChristoffer Dall <christoffer.dall@linaro.org>, eric.auger.pro@gmail.com","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1784770,"web_url":"http://patchwork.ozlabs.org/comment/1784770/","msgid":"<f3a263b7-27e6-26df-592d-a34902bab6fe@redhat.com>","list_archive_url":null,"date":"2017-10-11T16:08:58","subject":"Re: [Qemu-devel] [RFC v4 00/16] VIRTIO-IOMMU device","submitter":{"id":69187,"url":"http://patchwork.ozlabs.org/api/people/69187/","name":"Eric Auger","email":"eric.auger@redhat.com"},"content":"Hi Peter,\n\nOn 11/10/2017 16:56, Peter Maydell wrote:\n> On 19 September 2017 at 08:46, Eric Auger <eric.auger@redhat.com> wrote:\n>> This series implements the virtio-iommu device.\n>>\n>> This v4 is an upgrade to v0.4 spec [1] and applies on QEMU v2.10.0.\n>> - probe request support although no reserved region is returned at\n>>   the moment\n>> - unmap semantics less strict, as specified in v0.4\n>> - device registration, attach/detach revisited\n>> - split into smaller patches to ease review\n>> - propose a way to inform the IOMMU mr about the page_size_mask\n>>   of underlying HW IOMMU, if any\n>> - remove warning associated with the translation of the MSI doorbell\n>>\n>> The device gets instantiated using the \"-device virtio-iommu-device\"\n>> option. It currently works with ARM virt machine only, as the machine\n>> must handle the dt binding between the virtio-mmio \"iommu\" node and\n>> the PCI host bridge node.\n> \n> Could this work on x86, or is it inherently arm-only?\n\nYes this is the goal. At the moment the ACPI probing is not yet properly\nspecified but a Q35 prototype was developed in the Red Hat Virt team.\nThis will be presented at the KVM forum.\n\nThanks\n\nEric\n> \n> thanks\n> -- PMM\n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx03.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx03.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=eric.auger@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yBzT24z8wz9s9Y\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 12 Oct 2017 03:09:42 +1100 (AEDT)","from localhost ([::1]:41719 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1e2JZk-0007kB-RR\n\tfor incoming@patchwork.ozlabs.org; Wed, 11 Oct 2017 12:09:40 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:48052)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <eric.auger@redhat.com>) id 1e2JZQ-0007j2-3D\n\tfor qemu-devel@nongnu.org; Wed, 11 Oct 2017 12:09:20 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <eric.auger@redhat.com>) id 1e2JZP-0004Ue-85\n\tfor qemu-devel@nongnu.org; Wed, 11 Oct 2017 12:09:20 -0400","from mx1.redhat.com ([209.132.183.28]:41168)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <eric.auger@redhat.com>)\n\tid 1e2JZK-0004RE-RG; Wed, 11 Oct 2017 12:09:14 -0400","from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id E321F7D0CF;\n\tWed, 11 Oct 2017 16:09:13 +0000 (UTC)","from localhost.localdomain (ovpn-117-172.ams2.redhat.com\n\t[10.36.117.172])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id 6032163BAA;\n\tWed, 11 Oct 2017 16:09:00 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com E321F7D0CF","To":"Peter Maydell <peter.maydell@linaro.org>","References":"<1505807208-9063-1-git-send-email-eric.auger@redhat.com>\n\t<CAFEAcA-0MK18DakmNPRXCNYbDpBvzE0h12nNjg7zr+F_m0EnDw@mail.gmail.com>","From":"Auger Eric <eric.auger@redhat.com>","Message-ID":"<f3a263b7-27e6-26df-592d-a34902bab6fe@redhat.com>","Date":"Wed, 11 Oct 2017 18:08:58 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101\n\tThunderbird/45.4.0","MIME-Version":"1.0","In-Reply-To":"<CAFEAcA-0MK18DakmNPRXCNYbDpBvzE0h12nNjg7zr+F_m0EnDw@mail.gmail.com>","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.15","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.27]);\n\tWed, 11 Oct 2017 16:09:14 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [RFC v4 00/16] VIRTIO-IOMMU device","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Wei Huang <wei@redhat.com>, \"Tian, Kevin\" <kevin.tian@intel.com>,\n\t\"Michael S. Tsirkin\" <mst@redhat.com>,\n\tjean-philippe.brucker@arm.com, Tomasz Nowicki <tn@semihalf.com>,\n\tWill Deacon <will.deacon@arm.com>,\n\tAndrew Jones <drjones@redhat.com>, Peter Xu <peterx@redhat.com>,\n\tQEMU Developers <qemu-devel@nongnu.org>,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tAlex Williamson <alex.williamson@redhat.com>,\n\tqemu-arm <qemu-arm@nongnu.org>, linuc.decode@gmail.com,\n\tBharat Bhushan <bharat.bhushan@nxp.com>,\n\tChristoffer Dall <christoffer.dall@linaro.org>, eric.auger.pro@gmail.com","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1785271,"web_url":"http://patchwork.ozlabs.org/comment/1785271/","msgid":"<CAFEAcA_2RaRsvm_=V4iDNk_vMOtiWUZs3-SdMh+DSYqGyPE0PQ@mail.gmail.com>","list_archive_url":null,"date":"2017-10-12T09:54:25","subject":"Re: [Qemu-devel] [RFC v4 00/16] VIRTIO-IOMMU device","submitter":{"id":5111,"url":"http://patchwork.ozlabs.org/api/people/5111/","name":"Peter Maydell","email":"peter.maydell@linaro.org"},"content":"On 11 October 2017 at 17:08, Auger Eric <eric.auger@redhat.com> wrote:\n> Hi Peter,\n>\n> On 11/10/2017 16:56, Peter Maydell wrote:\n>> On 19 September 2017 at 08:46, Eric Auger <eric.auger@redhat.com> wrote:\n>>> This series implements the virtio-iommu device.\n>>>\n>>> This v4 is an upgrade to v0.4 spec [1] and applies on QEMU v2.10.0.\n>>> - probe request support although no reserved region is returned at\n>>>   the moment\n>>> - unmap semantics less strict, as specified in v0.4\n>>> - device registration, attach/detach revisited\n>>> - split into smaller patches to ease review\n>>> - propose a way to inform the IOMMU mr about the page_size_mask\n>>>   of underlying HW IOMMU, if any\n>>> - remove warning associated with the translation of the MSI doorbell\n>>>\n>>> The device gets instantiated using the \"-device virtio-iommu-device\"\n>>> option. It currently works with ARM virt machine only, as the machine\n>>> must handle the dt binding between the virtio-mmio \"iommu\" node and\n>>> the PCI host bridge node.\n>>\n>> Could this work on x86, or is it inherently arm-only?\n>\n> Yes this is the goal. At the moment the ACPI probing is not yet properly\n> specified but a Q35 prototype was developed in the Red Hat Virt team.\n> This will be presented at the KVM forum.\n\nSince I have very little familiarity with virtio or iommu code,\nI'd be much happier if this was reviewed as a generic virtio-iommu\nby the x86/virtio devs and then the arm specific parts done second...\n\nI'm also not clear on what we're expecting the recommended or normal\nway to do device passthrough is going to be -- this virtio-mmio,\nor presenting the guest with an SMMUv3 interface? Do we really\nneed to implement both ?\n\nthanks\n-- PMM","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"GB3xI2Pm\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yCRJt4W4Vz9sBd\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 12 Oct 2017 21:04:14 +1100 (AEDT)","from localhost ([::1]:44567 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1e2aLc-0001LQ-K2\n\tfor incoming@patchwork.ozlabs.org; Thu, 12 Oct 2017 06:04:12 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:36169)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <peter.maydell@linaro.org>) id 1e2aCW-0002IU-L8\n\tfor qemu-devel@nongnu.org; Thu, 12 Oct 2017 05:54:49 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <peter.maydell@linaro.org>) id 1e2aCV-0001Nt-NZ\n\tfor qemu-devel@nongnu.org; Thu, 12 Oct 2017 05:54:48 -0400","from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]:56097)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <peter.maydell@linaro.org>)\n\tid 1e2aCV-0001NH-GY\n\tfor qemu-devel@nongnu.org; Thu, 12 Oct 2017 05:54:47 -0400","by mail-wm0-x232.google.com with SMTP id u138so11790492wmu.4\n\tfor <qemu-devel@nongnu.org>; Thu, 12 Oct 2017 02:54:47 -0700 (PDT)","by 10.223.139.195 with HTTP; Thu, 12 Oct 2017 02:54:25 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=SdL/5k4cQ4dOWZpu8dduUoTE6KcqaN0X5ZEKPwBp+gw=;\n\tb=GB3xI2Pmbsbw52yGknnuesGao3UB72amVlVyBOVWDmMEzMGTlXtUP6tT7KNDNpiXLF\n\tRWgzBlTBJhzQe+xUQVlTn1Ab0wsyaYAhlJUwKuSqruTt8V2RBWeFfHwiH3HF1NxyIcKz\n\tznF0dNC/n1mHJwB+NUrDmEcga+zGbEGYSDYJA=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=SdL/5k4cQ4dOWZpu8dduUoTE6KcqaN0X5ZEKPwBp+gw=;\n\tb=J/1Yisk+fA/K/RJLmFT4IgX793ZctjcVSTsjAsyK3/f2nbTBlaBZzhVyjouvxs09j8\n\tGm9MuizIL4bAnrn9C6x05dJjeta7tkMb/RsTh4+srvBxhg8NkLuUf2Xj41NhPHGRj2pc\n\tb9y4UcIVQG+X6vfz9VNnrj7TM3KQ+xHdclKwEcnzYvoexvKWdTs9vEStD1/OSmv+ZQMD\n\tDPCdbLvDo3KV2dP2UgPANYhtPpLCql/goazrk07NTCewPgWYPiwgzfx1FKemvPKpWWnt\n\t3KTiWuj0/1sBZt70EW1t1++COKYF28ie4DrA0ojjs2ityX+0eOU6sIeSY9uoUYLLFfZ+\n\tgC6g==","X-Gm-Message-State":"AMCzsaU9jUAbbYqRdXdH47G2RRueWceL/Yhg5GTNDGaACvo68ZjIgUsJ\n\tdNN6f5WIMbE7GE32V0q+W6DUcAnGJ3ZuZL/SQjSkHQ==","X-Google-Smtp-Source":"ABhQp+S4XYbHWbS+uRGrM+ieGBQA1340Pacr35g9y2e4AazcWkTywJTwXJgUPPVlLG7jfLBscIhGe8bPDfw3z/SVa3o=","X-Received":"by 10.28.23.3 with SMTP id 3mr1343419wmx.62.1507802086416;\n\tThu, 12 Oct 2017 02:54:46 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<f3a263b7-27e6-26df-592d-a34902bab6fe@redhat.com>","References":"<1505807208-9063-1-git-send-email-eric.auger@redhat.com>\n\t<CAFEAcA-0MK18DakmNPRXCNYbDpBvzE0h12nNjg7zr+F_m0EnDw@mail.gmail.com>\n\t<f3a263b7-27e6-26df-592d-a34902bab6fe@redhat.com>","From":"Peter Maydell <peter.maydell@linaro.org>","Date":"Thu, 12 Oct 2017 10:54:25 +0100","Message-ID":"<CAFEAcA_2RaRsvm_=V4iDNk_vMOtiWUZs3-SdMh+DSYqGyPE0PQ@mail.gmail.com>","To":"Auger Eric <eric.auger@redhat.com>","Content-Type":"text/plain; charset=\"UTF-8\"","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2a00:1450:400c:c09::232","Subject":"Re: [Qemu-devel] [RFC v4 00/16] VIRTIO-IOMMU device","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Wei Huang <wei@redhat.com>, \"Tian, Kevin\" <kevin.tian@intel.com>,\n\t\"Michael S. Tsirkin\" <mst@redhat.com>,\n\tjean-philippe.brucker@arm.com, Tomasz Nowicki <tn@semihalf.com>,\n\tWill Deacon <will.deacon@arm.com>,\n\tAndrew Jones <drjones@redhat.com>, Peter Xu <peterx@redhat.com>,\n\tQEMU Developers <qemu-devel@nongnu.org>,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tAlex Williamson <alex.williamson@redhat.com>,\n\tqemu-arm <qemu-arm@nongnu.org>, linuc.decode@gmail.com,\n\tBharat Bhushan <bharat.bhushan@nxp.com>,\n\tChristoffer Dall <christoffer.dall@linaro.org>, eric.auger.pro@gmail.com","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1785282,"web_url":"http://patchwork.ozlabs.org/comment/1785282/","msgid":"<08ce288c-610c-4dea-927d-262e7b75051f@redhat.com>","list_archive_url":null,"date":"2017-10-12T10:09:40","subject":"Re: [Qemu-devel] [RFC v4 00/16] VIRTIO-IOMMU device","submitter":{"id":69187,"url":"http://patchwork.ozlabs.org/api/people/69187/","name":"Eric Auger","email":"eric.auger@redhat.com"},"content":"Hi Peter,\n\nOn 12/10/2017 11:54, Peter Maydell wrote:\n> On 11 October 2017 at 17:08, Auger Eric <eric.auger@redhat.com> wrote:\n>> Hi Peter,\n>>\n>> On 11/10/2017 16:56, Peter Maydell wrote:\n>>> On 19 September 2017 at 08:46, Eric Auger <eric.auger@redhat.com> wrote:\n>>>> This series implements the virtio-iommu device.\n>>>>\n>>>> This v4 is an upgrade to v0.4 spec [1] and applies on QEMU v2.10.0.\n>>>> - probe request support although no reserved region is returned at\n>>>>   the moment\n>>>> - unmap semantics less strict, as specified in v0.4\n>>>> - device registration, attach/detach revisited\n>>>> - split into smaller patches to ease review\n>>>> - propose a way to inform the IOMMU mr about the page_size_mask\n>>>>   of underlying HW IOMMU, if any\n>>>> - remove warning associated with the translation of the MSI doorbell\n>>>>\n>>>> The device gets instantiated using the \"-device virtio-iommu-device\"\n>>>> option. It currently works with ARM virt machine only, as the machine\n>>>> must handle the dt binding between the virtio-mmio \"iommu\" node and\n>>>> the PCI host bridge node.\n>>>\n>>> Could this work on x86, or is it inherently arm-only?\n>>\n>> Yes this is the goal. At the moment the ACPI probing is not yet properly\n>> specified but a Q35 prototype was developed in the Red Hat Virt team.\n>> This will be presented at the KVM forum.\n> \n> Since I have very little familiarity with virtio or iommu code,\n> I'd be much happier if this was reviewed as a generic virtio-iommu\n> by the x86/virtio devs and then the arm specific parts done second...\n\nUnderstood. I was rather expecting you to review the smmuv3 emulation\ncode which you did, in a comprehensive manner ;-), and many thanks for that.\n\nNote sure this is time yet to get this RFC reviewed as\n- the v0.4 virtio-iommu driver it relies on was not officially submitted,\n- the virtio-iommu specification review has not really been reviewed,\n- the ACPI probing method has not been discussed yet.\n\nJean-Philippe, please correct me if I am wrong.\n\nSo to me, this is pure RFC at the moment.\n> \n> I'm also not clear on what we're expecting the recommended or normal\n> way to do device passthrough is going to be -- this virtio-mmio,\n> or presenting the guest with an SMMUv3 interface? Do we really\n> need to implement both ?\n\nI think the KVM forum is the right place to sync as both approaches will\nbe presented and some pros/cons + performance figures will be given.\n\nAs we talk about choosing, there is one alternative that was suggested\non the ML by Alex & Michael but never really get considered yet and\nmaybe should be: using intel iommu emulation code for ARM. I aknowledge\nthis deserves a thorough impact study on kernel and FW side but I would\nbe happy to get your opinion about the QEMU side. Would you have a by-\nprinciple rejection of this idea to instantiate such an Intel device in\nmach virt or would it be something you would be ready to consider?\n\nThanks\n\nEric\n\n\n> \n> thanks\n> -- PMM\n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=eric.auger@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yCRSX29VZz9sRq\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 12 Oct 2017 21:10:52 +1100 (AEDT)","from localhost ([::1]:44616 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1e2aS2-0006cW-8g\n\tfor incoming@patchwork.ozlabs.org; Thu, 12 Oct 2017 06:10:50 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:43277)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <eric.auger@redhat.com>) id 1e2aRK-0006Rv-MY\n\tfor qemu-devel@nongnu.org; Thu, 12 Oct 2017 06:10:12 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <eric.auger@redhat.com>) id 1e2aRE-0004dk-L5\n\tfor qemu-devel@nongnu.org; Thu, 12 Oct 2017 06:10:06 -0400","from mx1.redhat.com ([209.132.183.28]:56548)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <eric.auger@redhat.com>)\n\tid 1e2aR7-0004Vz-NA; Thu, 12 Oct 2017 06:09:53 -0400","from smtp.corp.redhat.com\n\t(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 5437081DE3;\n\tThu, 12 Oct 2017 10:09:52 +0000 (UTC)","from localhost.localdomain (ovpn-117-172.ams2.redhat.com\n\t[10.36.117.172])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id CD2896047B;\n\tThu, 12 Oct 2017 10:09:41 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 5437081DE3","To":"Peter Maydell <peter.maydell@linaro.org>","References":"<1505807208-9063-1-git-send-email-eric.auger@redhat.com>\n\t<CAFEAcA-0MK18DakmNPRXCNYbDpBvzE0h12nNjg7zr+F_m0EnDw@mail.gmail.com>\n\t<f3a263b7-27e6-26df-592d-a34902bab6fe@redhat.com>\n\t<CAFEAcA_2RaRsvm_=V4iDNk_vMOtiWUZs3-SdMh+DSYqGyPE0PQ@mail.gmail.com>","From":"Auger Eric <eric.auger@redhat.com>","Message-ID":"<08ce288c-610c-4dea-927d-262e7b75051f@redhat.com>","Date":"Thu, 12 Oct 2017 12:09:40 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101\n\tThunderbird/45.4.0","MIME-Version":"1.0","In-Reply-To":"<CAFEAcA_2RaRsvm_=V4iDNk_vMOtiWUZs3-SdMh+DSYqGyPE0PQ@mail.gmail.com>","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.11","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.25]);\n\tThu, 12 Oct 2017 10:09:52 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [RFC v4 00/16] VIRTIO-IOMMU device","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Wei Huang <wei@redhat.com>, \"Tian, Kevin\" <kevin.tian@intel.com>,\n\t\"Michael S. Tsirkin\" <mst@redhat.com>,\n\tjean-philippe.brucker@arm.com, Tomasz Nowicki <tn@semihalf.com>,\n\tWill Deacon <will.deacon@arm.com>,\n\tAndrew Jones <drjones@redhat.com>, Peter Xu <peterx@redhat.com>,\n\tQEMU Developers <qemu-devel@nongnu.org>,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tAlex Williamson <alex.williamson@redhat.com>,\n\tqemu-arm <qemu-arm@nongnu.org>, linuc.decode@gmail.com,\n\tBharat Bhushan <bharat.bhushan@nxp.com>,\n\tChristoffer Dall <christoffer.dall@linaro.org>, eric.auger.pro@gmail.com","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1785310,"web_url":"http://patchwork.ozlabs.org/comment/1785310/","msgid":"<1f4895e8-cc64-feb7-65e4-d17128c570d1@arm.com>","list_archive_url":null,"date":"2017-10-12T10:46:26","subject":"Re: [Qemu-devel] [RFC v4 00/16] VIRTIO-IOMMU device","submitter":{"id":68357,"url":"http://patchwork.ozlabs.org/api/people/68357/","name":"Jean-Philippe Brucker","email":"Jean-Philippe.Brucker@arm.com"},"content":"On 12/10/17 11:09, Auger Eric wrote:\n> Hi Peter,\n> \n> On 12/10/2017 11:54, Peter Maydell wrote:\n>> On 11 October 2017 at 17:08, Auger Eric <eric.auger@redhat.com> wrote:\n>>> Hi Peter,\n>>>\n>>> On 11/10/2017 16:56, Peter Maydell wrote:\n>>>> On 19 September 2017 at 08:46, Eric Auger <eric.auger@redhat.com> wrote:\n>>>>> This series implements the virtio-iommu device.\n>>>>>\n>>>>> This v4 is an upgrade to v0.4 spec [1] and applies on QEMU v2.10.0.\n>>>>> - probe request support although no reserved region is returned at\n>>>>>   the moment\n>>>>> - unmap semantics less strict, as specified in v0.4\n>>>>> - device registration, attach/detach revisited\n>>>>> - split into smaller patches to ease review\n>>>>> - propose a way to inform the IOMMU mr about the page_size_mask\n>>>>>   of underlying HW IOMMU, if any\n>>>>> - remove warning associated with the translation of the MSI doorbell\n>>>>>\n>>>>> The device gets instantiated using the \"-device virtio-iommu-device\"\n>>>>> option. It currently works with ARM virt machine only, as the machine\n>>>>> must handle the dt binding between the virtio-mmio \"iommu\" node and\n>>>>> the PCI host bridge node.\n>>>>\n>>>> Could this work on x86, or is it inherently arm-only?\n>>>\n>>> Yes this is the goal. At the moment the ACPI probing is not yet properly\n>>> specified but a Q35 prototype was developed in the Red Hat Virt team.\n>>> This will be presented at the KVM forum.\n>>\n>> Since I have very little familiarity with virtio or iommu code,\n>> I'd be much happier if this was reviewed as a generic virtio-iommu\n>> by the x86/virtio devs and then the arm specific parts done second...\n> \n> Understood. I was rather expecting you to review the smmuv3 emulation\n> code which you did, in a comprehensive manner ;-), and many thanks for that.\n> \n> Note sure this is time yet to get this RFC reviewed as\n> - the v0.4 virtio-iommu driver it relies on was not officially submitted,\n> - the virtio-iommu specification review has not really been reviewed,\n> - the ACPI probing method has not been discussed yet.\n> \n> Jean-Philippe, please correct me if I am wrong.\n> \n> So to me, this is pure RFC at the moment.\n\nYes, having it as an RFC for the moment allowed to break compatibility\nbetween versions of the specification. The downside is that it probably\ndoesn't get as many eyeballs as it would without an RFC tag (although I\ndid receive tonnes of helpful comments). Maybe v0.5, that should be\npublished shortly, can be a candidate for mainline.\n\nThanks,\nJean\n\n>> I'm also not clear on what we're expecting the recommended or normal\n>> way to do device passthrough is going to be -- this virtio-mmio,\n>> or presenting the guest with an SMMUv3 interface? Do we really\n>> need to implement both ?\n> \n> I think the KVM forum is the right place to sync as both approaches will\n> be presented and some pros/cons + performance figures will be given.\n> \n> As we talk about choosing, there is one alternative that was suggested\n> on the ML by Alex & Michael but never really get considered yet and\n> maybe should be: using intel iommu emulation code for ARM. I aknowledge\n> this deserves a thorough impact study on kernel and FW side but I would\n> be happy to get your opinion about the QEMU side. Would you have a by-\n> principle rejection of this idea to instantiate such an Intel device in\n> mach virt or would it be something you would be ready to consider?\n> \n> Thanks\n> \n> Eric\n> \n> \n>>\n>> thanks\n>> -- PMM\n>>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yCS8T2HmQz9sRq\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 12 Oct 2017 21:42:01 +1100 (AEDT)","from localhost ([::1]:44731 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1e2awB-0000BB-Fh\n\tfor incoming@patchwork.ozlabs.org; Thu, 12 Oct 2017 06:41:59 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:56285)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <jean-philippe.brucker@arm.com>) id 1e2avq-00005f-0S\n\tfor qemu-devel@nongnu.org; Thu, 12 Oct 2017 06:41:39 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <jean-philippe.brucker@arm.com>) id 1e2avp-0003GG-1O\n\tfor qemu-devel@nongnu.org; Thu, 12 Oct 2017 06:41:38 -0400","from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:50926\n\thelo=foss.arm.com) by eggs.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <jean-philippe.brucker@arm.com>)\n\tid 1e2avk-0003AM-3l; Thu, 12 Oct 2017 06:41:32 -0400","from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249])\n\tby usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AF9EB1435;\n\tThu, 12 Oct 2017 03:41:29 -0700 (PDT)","from [10.1.211.72] (e106794-lin.cambridge.arm.com [10.1.211.72])\n\tby usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id\n\tEA5C33F599; Thu, 12 Oct 2017 03:41:26 -0700 (PDT)"],"To":"Auger Eric <eric.auger@redhat.com>,\n\tPeter Maydell <peter.maydell@linaro.org>","References":"<1505807208-9063-1-git-send-email-eric.auger@redhat.com>\n\t<CAFEAcA-0MK18DakmNPRXCNYbDpBvzE0h12nNjg7zr+F_m0EnDw@mail.gmail.com>\n\t<f3a263b7-27e6-26df-592d-a34902bab6fe@redhat.com>\n\t<CAFEAcA_2RaRsvm_=V4iDNk_vMOtiWUZs3-SdMh+DSYqGyPE0PQ@mail.gmail.com>\n\t<08ce288c-610c-4dea-927d-262e7b75051f@redhat.com>","From":"Jean-Philippe Brucker <jean-philippe.brucker@arm.com>","Message-ID":"<1f4895e8-cc64-feb7-65e4-d17128c570d1@arm.com>","Date":"Thu, 12 Oct 2017 11:46:26 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<08ce288c-610c-4dea-927d-262e7b75051f@redhat.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"217.140.101.70","Subject":"Re: [Qemu-devel] [RFC v4 00/16] VIRTIO-IOMMU device","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Wei Huang <wei@redhat.com>, \"Tian, Kevin\" <kevin.tian@intel.com>,\n\t\"Michael S. Tsirkin\" <mst@redhat.com>,\n\tMarc Zyngier <Marc.Zyngier@arm.com>, \n\tTomasz Nowicki <tn@semihalf.com>, Will Deacon <Will.Deacon@arm.com>, \n\tAndrew Jones <drjones@redhat.com>, Peter Xu <peterx@redhat.com>,\n\tQEMU Developers <qemu-devel@nongnu.org>,\n\tAlex Williamson <alex.williamson@redhat.com>,\n\tqemu-arm <qemu-arm@nongnu.org>,\n\t\"linuc.decode@gmail.com\" <linuc.decode@gmail.com>,\n\tBharat Bhushan <bharat.bhushan@nxp.com>,\n\tChristoffer Dall <christoffer.dall@linaro.org>,\n\t\"eric.auger.pro@gmail.com\" <eric.auger.pro@gmail.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1786033,"web_url":"http://patchwork.ozlabs.org/comment/1786033/","msgid":"<AADFC41AFE54684AB9EE6CBC0274A5D190E139B0@SHSMSX151.ccr.corp.intel.com>","list_archive_url":null,"date":"2017-10-13T07:01:54","subject":"Re: [Qemu-devel] [RFC v4 00/16] VIRTIO-IOMMU device","submitter":{"id":4529,"url":"http://patchwork.ozlabs.org/api/people/4529/","name":"Tian, Kevin","email":"kevin.tian@intel.com"},"content":"> From: Auger Eric [mailto:eric.auger@redhat.com]\r\n> Sent: Thursday, October 12, 2017 6:10 PM\r\n> \r\n> Hi Peter,\r\n> \r\n> On 12/10/2017 11:54, Peter Maydell wrote:\r\n> > On 11 October 2017 at 17:08, Auger Eric <eric.auger@redhat.com> wrote:\r\n> >> Hi Peter,\r\n> >>\r\n> >> On 11/10/2017 16:56, Peter Maydell wrote:\r\n> >>> On 19 September 2017 at 08:46, Eric Auger <eric.auger@redhat.com>\r\n> wrote:\r\n> >>>> This series implements the virtio-iommu device.\r\n> >>>>\r\n> >>>> This v4 is an upgrade to v0.4 spec [1] and applies on QEMU v2.10.0.\r\n> >>>> - probe request support although no reserved region is returned at\r\n> >>>>   the moment\r\n> >>>> - unmap semantics less strict, as specified in v0.4\r\n> >>>> - device registration, attach/detach revisited\r\n> >>>> - split into smaller patches to ease review\r\n> >>>> - propose a way to inform the IOMMU mr about the page_size_mask\r\n> >>>>   of underlying HW IOMMU, if any\r\n> >>>> - remove warning associated with the translation of the MSI doorbell\r\n> >>>>\r\n> >>>> The device gets instantiated using the \"-device virtio-iommu-device\"\r\n> >>>> option. It currently works with ARM virt machine only, as the machine\r\n> >>>> must handle the dt binding between the virtio-mmio \"iommu\" node\r\n> and\r\n> >>>> the PCI host bridge node.\r\n> >>>\r\n> >>> Could this work on x86, or is it inherently arm-only?\r\n> >>\r\n> >> Yes this is the goal. At the moment the ACPI probing is not yet properly\r\n> >> specified but a Q35 prototype was developed in the Red Hat Virt team.\r\n> >> This will be presented at the KVM forum.\r\n> >\r\n> > Since I have very little familiarity with virtio or iommu code,\r\n> > I'd be much happier if this was reviewed as a generic virtio-iommu\r\n> > by the x86/virtio devs and then the arm specific parts done second...\r\n> \r\n> Understood. I was rather expecting you to review the smmuv3 emulation\r\n> code which you did, in a comprehensive manner ;-), and many thanks for\r\n> that.\r\n> \r\n> Note sure this is time yet to get this RFC reviewed as\r\n> - the v0.4 virtio-iommu driver it relies on was not officially submitted,\r\n> - the virtio-iommu specification review has not really been reviewed,\r\n> - the ACPI probing method has not been discussed yet.\r\n> \r\n> Jean-Philippe, please correct me if I am wrong.\r\n> \r\n> So to me, this is pure RFC at the moment.\r\n> >\r\n> > I'm also not clear on what we're expecting the recommended or normal\r\n> > way to do device passthrough is going to be -- this virtio-mmio,\r\n> > or presenting the guest with an SMMUv3 interface? Do we really\r\n> > need to implement both ?\r\n> \r\n> I think the KVM forum is the right place to sync as both approaches will\r\n> be presented and some pros/cons + performance figures will be given.\r\n> \r\n> As we talk about choosing, there is one alternative that was suggested\r\n> on the ML by Alex & Michael but never really get considered yet and\r\n> maybe should be: using intel iommu emulation code for ARM. I\r\n> aknowledge\r\n> this deserves a thorough impact study on kernel and FW side but I would\r\n> be happy to get your opinion about the QEMU side. Would you have a by-\r\n> principle rejection of this idea to instantiate such an Intel device in\r\n> mach virt or would it be something you would be ready to consider?\r\n> \r\n\r\nbear posting a link to Alex/Michael's comment? interesting to know\r\nthe rationale...\r\n\r\nThanks\r\nKevin","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yCzDq4tkQz9sNx\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 13 Oct 2017 18:02:35 +1100 (AEDT)","from localhost ([::1]:48692 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1e2tzN-0005fN-SO\n\tfor incoming@patchwork.ozlabs.org; Fri, 13 Oct 2017 03:02:33 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:39960)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <kevin.tian@intel.com>) id 1e2tz1-0005d5-M5\n\tfor qemu-devel@nongnu.org; Fri, 13 Oct 2017 03:02:12 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <kevin.tian@intel.com>) id 1e2tyv-00007B-Rt\n\tfor qemu-devel@nongnu.org; Fri, 13 Oct 2017 03:02:11 -0400","from mga04.intel.com ([192.55.52.120]:54868)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <kevin.tian@intel.com>)\n\tid 1e2tyv-00005O-Ey; Fri, 13 Oct 2017 03:02:05 -0400","from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t13 Oct 2017 00:01:57 -0700","from fmsmsx105.amr.corp.intel.com ([10.18.124.203])\n\tby fmsmga005.fm.intel.com with ESMTP; 13 Oct 2017 00:01:57 -0700","from FMSMSX109.amr.corp.intel.com (10.18.116.9) by\n\tFMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP\n\tServer (TLS) id 14.3.319.2; Fri, 13 Oct 2017 00:01:57 -0700","from shsmsx152.ccr.corp.intel.com (10.239.6.52) by\n\tfmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server\n\t(TLS) id 14.3.319.2; Fri, 13 Oct 2017 00:01:57 -0700","from shsmsx151.ccr.corp.intel.com ([169.254.3.98]) by\n\tSHSMSX152.ccr.corp.intel.com ([169.254.6.93]) with mapi id\n\t14.03.0319.002; Fri, 13 Oct 2017 15:01:55 +0800"],"X-ExtLoop1":"1","X-IronPort-AV":"E=Sophos;i=\"5.43,369,1503385200\"; d=\"scan'208\";a=\"162203599\"","From":"\"Tian, Kevin\" <kevin.tian@intel.com>","To":"Auger Eric <eric.auger@redhat.com>, Peter Maydell\n\t<peter.maydell@linaro.org>","Thread-Topic":"[Qemu-devel] [RFC v4 00/16] VIRTIO-IOMMU device","Thread-Index":"AQHTMRuJE/W4h0K/h0uvPH/UZkcacKLeWg2AgAAUHACAASmvgIAABEMAgAHjfIA=","Date":"Fri, 13 Oct 2017 07:01:54 +0000","Message-ID":"<AADFC41AFE54684AB9EE6CBC0274A5D190E139B0@SHSMSX151.ccr.corp.intel.com>","References":"<1505807208-9063-1-git-send-email-eric.auger@redhat.com>\n\t<CAFEAcA-0MK18DakmNPRXCNYbDpBvzE0h12nNjg7zr+F_m0EnDw@mail.gmail.com>\n\t<f3a263b7-27e6-26df-592d-a34902bab6fe@redhat.com>\n\t<CAFEAcA_2RaRsvm_=V4iDNk_vMOtiWUZs3-SdMh+DSYqGyPE0PQ@mail.gmail.com>\n\t<08ce288c-610c-4dea-927d-262e7b75051f@redhat.com>","In-Reply-To":"<08ce288c-610c-4dea-927d-262e7b75051f@redhat.com>","Accept-Language":"en-US","Content-Language":"en-US","X-MS-Has-Attach":"","X-MS-TNEF-Correlator":"","x-ctpclassification":"CTP_IC","x-titus-metadata-40":"eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjE5NWVkNjgtMTk2My00MjNkLTk5YmQtZmY1NTA0Y2U0NDUzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6Ik55bjJoTXpMcE0xMGJTSlBSeDJUd0oya0h2UnJ0ODZBbzNFQllKSWdKMmc9In0=","dlp-product":"dlpe-windows","dlp-version":"11.0.0.116","dlp-reaction":"no-action","x-originating-ip":"[10.239.127.40]","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","MIME-Version":"1.0","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"192.55.52.120","Subject":"Re: [Qemu-devel] [RFC v4 00/16] VIRTIO-IOMMU device","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Wei Huang <wei@redhat.com>, Andrew Jones <drjones@redhat.com>, \"Michael\n\tS. Tsirkin\" <mst@redhat.com>,\n\t\"jean-philippe.brucker@arm.com\" <jean-philippe.brucker@arm.com>,\n\tTomasz Nowicki <tn@semihalf.com>, Will\n\tDeacon <will.deacon@arm.com>, QEMU Developers <qemu-devel@nongnu.org>,\n\tPeter Xu <peterx@redhat.com>, Marc Zyngier <marc.zyngier@arm.com>, Alex\n\tWilliamson <alex.williamson@redhat.com>, qemu-arm <qemu-arm@nongnu.org>, \n\t\"linuc.decode@gmail.com\" <linuc.decode@gmail.com>,\n\tBharat Bhushan <bharat.bhushan@nxp.com>,\n\tChristoffer Dall <christoffer.dall@linaro.org>,\n\t\"eric.auger.pro@gmail.com\" <eric.auger.pro@gmail.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1786066,"web_url":"http://patchwork.ozlabs.org/comment/1786066/","msgid":"<4ce3a29a-6105-88ef-8b90-75658285dd78@redhat.com>","list_archive_url":null,"date":"2017-10-13T07:43:52","subject":"Re: [Qemu-devel] [RFC v4 00/16] VIRTIO-IOMMU device","submitter":{"id":69187,"url":"http://patchwork.ozlabs.org/api/people/69187/","name":"Eric Auger","email":"eric.auger@redhat.com"},"content":"Hi Kevin,\n\nOn 13/10/2017 09:01, Tian, Kevin wrote:\n>> From: Auger Eric [mailto:eric.auger@redhat.com]\n>> Sent: Thursday, October 12, 2017 6:10 PM\n>>\n>> Hi Peter,\n>>\n>> On 12/10/2017 11:54, Peter Maydell wrote:\n>>> On 11 October 2017 at 17:08, Auger Eric <eric.auger@redhat.com> wrote:\n>>>> Hi Peter,\n>>>>\n>>>> On 11/10/2017 16:56, Peter Maydell wrote:\n>>>>> On 19 September 2017 at 08:46, Eric Auger <eric.auger@redhat.com>\n>> wrote:\n>>>>>> This series implements the virtio-iommu device.\n>>>>>>\n>>>>>> This v4 is an upgrade to v0.4 spec [1] and applies on QEMU v2.10.0.\n>>>>>> - probe request support although no reserved region is returned at\n>>>>>>   the moment\n>>>>>> - unmap semantics less strict, as specified in v0.4\n>>>>>> - device registration, attach/detach revisited\n>>>>>> - split into smaller patches to ease review\n>>>>>> - propose a way to inform the IOMMU mr about the page_size_mask\n>>>>>>   of underlying HW IOMMU, if any\n>>>>>> - remove warning associated with the translation of the MSI doorbell\n>>>>>>\n>>>>>> The device gets instantiated using the \"-device virtio-iommu-device\"\n>>>>>> option. It currently works with ARM virt machine only, as the machine\n>>>>>> must handle the dt binding between the virtio-mmio \"iommu\" node\n>> and\n>>>>>> the PCI host bridge node.\n>>>>>\n>>>>> Could this work on x86, or is it inherently arm-only?\n>>>>\n>>>> Yes this is the goal. At the moment the ACPI probing is not yet properly\n>>>> specified but a Q35 prototype was developed in the Red Hat Virt team.\n>>>> This will be presented at the KVM forum.\n>>>\n>>> Since I have very little familiarity with virtio or iommu code,\n>>> I'd be much happier if this was reviewed as a generic virtio-iommu\n>>> by the x86/virtio devs and then the arm specific parts done second...\n>>\n>> Understood. I was rather expecting you to review the smmuv3 emulation\n>> code which you did, in a comprehensive manner ;-), and many thanks for\n>> that.\n>>\n>> Note sure this is time yet to get this RFC reviewed as\n>> - the v0.4 virtio-iommu driver it relies on was not officially submitted,\n>> - the virtio-iommu specification review has not really been reviewed,\n>> - the ACPI probing method has not been discussed yet.\n>>\n>> Jean-Philippe, please correct me if I am wrong.\n>>\n>> So to me, this is pure RFC at the moment.\n>>>\n>>> I'm also not clear on what we're expecting the recommended or normal\n>>> way to do device passthrough is going to be -- this virtio-mmio,\n>>> or presenting the guest with an SMMUv3 interface? Do we really\n>>> need to implement both ?\n>>\n>> I think the KVM forum is the right place to sync as both approaches will\n>> be presented and some pros/cons + performance figures will be given.\n>>\n>> As we talk about choosing, there is one alternative that was suggested\n>> on the ML by Alex & Michael but never really get considered yet and\n>> maybe should be: using intel iommu emulation code for ARM. I\n>> aknowledge\n>> this deserves a thorough impact study on kernel and FW side but I would\n>> be happy to get your opinion about the QEMU side. Would you have a by-\n>> principle rejection of this idea to instantiate such an Intel device in\n>> mach virt or would it be something you would be ready to consider?\n>>\n> \n> bear posting a link to Alex/Michael's comment? interesting to know\n> the rationale...\n\nThis was suggested here for instance:\n\nhttps://lkml.org/lkml/2017/7/12/579\n\nI think rationale was\n- this is an emulated platform so there is more freedom\n- vtd emulation code is rather stable\n- it has pieces missing on smmu: cachine mode, IOTLB invalidation\ncommand with addr_mask,\n- intel iommu driver implements deferred IOTLB Invalidation which boosts\nperf\n\nBut problems I foresee are:\n- MSI handling. ARM MSI doorbells can be anywhere in the GPA address\nspace whereas Intel has MSIs within the APIC window: [FEE0_0000h –\nFEF0_000h]. So I suspect the MSI handling may not work at kernel level.\n- intel IOMMU input/output address ranges and page sizes may be\ndifferent from ARM ones.\n- ARM uses ACPI IORT for binding RC <-> IOMMU <-> MSI controller whereas\nIntel uses other tables\n- Intel's dmar kernel code must be compiled/enabled on ARM\n\nSo personally I don't think this solution is viable but I prefer this\ngets discussed on the ML.\n\nThanks\n\nEric\n> \n> Thanks\n> Kevin\n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=eric.auger@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yD09H2kJTz9sPr\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 13 Oct 2017 18:44:35 +1100 (AEDT)","from localhost ([::1]:48805 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1e2ue1-0002oR-EX\n\tfor incoming@patchwork.ozlabs.org; Fri, 13 Oct 2017 03:44:33 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:47277)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <eric.auger@redhat.com>) id 1e2udh-0002mv-Nw\n\tfor qemu-devel@nongnu.org; Fri, 13 Oct 2017 03:44:14 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <eric.auger@redhat.com>) id 1e2udg-00084e-KS\n\tfor qemu-devel@nongnu.org; Fri, 13 Oct 2017 03:44:13 -0400","from mx1.redhat.com ([209.132.183.28]:38308)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <eric.auger@redhat.com>)\n\tid 1e2udb-00081a-Q9; Fri, 13 Oct 2017 03:44:08 -0400","from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 7AFC17AEA3;\n\tFri, 13 Oct 2017 07:44:06 +0000 (UTC)","from localhost.localdomain (ovpn-117-172.ams2.redhat.com\n\t[10.36.117.172])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id AAEE05D6A4;\n\tFri, 13 Oct 2017 07:43:53 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 7AFC17AEA3","To":"\"Tian, Kevin\" <kevin.tian@intel.com>,\n\tPeter Maydell <peter.maydell@linaro.org>","References":"<1505807208-9063-1-git-send-email-eric.auger@redhat.com>\n\t<CAFEAcA-0MK18DakmNPRXCNYbDpBvzE0h12nNjg7zr+F_m0EnDw@mail.gmail.com>\n\t<f3a263b7-27e6-26df-592d-a34902bab6fe@redhat.com>\n\t<CAFEAcA_2RaRsvm_=V4iDNk_vMOtiWUZs3-SdMh+DSYqGyPE0PQ@mail.gmail.com>\n\t<08ce288c-610c-4dea-927d-262e7b75051f@redhat.com>\n\t<AADFC41AFE54684AB9EE6CBC0274A5D190E139B0@SHSMSX151.ccr.corp.intel.com>","From":"Auger Eric <eric.auger@redhat.com>","Message-ID":"<4ce3a29a-6105-88ef-8b90-75658285dd78@redhat.com>","Date":"Fri, 13 Oct 2017 09:43:52 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101\n\tThunderbird/45.4.0","MIME-Version":"1.0","In-Reply-To":"<AADFC41AFE54684AB9EE6CBC0274A5D190E139B0@SHSMSX151.ccr.corp.intel.com>","Content-Type":"text/plain; charset=utf-8","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.15","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.25]);\n\tFri, 13 Oct 2017 07:44:06 +0000 (UTC)","Content-Transfer-Encoding":"quoted-printable","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [RFC v4 00/16] VIRTIO-IOMMU device","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Wei Huang <wei@redhat.com>, Andrew Jones <drjones@redhat.com>,\n\t\"Michael S. Tsirkin\" <mst@redhat.com>,\n\t\"jean-philippe.brucker@arm.com\" <jean-philippe.brucker@arm.com>,\n\tTomasz Nowicki <tn@semihalf.com>, Will Deacon <will.deacon@arm.com>, \n\tQEMU Developers <qemu-devel@nongnu.org>, Peter Xu <peterx@redhat.com>,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tAlex Williamson <alex.williamson@redhat.com>,\n\tqemu-arm <qemu-arm@nongnu.org>,\n\t\"linuc.decode@gmail.com\" <linuc.decode@gmail.com>,\n\tBharat Bhushan <bharat.bhushan@nxp.com>,\n\tChristoffer Dall <christoffer.dall@linaro.org>,\n\t\"eric.auger.pro@gmail.com\" <eric.auger.pro@gmail.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]