aboutsummaryrefslogtreecommitdiff
path: root/xen/include/xeno/dom0_ops.h
blob: ea3f829d731e5081899e51cde07a5f600ee53a38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/******************************************************************************
 * dom0_ops.h
 * 
 * Process command requests from domain-0 guest OS.
 * 
 * Copyright (c) 2002, K A Fraser, B Dragovic
 * 
 * MUST BE KEPT IN SYNC WITH xenolinux<*>/arch/xeno/drivers/dom0/dom0_ops.h
 */


#ifndef __DOM0_OPS_H__
#define __DOM0_OPS_H__

#define DOM0_NEWDOMAIN   0
#define DOM0_KILLDOMAIN  1
#define DOM0_GETMEMLIST  2
#define DOM0_STARTDOM    4
#define DOM0_BVTCTL      6
#define DOM0_ADJUSTDOM   7

#define MAX_CMD_LEN    256

typedef struct dom0_newdomain_st 
{
    unsigned int domain;    // return parameter
    unsigned int memory_kb; 
    unsigned int num_vifs;  // temporary
    unsigned long pg_head;  // return parameter
} dom0_newdomain_t;

typedef struct dom0_killdomain_st
{
    unsigned int domain;
    int          force;
} dom0_killdomain_t;

typedef struct dom0_getmemlist_st
{
    unsigned long start_pfn;
    unsigned long num_pfns;
    void *buffer;
} dom0_getmemlist_t;

typedef struct domain_launch
{
    unsigned int domain;
    unsigned long l2_pgt_addr;
    unsigned long virt_load_addr;
    unsigned long virt_shinfo_addr;
    unsigned long virt_startinfo_addr;
    unsigned int num_vifs;
    char cmd_line[MAX_CMD_LEN];
    unsigned long virt_mod_addr;
    unsigned long virt_mod_len;
} dom_meminfo_t;

typedef struct dom0_bvtctl_st
{
	unsigned long ctx_allow;	/* context switch allowance */
} dom0_bvtctl_t;

typedef struct dom0_adjustdom_st
{
    unsigned int  domain;	/* domain id */
	unsigned long mcu_adv;	/* mcu advance: inverse of weight */
	unsigned long warp;     /* time warp */
	unsigned long warpl;    /* warp limit */
	unsigned long warpu;    /* unwarp time requirement */
} dom0_adjustdom_t;

typedef struct dom0_op_st
{
    unsigned long cmd;
    union
    {
        dom0_newdomain_t newdomain;
        dom0_killdomain_t killdomain;
        dom0_getmemlist_t getmemlist;
		dom0_bvtctl_t bvtctl;
		dom0_adjustdom_t adjustdom;
        dom_meminfo_t meminfo;
    }
    u;
} dom0_op_t;

#endif