Re: [PATCH] RDMSR before test_cpu_capacity brings about KVM warning

From: Han, Huaitong
Date: Mon Aug 17 2015 - 09:24:10 EST


On Mon, 2015-08-17 at 15:04 +0300, Alexander Shishkin wrote:
> Huaitong Han <huaitong.han@xxxxxxxxx> writes:
>
> > rdmsrl_safe does not lead to #GP in native kernel although CPU
> > does not support INTEL_PT, but if KVM does not support INTEL_PT,
> > the codes cannot understand MSR_IA32_RTIT_CTL, and the warning
> > is produced.
>
> "the codes"?
KVM codes. Current KVM does not support Intel_PT. But guest kernel may
readmsr MSR_IA32_RTIT_CTL that KVM cannot understand.
Details from https://bugzilla.kernel.org/show_bug.cgi?id=102651
>
> > If KVM does not support INTEL_PT, its guest CPUID also does not.
> > So test_cpu_cap is added before RDMSR, and it is more in line with
> > the code style.
>
> It does make more sense like this, but please improve this commit
> message. And don't forget to include Peter in the loop.
I will update the commit message.
>
> FWIW,
>
> Reviewed-by: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
>
> Regards,
> --
> Alex