* [PATCH v2] x86/Hyper-V: Expand definition of struct hv_vp_assist_page
@ 2022-11-04 18:38 Saurabh Sengar
2022-11-07 10:33 ` Anirudh Rayabharam
0 siblings, 1 reply; 3+ messages in thread
From: Saurabh Sengar @ 2022-11-04 18:38 UTC (permalink / raw)
To: ssengar, kys, haiyangz, wei.liu, decui, ssengar, linux-hyperv,
linux-kernel, mikelley, tglx, bp, dave.hansen, x86, hpa, anrayabh
The struct hv_vp_assist_page has 24 bytes which is defined as u64[3],
expand that to expose vtl_entry_reason, vtl_ret_x64rax and vtl_ret_x64rcx
field. vtl_entry_reason is updated by hypervisor for the entry reason as
to why the VTL was entered on the virtual processor.
Guest updates the vtl_ret_* fields to provide the register values to
restore on VTL return. The specific register values that are restored
which will be updated on vtl_ret_x64rax and vtl_ret_x64rcx.
Also added the missing fields for synthetic_time_unhalted_timer_expired,
virtualization_fault_information and intercept_message.
Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
---
[v2]: Corrected vtl_entry_reson size from u8 to u32
arch/x86/include/asm/hyperv-tlfs.h | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/hyperv-tlfs.h b/arch/x86/include/asm/hyperv-tlfs.h
index 3089ec3..6d9368e 100644
--- a/arch/x86/include/asm/hyperv-tlfs.h
+++ b/arch/x86/include/asm/hyperv-tlfs.h
@@ -374,11 +374,20 @@ struct hv_nested_enlightenments_control {
struct hv_vp_assist_page {
__u32 apic_assist;
__u32 reserved1;
- __u64 vtl_control[3];
+ __u32 vtl_entry_reason;
+ __u32 vtl_reserved;
+ __u64 vtl_ret_x64rax;
+ __u64 vtl_ret_x64rcx;
struct hv_nested_enlightenments_control nested_control;
__u8 enlighten_vmentry;
__u8 reserved2[7];
__u64 current_nested_vmcs;
+ __u8 synthetic_time_unhalted_timer_expired;
+ __u8 reserved3[7];
+ __u8 virtualization_fault_information[40];
+ __u8 reserved4[8];
+ __u8 intercept_message[256];
+ __u8 vtl_ret_actions[256];
} __packed;
struct hv_enlightened_vmcs {
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2] x86/Hyper-V: Expand definition of struct hv_vp_assist_page
2022-11-04 18:38 [PATCH v2] x86/Hyper-V: Expand definition of struct hv_vp_assist_page Saurabh Sengar
@ 2022-11-07 10:33 ` Anirudh Rayabharam
2022-11-11 23:39 ` Wei Liu
0 siblings, 1 reply; 3+ messages in thread
From: Anirudh Rayabharam @ 2022-11-07 10:33 UTC (permalink / raw)
To: Saurabh Sengar
Cc: ssengar, kys, haiyangz, wei.liu, decui, linux-hyperv,
linux-kernel, mikelley, tglx, bp, dave.hansen, x86, hpa
On Fri, Nov 04, 2022 at 11:38:43AM -0700, Saurabh Sengar wrote:
> The struct hv_vp_assist_page has 24 bytes which is defined as u64[3],
> expand that to expose vtl_entry_reason, vtl_ret_x64rax and vtl_ret_x64rcx
> field. vtl_entry_reason is updated by hypervisor for the entry reason as
> to why the VTL was entered on the virtual processor.
> Guest updates the vtl_ret_* fields to provide the register values to
> restore on VTL return. The specific register values that are restored
> which will be updated on vtl_ret_x64rax and vtl_ret_x64rcx.
> Also added the missing fields for synthetic_time_unhalted_timer_expired,
> virtualization_fault_information and intercept_message.
>
> Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
> ---
> [v2]: Corrected vtl_entry_reson size from u8 to u32
>
> arch/x86/include/asm/hyperv-tlfs.h | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/include/asm/hyperv-tlfs.h b/arch/x86/include/asm/hyperv-tlfs.h
> index 3089ec3..6d9368e 100644
> --- a/arch/x86/include/asm/hyperv-tlfs.h
> +++ b/arch/x86/include/asm/hyperv-tlfs.h
> @@ -374,11 +374,20 @@ struct hv_nested_enlightenments_control {
> struct hv_vp_assist_page {
> __u32 apic_assist;
> __u32 reserved1;
> - __u64 vtl_control[3];
> + __u32 vtl_entry_reason;
> + __u32 vtl_reserved;
> + __u64 vtl_ret_x64rax;
> + __u64 vtl_ret_x64rcx;
> struct hv_nested_enlightenments_control nested_control;
> __u8 enlighten_vmentry;
> __u8 reserved2[7];
> __u64 current_nested_vmcs;
> + __u8 synthetic_time_unhalted_timer_expired;
> + __u8 reserved3[7];
> + __u8 virtualization_fault_information[40];
> + __u8 reserved4[8];
> + __u8 intercept_message[256];
> + __u8 vtl_ret_actions[256];
> } __packed;
>
> struct hv_enlightened_vmcs {
> --
> 1.8.3.1
Reviewed-by: <anrayabh@linux.microsoft.com>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2] x86/Hyper-V: Expand definition of struct hv_vp_assist_page
2022-11-07 10:33 ` Anirudh Rayabharam
@ 2022-11-11 23:39 ` Wei Liu
0 siblings, 0 replies; 3+ messages in thread
From: Wei Liu @ 2022-11-11 23:39 UTC (permalink / raw)
To: Anirudh Rayabharam
Cc: Saurabh Sengar, ssengar, kys, haiyangz, wei.liu, decui,
linux-hyperv, linux-kernel, mikelley, tglx, bp, dave.hansen, x86,
hpa
On Mon, Nov 07, 2022 at 04:03:07PM +0530, Anirudh Rayabharam wrote:
> On Fri, Nov 04, 2022 at 11:38:43AM -0700, Saurabh Sengar wrote:
> > The struct hv_vp_assist_page has 24 bytes which is defined as u64[3],
> > expand that to expose vtl_entry_reason, vtl_ret_x64rax and vtl_ret_x64rcx
> > field. vtl_entry_reason is updated by hypervisor for the entry reason as
> > to why the VTL was entered on the virtual processor.
> > Guest updates the vtl_ret_* fields to provide the register values to
> > restore on VTL return. The specific register values that are restored
> > which will be updated on vtl_ret_x64rax and vtl_ret_x64rcx.
> > Also added the missing fields for synthetic_time_unhalted_timer_expired,
> > virtualization_fault_information and intercept_message.
I did a bit of stylistic changes to the commit message and queued this
up to hyperv-next. Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-11 23:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-04 18:38 [PATCH v2] x86/Hyper-V: Expand definition of struct hv_vp_assist_page Saurabh Sengar
2022-11-07 10:33 ` Anirudh Rayabharam
2022-11-11 23:39 ` Wei Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox