lkml.org 
[lkml]   [2011]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC 6/7] iommu/core: add fault reporting
    On Fri, Sep 02, 2011 at 01:32:35PM -0400, Ohad Ben-Cohen wrote:
    > -struct iommu_domain *iommu_domain_alloc(void)
    > +/**
    > + * iommu_domain_alloc() - allocate and initialize a new iommu domain
    > + * @handler: an optional pointer to a fault handler, or NULL if not needed
    > + *
    > + * Returns the new domain, or NULL on error.
    > + */
    > +struct iommu_domain *iommu_domain_alloc(iommu_fault_handler_t handler)

    Please add a seperate function for setting the fault-handler. It is
    optional, so no need to be a value of the alloc-function.

    > +/**
    > + * enum iommu_fault_types - iommu fault types
    > + *
    > + * @IOMMU_ERROR: Unrecoverable error
    > + * @IOMMU_TLBMISS: TLB miss while the page table walker is disabled
    > + * @IOMMU_NOPTE: TLB miss and no PTE for the requested address
    > + */
    > +enum iommu_fault_types {
    > + IOMMU_ERROR,
    > + IOMMU_TLBMISS,
    > + IOMMU_NOPTE,
    > +};

    Can you elaborate a bit on what the user of the api will do different
    between IOMMU_TLBMISS and IOMMU_NOPTE?
    My feeling is that those differences should be handled internally in the
    IOMMU driver, but probably I miss a use-case.
    Also, we need some flags to distinguish between the type of the fault
    (read, write, ...).

    Joerg


    --
    AMD Operating System Research Center

    Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
    General Managers: Alberto Bozzo, Andrew Bowd
    Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632



    \
     
     \ /
      Last update: 2011-09-05 12:03    [W:0.025 / U:1.384 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site