• Lu Baolu's avatar
    iommu/vt-d: Manage scalalble mode PASID tables · 0bbeb01a
    Lu Baolu authored
    In scalable mode, pasid structure is a two level table with
    a pasid directory table and a pasid table. Any pasid entry
    can be identified by a pasid value in below way.
    
       1
       9                       6 5      0
        .-----------------------.-------.
        |              PASID    |       |
        '-----------------------'-------'    .-------------.
                 |                    |      |             |
                 |                    |      |             |
                 |                    |      |             |
                 |     .-----------.  |      .-------------.
                 |     |           |  |----->| PASID Entry |
                 |     |           |  |      '-------------'
                 |     |           |  |Plus  |             |
                 |     .-----------.  |      |             |
                 |---->| DIR Entry |-------->|             |
                 |     '-----------'         '-------------'
    .---------.  |Plus |           |
    | Context |  |     |           |
    |  Entry  |------->|           |
    '---------'        '-----------'
    
    This changes the pasid table APIs to support scalable mode
    PASID directory and PASID table. It also adds a helper to
    get the PASID table entry according to the pasid value.
    
    Cc: Ashok Raj <ashok.raj@intel.com>
    Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
    Cc: Kevin Tian <kevin.tian@intel.com>
    Signed-off-by: default avatarSanjay Kumar <sanjay.k.kumar@intel.com>
    Signed-off-by: default avatarLiu Yi L <yi.l.liu@intel.com>
    Signed-off-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
    Reviewed-by: default avatarAshok Raj <ashok.raj@intel.com>
    Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
    0bbeb01a
intel-svm.c 18.3 KB