KVM: Extended shared_msr_global to per CPU
authorSheng Yang <sheng@linux.intel.com>
Fri, 18 Dec 2009 08:48:44 +0000 (16:48 +0800)
committerMarcelo Tosatti <mtosatti@redhat.com>
Mon, 1 Mar 2010 15:35:40 +0000 (12:35 -0300)
commit2bf78fa7b9b0d2917fd6587eadb3c0f6bbaf1718
tree614464f8cc2e6e8bd8610e00601caec35e0c252d
parent8a7e3f01e692cd202fb7c042cf2be9ff8c599a1e
KVM: Extended shared_msr_global to per CPU

shared_msr_global saved host value of relevant MSRs, but it have an
assumption that all MSRs it tracked shared the value across the different
CPUs. It's not true with some MSRs, e.g. MSR_TSC_AUX.

Extend it to per CPU to provide the support of MSR_TSC_AUX, and more
alike MSRs.

Notice now the shared_msr_global still have one assumption: it can only deal
with the MSRs that won't change in host after KVM module loaded.

Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/x86.c