diff options
Diffstat (limited to 'include/linux/hyperv.h')
| -rw-r--r-- | include/linux/hyperv.h | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index df77ba9a8166..c2559847d7ee 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 | |||
| 37 | enum 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 | */ | ||
| 56 | struct 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 | |||
| 68 | struct hv_vss_check_feature { | ||
| 69 | __u32 flags; | ||
| 70 | } __attribute__((packed)); | ||
| 71 | |||
| 72 | struct hv_vss_check_dm_info { | ||
| 73 | __u32 flags; | ||
| 74 | } __attribute__((packed)); | ||
| 75 | |||
| 76 | struct 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,25 @@ 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 | /* | ||
| 1321 | * Synthetic Video GUID | ||
| 1322 | * {DA0A7802-E377-4aac-8E77-0558EB1073F8} | ||
| 1323 | */ | ||
| 1324 | #define HV_SYNTHVID_GUID \ | ||
| 1325 | .guid = { \ | ||
| 1326 | 0x02, 0x78, 0x0a, 0xda, 0x77, 0xe3, 0xac, 0x4a, \ | ||
| 1327 | 0x8e, 0x77, 0x05, 0x58, 0xeb, 0x10, 0x73, 0xf8 \ | ||
| 1328 | } | ||
| 1329 | |||
| 1330 | |||
| 1331 | /* | ||
| 1256 | * Common header for Hyper-V ICs | 1332 | * Common header for Hyper-V ICs |
| 1257 | */ | 1333 | */ |
| 1258 | 1334 | ||
| @@ -1356,6 +1432,10 @@ int hv_kvp_init(struct hv_util_service *); | |||
| 1356 | void hv_kvp_deinit(void); | 1432 | void hv_kvp_deinit(void); |
| 1357 | void hv_kvp_onchannelcallback(void *); | 1433 | void hv_kvp_onchannelcallback(void *); |
| 1358 | 1434 | ||
| 1435 | int hv_vss_init(struct hv_util_service *); | ||
| 1436 | void hv_vss_deinit(void); | ||
| 1437 | void hv_vss_onchannelcallback(void *); | ||
| 1438 | |||
| 1359 | /* | 1439 | /* |
| 1360 | * Negotiated version with the Host. | 1440 | * Negotiated version with the Host. |
| 1361 | */ | 1441 | */ |
