From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Subject: Re: [PATCH 4/4 v3] KVM: Introduce kvm_memory_slot::arch and move lpage_info into it Date: Wed, 07 Mar 2012 16:28:15 +0100 Message-ID: <4F577E8F.9050103@suse.de> 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> <4F5778DA.60805@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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: Avi Kivity Return-path: Received: from cantor2.suse.de ([195.135.220.15]:45979 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755257Ab2CGP2R (ORCPT ); Wed, 7 Mar 2012 10:28:17 -0500 In-Reply-To: <4F5778DA.60805@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 03/07/2012 04:03 PM, Avi Kivity wrote: > 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. Ah, now that makes more sense. On booke, we don't do rmap yet. On book3s_hv, IIRC Paul did implement something, so I'd like to hear his opinion on it really. Alex