Commit ce7184bdbd38d920fb515266fbbdc585ad2e5493

Authored by Alex Shi
Committed by Konrad Rzeszutek Wilk
1 parent 593d0a3e9f

xen: fix logical error in tlb flushing

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>
Acked-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Yongjie Ren <yongjie.ren@intel.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -1283,7 +1283,7 @@
1283 1283 cpumask_clear_cpu(smp_processor_id(), to_cpumask(args->mask));
1284 1284  
1285 1285 args->op.cmd = MMUEXT_TLB_FLUSH_MULTI;
1286   - if (start != TLB_FLUSH_ALL && (end - start) <= PAGE_SIZE) {
  1286 + if (end != TLB_FLUSH_ALL && (end - start) <= PAGE_SIZE) {
1287 1287 args->op.cmd = MMUEXT_INVLPG_MULTI;
1288 1288 args->op.arg1.linear_addr = start;
1289 1289 }