lkml.org 
[lkml]   [2013]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 03/12] KVM: MMU: simplify mmu_set_spte
On 01/29/2013 08:21 AM, Marcelo Tosatti wrote:
> On Wed, Jan 23, 2013 at 06:05:29PM +0800, Xiao Guangrong wrote:
>> In order to detecting spte remapping, we can simply check whether the
>> spte has already been pointing to the pfn even if the spte is not the
>> last spte, for middle spte is pointing to the kernel pfn which can not
>> be mapped to userspace
>
> This check is detecting spte overwrite, when a large spte is replaced by
> pointer to spte table.
>
> Can't see why check for different pfn is safe: only 'int level' can
> differ, and pfn be equivalent, for example.

The 'u64 *sptep' must on the "int level" we want to set, that means:
page_header(__pa(sptep)).role.level == "int level".


We discussed this before :), the discussion can be found at:
http://marc.info/?l=kvm&m=135345057329427&w=2.



\
 
 \ /
  Last update: 2013-01-29 04:41    [W:1.801 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site