xref: /linux/drivers/hv/mshv.h (revision 4f9786035f9e519db41375818e1d0b5f20da2f10)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (c) 2023, Microsoft Corporation.
4  */
5 
6 #ifndef _MSHV_H_
7 #define _MSHV_H_
8 
9 #include <linux/stddef.h>
10 #include <linux/string.h>
11 #include <hyperv/hvhdk.h>
12 
13 #define mshv_field_nonzero(STRUCT, MEMBER) \
14 	memchr_inv(&((STRUCT).MEMBER), \
15 		   0, sizeof_field(typeof(STRUCT), MEMBER))
16 
17 int hv_call_get_vp_registers(u32 vp_index, u64 partition_id, u16 count,
18 			     union hv_input_vtl input_vtl,
19 			     struct hv_register_assoc *registers);
20 
21 int hv_call_set_vp_registers(u32 vp_index, u64 partition_id, u16 count,
22 			     union hv_input_vtl input_vtl,
23 			     struct hv_register_assoc *registers);
24 
25 int hv_call_get_partition_property(u64 partition_id, u64 property_code,
26 				   u64 *property_value);
27 
28 int mshv_do_pre_guest_mode_work(ulong th_flags);
29 
30 #endif /* _MSHV_H */
31