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

2008-02-05 Thread Ian Jackson
Fabrice Bellard writes ([Qemu-devel] Re: [PATCH 1/6] Use correct types to enable 2G support): Paul Brook wrote: If we ever implement 2G ram on a 32-bit host this may need some rethinking. We can deal with that if/when it happens though. Requiring a 64-bit host for large quantities

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

2008-02-01 Thread Fabrice Bellard
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. [...] +

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

2008-02-01 Thread Anthony Liguori
Fabrice Bellard wrote: Anthony Liguori wrote: +/* above 4giga memory allocation */ +if (above_4g_mem_size 0) { +ram_addr = qemu_ram_alloc(above_4g_mem_size); +cpu_register_physical_memory(0x1, above_4g_mem_size, ram_addr); +} + Why do you need this ? All

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

2008-02-01 Thread Paul Brook
I agree with the fact that ram_size should be 64 bit. Maybe each machine could test the value and emit an error message if it is too big. Maybe an uint64_t would be better though. uint64_t is probably more reasonable. I wouldn't begin to know what the appropriate amount of ram was for

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

2008-02-01 Thread M. Warner Losh
In message: [EMAIL PROTECTED] Robert William Fuller [EMAIL PROTECTED] writes: : Avi Kivity wrote: : Anthony Liguori wrote: : Fabrice Bellard wrote: : Anthony Liguori wrote: : +/* above 4giga memory allocation */ : +if (above_4g_mem_size 0) { : +ram_addr =

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

2008-02-01 Thread Robert William Fuller
Avi Kivity wrote: Anthony Liguori wrote: Fabrice Bellard wrote: Anthony Liguori wrote: +/* above 4giga memory allocation */ +if (above_4g_mem_size 0) { +ram_addr = qemu_ram_alloc(above_4g_mem_size); +cpu_register_physical_memory(0x1, above_4g_mem_size,

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

2008-02-01 Thread Fabrice Bellard
Paul Brook wrote: I agree with the fact that ram_size should be 64 bit. Maybe each machine could test the value and emit an error message if it is too big. Maybe an uint64_t would be better though. uint64_t is probably more reasonable. I wouldn't begin to know what the appropriate amount of

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

2008-02-01 Thread Philip Boulain
On 1 Feb 2008, at 16:09, M. Warner Losh wrote: In message: [EMAIL PROTECTED] Robert William Fuller [EMAIL PROTECTED] writes: : Avi Kivity wrote: : Anthony Liguori wrote: : I think I'll change this too into a single qemu_ram_alloc. That will : fix the bug with KVM when using

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

2008-02-01 Thread Anthony Liguori
Ian Jackson wrote: Anthony Liguori writes ([Qemu-devel] Re: [kvm-devel] [PATCH 1/6] Use correct types to enable 2G support): The alternative is to change all the places that assume phys_ram_base + PA which I don't like very much. We would ideally like to do this for Xen, at least in

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

2008-02-01 Thread Daniel P. Berrange
On Fri, Feb 01, 2008 at 11:53:02AM -0600, Anthony Liguori wrote: Ian Jackson wrote: Anthony Liguori writes ([Qemu-devel] Re: [kvm-devel] [PATCH 1/6] Use correct types to enable 2G support): The alternative is to change all the places that assume phys_ram_base + PA which I don't

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

2008-02-01 Thread Anthony Liguori
Daniel P. Berrange wrote: On Fri, Feb 01, 2008 at 11:53:02AM -0600, Anthony Liguori wrote: Ian Jackson wrote: Anthony Liguori writes ([Qemu-devel] Re: [kvm-devel] [PATCH 1/6] Use correct types to enable 2G support): The alternative is to change all the places that assume

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

2008-02-01 Thread Paul Brook
virtio could still be made to work with map cache. You would just have to change it to be able to map more than one page contiguously. As I mentioned though, it just starts getting ugly. That's why you should be using the cpu_physical_memory_rw routines :-) Anything that assume large linear

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

2008-01-31 Thread Paul Brook
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

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

2008-01-31 Thread Anthony Liguori
Paul Brook wrote: 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

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

2008-01-31 Thread Paul Brook
+#define PHYS_RAM_MAX_SIZE (2047 * 1024 * 1024 * 1024ULL) This seems fairly arbitrary. Why? Any limit is certainly target specific. On a 32-bit host, a 2GB limit is pretty reasonable since you're limited in virtual address space. On a 64-bit host, there isn't this fundamental limit. If

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

2008-01-31 Thread Anthony Liguori
Paul Brook wrote: +#define PHYS_RAM_MAX_SIZE (2047 * 1024 * 1024 * 1024ULL) This seems fairly arbitrary. Why? Any limit is certainly target specific. On a 32-bit host, a 2GB limit is pretty reasonable since you're limited in virtual address space. On a 64-bit host, there isn't