From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH 2/2] Linux support for hugepages as a Xen PVguest Date: Fri, 10 Oct 2008 16:32:44 +0100 Message-ID: <48EF91BC.76E4.0078.0@novell.com> References: <20081010132959.17293.60971.sendpatchset@magnum.int.mccr.org> <20081010133005.17293.29340.sendpatchset@magnum.int.mccr.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20081010133005.17293.29340.sendpatchset@magnum.int.mccr.org> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: dcm@mccr.org Cc: xen-devel@lists.xensource.com, Keir Fraser List-Id: xen-devel@lists.xenproject.org >+static inline void set_huge_pte_at(struct mm_struct *mm, unsigned long = addr, pte_t *ptep, pte_t pteval) { >+ if ((mm !=3D current->mm && mm !=3D &init_mm) || >+ HYPERVISOR_update_va_mapping(addr, pteval, 0)) >+ set_pmd((pmd_t *)ptep, (pmd_t){__pte_val(pteval)}); >+} Your Xen patch made no attempt at implementing L2 modifications through update_va_mapping, so why have the guest even try? >+static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm, = unsigned long addr, pte_t *ptep) >+{ >+ pte_t pte =3D *ptep; >+ if (!pte_none(pte)) { >+ if ((mm !=3D &init_mm) || >+ HYPERVISOR_update_va_mapping(addr, __pte(0), 0)) { >+ pte =3D *ptep; >+ set_pmd((pmd_t *)ptep, __pmd(0)); Same here. Jan