File Index
Files and directories
Sign in
FILE

hvgdk_ext.h

File preview with syntax highlighting.

linux-6.19.14/include/hyperv/hvgdk_ext.h C
 1/* SPDX-License-Identifier: GPL-2.0 */
 2/*
 3 * Type definitions for the Microsoft Hypervisor.
 4 */
 5#ifndef _HV_HVGDK_EXT_H
 6#define _HV_HVGDK_EXT_H
 7
 8#include "hvgdk_mini.h"
 9
10/* Extended hypercalls */
11#define HV_EXT_CALL_QUERY_CAPABILITIES		0x8001
12#define HV_EXT_CALL_MEMORY_HEAT_HINT		0x8003
13
14/* Extended hypercalls */
15enum {		/* HV_EXT_CALL */
16	HV_EXTCALL_QUERY_CAPABILITIES = 0x8001,
17	HV_EXTCALL_MEMORY_HEAT_HINT   = 0x8003,
18};
19
20/* HV_EXT_OUTPUT_QUERY_CAPABILITIES */
21#define HV_EXT_CAPABILITY_MEMORY_COLD_DISCARD_HINT BIT(8)
22
23enum {		/* HV_EXT_MEMORY_HEAT_HINT_TYPE */
24	HV_EXTMEM_HEAT_HINT_COLD = 0,
25	HV_EXTMEM_HEAT_HINT_HOT = 1,
26	HV_EXTMEM_HEAT_HINT_COLD_DISCARD = 2,
27	HV_EXTMEM_HEAT_HINT_MAX
28};
29
30/*
31 * The whole argument should fit in a page to be able to pass to the hypervisor
32 * in one hypercall.
33 */
34#define HV_MEMORY_HINT_MAX_GPA_PAGE_RANGES  \
35	((HV_HYP_PAGE_SIZE - sizeof(struct hv_memory_hint)) / \
36		sizeof(union hv_gpa_page_range))
37
38/* HvExtCallMemoryHeatHint hypercall */
39#define HV_EXT_MEMORY_HEAT_HINT_TYPE_COLD_DISCARD	2
40struct hv_memory_hint {		/* HV_EXT_INPUT_MEMORY_HEAT_HINT */
41	u64 heat_type : 2;	/* HV_EXTMEM_HEAT_HINT_* */
42	u64 reserved : 62;
43	union hv_gpa_page_range ranges[];
44} __packed;
45
46#endif /* _HV_HVGDK_EXT_H */
~/ Read-only file preview.