From: Eugene Korenevsky Date: Sun, 29 Mar 2015 20:56:12 +0000 (+0300) Subject: KVM: x86: cache maxphyaddr CPUID leaf in struct kvm_vcpu X-Git-Tag: omap-for-v4.1/fixes-rc1~202^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a4f55cde81f1633cb7ae9f0963b722e47acdc36;p=pandora-kernel.git KVM: x86: cache maxphyaddr CPUID leaf in struct kvm_vcpu cpuid_maxphyaddr(), which performs lot of memory accesses is called extensively across KVM, especially in nVMX code. This patch adds a cached value of maxphyaddr to vcpu.arch to reduce the pressure onto CPU cache and simplify the code of cpuid_maxphyaddr() callers. The cached value is initialized in kvm_arch_vcpu_init() and reloaded every time CPUID is updated by usermode. It is obvious that these reloads occur infrequently. Signed-off-by: Eugene Korenevsky Message-Id: <20150329205612.GA1223@gnote> Signed-off-by: Paolo Bonzini --- Reading git-diff-tree failed