Skip to contentSkip to conversation

x86/Hyper-V: Fix definition HV_MAX_FLUSH_REP_COUNT

PATCH In review [email protected] 4 participants 5 messages Feb 22, 2019 – Mar 20, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/Hyper-V: Fix definition HV_MAX_FLUSH_REP_COUNT

From: Lan Tianyu <[email protected]>

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 origin code lacks parenthesis around PAGE_SIZE - 2 * sizeof(u64). This patch is to fix it.

Cc: <[email protected]>
Fixs: cc4edae4b9(x86/hyper-v: Add HvFlushGuestAddressList hypercall support)

---
 arch/x86/include/asm/hyperv-tlfs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/hyperv-tlfs.h +1 -1
index 705dafc2d11a..2bdbbbcfa393 100644
@@ -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 {
Signature · 1 line
2.14.4
maintainer
#1 lore raw
Quoted 9 lines · On Fri, Feb 22, 2019 at 06:48:44PM +0800, [email protected] wrote:

From: Lan Tianyu <[email protected]>

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 origin code lacks parenthesis around PAGE_SIZE - 2 * sizeof(u64). This patch is to fix it.

Cc: <[email protected]>
Fixs: cc4edae4b9(x86/hyper-v: Add HvFlushGuestAddressList hypercall support)

Please use this format instead:

Fixes cc4edae4b924 ("x86/hyper-v: Add HvFlushGuestAddressList hypercall support")

And don't type it by hand, use a git alias for it:

	git show -s --abbrev-commit --abbrev=12 --pretty=format:"%h (\"%s\")%n"

You also messed up your To: line, keeping anyone from being able to respond to this message who do not know how to hand-edit the response line :(

thanks,

greg k-h

author
#2 lore raw
Quoted 12 lines · Greg KH
Quoted 9 lines · On Fri, Feb 22, 2019 at 06:48:44PM +0800, [email protected] wrote:

From: Lan Tianyu <[email protected]>

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 origin code lacks parenthesis around PAGE_SIZE - 2 * sizeof(u64). This patch is to fix it.

Cc: <[email protected]>
Fixs: cc4edae4b9(x86/hyper-v: Add HvFlushGuestAddressList hypercall support)

Quoted 7 lines

Please use this format instead:

Fixes cc4edae4b924 ("x86/hyper-v: Add HvFlushGuestAddressList hypercall support")

And don't type it by hand, use a git alias for it:

        git show -s --abbrev-commit --abbrev=12 --pretty=format:"%h (\"%s\")%n"

OK. Will update. Thanks.

Quoted 3 lines

You also messed up your To: line, keeping anyone from being able to respond to this message who do not know how to hand-edit the response line :(

I put all expected reviewers in the Cc line and will put into To line.

Quoted 4 lines

thanks,

greg k-h

Signature · 2 lines
Best regards
Tianyu Lan
maintainer
#3 lore raw
In reply to [email protected]
Quoted 20 lines · On 22/02/19 11:48, [email protected] wrote:

From: Lan Tianyu <[email protected]>

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 origin code lacks parenthesis around PAGE_SIZE - 2 * sizeof(u64). This patch is to fix it.

Cc: <[email protected]>
Fixs: cc4edae4b9(x86/hyper-v: Add HvFlushGuestAddressList hypercall support)

---
 arch/x86/include/asm/hyperv-tlfs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/hyperv-tlfs.h +0 -0
index 705dafc2d11a..2bdbbbcfa393 100644

arch/x86/include/asm/hyperv-tlfs.h union hv_gpa_page_range { · line 847

Quoted 8 lines
arch/x86/include/asm/hyperv-tlfs.h +1 -1
@@ -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 {

Queued for after he merge window, with the fixed "Fixes" tag.

Paolo

#4 lore raw
Quoted 27 lines · Paolo Bonzini
Quoted 26 lines · On 22/02/19 11:48, [email protected] wrote:

From: Lan Tianyu <[email protected]>

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 origin code lacks parenthesis around PAGE_SIZE - 2 * sizeof(u64). This patch is to fix it.

Cc: <[email protected]>
Fixs: cc4edae4b9(x86/hyper-v: Add HvFlushGuestAddressList hypercall support)

---
 arch/x86/include/asm/hyperv-tlfs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/hyperv-tlfs.h +1 -1
index 705dafc2d11a..2bdbbbcfa393 100644
@@ -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))
 
Quoted 4 lines

arch/x86/include/asm/hyperv-tlfs.h union hv_gpa_page_range { · line 847

Quoted 2 lines
arch/x86/include/asm/hyperv-tlfs.h +0 -0
 struct hv_guest_mapping_flush_list {

Queued for after he merge window, with the fixed "Fixes" tag.

That's upstream already:

9cd05ad2910b ("x86/hyper-v: Fix definition of HV_MAX_FLUSH_REP_COUNT")

Thanks,

tglx