===================================================================
@@ -45,6 +45,7 @@
#include "loader.h"
#include "elf.h"
#include "multiboot.h"
+#include "kvm.h"
/* output Bochs bios info messages */
//#define DEBUG_BIOS
@@ -59,6 +60,7 @@
#define FW_CFG_ACPI_TABLES (FW_CFG_ARCH_LOCAL + 0)
#define FW_CFG_SMBIOS_ENTRIES (FW_CFG_ARCH_LOCAL + 1)
#define FW_CFG_IRQ0_OVERRIDE (FW_CFG_ARCH_LOCAL + 2)
+#define FW_CFG_E820_RESERVE (FW_CFG_ARCH_LOCAL + 3)
#define MAX_IDE_BUS 2
@@ -66,6 +68,7 @@ static fdctrl_t *floppy_controller;
static RTCState *rtc_state;
static PITState *pit;
static PCII440FXState *i440fx_state;
+struct fw_cfg_e820_reserve e820_reserve;
typedef struct isa_irq_state {
qemu_irq *i8259;
@@ -466,6 +469,8 @@ static void *bochs_bios_init(void)
if (smbios_table)
fw_cfg_add_bytes(fw_cfg, FW_CFG_SMBIOS_ENTRIES,
smbios_table, smbios_len);
+ fw_cfg_add_bytes(fw_cfg, FW_CFG_E820_RESERVE, (uint8_t *)&e820_reserve,
+ sizeof(struct fw_cfg_e820_reserve));
/* allocate memory for the NUMA channel: one (64bit) word for the number
* of nodes, one word for each VCPU->node and one word for each node to
===================================================================
@@ -96,6 +96,13 @@ void kvm_arch_reset_vcpu(CPUState *env);
struct kvm_guest_debug;
struct kvm_debug_exit_arch;
+struct fw_cfg_e820_reserve {
+ uint32_t addr;
+ uint32_t length;
+};
+
+extern struct fw_cfg_e820_reserve e820_reserve;
+
struct kvm_sw_breakpoint {
target_ulong pc;
target_ulong saved_insn;
===================================================================
@@ -356,6 +356,11 @@ int kvm_arch_init(KVMState *s, int smp_c
* as unavaible memory. FIXME, need to ensure the e820 map deals with
* this?
*/
+ /*
+ * Tell fw_cfg to notify the BIOS to reserve the range.
+ */
+ e820_reserve.addr = 0xfffbc000;
+ e820_reserve.length = 0x4000;
return kvm_vm_ioctl(s, KVM_SET_TSS_ADDR, 0xfffbd000);
}