Chuan-kai Lin wrote:
> From: Chuan-kai Lin <[EMAIL PROTECTED]>
>
> This patch is based on the one Anthony Liguori submitted to kvm-devel
> on July 2nd, which fixes PXE booting with KVM enabled but breaks PXE
> booting when not using KVM.  I simplified Anthony's patch and
> duplicated the cpu_register_physical_memory call to ensure that the
> code retains its original behavior when kvm_allowed is 0.
>
> Signed-off-by: Chuan-kai Lin <[EMAIL PROTECTED]>
>
> ---
>
> diff -r 3aba64456000 qemu/hw/pc.c
> --- a/qemu/hw/pc.c    Fri Aug 10 11:33:03 2007 -0700
> +++ b/qemu/hw/pc.c    Fri Aug 10 14:53:28 2007 -0700
> @@ -566,8 +566,15 @@ static void pc_init1(int ram_size, int v
>           fprintf(stderr, "Too many option ROMS\n");
>           exit(1);
>       }
> -     cpu_register_physical_memory(0xd0000 + option_rom_offset,
> -                                  size, offset | IO_MEM_ROM);
> +        if (kvm_allowed) {
> +          memcpy(phys_ram_base + 0xc0000 + offset - bios_offset,
> +                 phys_ram_base + offset, size);
> +          cpu_register_physical_memory(0xd0000 + option_rom_offset,
> +                                       size, (offset - bios_offset) |
> IO_MEM_ROM);
> +        }
> +        else
>   

Should be:

} else

I clearly preferred the way I did it but I don't care that much.  Thanks 
for bringing this patch up again, I've been meaning to resubmit it.

Regards,

Anthony Liguori

> +          cpu_register_physical_memory(0xd0000 + option_rom_offset,
> +                                       size, offset | IO_MEM_ROM);
>       option_rom_offset += size + 2047;
>       option_rom_offset -= (option_rom_offset % 2048);
>      }
>
>   


-------------------------------------------------------------------------
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