Re: [Xen-devel] [PATCH v3 2/3] xen/pvh: check permissions when adding MMIO regions

2015-01-23 Thread Konrad Rzeszutek Wilk
On Fri, Jan 23, 2015 at 11:21:11AM +, Jan Beulich wrote: > >>> On 22.01.15 at 21:28, wrote: > > On Thu, Jan 22, 2015 at 04:19:22PM +0100, Roger Pau Monne wrote: > >> Check that MMIO regions added to PVH Dom0 are allowed. Previously a PVH > >> Dom0 > >> would have access to the full MMIO range

Re: [Xen-devel] [PATCH v3 2/3] xen/pvh: check permissions when adding MMIO regions

2015-01-23 Thread Jan Beulich
>>> On 23.01.15 at 12:29, wrote: > El 22/01/15 a les 16.43, Jan Beulich ha escrit: > On 22.01.15 at 16:19, wrote: >>> --- a/xen/arch/x86/domain_build.c >>> +++ b/xen/arch/x86/domain_build.c >>> @@ -320,11 +320,24 @@ static __init void pvh_add_mem_mapping(struct domain > *d, unsigned long gfn

Re: [Xen-devel] [PATCH v3 2/3] xen/pvh: check permissions when adding MMIO regions

2015-01-23 Thread Roger Pau Monné
El 22/01/15 a les 16.43, Jan Beulich ha escrit: On 22.01.15 at 16:19, wrote: >> --- a/xen/arch/x86/domain_build.c >> +++ b/xen/arch/x86/domain_build.c >> @@ -320,11 +320,24 @@ static __init void pvh_add_mem_mapping(struct domain >> *d, unsigned long gfn, >> { >> unsigned long i; >>

Re: [Xen-devel] [PATCH v3 2/3] xen/pvh: check permissions when adding MMIO regions

2015-01-23 Thread Jan Beulich
>>> On 22.01.15 at 21:28, wrote: > On Thu, Jan 22, 2015 at 04:19:22PM +0100, Roger Pau Monne wrote: >> Check that MMIO regions added to PVH Dom0 are allowed. Previously a PVH Dom0 >> would have access to the full MMIO range. > > How do we do this for normal PV dom0? Do we enforce the same > restr

Re: [Xen-devel] [PATCH v3 2/3] xen/pvh: check permissions when adding MMIO regions

2015-01-22 Thread Konrad Rzeszutek Wilk
On Thu, Jan 22, 2015 at 04:19:22PM +0100, Roger Pau Monne wrote: > Check that MMIO regions added to PVH Dom0 are allowed. Previously a PVH Dom0 > would have access to the full MMIO range. How do we do this for normal PV dom0? Do we enforce the same restriction? If not, should we ? > > Signed-off-

Re: [Xen-devel] [PATCH v3 2/3] xen/pvh: check permissions when adding MMIO regions

2015-01-22 Thread Jan Beulich
>>> On 22.01.15 at 16:19, wrote: > --- a/xen/arch/x86/domain_build.c > +++ b/xen/arch/x86/domain_build.c > @@ -320,11 +320,24 @@ static __init void pvh_add_mem_mapping(struct domain > *d, unsigned long gfn, > { > unsigned long i; > p2m_access_t a; > +mfn_t omfn; > +p2m_type_t t

[Xen-devel] [PATCH v3 2/3] xen/pvh: check permissions when adding MMIO regions

2015-01-22 Thread Roger Pau Monne
Check that MMIO regions added to PVH Dom0 are allowed. Previously a PVH Dom0 would have access to the full MMIO range. Signed-off-by: Roger Pau Monné Cc: Jan Beulich Cc: Andrew Cooper --- Changes since v2: - Fix coding style. Changes since v1: - Use the newly introduced p2m_access_t to set t