Re: [Xen-devel] [v3][PATCH 03/16] xen/vtd: create RMRR mapping

2015-06-18 Thread Chen, Tiejun
On 2015/6/18 18:07, Tim Deegan wrote: At 14:13 +0800 on 12 Jun (1434118407), Chen, Tiejun wrote: could you explain why existing guest_physmap_remove_page can't serve the purpose so you need invent a new identity mapping specific one? For unmapping suppose it should be common regardless of whethe

Re: [Xen-devel] [v3][PATCH 03/16] xen/vtd: create RMRR mapping

2015-06-18 Thread Tim Deegan
At 14:13 +0800 on 12 Jun (1434118407), Chen, Tiejun wrote: > > could you explain why existing guest_physmap_remove_page can't > > serve the purpose so you need invent a new identity mapping > > specific one? For unmapping suppose it should be common regardless > > of whether it's identity-mapped or

Re: [Xen-devel] [v3][PATCH 03/16] xen/vtd: create RMRR mapping

2015-06-17 Thread Chen, Tiejun
On 2015/6/17 18:03, Jan Beulich wrote: On 11.06.15 at 03:15, wrote: --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -927,10 +927,16 @@ int set_identity_p2m_entry(struct domain *d, unsigned long gfn, } gfn_unlock(p2m, gfn, 0); -return ret; } +el

Re: [Xen-devel] [v3][PATCH 03/16] xen/vtd: create RMRR mapping

2015-06-17 Thread Jan Beulich
>>> On 11.06.15 at 03:15, wrote: > --- a/xen/arch/x86/mm/p2m.c > +++ b/xen/arch/x86/mm/p2m.c > @@ -927,10 +927,16 @@ int set_identity_p2m_entry(struct domain *d, unsigned > long gfn, > } > > gfn_unlock(p2m, gfn, 0); > -return ret; > } > +else > +ret =

Re: [Xen-devel] [v3][PATCH 03/16] xen/vtd: create RMRR mapping

2015-06-11 Thread Chen, Tiejun
On 2015/6/12 13:59, Tian, Kevin wrote: From: Chen, Tiejun Sent: Friday, June 12, 2015 1:58 PM On 2015/6/12 10:43, Chen, Tiejun wrote: On 2015/6/11 22:07, Tim Deegan wrote: At 17:31 +0800 on 11 Jun (1434043916), Chen, Tiejun wrote: while ( base_pfn < end_pfn ) { -int er

Re: [Xen-devel] [v3][PATCH 03/16] xen/vtd: create RMRR mapping

2015-06-11 Thread Tian, Kevin
> From: Chen, Tiejun > Sent: Friday, June 12, 2015 1:58 PM > > On 2015/6/12 10:43, Chen, Tiejun wrote: > > On 2015/6/11 22:07, Tim Deegan wrote: > >> At 17:31 +0800 on 11 Jun (1434043916), Chen, Tiejun wrote: > >while ( base_pfn < end_pfn ) > >{ > > -int err = i

Re: [Xen-devel] [v3][PATCH 03/16] xen/vtd: create RMRR mapping

2015-06-11 Thread Chen, Tiejun
On 2015/6/12 10:43, Chen, Tiejun wrote: On 2015/6/11 22:07, Tim Deegan wrote: At 17:31 +0800 on 11 Jun (1434043916), Chen, Tiejun wrote: while ( base_pfn < end_pfn ) { -int err = intel_iommu_map_page(d, base_pfn, base_pfn, - IOMMUF_readable|IOMMUF_writable); +int e

Re: [Xen-devel] [v3][PATCH 03/16] xen/vtd: create RMRR mapping

2015-06-11 Thread Chen, Tiejun
On 2015/6/11 22:07, Tim Deegan wrote: At 17:31 +0800 on 11 Jun (1434043916), Chen, Tiejun wrote: while ( base_pfn < end_pfn ) { -int err = intel_iommu_map_page(d, base_pfn, base_pfn, - IOMMUF_readable|IOMMUF_writable); +int err

Re: [Xen-devel] [v3][PATCH 03/16] xen/vtd: create RMRR mapping

2015-06-11 Thread Tim Deegan
At 17:31 +0800 on 11 Jun (1434043916), Chen, Tiejun wrote: > >> while ( base_pfn < end_pfn ) > >> { > >> -int err = intel_iommu_map_page(d, base_pfn, base_pfn, > >> - IOMMUF_readable|IOMMUF_writable); > >> +int err = set_identity_p2m

Re: [Xen-devel] [v3][PATCH 03/16] xen/vtd: create RMRR mapping

2015-06-11 Thread Chen, Tiejun
On 2015/6/11 17:14, Tian, Kevin wrote: From: Chen, Tiejun Sent: Thursday, June 11, 2015 9:15 AM RMRR reserved regions must be setup in the pfn space with an identity mapping to reported mfn. However existing code has problem to setup correct mapping when VT-d shares EPT page table, so lead to pr

Re: [Xen-devel] [v3][PATCH 03/16] xen/vtd: create RMRR mapping

2015-06-11 Thread Tian, Kevin
> From: Chen, Tiejun > Sent: Thursday, June 11, 2015 9:15 AM > > RMRR reserved regions must be setup in the pfn space with an identity > mapping to reported mfn. However existing code has problem to setup > correct mapping when VT-d shares EPT page table, so lead to problem > when assigning device

[Xen-devel] [v3][PATCH 03/16] xen/vtd: create RMRR mapping

2015-06-10 Thread Tiejun Chen
RMRR reserved regions must be setup in the pfn space with an identity mapping to reported mfn. However existing code has problem to setup correct mapping when VT-d shares EPT page table, so lead to problem when assigning devices (e.g GPU) with RMRR reported. So instead, this patch aims to setup ide