Re: [PATCH] x86: fix rdmsr MSR_PLATFORM_INFO unsafe warning in kvm guest
From: Paolo Bonzini
Date: Wed Jun 22 2016 - 13:43:24 EST
On 22/06/2016 03:28, Wanpeng Li wrote:
>
> get_ratio:
> - rdmsr(MSR_PLATFORM_INFO, lo, hi);
> - ratio = (lo >> 8) & 0xff;
> + if (!rdmsr_safe(MSR_PLATFORM_INFO, &lo, &hi))
> + ratio = (lo >> 8) & 0xff;
This looks good, thanks.
Paolo