]> git.baikalelectronics.ru Git - kernel.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)
commit92362af0a3318dec8f8810ce669b4348925b1a52
tree91d209fb697122bffcffb9225a1b97a5b6036acf
parent182c39b05f9b3191ad661af27893c5e1a5dc379d
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