From: Paul Mackerras Date: Thu, 07 Nov 2013 11:07:15 +0000 Subject: Re: [PATCH] KVM: PPC: Book3S HV: Fix physical address calculation Message-Id: <20131107110715.GA21791@iris.ozlabs.ibm.com> List-Id: References: <20131106221138.GA27956@iris.ozlabs.ibm.com> In-Reply-To: <20131106221138.GA27956@iris.ozlabs.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org On Thu, Nov 07, 2013 at 09:11:38AM +1100, Paul Mackerras wrote: > This fixes a bug in kvmppc_do_h_enter() where the physical address > for a page can be calculated incorrectly if transparent huge pages > (THP) are active. Until THP came along, it was true that if we > encountered a large (16M) page in kvmppc_do_h_enter(), then the > associated memslot must be 16M aligned for both its guest physical > address and the userspace address, and the physical address > calculations in kvmppc_do_h_enter() assumed that. With THP, that > is no longer true. BTW, it looks like kvmppc_book3s_hv_page_fault() has a similar bug. I'll do a v2 of the patch to fix both, since it's essentially the same problem in both places. Paul.