]> 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)
commitb88e3d6a651c0613315e15863eb960ec48638283
treee6b60b58000832ae6a05e52511a7c24c879521a6
parent0e3fe6c3c45ea07b6e60c005f7005e338b8d2de2
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