Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1193164

Re: [PATCH v3 3/6] iommu: add ARM short descriptor page table allocator.

From Will Deacon <will.deacon@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 3/6] iommu: add ARM short descriptor page table allocator.
Date 2015-07-27 16:20 +0200
Message-ID <pQRq2-4iB-21@gated-at.bofh.it> (permalink)
References (2 earlier) <pOJmV-6k8-5@gated-at.bofh.it> <pPDIu-4AB-9@gated-at.bofh.it> <pPOuf-3ci-33@gated-at.bofh.it> <pQId3-7Ap-1@gated-at.bofh.it> <pQRgo-46U-63@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Jul 27, 2015 at 03:05:38PM +0100, Robin Murphy wrote:
> On 27/07/15 05:21, Yong Wu wrote:
> >>>>> +       } else {        /* page or largepage */
> >>>>> +               if (quirk & IO_PGTABLE_QUIRK_SHORT_MTK) {
> >>>>> +                       if (large) { /* special Bit */
> >>>>
> >>>> This definitely needs a better comment! What exactly are you doing here
> >>>> and what is that quirk all about?
> >>>
> >>> I use this quirk is for MTK Special Bit as we don't have the XN bit in
> >>> pagetable.
> >>
> >> I'm still not really clear about what this is.
> >
> > There is some difference between the standard spec and MTK HW,
> > Our hw don't implement some bits, like XN and AP.
> > So I add a quirk for MTK special.
> 
> When you say it doesn't implement these bits, do you mean that having 
> them set will lead to Bad Things happening in the hardware, or that it 
> will simply ignore them and not enforce any of the protections they 
> imply? The former case would definitely want clearly documenting 
> somewhere, whereas for the latter case I'm not sure it's even worth the 
> complication of having a quirk - if the value doesn't matter there seems 
> little point in doing a special dance just for the sake of semantic 
> correctness of the in-memory PTEs, in my opinion.

Agreed. We should only use quirks if the current (architecturally
compliant) code causes real issues with the hardware. Then the quirk can
be used to either avoid the problematic routines or to take extra steps
to make things work as the architecture intended.

I've asked how this IOMMU differs from the architecture on a number of
occasions, but I'm still yet to receive a response other than "it's special".

Will
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v3 3/6] iommu: add ARM short descriptor page table  allocator. Yong Wu <yong.wu@mediatek.com> - 2015-07-27 06:30 +0200
  Re: [PATCH v3 3/6] iommu: add ARM short descriptor page table allocator. Robin Murphy <robin.murphy@arm.com> - 2015-07-27 16:10 +0200
    Re: [PATCH v3 3/6] iommu: add ARM short descriptor page table  allocator. Will Deacon <will.deacon@arm.com> - 2015-07-27 16:20 +0200
      Re: [PATCH v3 3/6] iommu: add ARM short descriptor page table  allocator. Will Deacon <will.deacon@arm.com> - 2015-07-28 13:10 +0200

csiph-web