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

Re: [Xen-devel] per-domain passthrough/iommu options


  • To: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Fri, 26 Jul 2019 14:34:13 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.com;arc=none
  • 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-SenderADCheck; bh=ByPYSZ4Xb/IlW4Fk1MRxJAa2nt5dPjsMmQKLXuy1pzU=; b=Jgh5vIkVH+NFreZxeMb0mMKRtFBp+Mwutb/BKVsjETzgXsGQRL+TZuqQJSnIdliSkrgY55cZYhbM8Q9h7pU6VZOZLcT7s4UbXUItqxTNbni+dFo6cS6R5TPHrbAZWAZJJN7GGmT/oQ14xEH4B0R4HY/VkM8S51R0ceZ7dR3iVYfX3p6xfNzxiHvHJwh5+wvWedQd9EiItXmYbdx1Iw/nW9XLno4pRyXy36rniqKCvXgoMhoQ59zZHTSe9sp1+ET2/OZkg3I7hXAQ5ovnO3Fnge1UDLMiHcE0cYYBrHU3fhCzat2HZvUxZ1We54pTww0EzEzMhs3erRApzz1752Zajg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VZFRbsCtWgKvb+nSc2jQ5Yn8m2rEb1m0J6N/mV9PYFJ2PDTNTnUdzz7spWwlSvXFBx+Msix4afESI122rJ6z5S4/C/UQvo+RsUth8ckZanK9h80AyM78iFDwdRITKRwKL47BEJ2ixaaeiaISely0rAROElpBgB0nLemXd5HY7sR9tNVMFRaQ374mAa4yC95gnNYSlJ8BLaw0imeyITli4YbjNGP8trIQWWk3qYq7eIABh/QOtRSijT+MREWUJd8JPcdfIouzKVQ5J3qlsKuAUkXtoqwRW6dmGvLPHHWJ0Sxs65O27IY9h5jL1y4DrBx+bWcaZd2fNGkzI6YEb1AnWA==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: "xen-devel \(xen-devel@xxxxxxxxxxxxxxxxxxxx\)" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 26 Jul 2019 14:43:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AdVDqy2gdS3slVvQRuCN/iB10JmJ2gABnjsAAAD6vMAAAUXLgAAASpcAAADXF4A=
  • Thread-topic: [Xen-devel] per-domain passthrough/iommu options

On 26.07.2019 16:26, Paul Durrant wrote:
>> From: Jan Beulich <JBeulich@xxxxxxxx>
>> Sent: 26 July 2019 15:02
>>
>> On 26.07.2019 15:39, Paul Durrant wrote:
>>> ? I don't think 'private-pt' or 'separate-pt' really capture the fact that 
>>> the page tables match the
>> P2M. They could just as easily be taken to mean that they are populated 
>> using some other policy.
>>
>> But haven't we recently seen that this fully lock-step population
>> of page tables isn't always correct (or at least desirable)? I
>> vaguely recall other comments to that effect too, from long ago.
>> I'd specifically want to avoid encoding into the interface here
>> that the two are exact mirrors of one another, now and forever.
> 
> How do you think we should express it. I agree that it's a bit awkward 
> because of the difference between HVM and PV domains, but all we can do there 
> really is document it I think, so perhaps the manpage could have something 
> like:

Sounds reasonable - it at least avoids making the behavior too
much spelled out with regard to the similarity of mappings between
IOMMU page tables and P2M. There's one issue though:

> 'off'
> 
> IOMMU mappings are disabled for the domain and so hardware may not be passed 
> through.
> 
> 'sync-pt'
> 
> For a PV domain, all writable pages assigned to the domain are identity 
> mapped by MFN in the IOMMU page tables. Thus a device driver running in the 
> domain may program passthrough hardware for DMA using MFN values (i.e. 
> host/machine frame numbers) looked up in its P2M.
> For an HVM domain, all non-foreign RAM pages present in the P2M will be 
> identity mapped by GFN

Why "identity mapped" here? It's a GFN -> MFN mappingm, isn't it?

Jan

> in the IOMMU page tables. Thus a device driver running in the domain may 
> program passthrough hardware using GFN values (i.e. guest physical frame 
> numbers) without any further translation.
> 
> 'share-pt'
> 
> This is unavailable for a PV domain. For an HVM domain, this option means 
> that the IOMMU will be programmed to directly reference the P2M as its page 
> tables. This availability of this option is hardware specific and thus, if it 
> is specified for a domain running on hardware that does not allow it, 
> 'sync-pt' will be used instead.
> 
> ?
> 
>    Paul
> 
>>
>> Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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