From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JKjEq-0002VM-Ci for qemu-devel@nongnu.org; Thu, 31 Jan 2008 18:54:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JKjEo-0002TK-Iq for qemu-devel@nongnu.org; Thu, 31 Jan 2008 18:54:35 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JKjEo-0002T7-Da for qemu-devel@nongnu.org; Thu, 31 Jan 2008 18:54:34 -0500 Received: from mail.codesourcery.com ([65.74.133.4]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JKjEn-0007ln-T1 for qemu-devel@nongnu.org; Thu, 31 Jan 2008 18:54:34 -0500 From: Paul Brook Date: Thu, 31 Jan 2008 23:54:21 +0000 References: <1201818980-27534-1-git-send-email-aliguori@us.ibm.com> <1201818980-27534-2-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1201818980-27534-2-git-send-email-aliguori@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200801312354.24382.paul@codesourcery.com> Subject: [Qemu-devel] Re: [PATCH 1/6] Use correct types to enable > 2G support Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: kvm-devel@lists.sourceforge.net, qemu-devel@nongnu.org On Thursday 31 January 2008, Anthony Liguori wrote: > KVM supports more than 2GB of memory for x86_64 hosts. The following pat= ch > fixes a number of type related issues where int's were being used when th= ey > shouldn't have been. It also introduces CMOS support so the BIOS can bui= ld > the appropriate e820 tables. You've still got a fairly random mix of unsigned long, ram_addr_t and=20 uint64_t. > -typedef void QEMUMachineInitFunc(int ram_size, int vga_ram_size, > +typedef void QEMUMachineInitFunc(ram_addr_t ram_size, int vga_ram_size, This breaks every target except x86. > + =A0 =A0if (above_4g_mem_size) { > + =A0 =A0 =A0 =A0rtc_set_memory(s, 0x5b, (unsigned int)above_4g_mem_size = >> 16); > + =A0 =A0 =A0 =A0rtc_set_memory(s, 0x5c, (unsigned int)above_4g_mem_size = >> 24); > + =A0 =A0 =A0 =A0rtc_set_memory(s, 0x5d, above_4g_mem_size >> 32); This will cause warnings on 32-bit hosts. > + if (ram_size >=3D 0xe0000000 ) { > + above_4g_mem_size =3D ram_size - 0xe0000000; > + ram_size =3D 0xe0000000; > + } I'm fairly sure this will break the VMware VGA adapter: > pci_vmsvga_init(pci_bus, ds, phys_ram_base + ram_size, > ram_size, vga_ram_size); > +#define PHYS_RAM_MAX_SIZE (2047 * 1024 * 1024 * 1024ULL) This seems fairly arbitrary. Why? Any limit is certainly target specific. Paul