diff options
author | Chenyi Qiang <[email protected]> | 2019-11-06 14:35:20 +0800 |
---|---|---|
committer | Paolo Bonzini <[email protected]> | 2019-11-12 10:17:25 +0100 |
commit | 7a5ee6edb42e0bb487954806d34877995b6b8d59 (patch) | |
tree | 148baa85fb034c6fa3ef946f774abd70e152e2ee /tools/testing/selftests/bpf/prog_tests | |
parent | e2d3fcaf939dded3da604a25ebbea9fb954c2280 (diff) |
KVM: X86: Fix initialization of MSR lists
The three MSR lists(msrs_to_save[], emulated_msrs[] and
msr_based_features[]) are global arrays of kvm.ko, which are
adjusted (copy supported MSRs forward to override the unsupported MSRs)
when insmod kvm-{intel,amd}.ko, but it doesn't reset these three arrays
to their initial value when rmmod kvm-{intel,amd}.ko. Thus, at the next
installation, kvm-{intel,amd}.ko will do operations on the modified
arrays with some MSRs lost and some MSRs duplicated.
So define three constant arrays to hold the initial MSR lists and
initialize msrs_to_save[], emulated_msrs[] and msr_based_features[]
based on the constant arrays.
Cc: [email protected]
Reviewed-by: Xiaoyao Li <[email protected]>
Signed-off-by: Chenyi Qiang <[email protected]>
[Remove now useless conditionals. - Paolo]
Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests')
0 files changed, 0 insertions, 0 deletions