File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 12
12
#include <linux/types.h>
13
13
#include <asm/page.h>
14
14
15
+ /*
16
+ * While not explicitly listed in the TLFS, Hyper-V always runs with a page size
17
+ * of 4096. These definitions are used when communicating with Hyper-V using
18
+ * guest physical pages and guest physical page addresses, since the guest page
19
+ * size may not be 4096 on all architectures.
20
+ */
21
+ #define HV_HYP_PAGE_SHIFT 12
22
+ #define HV_HYP_PAGE_SIZE BIT(HV_HYP_PAGE_SHIFT)
23
+ #define HV_HYP_PAGE_MASK (~(HV_HYP_PAGE_SIZE - 1))
24
+
15
25
/*
16
26
* The below CPUID leaves are present if VersionAndFeatures.HypervisorPresent
17
27
* is set by CPUID(HvCpuIdFunctionVersionAndFeatures).
@@ -847,7 +857,7 @@ union hv_gpa_page_range {
847
857
* count is equal with how many entries of union hv_gpa_page_range can
848
858
* be populated into the input parameter page.
849
859
*/
850
- #define HV_MAX_FLUSH_REP_COUNT ((PAGE_SIZE - 2 * sizeof(u64)) / \
860
+ #define HV_MAX_FLUSH_REP_COUNT ((HV_HYP_PAGE_SIZE - 2 * sizeof(u64)) / \
851
861
sizeof(union hv_gpa_page_range))
852
862
853
863
struct hv_guest_mapping_flush_list {
You can’t perform that action at this time.
0 commit comments