[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <554AC8EE.50607@linux.intel.com>
Date: Thu, 07 May 2015 10:07:42 +0800
From: Xiao Guangrong <guangrong.xiao@...ux.intel.com>
To: David Matlack <dmatlack@...gle.com>
CC: Paolo Bonzini <pbonzini@...hat.com>,
Gleb Natapov <gleb@...nel.org>,
Marcelo Tosatti <mtosatti@...hat.com>,
kvm list <kvm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/9] KVM: MMU: fix decoding cache type from MTRR
On 05/07/2015 05:42 AM, David Matlack wrote:
> On Thu, Apr 30, 2015 at 3:24 AM, <guangrong.xiao@...ux.intel.com> wrote:
>> From: Xiao Guangrong <guangrong.xiao@...ux.intel.com>
>>
>> There are some bugs in current get_mtrr_type();
>> 1: bit 2 of mtrr_state->enabled is corresponding bit 11 of IA32_MTRR_DEF_TYPE
>
> bit 1, not bit 2. (code is correct though)
Oh, i counted the bit from 1, my fault. :(
>
>> MSR which completely control MTRR's enablement that means other bits are
>> ignored if it is cleared
>>
>> 2: the fixed MTRR ranges are controlled by bit 1 of mtrr_state->enabled (bit 10
>
> bit 0, not bit 1. (code is correct though)
Ditto. Will update the changelog in v2. Thank you for pointing it out.
>
>> of IA32_MTRR_DEF_TYPE)
>>
>> 3: if MTRR is disabled, UC is applied to all of physical memory rather than
>> mtrr_state->def_type
>
> kvm_get_guest_memory_type defaults to MTRR_TYPE_WRBACK, not
> mtrr_state->def_type, when get_mtrr_type returns 0xFF.
>
Yeah, that confused me. Based on the comment of vmx_get_mt_mask():
* a. VT-d without snooping control feature: can't guarantee the
* result, try to trust guest.
we need to completely follow guest's MTRR under this case.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists