public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH] Fix network boot while KVM is enabled
Date: Mon, 02 Jul 2007 23:32:39 -0500	[thread overview]
Message-ID: <4689D167.4020800@us.ibm.com> (raw)
In-Reply-To: <4689D0A1.5020400-atKUWr5tajBWk0Htik3J/w@public.gmane.org>

Avi Kivity wrote:
> Anthony Liguori wrote:
>> While QEMU can remap portions of physical ram to a higher address in
>> phys_ram_base, KVM requires that the memory be present where it would 
>> be in
>> physical memory.  Make sure to copy the option ROMs to the right 
>> space in
>> physical memory when KVM is enabled.
>>
>> Signed-off-by: Anthony Liguori <aliguori-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
>>
>> diff --git a/qemu/hw/pc.c b/qemu/hw/pc.c
>> index eda49cf..a6e4ea1 100644
>> --- a/qemu/hw/pc.c
>> +++ b/qemu/hw/pc.c
>> @@ -558,14 +558,20 @@ static void pc_init1(int ram_size, int 
>> vga_ram_size, int boot_device,
>>           option_rom_offset = 0;
>>      for (i = 0; i < nb_option_roms; i++) {
>> -    int offset = bios_offset + bios_size + option_rom_offset;
>> +    int offset = bios_size + option_rom_offset;
>>      int size;
>>  
>> -    size = load_image(option_rom[i], phys_ram_base + offset);
>> +    size = load_image(option_rom[i], phys_ram_base + bios_offset + 
>> offset);
>>      if ((size + option_rom_offset) > 0x10000) {
>>          fprintf(stderr, "Too many option ROMS\n");
>>          exit(1);
>>      }
>> +
>> +    if (kvm_allowed)
>> +        memcpy(phys_ram_base + 0xc0000 + offset,
>> +           phys_ram_base + bios_offset + offset,
>> +           size);
>> +
>>      cpu_register_physical_memory(0xd0000 + option_rom_offset,
>>                       size, offset | IO_MEM_ROM);
>>   
>
> #ifdef USE_KVM is needed here.

I thought a patch was recently submitted that made kvm_allowed not 
depend on USE_KVM?  If not, do you have a problem with one?

Regards,

Anthony Liguori



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

  parent reply	other threads:[~2007-07-03  4:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-03  1:39 [PATCH] Fix network boot while KVM is enabled Anthony Liguori
     [not found] ` <11834267632309-git-send-email-aliguori-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2007-07-03  4:29   ` Avi Kivity
     [not found]     ` <4689D0A1.5020400-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-03  4:32       ` Anthony Liguori [this message]
     [not found]         ` <4689D167.4020800-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2007-07-03  4:36           ` Avi Kivity
  -- strict thread matches above, loose matches on Subject: below --
2007-07-03 11:01 Gregory Haskins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4689D167.4020800@us.ibm.com \
    --to=aliguori-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
    --cc=avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox