Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions hv-headers/hvgdk_mini.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ struct hv_u128 {
#define HVCALL_COMPLETE_ISOLATED_IMPORT 0x00f1
#define HVCALL_ISSUE_SNP_PSP_GUEST_REQUEST 0x00f2
#define HVCALL_GET_VP_CPUID_VALUES 0x00f4
#define HVCALL_GET_PARTITION_PROPERTY_EX 0x0101

/* HvFlushGuestPhysicalAddressList, HvExtCallMemoryHeatHint hypercall */
union hv_gpa_page_range {
Expand Down
36 changes: 36 additions & 0 deletions hv-headers/hvhdk.h
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,42 @@ struct hv_input_set_partition_property {
__u64 property_value;
} __packed;

union hv_partition_property_arg {
__u64 as_uint64;
struct {
union {
__u32 arg;
__u32 vp_index;
};
__u16 reserved0;
__u8 reserved1;
__u8 object_type;
};
} __packed;

struct hv_input_get_partition_property_ex {
__u64 partition_id;
__u32 property_code; /* enum hv_partition_property_code */
__u32 padding;
union {
union hv_partition_property_arg arg_data;
__u64 arg;
};
} __packed;

#define HV_PARTITION_PROPERTY_EX_MAX_VAR_SIZE \
(HV_HYP_PAGE_SIZE - sizeof(struct hv_input_get_partition_property_ex))

union hv_partition_property_ex {
__u8 buffer[HV_PARTITION_PROPERTY_EX_MAX_VAR_SIZE];
struct hv_partition_property_vmm_capabilities vmm_capabilities;
/* More fields to be filled in when needed */
} __packed;

struct hv_output_get_partition_property_ex {
union hv_partition_property_ex property_value;
} __packed;

struct hv_cpuid_leaf_info {
__u32 eax;
__u32 ecx;
Expand Down
26 changes: 26 additions & 0 deletions hv-headers/hvhdk_mini.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,14 @@ enum hv_partition_property_code {

/* Nested virtualization properties */
HV_PARTITION_PROPERTY_PROCESSOR_VIRTUALIZATION_FEATURES = 0x00080000,

/* Extended properties with larger property values */
HV_PARTITION_PROPERTY_VMM_CAPABILITIES = 0x00090007,
};

#define HV_PARTITION_VMM_CAPABILITIES_BANK_COUNT 1
#define HV_PARTITION_VMM_CAPABILITIES_RESERVED_BITFIELD_COUNT 59

/* HV Map GPA (Guest Physical Address) Flags */
#define HV_MAP_GPA_PERMISSIONS_NONE 0x0
#define HV_MAP_GPA_READABLE 0x1
Expand Down Expand Up @@ -164,4 +170,24 @@ struct hv_input_complete_isolated_import {
union hv_partition_complete_isolated_import_data import_data;
} __packed;

struct hv_partition_property_vmm_capabilities {
__u16 bank_count;
__u16 reserved[3];
union {
__u64 as_uint64[HV_PARTITION_VMM_CAPABILITIES_BANK_COUNT];
struct {
__u64 map_gpa_preserve_adjustable : 1;
__u64 vmm_can_provide_overlay_gpfn : 1;
__u64 vp_affinity_property : 1;
#if defined(__aarch64__)
__u64 vmm_can_provide_gic_overlay_locations : 1;
#else
__u64 reservedbit3 : 1;
#endif
__u64 assignable_synthetic_proc_features : 1;
__u64 reserved0 : HV_PARTITION_VMM_CAPABILITIES_RESERVED_BITFIELD_COUNT;
} __packed;
};
} __packed;

#endif /* _HVHDK_MINI_H */
Loading