]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/hyperv: Clear vCPU banks between calls to avoid flushing unneeded vCPUs
authorVitaly Kuznetsov <vkuznets@redhat.com>
Fri, 6 Oct 2017 15:48:54 +0000 (17:48 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 10 Oct 2017 10:53:00 +0000 (12:53 +0200)
commita3b7424392924e778b608e30ee321f7b10cc94b8
tree91d209fb697122bffcffb9225a1b97a5b6036acf
parentd4a2d031dd42f9594107d317e2a9a0c6d73ad46b
x86/hyperv: Clear vCPU banks between calls to avoid flushing unneeded vCPUs

hv_flush_pcpu_ex structures are not cleared between calls for performance
reasons (they're variable size up to PAGE_SIZE each) but we must clear
hv_vp_set.bank_contents part of it to avoid flushing unneeded vCPUs. The
rest of the structure is formed correctly.

To do the clearing in an efficient way stash the maximum possible vCPU
number (this may differ from Linux CPU id).

Reported-by: Jork Loeser <Jork.Loeser@microsoft.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: Dexuan Cui <decui@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: devel@linuxdriverproject.org
Link: http://lkml.kernel.org/r/20171006154854.18092-1-vkuznets@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/hyperv/hv_init.c
arch/x86/hyperv/mmu.c
arch/x86/include/asm/mshyperv.h