]> Git Repo - linux.git/commitdiff
x86/hyper-v: Fix definition of HV_MAX_FLUSH_REP_COUNT
authorLan Tianyu <[email protected]>
Mon, 25 Feb 2019 14:31:14 +0000 (22:31 +0800)
committerThomas Gleixner <[email protected]>
Thu, 28 Feb 2019 10:58:29 +0000 (11:58 +0100)
The max flush rep count of HvFlushGuestPhysicalAddressList hypercall is
equal with how many entries of union hv_gpa_page_range can be populated
into the input parameter page.

The code lacks parenthesis around PAGE_SIZE - 2 * sizeof(u64) which results
in bogus computations. Add them.

Fixes: cc4edae4b924 ("x86/hyper-v: Add HvFlushGuestAddressList hypercall support")
Signed-off-by: Lan Tianyu <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: https://lkml.kernel.org/r/[email protected]
arch/x86/include/asm/hyperv-tlfs.h

index 705dafc2d11ab5bb9ddf3b249e0a69dae31a966e..2bdbbbcfa393fd6b2df936029917d20dc4ae8e84 100644 (file)
@@ -841,7 +841,7 @@ union hv_gpa_page_range {
  * count is equal with how many entries of union hv_gpa_page_range can
  * be populated into the input parameter page.
  */
-#define HV_MAX_FLUSH_REP_COUNT (PAGE_SIZE - 2 * sizeof(u64) /  \
+#define HV_MAX_FLUSH_REP_COUNT ((PAGE_SIZE - 2 * sizeof(u64)) /        \
                                sizeof(union hv_gpa_page_range))
 
 struct hv_guest_mapping_flush_list {
This page took 0.064092 seconds and 4 git commands to generate.