HV: Fix definition of struct hv_vp_assist_page.
PATCH 1/1 HV: Fix definition of struct hv_vp_assist_page.
The struct hv_vp_assist_page was defined incorrectly.
The "vtl_control" should be u64[3], "nested_enlightenments_control" should be a u64 and there is 7 reserved bytes following "enlighten_vmentry". This patch is to fix it.
--- arch/x86/include/asm/hyperv-tlfs.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
arch/x86/include/asm/hyperv-tlfs.h +5 -4
@@ -496,10 +496,11 @@ struct hv_timer_message_payload {/* Define virtual processor assist page structure. */ struct hv_vp_assist_page {__u32 apic_assist; -__u32 reserved; -__u64 vtl_control[2 ]; -__u64 nested_enlightenments_control[2 ]; -__u32 enlighten_vmentry; +__u32 reserved1; +__u64 vtl_control[3 ]; +__u64 nested_enlightenments_control; +__u8 enlighten_vmentry; +__u8 reserved2[7 ];__u64 current_nested_vmcs; };
Signature · 1 line
2.14.3
On Mon, 21 May 2018, Tianyu Lan wrote:
KY ????
Quoted 33 lines
The struct
hv_vp_assist_pagewas defined incorrectly.
The "vtl_control" should be u64[3], "nested_enlightenments_control" should be a u64 and there is 7 reserved bytes following "enlighten_vmentry". This patch is to fix it.Signed-off-by Lan Tianyu <[email protected]>--- arch/x86/include/asm/hyperv-tlfs.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)arch/x86/include/asm/hyperv-tlfs.h +5
-4@@ -496,10 +496,11 @@ struct hv_timer_message_payload {/* Define virtual processor assist page structure. */ struct hv_vp_assist_page {__u32 apic_assist; -__u32 reserved; -__u64 vtl_control[2 ]; -__u64 nested_enlightenments_control[2 ]; -__u32 enlighten_vmentry; +__u32 reserved1; +__u64 vtl_control[3 ]; +__u64 nested_enlightenments_control; +__u8 enlighten_vmentry; +__u8 reserved2[7 ];__u64 current_nested_vmcs; };Signature · 1 line
2.14.3
+Allen
Quoted 12 lines
-----Original Message-----
From: Thomas Gleixner <[email protected]>
Sent: Wednesday, June 6, 2018 3:18 AM
To: Tianyu Lan <[email protected]>
Cc: KY Srinivasan <[email protected]>; Haiyang Zhang <[email protected]>; Stephen Hemminger <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; Alexander Grest <[email protected]>; [email protected]; linux- [email protected]
Subject: Re: [PATCH] HV: Fix definition of structhv_vp_assist_page.
Quoted 3 lines
On Mon, 21 May 2018, Tianyu Lan wrote:
KY ????
I am looking at the published Hyper-V Top Level Functional Spec now; will get back shortly.
Quoted 36 lines
Quoted 4 lines
The struct
hv_vp_assist_pagewas defined incorrectly. The "vtl_control" should be u64[3], "nested_enlightenments_control" should be a u64 and there is 7 reserved bytes following"
enlighten_vmentry".Review
Quoted 8 lines
This patch is to fix it.
Signed-off-by Lan Tianyu <[email protected]>--- arch/x86/include/asm/hyperv-tlfs.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)(quoted diff) +0
-0
b/arch/x86/include/asm/hyperv-tlfs.hQuoted 22 lines
index
f7be6d03a310..fae0a5431cdd100644arch/x86/include/asm/hyperv-tlfs.h +5
-5@@ -496,10 +496,11 @@ struct hv_timer_message_payload {/* Define virtual processor assist page structure. */ struct hv_vp_assist_page {__u32 apic_assist; -__u32 reserved; -__u64 vtl_control[2 ]; -__u64 nested_enlightenments_control[2 ]; -__u32 enlighten_vmentry; +__u32 reserved1; +__u64 vtl_control[3 ]; +__u64 nested_enlightenments_control; +__u8 enlighten_vmentry; +__u8 reserved2[7 ];__u64 current_nested_vmcs; }; --2.14.3