Re: [PATCH v4 1/5] hyperv: Define struct hv_output_get_vp_registers

2024-12-27 Thread kernel test robot
Hi Roman, kernel test robot noticed the following build errors: [auto build test ERROR on 26e1b813fcd02984b1cac5f3decdf4b0bb56fe02] url: https://github.com/intel-lab-lkp/linux/commits/Roman-Kisel/hyperv-Define-struct-hv_output_get_vp_registers/20241228-023454 base: 26e1b813fcd02984b1cac5f3

Re: [PATCH v4 0/5] hyperv: Fixes for get_vtl(), hv_vtl_apicid_to_vp_id()

2024-12-27 Thread Roman Kisel
On 12/27/2024 10:42 AM, Easwar Hariharan wrote: On 12/27/2024 10:31 AM, Roman Kisel wrote: [...] Thank you for the persistence! I feel most fortunate learning from you, Michael, and Nuno :) Thank you! For the series, Reviewed-by: Easwar Hariharan -- Thank you, Roman

Re: [PATCH v4 0/5] hyperv: Fixes for get_vtl(), hv_vtl_apicid_to_vp_id()

2024-12-27 Thread Easwar Hariharan
On 12/27/2024 10:31 AM, Roman Kisel wrote: > The get_vtl(void) function > > * has got one bug when the code started using a wrong pointer type after > refactoring, and also > * the both function in question don't adhere to the requirements of > the Hypervisor Top-Level Funactional Specificatio

Re: [PATCH v4 1/5] hyperv: Define struct hv_output_get_vp_registers

2024-12-27 Thread Easwar Hariharan
On 12/27/2024 10:31 AM, Roman Kisel wrote: > There is no definition of the output structure for the > GetVpRegisters hypercall. Hence, using the hypercall > is not possible when the output value has some structure > to it. Even getting a datum of a primitive type reads > as ad-hoc without that defi

[PATCH v4 5/5] hyperv: Do not overlap the hvcall IO areas in hv_vtl_apicid_to_vp_id()

2024-12-27 Thread Roman Kisel
The Top-Level Functional Specification for Hyper-V, Section 3.6 [1, 2], disallows overlapping of the input and output hypercall areas, and hv_vtl_apicid_to_vp_id() overlaps them. Use the output hypercall page of the current vCPU for the hypercall. [1] https://learn.microsoft.com/en-us/virtualiza

[PATCH v4 4/5] hyperv: Do not overlap the hvcall IO areas in get_vtl()

2024-12-27 Thread Roman Kisel
The Top-Level Functional Specification for Hyper-V, Section 3.6 [1, 2], disallows overlapping of the input and output hypercall areas, and get_vtl(void) does overlap them. Use the output hypercall page of the current vCPU for the hypercall. [1] https://learn.microsoft.com/en-us/virtualization/hy

[PATCH v4 2/5] hyperv: Fix pointer type in get_vtl(void)

2024-12-27 Thread Roman Kisel
Commit bc905fa8b633 ("hyperv: Switch from hyperv-tlfs.h to hyperv/hvhdk.h") changed the type of the output pointer to `struct hv_register_assoc` from `struct hv_get_vp_registers_output`. That leads to an incorrect computation, and leaves the system broken. Use the correct pointer type for the outp

[PATCH v4 3/5] hyperv: Enable the hypercall output page for the VTL mode

2024-12-27 Thread Roman Kisel
Due to the hypercall page not being allocated in the VTL mode, the code resorts to using a part of the input page. Allocate the hypercall output page in the VTL mode thus enabling it to use it for output and share code with dom0. Signed-off-by: Roman Kisel --- drivers/hv/hv_common.c | 6 +++---

[PATCH v4 1/5] hyperv: Define struct hv_output_get_vp_registers

2024-12-27 Thread Roman Kisel
There is no definition of the output structure for the GetVpRegisters hypercall. Hence, using the hypercall is not possible when the output value has some structure to it. Even getting a datum of a primitive type reads as ad-hoc without that definition. Define struct hv_output_get_vp_registers to

[PATCH v4 0/5] hyperv: Fixes for get_vtl(), hv_vtl_apicid_to_vp_id()

2024-12-27 Thread Roman Kisel
The get_vtl(void) function * has got one bug when the code started using a wrong pointer type after refactoring, and also * the both function in question don't adhere to the requirements of the Hypervisor Top-Level Funactional Specification[1, 2] as the code overlaps the input and output are

Re: [PATCH v3 5/5] hyperv: Do not overlap the hvcall IO areas in hv_vtl_apicid_to_vp_id()

2024-12-27 Thread Roman Kisel
On 12/26/2024 2:01 PM, Easwar Hariharan wrote: On 12/26/2024 1:31 PM, Roman Kisel wrote: The Top-Level Functional Specification for Hyper-V, Section 3.6 [1, 2], disallows overlapping of the input and output hypercall areas, and hv_vtl_apicid_to_vp_id() overlaps them. Use the output hypercall

Re: [PATCH v3 1/5] hyperv: Define struct hv_output_get_vp_registers

2024-12-27 Thread Roman Kisel
On 12/26/2024 2:11 PM, Easwar Hariharan wrote: On 12/26/2024 1:31 PM, Roman Kisel wrote: [...] +#else + #error "This architecture is not supported" +#endif +}; I don't love the #error for unsupported architectures when Kconfig takes care of that for us, but I suppose it's for compl