Re: [PATCH v3 05/11] KVM: MMU: do not mark accessed bit on pte writepath

From: Marcelo Tosatti
Date: Thu Sep 15 2011 - 09:11:40 EST


On Wed, Sep 14, 2011 at 12:55:09PM +0300, Avi Kivity wrote:
> On 09/13/2011 09:29 PM, Xiao Guangrong wrote:
> >On 09/13/2011 06:53 PM, Avi Kivity wrote:
> >> On 08/30/2011 05:35 AM, Xiao Guangrong wrote:
> >>> In current code, the accessed bit is always set when page fault occurred,
> >>> do not need to set it on pte write path
> >>
> >> What about speculative sptes that are then only accessed via emulation?
> >>
> >
> >The gfn is read and written only via emulation? I think this case is very
> >very rare?
>
> Probably...

The access information will be transferred via the host pte, via
get_user_pages, to MM layer, in that case.

> Marcelo? Can you think of another case where spte.accessed is needed?

No, an spte updated via emulation will either be accessed directly, or
if via emulation, access to the gfn it points transferred via host pte.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/