TianoCore EDK2 master
Loading...
Searching...
No Matches
sched.h
1/******************************************************************************
2 * sched.h
3 *
4 * Scheduler state interactions
5 *
6 * SPDX-License-Identifier: MIT
7 *
8 * Copyright (c) 2005, Keir Fraser <keir@xensource.com>
9 */
10
11#ifndef __XEN_PUBLIC_SCHED_H__
12#define __XEN_PUBLIC_SCHED_H__
13
14#include "event_channel.h"
15
16/*
17 * Halt execution of this domain (all VCPUs) and notify the system controller.
18 * @arg == pointer to sched_shutdown_t structure.
19 *
20 * If the sched_shutdown_t reason is SHUTDOWN_suspend then
21 * x86 PV guests must also set RDX (EDX for 32-bit guests) to the MFN
22 * of the guest's start info page. RDX/EDX is the third hypercall
23 * argument.
24 *
25 * In addition, which reason is SHUTDOWN_suspend this hypercall
26 * returns 1 if suspend was cancelled or the domain was merely
27 * checkpointed, and 0 if it is resuming in a new domain.
28 */
29#define XEN_SCHEDOP_SHUTDOWN 2
30
32 UINT32 Reason; /* SHUTDOWN_* => enum sched_shutdown_reason */
33};
34
36DEFINE_XEN_GUEST_HANDLE (XEN_SCHED_SHUTDOWN);
37
38/*
39 * Reason codes for SCHEDOP_shutdown. These may be interpreted by control
40 * software to determine the appropriate action. For the most part, Xen does
41 * not care about the shutdown code.
42 */
43/* ` enum sched_shutdown_reason { */
44#define XEN_SHED_SHUTDOWN_POWEROFF 0 /* Domain exited normally. Clean up and kill. */
45#define XEN_SHED_SHUTDOWN_REBOOT 1 /* Clean up, kill, and then restart. */
46#define XEN_SHED_SHUTDOWN_SUSPEND 2 /* Clean up, save suspend info, kill. */
47#define XEN_SHED_SHUTDOWN_CRASH 3 /* Tell controller we've crashed. */
48#define XEN_SHED_SHUTDOWN_WATCHDOG 4 /* Restart because watchdog time expired. */
49
50#endif /* __XEN_PUBLIC_SCHED_H__ */