From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave McCracken Subject: Hugepages don't work on the Xen Linux git tree Date: Mon, 19 Apr 2010 21:27:29 -0500 Message-ID: <201004192127.29270.dcm@mccr.org> Mime-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com Cc: Jeremy Fitzhardinge , Xen Developers List List-Id: xen-devel@lists.xenproject.org I hadn't actually tested mainline Linux or the Xen Linux git tree in awhile, since we're focusing on RedHat released versions. When I actually tried to use it today it fell over dead as soon as I tried to map a hugepage. The current method for mapping hugepages does not work at all with Xen. We have set_huge_pte_at() in arch/x86/include/asm/hugetlb.h which does a set_pte_at(), but passes it a pmd pointer and a pmd entry. This will succeed on a native Linux kernel, but after passing through the paravirt vector to xen_set_pte_at(), it fails miserably. It expects HYPERVISOR_update_va_mapping() to do the right thing and it doesn't. The fix I have in older kernels is for set_huge_pte_at() to call set_pmd() instead. However, in this brave new world of paravirt vectors, should I instead set up a vector for it? What is the architecturally right thing to do? However we decide to do it, expect a patch for it shortly afterward. Thanks, Dave McCracken