Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/hyperv/vmbus/hyperv_reg.h
Show All 23 Lines | |||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
* | * | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#ifndef _HYPERV_REG_H_ | #ifndef _HYPERV_REG_H_ | ||||
#define _HYPERV_REG_H_ | #define _HYPERV_REG_H_ | ||||
#include <sys/param.h> | |||||
/* | /* | ||||
* Hyper-V Synthetic MSRs | * Hyper-V Synthetic MSRs | ||||
*/ | */ | ||||
#define MSR_HV_GUEST_OS_ID 0x40000000 | #define MSR_HV_GUEST_OS_ID 0x40000000 | ||||
#define MSR_HV_GUESTID_BUILD_MASK 0xffffULL | #define MSR_HV_GUESTID_BUILD_MASK 0xffffULL | ||||
#define MSR_HV_GUESTID_VERSION_MASK 0x0000ffffffff0000ULL | #define MSR_HV_GUESTID_VERSION_MASK 0x0000ffffffff0000ULL | ||||
#define MSR_HV_GUESTID_VERSION_SHIFT 16 | #define MSR_HV_GUESTID_VERSION_SHIFT 16 | ||||
▲ Show 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | |||||
#define CPUID3_HV_NUMA 0x0080 /* NUMA distance query */ | #define CPUID3_HV_NUMA 0x0080 /* NUMA distance query */ | ||||
#define CPUID3_HV_TIME_FREQ 0x0100 /* timer frequency query | #define CPUID3_HV_TIME_FREQ 0x0100 /* timer frequency query | ||||
* (TSC, LAPIC) */ | * (TSC, LAPIC) */ | ||||
#define CPUID3_HV_MSR_CRASH 0x0400 /* MSRs for guest crash */ | #define CPUID3_HV_MSR_CRASH 0x0400 /* MSRs for guest crash */ | ||||
#define CPUID_LEAF_HV_RECOMMENDS 0x40000004 | #define CPUID_LEAF_HV_RECOMMENDS 0x40000004 | ||||
#define CPUID_LEAF_HV_LIMITS 0x40000005 | #define CPUID_LEAF_HV_LIMITS 0x40000005 | ||||
#define CPUID_LEAF_HV_HWFEATURES 0x40000006 | #define CPUID_LEAF_HV_HWFEATURES 0x40000006 | ||||
/* | |||||
* Hyper-V message types | |||||
*/ | |||||
#define HYPERV_MSGTYPE_NONE 0 | |||||
#define HYPERV_MSGTYPE_CHANNEL 1 | |||||
#define HYPERV_MSGTYPE_TIMER_EXPIRED 0x80000010 | |||||
/* | |||||
* Hypercall status codes | |||||
*/ | |||||
#define HYPERCALL_STATUS_SUCCESS 0x0000 | |||||
/* | |||||
* Hypercall input values | |||||
*/ | |||||
#define HYPERCALL_POST_MESSAGE 0x005c | |||||
/* | |||||
* Hypercall input parameters | |||||
*/ | |||||
/* | |||||
* HYPERCALL_POST_MESSAGE | |||||
*/ | |||||
#define HYPERCALL_POSTMSGIN_DSIZE_MAX 240 | |||||
#define HYPERCALL_POSTMSGIN_SIZE 256 | |||||
#define HYPERCALL_POSTMSGIN_ALIGN 8 | |||||
struct hypercall_postmsg_in { | |||||
uint32_t hc_connid; | |||||
uint32_t hc_rsvd; | |||||
uint32_t hc_msgtype; /* HYPERV_MSGTYPE_ */ | |||||
uint32_t hc_dsize; | |||||
uint8_t hc_data[HYPERCALL_POSTMSGIN_DSIZE_MAX]; | |||||
} __packed; | |||||
CTASSERT(sizeof(struct hypercall_postmsg_in) == HYPERCALL_POSTMSGIN_SIZE); | |||||
#endif /* !_HYPERV_REG_H_ */ | #endif /* !_HYPERV_REG_H_ */ |