diff options
author | Peter Maydell | 2014-08-04 12:17:24 +0200 |
---|---|---|
committer | Peter Maydell | 2014-08-04 12:17:24 +0200 |
commit | 7b13ff3f156b98c3183dfa30edfd6473e8660374 (patch) | |
tree | b5ff0ee807688f810025a540129de130c61f2d81 /hw/i386/pc.c | |
parent | Open 2.2 development tree (diff) | |
parent | qemu: support xen hvm direct kernel boot (diff) | |
download | qemu-7b13ff3f156b98c3183dfa30edfd6473e8660374.tar.gz qemu-7b13ff3f156b98c3183dfa30edfd6473e8660374.tar.xz qemu-7b13ff3f156b98c3183dfa30edfd6473e8660374.zip |
Merge remote-tracking branch 'remotes/sstabellini/xen-20140801' into staging
* remotes/sstabellini/xen-20140801:
qemu: support xen hvm direct kernel boot
tap-bsd: implement a FreeBSD only version of tap_open
xen: fix usage of ENODATA
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/i386/pc.c')
-rw-r--r-- | hw/i386/pc.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 2cf22b1293..9e589825f0 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1190,6 +1190,31 @@ void pc_acpi_init(const char *default_dsdt) } } +FWCfgState *xen_load_linux(const char *kernel_filename, + const char *kernel_cmdline, + const char *initrd_filename, + ram_addr_t below_4g_mem_size, + PcGuestInfo *guest_info) +{ + int i; + FWCfgState *fw_cfg; + + assert(kernel_filename != NULL); + + fw_cfg = fw_cfg_init(BIOS_CFG_IOPORT, BIOS_CFG_IOPORT + 1, 0, 0); + rom_set_fw(fw_cfg); + + load_linux(fw_cfg, kernel_filename, initrd_filename, + kernel_cmdline, below_4g_mem_size); + for (i = 0; i < nb_option_roms; i++) { + assert(!strcmp(option_rom[i].name, "linuxboot.bin") || + !strcmp(option_rom[i].name, "multiboot.bin")); + rom_add_option(option_rom[i].name, option_rom[i].bootindex); + } + guest_info->fw_cfg = fw_cfg; + return fw_cfg; +} + FWCfgState *pc_memory_init(MachineState *machine, MemoryRegion *system_memory, ram_addr_t below_4g_mem_size, |