From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgDgo-0004Vx-GF for qemu-devel@nongnu.org; Sun, 17 Jun 2012 07:30:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SgDgm-0005fk-4d for qemu-devel@nongnu.org; Sun, 17 Jun 2012 07:30:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55072) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgDgl-0005fg-T5 for qemu-devel@nongnu.org; Sun, 17 Jun 2012 07:30:40 -0400 Message-ID: <4FDDBFCD.3000608@redhat.com> Date: Sun, 17 Jun 2012 14:30:21 +0300 From: Avi Kivity MIME-Version: 1.0 References: <1339922831-23002-1-git-send-email-avi@redhat.com> <4FDDB981.8070309@web.de> In-Reply-To: <4FDDB981.8070309@web.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] kvm: align ram_size to page boundary List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Marcelo Tosatti , Michael Tokarev , qemu-devel@nongnu.org, kvm@vger.kernel.org On 06/17/2012 02:03 PM, Jan Kiszka wrote: > On 2012-06-17 10:47, Avi Kivity wrote: >> kvm is not able to execute out of partial pages; align the RAM size >> so partial pages aren't present. >> >> Reported-by: Michael Tokarev >> Signed-off-by: Avi Kivity >> --- >> kvm-all.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/kvm-all.c b/kvm-all.c >> index 4ea7d85..482768f 100644 >> --- a/kvm-all.c >> +++ b/kvm-all.c >> @@ -1311,6 +1311,8 @@ int kvm_init(void) >> >> cpu_interrupt_handler = kvm_handle_interrupt; >> >> + ram_size = TARGET_PAGE_ALIGN(ram_size); >> + >> return 0; >> >> err: > > I think this should rather go into generic code. To be honest, I put this in kvm-specific code because vl.c doesn't have TARGET_PAGE_ALIGN. Maybe we should have machine->page_size or machine->ram_alignment. > What sense does it make > to have partial pages with TCG? Why impose an artificial restriction? (answer: to reduce differences among various accelerators) -- error compiling committee.c: too many arguments to function