qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 1/6] Use correct types to enable > 2G support


From: Paul Brook
Subject: [Qemu-devel] Re: [PATCH 1/6] Use correct types to enable > 2G support
Date: Thu, 31 Jan 2008 23:54:21 +0000
User-agent: KMail/1.9.7

On Thursday 31 January 2008, Anthony Liguori wrote:
> KVM supports more than 2GB of memory for x86_64 hosts.  The following patch
> fixes a number of type related issues where int's were being used when they
> shouldn't have been.  It also introduces CMOS support so the BIOS can build
> the appropriate e820 tables.

You've still got a fairly random mix of unsigned long, ram_addr_t and 
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.

> +    if (above_4g_mem_size) {
> +        rtc_set_memory(s, 0x5b, (unsigned int)above_4g_mem_size >> 16);
> +        rtc_set_memory(s, 0x5c, (unsigned int)above_4g_mem_size >> 24);
> +        rtc_set_memory(s, 0x5d, above_4g_mem_size >> 32);

This will cause warnings on 32-bit hosts.

> +    if (ram_size >= 0xe0000000 ) {
> +        above_4g_mem_size = ram_size - 0xe0000000;
> +        ram_size = 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]