lkml.org 
[lkml]   [2015]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.2 114/134] iommu/vt-d: Really use upper context table when necessary
    Date
    4.2-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Joerg Roedel <jroedel@suse.de>

    commit 4df4eab168c1c4058603be55a3169d4a45779cc0 upstream.

    There is a bug in iommu_context_addr() which will always use
    the lower context table, even when the upper context table
    needs to be used. Fix this issue.

    Fixes: 03ecc32c5274 ("iommu/vt-d: support extended root and context entries")
    Reported-by: Xiao, Nan <nan.xiao@hp.com>
    Signed-off-by: Joerg Roedel <jroedel@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/iommu/intel-iommu.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/drivers/iommu/intel-iommu.c
    +++ b/drivers/iommu/intel-iommu.c
    @@ -755,6 +755,7 @@ static inline struct context_entry *iomm
    struct context_entry *context;
    u64 *entry;

    + entry = &root->lo;
    if (ecs_enabled(iommu)) {
    if (devfn >= 0x80) {
    devfn -= 0x80;
    @@ -762,7 +763,6 @@ static inline struct context_entry *iomm
    }
    devfn *= 2;
    }
    - entry = &root->lo;
    if (*entry & 1)
    context = phys_to_virt(*entry & VTD_PAGE_MASK);
    else {



    \
     
     \ /
      Last update: 2015-09-27 00:21    [W:5.302 / U:1.100 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site