xref: /onnv-gate/usr/src/uts/common/xen/public/hvm/params.h (revision 11120:fe619717975a)
15084Sjohnlev /*
25084Sjohnlev  * Permission is hereby granted, free of charge, to any person obtaining a copy
35084Sjohnlev  * of this software and associated documentation files (the "Software"), to
45084Sjohnlev  * deal in the Software without restriction, including without limitation the
55084Sjohnlev  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
65084Sjohnlev  * sell copies of the Software, and to permit persons to whom the Software is
75084Sjohnlev  * furnished to do so, subject to the following conditions:
85084Sjohnlev  *
95084Sjohnlev  * The above copyright notice and this permission notice shall be included in
105084Sjohnlev  * all copies or substantial portions of the Software.
115084Sjohnlev  *
125084Sjohnlev  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
135084Sjohnlev  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
145084Sjohnlev  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
155084Sjohnlev  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
165084Sjohnlev  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
175084Sjohnlev  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
185084Sjohnlev  * DEALINGS IN THE SOFTWARE.
195084Sjohnlev  */
205084Sjohnlev 
215084Sjohnlev #ifndef __XEN_PUBLIC_HVM_PARAMS_H__
225084Sjohnlev #define __XEN_PUBLIC_HVM_PARAMS_H__
235084Sjohnlev 
245084Sjohnlev #include "hvm_op.h"
255084Sjohnlev 
266144Srab /*
276144Srab  * Parameter space for HVMOP_{set,get}_param.
286144Srab  */
296144Srab 
306144Srab /*
316144Srab  * How should CPU0 event-channel notifications be delivered?
326144Srab  * val[63:56] == 0: val[55:0] is a delivery GSI (Global System Interrupt).
336144Srab  * val[63:56] == 1: val[55:0] is a delivery PCI INTx line, as follows:
346144Srab  *                  Domain = val[47:32], Bus  = val[31:16],
356144Srab  *                  DevFn  = val[15: 8], IntX = val[ 1: 0]
366144Srab  * If val == 0 then CPU0 event-channel notifications are not delivered.
376144Srab  */
385084Sjohnlev #define HVM_PARAM_CALLBACK_IRQ 0
396144Srab 
406144Srab /*
416144Srab  * These are not used by Xen. They are here for convenience of HVM-guest
426144Srab  * xenbus implementations.
436144Srab  */
445084Sjohnlev #define HVM_PARAM_STORE_PFN    1
455084Sjohnlev #define HVM_PARAM_STORE_EVTCHN 2
466144Srab 
475084Sjohnlev #define HVM_PARAM_PAE_ENABLED  4
486144Srab 
495084Sjohnlev #define HVM_PARAM_IOREQ_PFN    5
506144Srab 
515084Sjohnlev #define HVM_PARAM_BUFIOREQ_PFN 6
526144Srab 
536144Srab #ifdef __ia64__
5410175SStuart.Maybee@Sun.COM 
556144Srab #define HVM_PARAM_NVRAM_FD     7
5610175SStuart.Maybee@Sun.COM #define HVM_PARAM_VHPT_SIZE    8
5710175SStuart.Maybee@Sun.COM #define HVM_PARAM_BUFPIOREQ_PFN	9
5810175SStuart.Maybee@Sun.COM 
5910175SStuart.Maybee@Sun.COM #elif defined(__i386__) || defined(__x86_64__)
6010175SStuart.Maybee@Sun.COM 
6110175SStuart.Maybee@Sun.COM /* Expose Viridian interfaces to this HVM guest? */
6210175SStuart.Maybee@Sun.COM #define HVM_PARAM_VIRIDIAN     9
6310175SStuart.Maybee@Sun.COM 
646144Srab #endif
655084Sjohnlev 
6610175SStuart.Maybee@Sun.COM /*
6710175SStuart.Maybee@Sun.COM  * Set mode for virtual timers (currently x86 only):
6810175SStuart.Maybee@Sun.COM  *  delay_for_missed_ticks (default):
6910175SStuart.Maybee@Sun.COM  *   Do not advance a vcpu's time beyond the correct delivery time for
7010175SStuart.Maybee@Sun.COM  *   interrupts that have been missed due to preemption. Deliver missed
7110175SStuart.Maybee@Sun.COM  *   interrupts when the vcpu is rescheduled and advance the vcpu's virtual
7210175SStuart.Maybee@Sun.COM  *   time stepwise for each one.
7310175SStuart.Maybee@Sun.COM  *  no_delay_for_missed_ticks:
7410175SStuart.Maybee@Sun.COM  *   As above, missed interrupts are delivered, but guest time always tracks
7510175SStuart.Maybee@Sun.COM  *   wallclock (i.e., real) time while doing so.
7610175SStuart.Maybee@Sun.COM  *  no_missed_ticks_pending:
7710175SStuart.Maybee@Sun.COM  *   No missed interrupts are held pending. Instead, to ensure ticks are
7810175SStuart.Maybee@Sun.COM  *   delivered at some non-zero rate, if we detect missed ticks then the
7910175SStuart.Maybee@Sun.COM  *   internal tick alarm is not disabled if the VCPU is preempted during the
8010175SStuart.Maybee@Sun.COM  *   next tick period.
8110175SStuart.Maybee@Sun.COM  *  one_missed_tick_pending:
8210175SStuart.Maybee@Sun.COM  *   Missed interrupts are collapsed together and delivered as one 'late tick'.
8310175SStuart.Maybee@Sun.COM  *   Guest time always tracks wallclock (i.e., real) time.
8410175SStuart.Maybee@Sun.COM  */
8510175SStuart.Maybee@Sun.COM #define HVM_PARAM_TIMER_MODE   10
8610175SStuart.Maybee@Sun.COM #define HVMPTM_delay_for_missed_ticks    0
8710175SStuart.Maybee@Sun.COM #define HVMPTM_no_delay_for_missed_ticks 1
8810175SStuart.Maybee@Sun.COM #define HVMPTM_no_missed_ticks_pending   2
8910175SStuart.Maybee@Sun.COM #define HVMPTM_one_missed_tick_pending   3
9010175SStuart.Maybee@Sun.COM 
9110175SStuart.Maybee@Sun.COM /* Boolean: Enable virtual HPET (high-precision event timer)? (x86-only) */
9210175SStuart.Maybee@Sun.COM #define HVM_PARAM_HPET_ENABLED 11
9310175SStuart.Maybee@Sun.COM 
9410175SStuart.Maybee@Sun.COM /* Identity-map page directory used by Intel EPT when CR0.PG=0. */
9510175SStuart.Maybee@Sun.COM #define HVM_PARAM_IDENT_PT     12
9610175SStuart.Maybee@Sun.COM 
9710175SStuart.Maybee@Sun.COM /* Device Model domain, defaults to 0. */
9810175SStuart.Maybee@Sun.COM #define HVM_PARAM_DM_DOMAIN    13
9910175SStuart.Maybee@Sun.COM 
10010175SStuart.Maybee@Sun.COM /* ACPI S state: currently support S0 and S3 on x86. */
10110175SStuart.Maybee@Sun.COM #define HVM_PARAM_ACPI_S_STATE 14
10210175SStuart.Maybee@Sun.COM 
103*11120SMark.Johnson@Sun.COM /* TSS used on Intel when CR0.PE=0. */
104*11120SMark.Johnson@Sun.COM #define HVM_PARAM_VM86_TSS     15
105*11120SMark.Johnson@Sun.COM 
106*11120SMark.Johnson@Sun.COM /* Boolean: Enable aligning all periodic vpts to reduce interrupts */
107*11120SMark.Johnson@Sun.COM #define HVM_PARAM_VPT_ALIGN    16
108*11120SMark.Johnson@Sun.COM 
109*11120SMark.Johnson@Sun.COM #define HVM_NR_PARAMS          17
11010175SStuart.Maybee@Sun.COM 
1115084Sjohnlev #endif /* __XEN_PUBLIC_HVM_PARAMS_H__ */
112