kvmtool: pull x86 system header e820 definitions into kvm/e820.h

The x86 BIOS code included some definitions for the E820 table from
the Linux system headers, but those could not be found on x86_64
multiarch systems without the compat headers installed.
Pull the required definitions into the kvmtool source directory,
removing the reference to <asm/e820.h>.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
This commit is contained in:
Andre Przywara
2015-06-01 15:51:09 +01:00
committed by Will Deacon
parent f23171ca13
commit f323796502
4 changed files with 29 additions and 15 deletions
-13
View File
@@ -1,13 +0,0 @@
#ifndef KVM_E820_H
#define KVM_E820_H
#include <linux/types.h>
#include <kvm/bios.h>
#define SMAP 0x534d4150 /* ASCII "SMAP" */
struct biosregs;
extern bioscall void e820_query_map(struct biosregs *regs);
#endif /* KVM_E820_H */
-1
View File
@@ -5,7 +5,6 @@
#include "kvm/util.h"
#include <string.h>
#include <asm/e820.h>
#include "bios/bios-rom.h"
-1
View File
@@ -4,7 +4,6 @@
#include "kvm/bios.h"
#include <asm/processor-flags.h>
#include <asm/e820.h>
static inline void set_fs(u16 seg)
{
+29
View File
@@ -0,0 +1,29 @@
#ifndef KVM_E820_H
#define KVM_E820_H
#include <kvm/bios.h>
#define SMAP 0x534d4150 /* ASCII "SMAP" */
#define E820MAX 128 /* number of entries in E820MAP */
#define E820_X_MAX E820MAX
#define E820_RAM 1
#define E820_RESERVED 2
struct e820entry {
u64 addr; /* start of memory segment */
u64 size; /* size of memory segment */
u32 type; /* type of memory segment */
} __attribute__((packed));
struct e820map {
u32 nr_map;
struct e820entry map[E820_X_MAX];
};
struct biosregs;
extern bioscall void e820_query_map(struct biosregs *regs);
#endif /* KVM_E820_H */