Files
Greg Kroah-Hartman 598cf27219 Linux 6.19.3
Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com>
Tested-by: Peter Schneider <pschneider1968@googlemail.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Salvatore Bonaccorso <carnil@debian.org>
Tested-by: Brett A C Sheffield <bacs@librecast.net>
Tested-by: Mark Brown <broonie@kernel.org>
Tested-by: Luna Jernberg <droidbittin@gmail.com>
Tested-by: Ronald Warsow <rwarsow@gmx.de>
Tested-by: Justin M. Forbes <jforbes@fedoraproject.org>
Tested-by: Ron Economos <re@w6rz.net>
Tested-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-19 16:33:27 +01:00

47 lines
1.2 KiB
C

/* SPDX-License-Identifier: GPL-2.0 */
/*
* Type definitions for the Microsoft Hypervisor.
*/
#ifndef _HV_HVGDK_EXT_H
#define _HV_HVGDK_EXT_H
#include "hvgdk_mini.h"
/* Extended hypercalls */
#define HV_EXT_CALL_QUERY_CAPABILITIES 0x8001
#define HV_EXT_CALL_MEMORY_HEAT_HINT 0x8003
/* Extended hypercalls */
enum { /* HV_EXT_CALL */
HV_EXTCALL_QUERY_CAPABILITIES = 0x8001,
HV_EXTCALL_MEMORY_HEAT_HINT = 0x8003,
};
/* HV_EXT_OUTPUT_QUERY_CAPABILITIES */
#define HV_EXT_CAPABILITY_MEMORY_COLD_DISCARD_HINT BIT(8)
enum { /* HV_EXT_MEMORY_HEAT_HINT_TYPE */
HV_EXTMEM_HEAT_HINT_COLD = 0,
HV_EXTMEM_HEAT_HINT_HOT = 1,
HV_EXTMEM_HEAT_HINT_COLD_DISCARD = 2,
HV_EXTMEM_HEAT_HINT_MAX
};
/*
* The whole argument should fit in a page to be able to pass to the hypervisor
* in one hypercall.
*/
#define HV_MEMORY_HINT_MAX_GPA_PAGE_RANGES \
((HV_HYP_PAGE_SIZE - sizeof(struct hv_memory_hint)) / \
sizeof(union hv_gpa_page_range))
/* HvExtCallMemoryHeatHint hypercall */
#define HV_EXT_MEMORY_HEAT_HINT_TYPE_COLD_DISCARD 2
struct hv_memory_hint { /* HV_EXT_INPUT_MEMORY_HEAT_HINT */
u64 heat_type : 2; /* HV_EXTMEM_HEAT_HINT_* */
u64 reserved : 62;
union hv_gpa_page_range ranges[];
} __packed;
#endif /* _HV_HVGDK_EXT_H */