From patchwork Sun Jun 17 08:47:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 165330 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6935DB7119 for ; Sun, 17 Jun 2012 18:47:31 +1000 (EST) Received: from localhost ([::1]:49856 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgB8r-0004oF-3x for incoming@patchwork.ozlabs.org; Sun, 17 Jun 2012 04:47:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgB8j-0004ny-FZ for qemu-devel@nongnu.org; Sun, 17 Jun 2012 04:47:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SgB8h-0006pX-Ov for qemu-devel@nongnu.org; Sun, 17 Jun 2012 04:47:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31217) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgB8h-0006pT-Gl for qemu-devel@nongnu.org; Sun, 17 Jun 2012 04:47:19 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q5H8lHnr031685 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 17 Jun 2012 04:47:17 -0400 Received: from s01.tlv.redhat.com (s01.tlv.redhat.com [10.35.255.8]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q5H8lDI2010268; Sun, 17 Jun 2012 04:47:14 -0400 From: Avi Kivity To: Marcelo Tosatti Date: Sun, 17 Jun 2012 11:47:11 +0300 Message-Id: <1339922831-23002-1-git-send-email-avi@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Michael Tokarev , qemu-devel@nongnu.org, kvm@vger.kernel.org Subject: [Qemu-devel] [PATCH] kvm: align ram_size to page boundary X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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: