[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5] Add optionrom compatible with fw_cfg DMA ver
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v5] Add optionrom compatible with fw_cfg DMA version |
Date: |
Mon, 25 Apr 2016 16:26:01 +0100 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Fri, Apr 22, 2016 at 02:02:28PM +0100, Richard W.M. Jones wrote:
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index 99437e0..e11152d 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -999,8 +999,13 @@ static void load_linux(PCMachineState *pcms,
> fw_cfg_add_i32(fw_cfg, FW_CFG_SETUP_SIZE, setup_size);
> fw_cfg_add_bytes(fw_cfg, FW_CFG_SETUP_DATA, setup, setup_size);
>
> - option_rom[nb_option_roms].name = "linuxboot.bin";
> - option_rom[nb_option_roms].bootindex = 0;
> + if (fw_cfg_dma_enabled(fw_cfg)) {
> + option_rom[nb_option_roms].name = "linuxboot_dma.bin";
> + option_rom[nb_option_roms].bootindex = 0;
> + } else {
> + option_rom[nb_option_roms].name = "linuxboot.bin";
> + option_rom[nb_option_roms].bootindex = 0;
> + }
> nb_option_roms++;
> }
>
Please update xen_load_linux() to avoid assertion failure:
for (i = 0; i < nb_option_roms; i++) {
assert(!strcmp(option_rom[i].name, "linuxboot.bin") ||
!strcmp(option_rom[i].name, "multiboot.bin"));
signature.asc
Description: PGP signature