[lkml]   [2011]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH] swiotlb=nslabs not honored when launching xen pv guests.
    Hey Tomo-san,

    I ran into an issue where the 'swiotlb' argument was being ignored when
    launching a PV guest. Please see the patch - it has a nice explanation
    in the description of the patch.

    Not sure if this is the best way of fixing it. The other way of fixing
    this would be to change swiotlb_init_with_tbl to sample the 'io_tlb_nslabs'
    and if the io_tlb_nslabs is set use that instead of the passed in value?
    But that looks a bit sneaky..

    Something like this (not tested, nor compiled)?

    diff --git a/lib/swiotlb.c b/lib/swiotlb.c
    index 93ca08b..3cfad6e 100644
    --- a/lib/swiotlb.c
    +++ b/lib/swiotlb.c
    @@ -136,9 +136,11 @@ void __init swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose)
    unsigned long i, bytes;

    + if (io_tlb_nslabs)
    + nslabs = io_tlb_nslabs;
    bytes = nslabs << IO_TLB_SHIFT;

    - io_tlb_nslabs = nslabs;
    io_tlb_start = tlb;
    io_tlb_end = io_tlb_start + bytes;

     \ /
      Last update: 2011-06-01 18:45    [W:0.018 / U:244.460 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site