Message ID | 1494424994-26232-11-git-send-email-olekstysh@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Oleksandr, On 10/05/17 15:03, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> > > We don't passthrough IOMMU device to DOM0 even if it is not used by > Xen. Therefore exposing the property that describes the IOMMU > master interfaces of the device does not make any sense. > > Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> > --- > xen/arch/arm/domain_build.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c > index 3abacc0..2defb60 100644 > --- a/xen/arch/arm/domain_build.c > +++ b/xen/arch/arm/domain_build.c > @@ -432,6 +432,10 @@ static int write_properties(struct domain *d, struct kernel_info *kinfo, > continue; > } > > + /* Don't expose the property "iommus" to the guest */ > + if ( dt_property_name_is_equal(prop, "iommus") ) > + continue; It would be useful to have a link to the bindings associated (Documentation/devicetree/bindings/iommu/iommu.txt). Also, whilst you are at it, you likely want to remove all the other iommu properties such as iommu-map. > + > res = fdt_property(kinfo->fdt, prop->name, prop_data, prop_len); > > if ( res ) > Cheers,
On Thu, May 11, 2017 at 2:58 PM, Julien Grall <julien.grall@arm.com> wrote: > Hi Oleksandr, Hi Julien > > On 10/05/17 15:03, Oleksandr Tyshchenko wrote: >> >> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> >> >> We don't passthrough IOMMU device to DOM0 even if it is not used by >> Xen. Therefore exposing the property that describes the IOMMU >> master interfaces of the device does not make any sense. >> >> Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> >> --- >> xen/arch/arm/domain_build.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c >> index 3abacc0..2defb60 100644 >> --- a/xen/arch/arm/domain_build.c >> +++ b/xen/arch/arm/domain_build.c >> @@ -432,6 +432,10 @@ static int write_properties(struct domain *d, struct >> kernel_info *kinfo, >> continue; >> } >> >> + /* Don't expose the property "iommus" to the guest */ >> + if ( dt_property_name_is_equal(prop, "iommus") ) >> + continue; > > > It would be useful to have a link to the bindings associated > (Documentation/devicetree/bindings/iommu/iommu.txt). Agree. I will mention it in commit description. > > Also, whilst you are at it, you likely want to remove all the other iommu > properties such as iommu-map. Excuse me, I have never heard about it. Is it a required property? > >> + >> res = fdt_property(kinfo->fdt, prop->name, prop_data, prop_len); >> >> if ( res ) >> > > Cheers, > > -- > Julien Grall
On 11/05/17 15:15, Oleksandr Tyshchenko wrote: > On Thu, May 11, 2017 at 2:58 PM, Julien Grall <julien.grall@arm.com> wrote: >> Hi Oleksandr, > Hi Julien Hi, >> >> On 10/05/17 15:03, Oleksandr Tyshchenko wrote: >>> >>> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> >>> >>> We don't passthrough IOMMU device to DOM0 even if it is not used by >>> Xen. Therefore exposing the property that describes the IOMMU >>> master interfaces of the device does not make any sense. >>> >>> Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> >>> --- >>> xen/arch/arm/domain_build.c | 4 ++++ >>> 1 file changed, 4 insertions(+) >>> >>> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c >>> index 3abacc0..2defb60 100644 >>> --- a/xen/arch/arm/domain_build.c >>> +++ b/xen/arch/arm/domain_build.c >>> @@ -432,6 +432,10 @@ static int write_properties(struct domain *d, struct >>> kernel_info *kinfo, >>> continue; >>> } >>> >>> + /* Don't expose the property "iommus" to the guest */ >>> + if ( dt_property_name_is_equal(prop, "iommus") ) >>> + continue; >> >> >> It would be useful to have a link to the bindings associated >> (Documentation/devicetree/bindings/iommu/iommu.txt). > Agree. I will mention it in commit description. > >> >> Also, whilst you are at it, you likely want to remove all the other iommu >> properties such as iommu-map. > Excuse me, I have never heard about it. Is it a required property? This property is used to translate an RID into a Master ID (see the documentation in bindings/pci/pci-iommu.txt). Cheers,
On Thu, May 11, 2017 at 9:07 PM, Julien Grall <julien.grall@arm.com> wrote: > > > On 11/05/17 15:15, Oleksandr Tyshchenko wrote: >> >> On Thu, May 11, 2017 at 2:58 PM, Julien Grall <julien.grall@arm.com> >> wrote: >>> >>> Hi Oleksandr, >> >> Hi Julien > > > Hi, > > >>> >>> On 10/05/17 15:03, Oleksandr Tyshchenko wrote: >>>> >>>> >>>> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> >>>> >>>> We don't passthrough IOMMU device to DOM0 even if it is not used by >>>> Xen. Therefore exposing the property that describes the IOMMU >>>> master interfaces of the device does not make any sense. >>>> >>>> Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> >>>> --- >>>> xen/arch/arm/domain_build.c | 4 ++++ >>>> 1 file changed, 4 insertions(+) >>>> >>>> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c >>>> index 3abacc0..2defb60 100644 >>>> --- a/xen/arch/arm/domain_build.c >>>> +++ b/xen/arch/arm/domain_build.c >>>> @@ -432,6 +432,10 @@ static int write_properties(struct domain *d, >>>> struct >>>> kernel_info *kinfo, >>>> continue; >>>> } >>>> >>>> + /* Don't expose the property "iommus" to the guest */ >>>> + if ( dt_property_name_is_equal(prop, "iommus") ) >>>> + continue; >>> >>> >>> >>> It would be useful to have a link to the bindings associated >>> (Documentation/devicetree/bindings/iommu/iommu.txt). >> >> Agree. I will mention it in commit description. >> >>> >>> Also, whilst you are at it, you likely want to remove all the other iommu >>> properties such as iommu-map. >> >> Excuse me, I have never heard about it. Is it a required property? > > > This property is used to translate an RID into a Master ID (see the > documentation in bindings/pci/pci-iommu.txt). So, these two should be skipped too: - iommu-map - iommu-map-mask Right? > > Cheers, > > -- > Julien Grall
On 11/05/17 19:19, Oleksandr Tyshchenko wrote: > On Thu, May 11, 2017 at 9:07 PM, Julien Grall <julien.grall@arm.com> wrote: >> This property is used to translate an RID into a Master ID (see the >> documentation in bindings/pci/pci-iommu.txt). > So, these two should be skipped too: > - iommu-map > - iommu-map-mask > > Right? Yep. Cheers,
diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 3abacc0..2defb60 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -432,6 +432,10 @@ static int write_properties(struct domain *d, struct kernel_info *kinfo, continue; } + /* Don't expose the property "iommus" to the guest */ + if ( dt_property_name_is_equal(prop, "iommus") ) + continue; + res = fdt_property(kinfo->fdt, prop->name, prop_data, prop_len); if ( res )