Re: [Xen-devel] Unshared IOMMU issues

2017-02-22 Thread Oleksandr Tyshchenko
On Wed, Feb 22, 2017 at 1:39 PM, Julien Grall wrote: > On 21/02/17 10:39, Oleksandr Tyshchenko wrote: >> >> Hi, Julien. Hi, Julien, all. > > > Hi Oleksandr, > >> On Mon, Feb 20, 2017 at 10:31 AM, Julien Grall >> wrote: >>> >>> Hello Oleksandr, >>> >>> On 02/17/2017 08:20 PM, Oleksandr Tyshchenk

Re: [Xen-devel] Unshared IOMMU issues

2017-02-22 Thread Julien Grall
On 21/02/17 10:39, Oleksandr Tyshchenko wrote: Hi, Julien. Hi Oleksandr, On Mon, Feb 20, 2017 at 10:31 AM, Julien Grall wrote: Hello Oleksandr, On 02/17/2017 08:20 PM, Oleksandr Tyshchenko wrote: Hi, all. So, as I understand we have two possible solutions for the IOMMU page table to be

Re: [Xen-devel] Unshared IOMMU issues

2017-02-21 Thread Oleksandr Tyshchenko
Hi, Julien. On Mon, Feb 20, 2017 at 10:31 AM, Julien Grall wrote: > Hello Oleksandr, > > On 02/17/2017 08:20 PM, Oleksandr Tyshchenko wrote: >> >> Hi, all. >> >> So, as I understand we have two possible solutions for the IOMMU page >> table to be populated: >> 1. When the first device is being a

Re: [Xen-devel] Unshared IOMMU issues

2017-02-20 Thread Julien Grall
Hello Oleksandr, On 02/17/2017 08:20 PM, Oleksandr Tyshchenko wrote: Hi, all. So, as I understand we have two possible solutions for the IOMMU page table to be populated: 1. When the first device is being assigned. Retrieve all mappings from stage-2 table. 2. When the domain is being created.

Re: [Xen-devel] Unshared IOMMU issues

2017-02-17 Thread Oleksandr Tyshchenko
Hi, all. So, as I understand we have two possible solutions for the IOMMU page table to be populated: 1. When the first device is being assigned. Retrieve all mappings from stage-2 table. 2. When the domain is being created. I would prefer the second variant. Retrieving all mappings from P2M m

Re: [Xen-devel] Unshared IOMMU issues

2017-02-17 Thread Julien Grall
Hi Jan, On 17/02/17 07:43, Jan Beulich wrote: Well, in the end it's your call, but I don't think this is an acceptable model in the general case. Quite often - see the Viridian support in x86 Xen for a very good example - distros (XenServer in this case) enable functionality even if a guest (Lin

Re: [Xen-devel] Unshared IOMMU issues

2017-02-16 Thread Jan Beulich
>>> On 16.02.17 at 19:09, wrote: > On 16/02/17 16:34, Jan Beulich wrote: > On 16.02.17 at 17:11, wrote: >>> On 16/02/17 15:52, Jan Beulich wrote: >>> On 16.02.17 at 16:02, wrote: > On Thu, Feb 16, 2017 at 11:36 AM, Jan Beulich wrote: > On 15.02.17 at 18:43, wrote: >>> 1

Re: [Xen-devel] Unshared IOMMU issues

2017-02-16 Thread Stefano Stabellini
On Thu, 16 Feb 2017, Julien Grall wrote: > Hi Jan, > > On 16/02/17 16:34, Jan Beulich wrote: > > > > > On 16.02.17 at 17:11, wrote: > > > On 16/02/17 15:52, Jan Beulich wrote: > > > > > > > On 16.02.17 at 16:02, wrote: > > > > > On Thu, Feb 16, 2017 at 11:36 AM, Jan Beulich > > > > > wrote: > >

Re: [Xen-devel] Unshared IOMMU issues

2017-02-16 Thread Julien Grall
Hi Jan, On 16/02/17 16:34, Jan Beulich wrote: On 16.02.17 at 17:11, wrote: On 16/02/17 15:52, Jan Beulich wrote: On 16.02.17 at 16:02, wrote: On Thu, Feb 16, 2017 at 11:36 AM, Jan Beulich wrote: On 15.02.17 at 18:43, wrote: 1. I need: Allow P2M core on ARM to update IOMMU mapping from t

Re: [Xen-devel] Unshared IOMMU issues

2017-02-16 Thread Jan Beulich
>>> On 16.02.17 at 17:11, wrote: > On 16/02/17 15:52, Jan Beulich wrote: > On 16.02.17 at 16:02, wrote: >>> On Thu, Feb 16, 2017 at 11:36 AM, Jan Beulich wrote: >>> On 15.02.17 at 18:43, wrote: > 1. > I need: > Allow P2M core on ARM to update IOMMU mapping from the first >>

Re: [Xen-devel] Unshared IOMMU issues

2017-02-16 Thread Julien Grall
Hi Jan, On 16/02/17 15:52, Jan Beulich wrote: On 16.02.17 at 16:02, wrote: On Thu, Feb 16, 2017 at 11:36 AM, Jan Beulich wrote: On 15.02.17 at 18:43, wrote: 1. I need: Allow P2M core on ARM to update IOMMU mapping from the first "p2m_set_entry". I do: I explicitly set need_iommu flag for *

Re: [Xen-devel] Unshared IOMMU issues

2017-02-16 Thread Jan Beulich
>>> On 16.02.17 at 16:02, wrote: > On Thu, Feb 16, 2017 at 11:36 AM, Jan Beulich wrote: > On 15.02.17 at 18:43, wrote: >>> 1. >>> I need: >>> Allow P2M core on ARM to update IOMMU mapping from the first >>> "p2m_set_entry". >>> I do: >>> I explicitly set need_iommu flag for *every* guest do

Re: [Xen-devel] Unshared IOMMU issues

2017-02-16 Thread Oleksandr Tyshchenko
Hi, Jan. On Thu, Feb 16, 2017 at 11:36 AM, Jan Beulich wrote: On 15.02.17 at 18:43, wrote: >> 1. >> I need: >> Allow P2M core on ARM to update IOMMU mapping from the first "p2m_set_entry". >> I do: >> I explicitly set need_iommu flag for *every* guest domain during >> iommu_domain_init() on

Re: [Xen-devel] Unshared IOMMU issues

2017-02-16 Thread Jan Beulich
>>> On 15.02.17 at 18:43, wrote: > 1. > I need: > Allow P2M core on ARM to update IOMMU mapping from the first "p2m_set_entry". > I do: > I explicitly set need_iommu flag for *every* guest domain during > iommu_domain_init() on ARM in case if page table is not shared. > At that moment I have no kn

Re: [Xen-devel] Unshared IOMMU issues

2017-02-15 Thread Oleksandr Tyshchenko
Hi, Jan. On Wed, Feb 15, 2017 at 6:22 PM, Jan Beulich wrote: On 15.02.17 at 16:52, wrote: >> I think, but I am not 100% sure that we could avoid actions above if >> we would have knowledge about device assignment for particular >> domain before making any updates in P2M. > > Well, one could

Re: [Xen-devel] Unshared IOMMU issues

2017-02-15 Thread Jan Beulich
>>> On 15.02.17 at 16:52, wrote: > I think, but I am not 100% sure that we could avoid actions above if > we would have knowledge about device assignment for particular > domain before making any updates in P2M. Well, one could in theory make this work for boot time assigned devices, but since th

[Xen-devel] Unshared IOMMU issues

2017-02-15 Thread Oleksandr Tyshchenko
Hi, all. As it was suggested by Julien in IRC I open this thread. Currently, I am trying to add support for IPMMU in Xen. It is VMSA-compatible IOMMU that integrated in the newest Renesas SoCs (ARM). This IPMMU can't share the page table with the CPU since it uses stage-1 page table unlike the CP