xref: /titanic_50/usr/src/uts/common/xen/public/hvm/params.h (revision ad09f8b827db90c9a0093f0b6382803fa64a5fd1)
1843e1988Sjohnlev /*
2843e1988Sjohnlev  * Permission is hereby granted, free of charge, to any person obtaining a copy
3843e1988Sjohnlev  * of this software and associated documentation files (the "Software"), to
4843e1988Sjohnlev  * deal in the Software without restriction, including without limitation the
5843e1988Sjohnlev  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
6843e1988Sjohnlev  * sell copies of the Software, and to permit persons to whom the Software is
7843e1988Sjohnlev  * furnished to do so, subject to the following conditions:
8843e1988Sjohnlev  *
9843e1988Sjohnlev  * The above copyright notice and this permission notice shall be included in
10843e1988Sjohnlev  * all copies or substantial portions of the Software.
11843e1988Sjohnlev  *
12843e1988Sjohnlev  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13843e1988Sjohnlev  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14843e1988Sjohnlev  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15843e1988Sjohnlev  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16843e1988Sjohnlev  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
17843e1988Sjohnlev  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
18843e1988Sjohnlev  * DEALINGS IN THE SOFTWARE.
19843e1988Sjohnlev  */
20843e1988Sjohnlev 
21843e1988Sjohnlev #ifndef __XEN_PUBLIC_HVM_PARAMS_H__
22843e1988Sjohnlev #define __XEN_PUBLIC_HVM_PARAMS_H__
23843e1988Sjohnlev 
24843e1988Sjohnlev #include "hvm_op.h"
25843e1988Sjohnlev 
26a576ab5bSrab /*
27a576ab5bSrab  * Parameter space for HVMOP_{set,get}_param.
28a576ab5bSrab  */
29a576ab5bSrab 
30a576ab5bSrab /*
31a576ab5bSrab  * How should CPU0 event-channel notifications be delivered?
32a576ab5bSrab  * val[63:56] == 0: val[55:0] is a delivery GSI (Global System Interrupt).
33a576ab5bSrab  * val[63:56] == 1: val[55:0] is a delivery PCI INTx line, as follows:
34a576ab5bSrab  *                  Domain = val[47:32], Bus  = val[31:16],
35a576ab5bSrab  *                  DevFn  = val[15: 8], IntX = val[ 1: 0]
36a576ab5bSrab  * If val == 0 then CPU0 event-channel notifications are not delivered.
37a576ab5bSrab  */
38843e1988Sjohnlev #define HVM_PARAM_CALLBACK_IRQ 0
39a576ab5bSrab 
40a576ab5bSrab /*
41a576ab5bSrab  * These are not used by Xen. They are here for convenience of HVM-guest
42a576ab5bSrab  * xenbus implementations.
43a576ab5bSrab  */
44843e1988Sjohnlev #define HVM_PARAM_STORE_PFN    1
45843e1988Sjohnlev #define HVM_PARAM_STORE_EVTCHN 2
46a576ab5bSrab 
47843e1988Sjohnlev #define HVM_PARAM_PAE_ENABLED  4
48a576ab5bSrab 
49843e1988Sjohnlev #define HVM_PARAM_IOREQ_PFN    5
50a576ab5bSrab 
51843e1988Sjohnlev #define HVM_PARAM_BUFIOREQ_PFN 6
52a576ab5bSrab 
53a576ab5bSrab #ifdef __ia64__
54349b53ddSStuart Maybee 
55a576ab5bSrab #define HVM_PARAM_NVRAM_FD     7
56349b53ddSStuart Maybee #define HVM_PARAM_VHPT_SIZE    8
57349b53ddSStuart Maybee #define HVM_PARAM_BUFPIOREQ_PFN	9
58349b53ddSStuart Maybee 
59349b53ddSStuart Maybee #elif defined(__i386__) || defined(__x86_64__)
60349b53ddSStuart Maybee 
61349b53ddSStuart Maybee /* Expose Viridian interfaces to this HVM guest? */
62349b53ddSStuart Maybee #define HVM_PARAM_VIRIDIAN     9
63349b53ddSStuart Maybee 
64a576ab5bSrab #endif
65843e1988Sjohnlev 
66349b53ddSStuart Maybee /*
67349b53ddSStuart Maybee  * Set mode for virtual timers (currently x86 only):
68349b53ddSStuart Maybee  *  delay_for_missed_ticks (default):
69349b53ddSStuart Maybee  *   Do not advance a vcpu's time beyond the correct delivery time for
70349b53ddSStuart Maybee  *   interrupts that have been missed due to preemption. Deliver missed
71349b53ddSStuart Maybee  *   interrupts when the vcpu is rescheduled and advance the vcpu's virtual
72349b53ddSStuart Maybee  *   time stepwise for each one.
73349b53ddSStuart Maybee  *  no_delay_for_missed_ticks:
74349b53ddSStuart Maybee  *   As above, missed interrupts are delivered, but guest time always tracks
75349b53ddSStuart Maybee  *   wallclock (i.e., real) time while doing so.
76349b53ddSStuart Maybee  *  no_missed_ticks_pending:
77349b53ddSStuart Maybee  *   No missed interrupts are held pending. Instead, to ensure ticks are
78349b53ddSStuart Maybee  *   delivered at some non-zero rate, if we detect missed ticks then the
79349b53ddSStuart Maybee  *   internal tick alarm is not disabled if the VCPU is preempted during the
80349b53ddSStuart Maybee  *   next tick period.
81349b53ddSStuart Maybee  *  one_missed_tick_pending:
82349b53ddSStuart Maybee  *   Missed interrupts are collapsed together and delivered as one 'late tick'.
83349b53ddSStuart Maybee  *   Guest time always tracks wallclock (i.e., real) time.
84349b53ddSStuart Maybee  */
85349b53ddSStuart Maybee #define HVM_PARAM_TIMER_MODE   10
86349b53ddSStuart Maybee #define HVMPTM_delay_for_missed_ticks    0
87349b53ddSStuart Maybee #define HVMPTM_no_delay_for_missed_ticks 1
88349b53ddSStuart Maybee #define HVMPTM_no_missed_ticks_pending   2
89349b53ddSStuart Maybee #define HVMPTM_one_missed_tick_pending   3
90349b53ddSStuart Maybee 
91349b53ddSStuart Maybee /* Boolean: Enable virtual HPET (high-precision event timer)? (x86-only) */
92349b53ddSStuart Maybee #define HVM_PARAM_HPET_ENABLED 11
93349b53ddSStuart Maybee 
94349b53ddSStuart Maybee /* Identity-map page directory used by Intel EPT when CR0.PG=0. */
95349b53ddSStuart Maybee #define HVM_PARAM_IDENT_PT     12
96349b53ddSStuart Maybee 
97349b53ddSStuart Maybee /* Device Model domain, defaults to 0. */
98349b53ddSStuart Maybee #define HVM_PARAM_DM_DOMAIN    13
99349b53ddSStuart Maybee 
100349b53ddSStuart Maybee /* ACPI S state: currently support S0 and S3 on x86. */
101349b53ddSStuart Maybee #define HVM_PARAM_ACPI_S_STATE 14
102349b53ddSStuart Maybee 
103*ad09f8b8SMark Johnson /* TSS used on Intel when CR0.PE=0. */
104*ad09f8b8SMark Johnson #define HVM_PARAM_VM86_TSS     15
105*ad09f8b8SMark Johnson 
106*ad09f8b8SMark Johnson /* Boolean: Enable aligning all periodic vpts to reduce interrupts */
107*ad09f8b8SMark Johnson #define HVM_PARAM_VPT_ALIGN    16
108*ad09f8b8SMark Johnson 
109*ad09f8b8SMark Johnson #define HVM_NR_PARAMS          17
110349b53ddSStuart Maybee 
111843e1988Sjohnlev #endif /* __XEN_PUBLIC_HVM_PARAMS_H__ */
112