From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgDyF-0006Eb-GI for qemu-devel@nongnu.org; Sun, 17 Jun 2012 07:48:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SgDyD-0001Ff-LM for qemu-devel@nongnu.org; Sun, 17 Jun 2012 07:48:43 -0400 Received: from mout.web.de ([212.227.17.11]:51077) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgDyD-0001ET-Ba for qemu-devel@nongnu.org; Sun, 17 Jun 2012 07:48:41 -0400 Message-ID: <4FDDC3C8.5020205@web.de> Date: Sun, 17 Jun 2012 13:47:20 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1339922831-23002-1-git-send-email-avi@redhat.com> <4FDDB981.8070309@web.de> <4FDDBFCD.3000608@redhat.com> In-Reply-To: <4FDDBFCD.3000608@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig94B75CA474E6BB81ECB769A2" 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: Avi Kivity Cc: Marcelo Tosatti , Michael Tokarev , qemu-devel@nongnu.org, kvm@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig94B75CA474E6BB81ECB769A2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2012-06-17 13:30, Avi Kivity wrote: > 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) >>> =20 >>> cpu_interrupt_handler =3D kvm_handle_interrupt; >>> =20 >>> + ram_size =3D TARGET_PAGE_ALIGN(ram_size); >>> + >>> return 0; >>> =20 >>> err: >> >> I think this should rather go into generic code.=20 >=20 > 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. >=20 >> What sense does it make >> to have partial pages with TCG? >=20 > Why impose an artificial restriction? Beca... >=20 > (answer: to reduce differences among various accelerators) >=20 Oh, you found the answer. :) At least, it should be enforce for the x86 target, independent of the accelerator. Jan --------------enig94B75CA474E6BB81ECB769A2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/dw8gACgkQitSsb3rl5xQNugCfYpD7EpjhFv5Szl+CE877Gr/L RTEAnjYRmEdvFPDNALpTmD6hMuo21lih =A9/I -----END PGP SIGNATURE----- --------------enig94B75CA474E6BB81ECB769A2--