lkml.org 
[lkml]   [2022]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RESEND PATCH] perf/x86/intel: Fix unchecked MSR access error for Alder Lake N
On Mon, Aug 22, 2022 at 10:59:13AM -0400, Liang, Kan wrote:

> > + if (boot_cpu_has(X86_FEATURE_HYPERVISOR)) {
> > + pr_warn_once("hybrid PMU and virt are incompatible\n");
> > + return false;
> > + }
>
> I would expect that KVM exposes the enhanced CPUID to the guest. The
> guest vCPU should knows its specific CPU type. The KVM should bind the
> vCPU to the same type of CPUs.
>
> Before KVM provides such support, I guess it may be OK to have the
> warning. Maybe more specifically, only architecture events work.

Well, as is I randomly get #GPs when I boot a guest kernel.

The QEMU thing is passing in Core CPUID to all vCPUs (because per luck
it starts on a biggie), but if the vCPU lands on a small then the
PERF_GLOBAL_CTRL write will #GP because biggie has more bits set than
small knows how to deal with:

0001000f000000ff vs 000000070000003f, or something like that.

So I'm thinking we should entirely kill the thing by default and allow
KVM to set some magical bit when it knows the CPUID and affinity crud is
just right to have it maybe work. But that's for some virt person to
sort out...

\
 
 \ /
  Last update: 2022-08-22 17:26    [W:0.082 / U:1.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site