lkml.org 
[lkml]   [2017]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 2/5] KVM: MMU: check guest CR3 reserved bits based on its physical address width.
From
Date
On 17/08/2017 21:52, Yu Zhang wrote:
> + if (efer & EFER_LMA) {
> + u64 maxphyaddr;
> + u32 eax = 0x80000008;
> +
> + if (ctxt->ops->get_cpuid(ctxt, &eax, NULL, NULL, NULL,
> + NO_CHECK_LIMIT)) {
> + maxphyaddr = eax & 0xff;
> + rsvd = rsvd_bits(maxphyaddr, 62);
> + }

You should use 36 here if ctxt->ops->get_cpuid returns false, for
consistency with cpuid_query_maxphyaddr.

Paolo

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