Re: bind pasid table API

2017-09-29 Thread Joerg Roedel
On Fri, Sep 29, 2017 at 05:44:02AM +, Tian, Kevin wrote: > Thinking about anyway we need to factor page table code in the > guest side. It's not a big deal to further factor PASID code due to the > same reason. Of course there are additional format info to be > communicated back-and-forth, but

Re: bind pasid table API

2017-09-29 Thread Joerg Roedel
On Thu, Sep 28, 2017 at 10:11:21AM -0700, Raj, Ashok wrote: > Hi Jean > > On Thu, Sep 28, 2017 at 12:21:34PM +0100, Jean-Philippe Brucker wrote: > > It's the same problem on SMMUv3, all pointers in the multi-level PASID > > tables are GPAs. Our solution was to grab chunks GPA space from the guest

Re: bind pasid table API

2017-09-29 Thread Joerg Roedel
On Thu, Sep 28, 2017 at 02:36:57PM -0700, Jacob Pan wrote: > just to confirm, we have two separate APIs for bind_pasid_table_ptr and > bind_page_table. For the former, we need to passdown the following info > from qemu/vfio. For now > struct pasid_table_config { > __u32 version; > #define PAS

RE: bind pasid table API

2017-09-28 Thread Tian, Kevin
> From: Raj, Ashok > Sent: Friday, September 29, 2017 1:11 AM > > Hi Jean > > On Thu, Sep 28, 2017 at 12:21:34PM +0100, Jean-Philippe Brucker wrote: > > On 27/09/17 14:40, Joerg Roedel wrote: > > > Hi, > > > > > > On Wed, Sep 20, 2017 at 01:09:47PM +0100, Jean-Philippe Brucker > wrote: > > >> For

Re: bind pasid table API

2017-09-28 Thread Jacob Pan
On Thu, 28 Sep 2017 14:07:05 +0200 Joerg Roedel wrote: > On Wed, Sep 27, 2017 at 10:51:55AM -0700, Jacob Pan wrote: > > On Wed, 27 Sep 2017 15:40:41 +0200 > > Joerg Roedel wrote: > > > enum pasid_table_model { > > > PASID_TABLE_INTEL, > > > PASID_TABLE_ARM, > > >

Re: bind pasid table API

2017-09-28 Thread Raj, Ashok
Hi Jean On Thu, Sep 28, 2017 at 12:21:34PM +0100, Jean-Philippe Brucker wrote: > On 27/09/17 14:40, Joerg Roedel wrote: > > Hi, > > > > On Wed, Sep 20, 2017 at 01:09:47PM +0100, Jean-Philippe Brucker wrote: > >> For binding page tables instead of PASID tables (e.g. virtio-iommu), the > >> generic

Re: bind pasid table API

2017-09-28 Thread Joerg Roedel
On Wed, Sep 27, 2017 at 10:51:55AM -0700, Jacob Pan wrote: > On Wed, 27 Sep 2017 15:40:41 +0200 > Joerg Roedel wrote: > > enum pasid_table_model { > > PASID_TABLE_INTEL, > > PASID_TABLE_ARM, > > PASID_TABLE_AMD, > > /* ... */ > > }; > > > I

Re: bind pasid table API

2017-09-28 Thread Jean-Philippe Brucker
On 27/09/17 14:40, Joerg Roedel wrote: > Hi, > > On Wed, Sep 20, 2017 at 01:09:47PM +0100, Jean-Philippe Brucker wrote: >> For binding page tables instead of PASID tables (e.g. virtio-iommu), the >> generic data would be: >> >> struct pgtable_info { >> __u32 pasid; >> __u64 ptr; >>

Re: bind pasid table API

2017-09-27 Thread Jacob Pan
On Wed, 27 Sep 2017 15:40:41 +0200 Joerg Roedel wrote: > Hi, > > On Wed, Sep 20, 2017 at 01:09:47PM +0100, Jean-Philippe Brucker wrote: > > For binding page tables instead of PASID tables (e.g. > > virtio-iommu), the generic data would be: > > > > struct pgtable_info { > > __u32 pasid; >

Re: bind pasid table API

2017-09-27 Thread Joerg Roedel
Hi, On Wed, Sep 20, 2017 at 01:09:47PM +0100, Jean-Philippe Brucker wrote: > For binding page tables instead of PASID tables (e.g. virtio-iommu), the > generic data would be: > > struct pgtable_info { > __u32 pasid; > __u64 ptr; > __u32 model; > __u8model_data[];

Re: bind pasid table API

2017-09-26 Thread Jean-Philippe Brucker
On 25/09/17 16:14, Raj, Ashok wrote: > On Mon, Sep 25, 2017 at 12:45:00PM +0100, Jean-Philippe Brucker wrote: > [snip] > >> This format tells how the guest organizes its PASID tables. Depending on >> 'format', the PASID table can be: >> * A flat array of descriptors >> * One array of 1st-level des

Re: bind pasid table API

2017-09-25 Thread Raj, Ashok
On Mon, Sep 25, 2017 at 12:45:00PM +0100, Jean-Philippe Brucker wrote: [snip] > This format tells how the guest organizes its PASID tables. Depending on > 'format', the PASID table can be: > * A flat array of descriptors > * One array of 1st-level descriptors pointing to a 2nd level of > descripto

Re: bind pasid table API

2017-09-25 Thread Jean-Philippe Brucker
gt;> Cc: Liu, Yi L ; Raj, Ashok ; David >> Woodhouse ; Joerg Roedel ; Tian, >> Kevin ; Auger Eric >> Subject: Re: bind pasid table API >> >> Hi Jacob, >> >> [Adding Eric as he might need pasid_table_info for vSVM at some point] >> >> On 19/09/1

Re: bind pasid table API

2017-09-25 Thread Jean-Philippe Brucker
On 20/09/17 23:35, Jacob Pan wrote: > On Wed, 20 Sep 2017 13:09:47 +0100 > Jean-Philippe Brucker wrote: > >> Hi Jacob, >> >> [Adding Eric as he might need pasid_table_info for vSVM at some point] >> >> On 19/09/17 04:45, Jacob Pan wrote: >>> Hi Jean and All, >>> >>> This is a follow-up on the LPC

RE: bind pasid table API

2017-09-20 Thread Liu, Yi L
oedel ; Tian, > Kevin ; Auger Eric > Subject: Re: bind pasid table API > > Hi Jacob, > > [Adding Eric as he might need pasid_table_info for vSVM at some point] > > On 19/09/17 04:45, Jacob Pan wrote: > > Hi Jean and All, > > > > This is a follow-up on the LPC

Re: bind pasid table API

2017-09-20 Thread Jacob Pan
On Wed, 20 Sep 2017 13:09:47 +0100 Jean-Philippe Brucker wrote: > Hi Jacob, > > [Adding Eric as he might need pasid_table_info for vSVM at some point] > > On 19/09/17 04:45, Jacob Pan wrote: > > Hi Jean and All, > > > > This is a follow-up on the LPC discussion we had last week. > > (https://l

Re: bind pasid table API

2017-09-20 Thread Jean-Philippe Brucker
Hi Jacob, [Adding Eric as he might need pasid_table_info for vSVM at some point] On 19/09/17 04:45, Jacob Pan wrote: > Hi Jean and All, > > This is a follow-up on the LPC discussion we had last week. > (https://linuxplumbersconf.org/2017/ocw/proposals/4748) > > My understanding is that the data

bind pasid table API

2017-09-18 Thread Jacob Pan
Hi Jean and All, This is a follow-up on the LPC discussion we had last week. (https://linuxplumbersconf.org/2017/ocw/proposals/4748) My understanding is that the data structure below can satisfy the needs from Intel (pointer + size) and AMD (pointer only). But ARM pvIOMMU would need additional in