[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposal for virtual IOMMU binding b/w vIOMMU and passthrough devices


  • To: Elliott Mitchell <ehem+xen@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Tue, 1 Nov 2022 16:30:31 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=i38CRmTm6wERfkVwb4A/x0v28RK8dyYprb9eOiTEGfw=; b=OFjqGrh+9IewE71+O6mGw2gJCC5yxu2q8HANhbQXjlXgzHXW5nqsdeoU0CRhzA9GKSCv5Ja7HENS1JM/zef9xE/MW8TwL5z00IQy9wbMliOtF+1vg4wYEfS6XEeu2E+CuhhhVqDr7kLd0wjGzEZjqoV4zDVDkOHJgFObZMcwfmVcUxVP+5Kq9XOiWGTC/tqbQV2gVLCPNJel4Yrzy25j+c5pavFPXwrC02d3WWGWh0gDj9MWMcjfclImqLNAY3UeYcwZXN2BRiJ08rp1MkYvu37vF5B7KkMoL1XLm8fdTQAf+DTkTXrQ2B8Hvyvb/45Rip20J9sS2R21AoI4UFXr+w==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=i38CRmTm6wERfkVwb4A/x0v28RK8dyYprb9eOiTEGfw=; b=H5uBoq3wf/mZuQAuWU6d4DN+PMNGrpjx7kHOyGh6m5jYD7s7X5lJ/bLjWunlpt8EZa2M4tWVLkfRwmTcR4guEU4Bl6cKz4ouT855bLnd1NAcVPxoDopqpl/IDxkKQfEDjPxctzs6t7TtN1rdqmvNc41691Rr/+74b6oNyq/V4/7TNv9bCGTEhvIUD+fXLmPXKIrh0h9UAoFF8B+eoMyNgwQ/+G77Dtpr97kv14WwEtjD8ZEWRKd+CHT8sh4eiC8bEgcaCJbqu6PNEuT3Z7hP/TQCNFLtcSb92Dgd2dI9aW1zG1dQij058+bF/LL3RN1CYMWLrgkka13pW46S7tEMwQ==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=loEmFMar9PZ5WEh9r39OSc4aRXwn4KzNnycCp9Efm/cMLdq0D9YlR7AVaeWbXnQFCYQkeR8TERbiloXNY1bAdnazqYd3Tn6wy3e0YYBfVaePKGdScfUpUHixDLNMZ+gEUEq38FyNmioJaF8amKxfz0X6pUM+pvS809nB3GjjOlG8Hxa38ERzOaAATdrSl0Lf7qyIhSOYrui6MHT4stLIRPNbndYOUBTyo2EFAKFpIT/sFayUahdJKhJAxguwldNIRRp0rD17VdBaKpIWrOiCBNNS+WiTi4MrIJlt+TtQqc7dWH4uw5Ooq9tyVB1YmhtVissi7sXLyX6WdWt4rfXeVQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QHWUujGd+OnYg36jifm8InmqAHg7+HSMTP2AGBC7i9qX7diUqHoi+mggl7QQ80PFzOM+O+dUyeXF0KlYybtMQo888D90p8joL4UZV/shR0YBvtBl5OSAwHKQ3rjlHfVYkimid/S4LN3aFx++lxxOv/Wqg88uw9TIUGyOlwIFLj2sACLxr+nP/7ACpO2uQt8NgS9pg+yRcbLHa/FQI9QtRlDZfyBSE8shO3gQekzl9YJdf3z1Hq0FQGkfY3UWQq5f9aq9CZEY7IQtWhBDlgjL+aOTKuhqi8s/kjq0ome5hVwxiQVOPfeuL6wPuaFwxGmLLBPiWz+QRXmmOHZ9B8aRPA==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Rahul Singh <Rahul.Singh@xxxxxxx>, Xen developer discussion <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Michal Orzel <Michal.Orzel@xxxxxxx>, Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>, Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Tue, 01 Nov 2022 16:30:59 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHY6T1V+gcJbmRqpEyt0b8GeG9bFq4grXIAgAAQCACAAFf9AIABVMyAgAAG64CAAVVJgIAAAzuAgAACBwCAAAPNgIADNHqAgABdGACAABWOgIABD7SAgAGs8ICAABi+AA==
  • Thread-topic: Proposal for virtual IOMMU binding b/w vIOMMU and passthrough devices

Hi Elliot,

> On 1 Nov 2022, at 15:01, Elliott Mitchell <ehem+xen@xxxxxxx> wrote:
> 
> On Mon, Oct 31, 2022 at 01:26:44PM +0000, Bertrand Marquis wrote:
>> 
>>> On 30 Oct 2022, at 21:14, Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
>>> 
>>> Ideally this would be something quick that can be easily invoked as the
>>> first step of an external third-party build process.
>> 
>> I think that we are making this problem a lot to complex and I am not sure
>> that all this complexity is required.
> 
> Speaking of complexity.  Is it just me or does a vIOMMU had an odd sort
> of similarity with a Grant Table?
> 
> Both are about allowing foreign entities access to portions of the
> current domain's memory.  Just in the case of a Grant Table the entity
> happens to be another domain, whereas for a vIOMMU it is a hardware
> device.
> 
> Perhaps some functionality could be shared between the two?  Perhaps
> this is something for the designer of the next version of IOMMU to think
> about?  (or perhaps I'm off the deep end and bringing in a silly idea)

I am not quite sure what you mean here.

The IOMMU is something not Xen specific. Linux is using it to restrict the area
of memory accessible to a device using its DMA engine. Here we just try to give
the same possibility when running on top Xen in a transparent way so that the
Linux (or an other guest) can continue to do the same even if it is running on
top of Xen.
In practice, the guest is not telling us what it does, we just get the pointer 
to the
first level of page table and we write it in the hardware which is doing the 
rest.
We need to have a vIOMMU because we need to make sure the guest is only
doing this for devices assigned to him and that it is not modifying the second
level of page tables which is used by Xen to make sure that only the memory
from the guest is accessible using the DMA engine. 

So I am not exactly seeing the common part with grant tables here.

Cheers
Bertrand




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.