aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hyperv.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/hyperv.h')
-rw-r--r--include/linux/hyperv.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index df77ba9a8166..95d0850584da 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -27,6 +27,63 @@
27 27
28#include <linux/types.h> 28#include <linux/types.h>
29 29
30
31/*
32 * Implementation of host controlled snapshot of the guest.
33 */
34
35#define VSS_OP_REGISTER 128
36
37enum hv_vss_op {
38 VSS_OP_CREATE = 0,
39 VSS_OP_DELETE,
40 VSS_OP_HOT_BACKUP,
41 VSS_OP_GET_DM_INFO,
42 VSS_OP_BU_COMPLETE,
43 /*
44 * Following operations are only supported with IC version >= 5.0
45 */
46 VSS_OP_FREEZE, /* Freeze the file systems in the VM */
47 VSS_OP_THAW, /* Unfreeze the file systems */
48 VSS_OP_AUTO_RECOVER,
49 VSS_OP_COUNT /* Number of operations, must be last */
50};
51
52
53/*
54 * Header for all VSS messages.
55 */
56struct hv_vss_hdr {
57 __u8 operation;
58 __u8 reserved[7];
59} __attribute__((packed));
60
61
62/*
63 * Flag values for the hv_vss_check_feature. Linux supports only
64 * one value.
65 */
66#define VSS_HBU_NO_AUTO_RECOVERY 0x00000005
67
68struct hv_vss_check_feature {
69 __u32 flags;
70} __attribute__((packed));
71
72struct hv_vss_check_dm_info {
73 __u32 flags;
74} __attribute__((packed));
75
76struct hv_vss_msg {
77 union {
78 struct hv_vss_hdr vss_hdr;
79 int error;
80 };
81 union {
82 struct hv_vss_check_feature vss_cf;
83 struct hv_vss_check_dm_info dm_info;
84 };
85} __attribute__((packed));
86
30/* 87/*
31 * An implementation of HyperV key value pair (KVP) functionality for Linux. 88 * An implementation of HyperV key value pair (KVP) functionality for Linux.
32 * 89 *
@@ -1253,6 +1310,14 @@ void vmbus_driver_unregister(struct hv_driver *hv_driver);
1253 } 1310 }
1254 1311
1255/* 1312/*
1313 * VSS (Backup/Restore) GUID
1314 */
1315#define HV_VSS_GUID \
1316 .guid = { \
1317 0x29, 0x2e, 0xfa, 0x35, 0x23, 0xea, 0x36, 0x42, \
1318 0x96, 0xae, 0x3a, 0x6e, 0xba, 0xcb, 0xa4, 0x40 \
1319 }
1320/*
1256 * Common header for Hyper-V ICs 1321 * Common header for Hyper-V ICs
1257 */ 1322 */
1258 1323
@@ -1356,6 +1421,10 @@ int hv_kvp_init(struct hv_util_service *);
1356void hv_kvp_deinit(void); 1421void hv_kvp_deinit(void);
1357void hv_kvp_onchannelcallback(void *); 1422void hv_kvp_onchannelcallback(void *);
1358 1423
1424int hv_vss_init(struct hv_util_service *);
1425void hv_vss_deinit(void);
1426void hv_vss_onchannelcallback(void *);
1427
1359/* 1428/*
1360 * Negotiated version with the Host. 1429 * Negotiated version with the Host.
1361 */ 1430 */