2 * This file is part of the Palacios Virtual Machine Monitor developed
\r
3 * by the V3VEE Project with funding from the United States National
\r
4 * Science Foundation and the Department of Energy.
\r
6 * The V3VEE Project is a joint project between Northwestern University
\r
7 * and the University of New Mexico. You can find out more at
\r
8 * http://www.v3vee.org
\r
10 * Copyright (c) 2013, Oscar Mondragon <omondrag@cs.unm.edu>
\r
11 * Copyright (c) 2013, Patrick G. Bridges <bridges@cs.unm.edu>
\r
12 * Copyright (c) 2013, The V3VEE Project <http://www.v3vee.org>
\r
13 * All rights reserved.
\r
15 * Author: Oscar Mondragon <omondrag@cs.unm.edu>
\r
16 * Patrick G. Bridges <bridges@cs.unm.edu>
\r
18 * This is free software. You are permitted to use,
\r
19 * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
\r
22 #ifndef __VMM_SCHEDULER_H__
\r
23 #define __VMM_SCHEDULER_H__
\r
25 struct vm_scheduler_impl {
\r
29 int (*vm_init)(struct v3_vm_info *vm);
\r
30 int (*vm_deinit)(struct v3_vm_info *vm);
\r
31 int (*core_init)(struct guest_info *vm);
\r
32 int (*core_deinit)(struct guest_info *vm);
\r
33 void (*schedule)(struct guest_info *vm);
\r
34 void (*yield)(struct guest_info *vm, int usec);
\r
35 int (*admit)(struct v3_vm_info *vm);
\r
36 int (*remap)(struct v3_vm_info *vm);
\r
37 int (*dvfs)(struct v3_vm_info *vm);
\r
40 //struct vm_sched_state {
\r
41 // struct vm_scheduler *sched;
\r
45 //struct vm_core_sched_state {
\r
46 // struct vm_scheduler *sched;
\r
50 void v3_schedule(struct guest_info *core);
\r
51 void v3_yield(struct guest_info *core, int usec);
\r
53 int v3_scheduler_register_vm(struct v3_vm_info *vm);
\r
54 int v3_scheduler_register_core(struct guest_info *vm); /* ? */
\r
55 int v3_scheduler_admit_vm(struct v3_vm_info *vm);
\r
57 void v3_scheduler_remap_notify(struct v3_vm_info *vm);
\r
58 void v3_scheduler_dvfs_notify(struct v3_vm_info *vm);
\r
60 int V3_init_scheduling();
\r
61 int v3_register_scheduler(struct vm_scheduler_impl *vm);
\r
62 struct vm_scheduler_impl *v3_scheduler_lookup(char *name);
\r
63 int V3_enable_scheduler();
\r
65 #endif /* __VMM_SCHEDULER_H__ */
\r