]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: Handle reads of SandyBridge RAPL PMU MSRs rather than injecting #GP
authorVenkatesh Srinivas <venkateshs@google.com>
Thu, 16 Apr 2020 18:42:54 +0000 (11:42 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 17 Apr 2020 15:06:33 +0000 (11:06 -0400)
commit7b594eaf53159643f67e1d38dca650e4dcd80170
treee2523202629412d88c4f430eba74d30e86eb2b3a
parent199d3ae16fd1b0239ac04977642405718014f3b8
kvm: Handle reads of SandyBridge RAPL PMU MSRs rather than injecting #GP

Linux 3.14 unconditionally reads the RAPL PMU MSRs on boot, without handling
General Protection Faults on reading those MSRs. Rather than injecting a #GP,
which prevents boot, handle the MSRs by returning 0 for their data. Zero was
checked to be safe by code review of the RAPL PMU driver and in discussion
with the original driver author (eranian@google.com).

Signed-off-by: Venkatesh Srinivas <venkateshs@google.com>
Signed-off-by: Jon Cargille <jcargill@google.com>
Reviewed-by: Jim Mattson <jmattson@google.com>
Message-Id: <20200416184254.248374-1-jcargill@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c