dm: remove set vm memory by cma

Signed-off-by: Li, Fei1 <fei1.li@intel.com>
Acked-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
This commit is contained in:
Li, Fei1
2018-06-29 11:01:17 +08:00
committed by lijinxia
parent 652e37e908
commit 6f097b1633
4 changed files with 4 additions and 124 deletions

View File

@@ -90,6 +90,7 @@
/* Guest memory management */
#define IC_ID_MEM_BASE 0x40UL
/* IC_ALLOC_MEMSEG not used */
#define IC_ALLOC_MEMSEG _IC_ID(IC_ID, IC_ID_MEM_BASE + 0x00)
#define IC_SET_MEMSEG _IC_ID(IC_ID, IC_ID_MEM_BASE + 0x01)
@@ -105,17 +106,6 @@
#define IC_ID_PM_BASE 0x60UL
#define IC_PM_GET_CPU_STATE _IC_ID(IC_ID, IC_ID_PM_BASE + 0x00)
/**
* struct vm_memseg - memory segment info for guest
*
* @len: length of memory segment
* @gpa: guest physical start address of memory segment
*/
struct vm_memseg {
uint64_t len;
uint64_t gpa;
};
#define VM_MEMMAP_SYSMEM 0
#define VM_MMIO 1

View File

@@ -53,8 +53,6 @@ struct vmctx {
int memflags;
size_t lowmem;
size_t highmem;
char *mmap_lowmem;
char *mmap_highmem;
char *baseaddr;
char *name;
uuid_t vm_uuid;
@@ -65,16 +63,6 @@ struct vmctx {
void *ioc_dev;
};
/*
* Different styles of mapping the memory assigned to a VM into the address
* space of the controlling process.
*/
enum vm_mmap_style {
VM_MMAP_NONE, /* no mapping */
VM_MMAP_ALL, /* fully and statically mapped */
VM_MMAP_SPARSE, /* mappings created on-demand */
};
/*
* 'flags' value passed to 'vm_set_memflags()'.
*/
@@ -122,7 +110,7 @@ void vm_destroy(struct vmctx *ctx);
int vm_parse_memsize(const char *optarg, size_t *memsize);
int vm_map_memseg_vma(struct vmctx *ctx, size_t len, vm_paddr_t gpa,
uint64_t vma, int prot);
int vm_setup_memory(struct vmctx *ctx, size_t len, enum vm_mmap_style s);
int vm_setup_memory(struct vmctx *ctx, size_t len);
void vm_unsetup_memory(struct vmctx *ctx);
bool check_hugetlb_support(void);
int hugetlb_setup_memory(struct vmctx *ctx);