Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #67 from nickme/master
Browse files Browse the repository at this point in the history
Changes to support Panic Notifier on versions that do not ship with LIS
  • Loading branch information
vyadavmsft committed Feb 11, 2016
2 parents 9395e1f + 9af6abd commit a1057cf
Show file tree
Hide file tree
Showing 6 changed files with 2,171 additions and 2,129 deletions.
25 changes: 22 additions & 3 deletions hv-rhel5.x/hv/hyperv_vmbus.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,31 @@ enum hv_cpuid_function {
* HVCPUID_INTERFACE
*/
HVCPUID_VERSION = 0x40000002,
HVCPUID_FEATURES = 0x40000003,
HVCPUID_FEATURES = 0x40000003,
HVCPUID_ENLIGHTENMENT_INFO = 0x40000004,
HVCPUID_IMPLEMENTATION_LIMITS = 0x40000005,
HVCPUID_IMPLEMENTATION_LIMITS = 0x40000005,
};

#define HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE 0x400
/*
* Feature identification. EDX bits which identify miscellaneous
* features that are available to the partition. Defined in
* section 3.4 of the HV Top Level Functional spec.
*/
#define HV_FEATURE_MWAIT_INSTRUCTION_AVAILABLE 0x1
#define HV_FEATURE_GUEST_DEBUGGING_SUPPORT 0x2
#define HV_FEATURE_PERFORMANCE_MONITOR_SUPPORT 0x4
#define HV_FEATURE_PHYSICAL_CPU_DYNAMIC_PARTITIONING 0x8
#define HV_FEATURE_HYPERCALL_PARAMETER_BLOCK_XMM_REGISTER 0x10
#define HV_FEATURE_VIRTUAL_GUEST_IDLE_STATE 0x20
#define HV_FEATURE_HYPERVISOR_SLEEP_STATE 0x40
#define HV_FEATURE_QUERY_NUMA_DISTANCE 0x80
#define HV_FEATURE_DETERMINE_TIMER_FREQUENCIES 0x100
#define HV_FEATURE_SYNTHETIC_MACHINE_CHECK 0x200
#define HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE 0x400
#define HV_FEATURE_DEBUG_MSG_AVAILABLE 0x800
#define HV_FEATURE_NPIPE_1_AVAILABLE 0x1000
#define HV_FEATURE_DISABLE_HYPERVISOR_AVAILABLE 0x200
/* Bits 14 - 31 reserved */

#define HV_X64_MSR_CRASH_P0 0x40000100
#define HV_X64_MSR_CRASH_P1 0x40000101
Expand Down
1 change: 1 addition & 0 deletions hv-rhel5.x/hv/include/asm/mshyperv.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

struct ms_hyperv_info {
u32 features;
u32 misc_features;
u32 hints;
};

Expand Down
9 changes: 4 additions & 5 deletions hv-rhel5.x/hv/vmbus_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,7 @@ bool using_null_legacy_pic = false;
EXPORT_SYMBOL(using_null_legacy_pic);


struct ms_hyperv_info ms_hyperv = {
.features = HV_X64_MSR_TIME_REF_COUNT_AVAILABLE |
HV_X64_MSR_SYNTIMER_AVAILABLE,
};
struct ms_hyperv_info ms_hyperv;
EXPORT_SYMBOL(ms_hyperv);

#endif
Expand Down Expand Up @@ -819,7 +816,9 @@ static int vmbus_bus_init(int irq)


#if defined(RHEL_RELEASE_VERSION) && (RHEL_RELEASE_CODE < 1540)
ms_hyperv.features |= HV_X64_MSR_TIME_REF_COUNT_AVAILABLE;
ms_hyperv.features = cpuid_eax(HYPERV_CPUID_FEATURES);
ms_hyperv.misc_features = cpuid_edx(HYPERV_CPUID_FEATURES);
ms_hyperv.hints = cpuid_eax(HYPERV_CPUID_ENLIGHTMENT_INFO);
#endif

/*
Expand Down
Loading

0 comments on commit a1057cf

Please sign in to comment.