mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
QEMU e820 reservation patch
Hi, Kevin and I have agreed on the approach for this one now. So here is the latest version of the patch for QEMU, submitting e820 reservation entries via fw_cfg. Cheers, Jes Use qemu-cfg to provide the BIOS with an optional table of e820 entries. Notify the BIOS of the location of the TSS+EPT range to by reserving it via the e820 table. This matches a corresponding patch for Seabios, however older versions of Seabios will default to the hardcoded address range and stay compatible with current QEMU. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
ed487bb1d6
commit
4c5b10b7b6
3 changed files with 53 additions and 0 deletions
|
@ -24,6 +24,7 @@
|
|||
#include "cpu.h"
|
||||
#include "gdbstub.h"
|
||||
#include "host-utils.h"
|
||||
#include "hw/pc.h"
|
||||
|
||||
#ifdef CONFIG_KVM_PARA
|
||||
#include <linux/kvm_para.h>
|
||||
|
@ -362,6 +363,13 @@ int kvm_arch_init(KVMState *s, int smp_cpus)
|
|||
* as unavaible memory. FIXME, need to ensure the e820 map deals with
|
||||
* this?
|
||||
*/
|
||||
/*
|
||||
* Tell fw_cfg to notify the BIOS to reserve the range.
|
||||
*/
|
||||
if (e820_add_entry(0xfffbc000, 0x4000, E820_RESERVED) < 0) {
|
||||
perror("e820_add_entry() table is full");
|
||||
exit(1);
|
||||
}
|
||||
return kvm_vm_ioctl(s, KVM_SET_TSS_ADDR, 0xfffbd000);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue