/*
*
* Copyright (c) 2011, Microsoft Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place - Suite 330, Boston, MA 02111-1307 USA.
*
* Authors:
* Haiyang Zhang <haiyangz@microsoft.com>
* Hank Janssen <hjanssen@microsoft.com>
* K. Y. Srinivasan <kys@microsoft.com>
*
*/
#ifndef _HYPERV_H
#define _HYPERV_H
#include <linux/types.h>
/*
* Framework version for util services.
*/
#define UTIL_FW_MAJOR 3
#define UTIL_FW_MINOR 0
#define UTIL_FW_MAJOR_MINOR (UTIL_FW_MAJOR << 16 | UTIL_FW_MINOR)
/*
* Implementation of host controlled snapshot of the guest.
*/
#define VSS_OP_REGISTER 128
enum hv_vss_op {
VSS_OP_CREATE = 0,
VSS_OP_DELETE,
VSS_OP_HOT_BACKUP,
VSS_OP_GET_DM_INFO,
VSS_OP_BU_COMPLETE,
/*
* Following operations are only supported with IC version >= 5.0
*/
VSS_OP_FREEZE, /* Freeze the file systems in the VM */
VSS_OP_THAW, /* Unfreeze the file systems */
VSS_OP_AUTO_RECOVER,
VSS_OP_COUNT /* Number of operations, must be last */
};
/*
* Header for all VSS messages.
*/
struct hv_vss_hdr {
__u8 operation;
__u8 reserved[7];
} __attribute__((packed));
/*
* Flag values for the hv_vss_check_feature. Linux supports only
* one value.
*/
#define VSS_HBU_NO_AUTO_RECOVERY 0x00000005
struct hv_vss_check_feature {
__u32 flags;
} __