lkml.org 
[lkml]   [2012]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] xen: fix logical error in tlb flushing
    Date
    While TLB_FLUSH_ALL gets passed as 'end' argument to
    flush_tlb_others(), the Xen code was made to check its 'start'
    parameter. That may give a incorrect op.cmd to MMUEXT_INVLPG_MULTI
    instead of MMUEXT_TLB_FLUSH_MULTI. Then it causes some page can not
    be flushed from TLB.

    This patch fixed this issue.

    Reported-by: Jan Beulich <jbeulich@suse.com>
    Signed-off-by: Alex Shi <alex.shi@intel.com>
    ---
    arch/x86/xen/mmu.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
    index b65a761..5141d80 100644
    --- a/arch/x86/xen/mmu.c
    +++ b/arch/x86/xen/mmu.c
    @@ -1283,7 +1283,7 @@ static void xen_flush_tlb_others(const struct cpumask *cpus,
    cpumask_clear_cpu(smp_processor_id(), to_cpumask(args->mask));

    args->op.cmd = MMUEXT_TLB_FLUSH_MULTI;
    - if (start != TLB_FLUSH_ALL && (end - start) <= PAGE_SIZE) {
    + if (end != TLB_FLUSH_ALL && (end - start) <= PAGE_SIZE) {
    args->op.cmd = MMUEXT_INVLPG_MULTI;
    args->op.arg1.linear_addr = start;
    }
    --
    1.7.5.4


    \
     
     \ /
      Last update: 2012-08-24 11:22    [W:3.982 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site