2 * This file is part of the Palacios Virtual Machine Monitor developed
3 * by the V3VEE Project with funding from the United States National
4 * Science Foundation and the Department of Energy.
6 * The V3VEE Project is a joint project between Northwestern University
7 * and the University of New Mexico. You can find out more at
10 * Copyright (c) 2013, Oscar Mondragon <omondrag@cs.unm.edu>
11 * Copyright (c) 2013, Patrick G. Bridges <bridges@cs.unm.edu>
12 * Copyright (c) 2013, The V3VEE Project <http://www.v3vee.org>
13 * All rights reserved.
15 * Author: Oscar Mondragon <omondrag@cs.unm.edu>
16 * Patrick G. Bridges <bridges@cs.unm.edu>
18 * This is free software. You are permitted to use,
19 * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
22 #ifndef __VMM_CPU_MAPPER_H__
23 #define __VMM_CPU_MAPPER_H__
25 struct vm_cpu_mapper_impl {
29 int (*vm_init)(struct v3_vm_info *vm, unsigned int cpu_mask);
30 int (*vm_deinit)(struct v3_vm_info *vm);
31 int (*admit_core)(struct v3_vm_info * vm, int vcore_id, int target_cpu);
32 int (*admit)(struct v3_vm_info *vm);
33 // should really be departure options...
37 int v3_cpu_mapper_register_vm(struct v3_vm_info *vm, unsigned int cpu_mask);
38 int v3_cpu_mapper_admit_vm(struct v3_vm_info *vm);
39 int v3_cpu_mapper_admit_core(struct v3_vm_info * vm, int vcore_id, int target_cpu);
41 int V3_init_cpu_mapper();
42 int V3_deinit_cpu_mapper();
44 int v3_register_cpu_mapper(struct vm_cpu_mapper_impl *vm);
45 struct vm_cpu_mapper_impl *v3_unregister_cpu_mapper(char *name);
46 struct vm_cpu_mapper_impl *v3_cpu_mapper_lookup(char *name);
48 int V3_enable_cpu_mapper();
49 int V3_disable_cpu_mapper();
51 #endif /* __VMM_cpu_mapper_H__ */