Re: [PATCH v2 3/3] x86/mm: Fix flush_tlb_page() on Xen

From: Boris Ostrovsky
Date: Fri Apr 21 2017 - 14:47:35 EST


On 04/21/2017 02:15 PM, Andy Lutomirski wrote:
> flush_tlb_page() passes a bogus range to flush_tlb_others() and
> expects the latter to fix it up. native_flush_tlb_others() has the
> fixup but Xen's version doesn't. Move the fixup to
> flush_tlb_others().
>
> AFAICS the only real effect is that, without this fix, Xen would
> flush everything instead of just the one page on remote vCPUs in
> when flush_tlb_page() was called.
>
> Cc: Rik van Riel <riel@xxxxxxxxxx>
> Cc: Dave Hansen <dave.hansen@xxxxxxxxx>
> Cc: Nadav Amit <namit@xxxxxxxxxx>
> Cc: Michal Hocko <mhocko@xxxxxxxx>
> Cc: Sasha Levin <sasha.levin@xxxxxxxxxx>
> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Cc: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
> Cc: Juergen Gross <jgross@xxxxxxxx>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> Fixes: e7b52ffd45a6 ("x86/flush_tlb: try flush_tlb_single one by one in flush_tlb_range")
> Signed-off-by: Andy Lutomirski <luto@xxxxxxxxxx>
> ---
> arch/x86/mm/tlb.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)

Thanks, Andy.

Reviewed-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>