cleanup warning of kvmctl.c
PATCH 1/1 cleanup warning of kvmctl.c
Hi,
Nice to meet you, all.
I recently got understanding kvm started,
and I found some worning at compiling kvm.
This patch is for cleanup of kvmctl.c.
I tested Booting Linux guest on x86_32.
user/kvmctl.c +5 -5
@@ -313,7 +313,7 @@ int kvm_alloc_kernel_memory(kvm_context_struct kvm_memory_region above_4g_memory = { .slot =4 , .memory_size = memory < pcimem ?0 : memory - pcimem, - .guest_phys_addr =0x100000000 , + .guest_phys_addr =0x100000000ULL , };if (memory >= pcimem)
@@ -372,12 +372,12 @@ int kvm_alloc_userspace_memory(kvm_contestruct kvm_userspace_memory_region above_4g_memory = { .slot =4 , .memory_size = memory < pcimem ?0 : memory - pcimem, - .guest_phys_addr =0x100000000 , + .guest_phys_addr =0x100000000ULL , };if (memory >= pcimem) { extended_memory.memory_size = pcimem - exmem; - *vm_mem =mmap (NULL , memory +0x100000000 - pcimem, + *vm_mem =mmap (NULL , memory +0x100000000ULL - pcimem,PROT_READ |PROT_WRITE ,MAP_ANONYMOUS |MAP_SHARED ,-1 ,0 ); }
@@ -413,13 +413,13 @@ int kvm_alloc_userspace_memory(kvm_conte }if (above_4g_memory.memory_size) { - r =munmap (*vm_mem + pcimem,0x100000000 - pcimem); + r =munmap (*vm_mem + pcimem,0x100000000ULL - pcimem);if (r ==-1 ) {fprintf (stderr,"kvm_alloc_userspace_memory: %s" ,strerror (errno));return -1 ; } - above_4g_memory.userspace_addr = (unsigned long )(*vm_mem +0x100000000 ); + above_4g_memory.userspace_addr = (unsigned long )(*vm_mem +0x100000000ULL ); r =ioctl (kvm->vm_fd,KVM_SET_USER_MEMORY_REGION , &above_4g_memory);if (r ==-1 ) {fprintf (stderr,"kvm_create_memory_region: %m\n" );
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
A message that is not in the archive (sent off-list or not yet received): 7EC8123BBADDD6takebe_akio-+CUm20s59erQFUHtdCDX3A@public.gmane.org
Avi Kivity
AppliedQuoted 4 lines · Akio Takebe
Hi,
Nice to meet you, all.
Hello and welcome :)
Quoted 7 lines
I recently got understanding kvm started,
and I found some worning at compiling kvm.This patch is for cleanup of
kvmctl.c.
I tested Booting Linux guest onx86_32.
Thanks, applied.
Signature · 8 lines
error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/