aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/cryptodev-linux
Commit message (Expand)AuthorAgeFilesLines
* cryptodev-linux: update to 1.12Rosen Penev2021-09-292-35/+3
* cryptodev-linux: bump to 1.11, fix build against kernel 5.10.Stijn Segers2021-01-013-53/+35
* cryptodev-linux: Fix error when compiling with 5.4 kernelJeffery To2020-03-182-1/+51
* cryptodev-linux: remove DEFAULT redefinitionEneas U de Queiroz2020-01-151-1/+0
* cryptodev-linux: Update to 1.10Daniel Engberg2019-01-121-6/+5
* cryptodev-linux: move from packages feedEneas U de Queiroz2018-12-031-0/+60
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
#============================================================================
# This library is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#============================================================================
# Copyright (C) 2006 XenSource Ltd.
#============================================================================

from xen.xend.XendAPIConstants import *

#
# Shutdown codes and reasons.
#

DOMAIN_POWEROFF = 0 
DOMAIN_REBOOT   = 1
DOMAIN_SUSPEND  = 2
DOMAIN_CRASH    = 3
DOMAIN_HALT     = 4

DOMAIN_SHUTDOWN_REASONS = {
    DOMAIN_POWEROFF: "poweroff",
    DOMAIN_REBOOT  : "reboot",
    DOMAIN_SUSPEND : "suspend",
    DOMAIN_CRASH   : "crash",
    DOMAIN_HALT    : "halt"
}
REVERSE_DOMAIN_SHUTDOWN_REASONS = \
    dict([(y, x) for x, y in DOMAIN_SHUTDOWN_REASONS.items()])

HVM_PARAM_CALLBACK_IRQ = 0
HVM_PARAM_STORE_PFN    = 1
HVM_PARAM_STORE_EVTCHN = 2
HVM_PARAM_PAE_ENABLED  = 4
HVM_PARAM_IOREQ_PFN    = 5
HVM_PARAM_BUFIOREQ_PFN = 6
HVM_PARAM_NVRAM_FD     = 7
HVM_PARAM_VHPT_SIZE    = 8
HVM_PARAM_BUFPIOREQ_PFN = 9
HVM_PARAM_TIMER_MODE   = 10
HVM_PARAM_HPET_ENABLED = 11
HVM_PARAM_ACPI_S_STATE = 14

restart_modes = [
    "restart",
    "destroy",
    "preserve",
    "rename-restart",
    "coredump-destroy",
    "coredump-restart"
    ]

DOM_STATES = [
    'halted',
    'paused',
    'running',
    'suspended',
    'shutdown',
    'crashed',
    'unknown',
]

DOM_STATE_HALTED = XEN_API_VM_POWER_STATE_HALTED
DOM_STATE_PAUSED = XEN_API_VM_POWER_STATE_PAUSED
DOM_STATE_RUNNING = XEN_API_VM_POWER_STATE_RUNNING
DOM_STATE_SUSPENDED = XEN_API_VM_POWER_STATE_SUSPENDED
DOM_STATE_SHUTDOWN = XEN_API_VM_POWER_STATE_SHUTTINGDOWN
DOM_STATE_CRASHED = XEN_API_VM_POWER_STATE_CRASHED
DOM_STATE_UNKNOWN = XEN_API_VM_POWER_STATE_UNKNOWN

DOM_STATES_OLD = [
    'running',
    'blocked',
    'paused',
    'shutdown',
    'crashed',
    'dying'
    ]

STATE_DOM_OK       = 1
STATE_DOM_SHUTDOWN = 2

SHUTDOWN_TIMEOUT = (60.0 * 5)

ZOMBIE_PREFIX = 'Zombie-'

"""Minimum time between domain restarts in seconds."""
MINIMUM_RESTART_TIME = 20

RESTART_IN_PROGRESS = 'xend/restart_in_progress'
DUMPCORE_IN_PROGRESS = 'xend/dumpcore_in_progress'
LAST_SHUTDOWN_REASON = 'xend/last_shutdown_reason'

TRIGGER_NMI   = 0
TRIGGER_RESET = 1
TRIGGER_INIT  = 2
TRIGGER_S3RESUME = 3

TRIGGER_TYPE = {
    "nmi"   : TRIGGER_NMI,
    "reset" : TRIGGER_RESET,
    "init"  : TRIGGER_INIT,
    "s3resume": TRIGGER_S3RESUME
}

#
# Device migration stages (eg. XendDomainInfo, XendCheckpoint, server.tpmif)
#

DEV_MIGRATE_TEST  = 0
DEV_MIGRATE_STEP1 = 1
DEV_MIGRATE_STEP2 = 2
DEV_MIGRATE_STEP3 = 3

#
# VTPM-related constants
#

VTPM_DELETE_SCRIPT = '/etc/xen/scripts/vtpm-delete'

#
# Xenstore Constants
#

XS_VMROOT = "/vm/"