From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH 3/3] add support for change_pte mmu notifiers Date: Sat, 12 Sep 2009 13:59:27 -0300 Message-ID: <20090912165927.GA4311@amt.cnet> References: <1252600738-9456-1-git-send-email-ieidus@redhat.com> <1252600738-9456-2-git-send-email-ieidus@redhat.com> <1252600738-9456-3-git-send-email-ieidus@redhat.com> <1252600738-9456-4-git-send-email-ieidus@redhat.com> <20090911212418.GC6244@amt.cnet> <4AAB4286.9070303@redhat.com> <20090912161849.GA3425@amt.cnet> <4AABD49F.8040000@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: avi@redhat.com, kvm@vger.kernel.org, aarcange@redhat.com To: Izik Eidus Return-path: Received: from mx1.redhat.com ([209.132.183.28]:11711 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754180AbZILQ7x (ORCPT ); Sat, 12 Sep 2009 12:59:53 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8CGxvuS020812 for ; Sat, 12 Sep 2009 12:59:57 -0400 Content-Disposition: inline In-Reply-To: <4AABD49F.8040000@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sat, Sep 12, 2009 at 08:04:31PM +0300, Izik Eidus wrote: >>>> If change_pte is called to modify a largepage pte, and the shadow has >>>> that largepage mapped with 4k sptes, you'll set the wrong pfn. That is, >>>> the patch does not attempt to handle different page sizes properly. >>>> >>>> So either disable change_pte updates to non-4k host vmas (making it >>>> explictly it does not handle different pagesizes), or handle largepages >>>> properly, although i don't see any use for change_pte or largepage >>>> mappings? >>>> >>> change_pte doesn't get called on 4k pages... >>> So adding commet to this function saying it is working just on 4k >>> pages would be enough ? >>> >> >> It would be better to fail/WARN on non-4k host ptes (can't it?), but if >> that is not possible i think a comment would be enough. >> >> > Ok so you want is_large_pte() check on data right? (and WARN() there..) pte_huge(pte), yeah.