]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: x86: Add AMD PMU MSRs to msrs_to_save_all[]
authorFares Mehanna <faresx@amazon.de>
Wed, 15 Sep 2021 13:39:50 +0000 (13:39 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 Oct 2021 12:39:50 +0000 (14:39 +0200)
commit02498d9de6d9f1186bc1b197aaac93caaeb0a7cb
treee6b60b58000832ae6a05e52511a7c24c879521a6
parentd151c5bc1df2ec5ea63341e1296f943995d879ae
kvm: x86: Add AMD PMU MSRs to msrs_to_save_all[]

[ Upstream commit e1fc1553cd78292ab3521c94c9dd6e3e70e606a1 ]

Intel PMU MSRs is in msrs_to_save_all[], so add AMD PMU MSRs to have a
consistent behavior between Intel and AMD when using KVM_GET_MSRS,
KVM_SET_MSRS or KVM_GET_MSR_INDEX_LIST.

We have to add legacy and new MSRs to handle guests running without
X86_FEATURE_PERFCTR_CORE.

Signed-off-by: Fares Mehanna <faresx@amazon.de>
Message-Id: <20210915133951.22389-1-faresx@amazon.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/kvm/x86.c