WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 2/2] Linux support for hugepages as a Xen PVguest

>+static inline void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, 
>pte_t *ptep, pte_t pteval) {
>+      if ((mm != current->mm && mm != &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 = *ptep;
>+      if (!pte_none(pte)) {
>+              if ((mm != &init_mm) ||
>+                  HYPERVISOR_update_va_mapping(addr, __pte(0), 0)) {
>+                      pte = *ptep;
>+                      set_pmd((pmd_t *)ptep, __pmd(0));

Same here.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel