Glauber de Oliveira Costa wrote:
> This patch removes duplicate code at vl.c. Once the KVM-only
> part defines how much physicall memory it wants, the rest should
> be the same for everybody.
>
> Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]>
> ---
>  qemu/vl.c |   23 +++++++++--------------
>  1 files changed, 9 insertions(+), 14 deletions(-)
>
> diff --git a/qemu/vl.c b/qemu/vl.c
> index fe49d2c..4f8cf51 100644
> --- a/qemu/vl.c
> +++ b/qemu/vl.c
> @@ -8657,20 +8657,15 @@ int main(int argc, char **argv)
>                   fprintf(stderr, "Could not create KVM context\n");
>                   exit(1);
>           }
> -    } else {
> -         phys_ram_base = qemu_vmalloc(phys_ram_size);
> -         if (!phys_ram_base) {
> -                 fprintf(stderr, "Could not allocate physical memory\n");
> -                 exit(1);
> -         }
> -    }
> -#else
> -    phys_ram_base = qemu_vmalloc(phys_ram_size);
> -    if (!phys_ram_base) {
> -        fprintf(stderr, "Could not allocate physical memory\n");
> -        exit(1);
> -    }
> +    } else
>  #endif
> +    {
> +      phys_ram_base = qemu_vmalloc(phys_ram_size);
> +      if (!phys_ram_base) {
> +          fprintf(stderr, "Could not allocate physical memory\n");
> +          exit(1);
> +      }
> +    }
>  
>      /* we always create the cdrom drive, even if no disk is there */
>      bdrv_init();
>   

This touches original qemu lines, which is likely to cause me pain on 
the next merge.  Maybe a goto after the kvm allocation code can remove 
the need to touch that code.

In any case this code is being worked on to be much more similar to 
regular qemu.

-- 
Any sufficiently difficult bug is indistinguishable from a feature.


-------------------------------------------------------------------------
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/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to