From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 4/4 v3] KVM: Introduce kvm_memory_slot::arch and move lpage_info into it Date: Wed, 07 Mar 2012 17:03:54 +0200 Message-ID: <4F5778DA.60805@redhat.com> References: <20120130124859.6c3bb19f.yoshikawa.takuya@oss.ntt.co.jp> <20120130125308.51e22f12.yoshikawa.takuya@oss.ntt.co.jp> <20120130143533.e52efcbe.yoshikawa.takuya@oss.ntt.co.jp> <4F274144.9000606@oss.ntt.co.jp> <065A8746-BEDD-4E2B-8AAB-FDA26D496582@suse.de> <20120307134617.f7fa887c.yoshikawa.takuya@oss.ntt.co.jp> <4F576247.4010402@suse.de> <4F576B0A.7060009@redhat.com> <4F577754.9090009@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Takuya Yoshikawa , mtosatti@redhat.com, kvm@vger.kernel.org, cotte@de.ibm.com, Paul Mackerras , borntraeger@de.ibm.com, Andrea Arcangeli To: Alexander Graf Return-path: Received: from mx1.redhat.com ([209.132.183.28]:4875 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754101Ab2CGPEG (ORCPT ); Wed, 7 Mar 2012 10:04:06 -0500 In-Reply-To: <4F577754.9090009@suse.de> Sender: kvm-owner@vger.kernel.org List-ID: On 03/07/2012 04:57 PM, Alexander Graf wrote: > On 03/07/2012 03:04 PM, Avi Kivity wrote: >> On 03/07/2012 03:27 PM, Alexander Graf wrote: >>>> At the time I made this patch, it seemed that only kvm-x86 supported >>>> huge pages, on ppc the array should be empty: >>> >>> Hrm. I suppose this refers to transparent huge pages? >> Just huge pages. Whether they are static or dynamic is immaterial in >> this context. > > Well, book3s_hv and e500 support hugetlbfs. I've never had to touch > that patches code though - so I guess I'm still not really > understanding what it's there for O_o. > The kvm hugepage code uses large sptes to map large pages, when available (either via hugetlbfs or transparent hugepages). Since x86 supports swapping, and needs to write-protect pages for dirty logging and for shadowing guest pagetables, it needs a reverse map from pages to sptes. The data structure we're discussing is part of the reverse map for large pages. -- error compiling committee.c: too many arguments to function