Re: [PATCH v5 09/10] hyperv: Add definitions for root partition driver to hv headers

2025-02-26 Thread Stanislav Kinsburskii
0644 > --- a/include/hyperv/hvhdk.h > +++ b/include/hyperv/hvhdk.h > @@ -19,11 +19,24 @@ > > #define HV_VP_REGISTER_PAGE_VERSION_11u > > +#define HV_VP_REGISTER_PAGE_MAX_VECTOR_COUNT 7 > + > +union hv_vp_register_page_interrupt_vectors { > + u64 as_uint64; > + struct { > + u8 vector_count; > + u8 vector[HV_VP_REGISTER_PAGE_MAX_VECTOR_COUNT]; > + } __packed; > +} __packed; Packed attribute for the union looks redundant. Reviewed-by: Stanislav Kinsburskii

Re: [PATCH v5 08/10] x86: hyperv: Add mshv_handler irq handler and setup function

2025-02-26 Thread Stanislav Kinsburskii
f (mshv_handler) > + mshv_handler(); Can mshv_handler be defined as a weak symbol doing nothing instead of defining it a null pointer? This should allow to simplify this code and get rid of hv_setup_mshv_handler, which looks redundant. Reviewed-by: Stanislav Kinsburskii

Re: [PATCH v5 07/10] Drivers: hv: Introduce per-cpu event ring tail

2025-02-26 Thread Stanislav Kinsburskii
; + Redundant empty line ^^^ > + if (unlikely(!*synic_eventring_tail)) { > + kfree(mem); > + return -ENOMEM; > + } > + } > + > if (!ms_hyperv.paravisor_present && >

Re: [PATCH v5 06/10] Drivers/hv: Export some functions for use by root partition module

2025-02-26 Thread Stanislav Kinsburskii
On Wed, Feb 26, 2025 at 03:08:00PM -0800, Nuno Das Neves wrote: > get_hypervisor_version, hv_call_deposit_pages, hv_call_create_vp, > hv_call_deposit_pages, and hv_call_create_vp are all needed in module > with CONFIG_MSHV_ROOT=m. > Reviewed-by: Stanislav Kinsburskii

Re: [PATCH v5 05/10] acpi: numa: Export node_to_pxm()

2025-02-26 Thread Stanislav Kinsburskii
On Wed, Feb 26, 2025 at 03:07:59PM -0800, Nuno Das Neves wrote: > node_to_pxm() is used by hv_numa_node_to_pxm_info(). > That helper will be used by Hyper-V root partition module code > when CONFIG_MSHV_ROOT=m. > Reviewed-by: Stanislav Kinsburskii

Re: [PATCH v5 04/10] hyperv: Introduce hv_recommend_using_aeoi()

2025-02-26 Thread Stanislav Kinsburskii
On Wed, Feb 26, 2025 at 03:07:58PM -0800, Nuno Das Neves wrote: > Factor out the check for enabling auto eoi, to be reused in root > partition code. > Reviewed-by: Stanislav Kinsburskii

Re: [PATCH v5 03/10] arm64/hyperv: Add some missing functions to arm64

2025-02-26 Thread Stanislav Kinsburskii
On Wed, Feb 26, 2025 at 03:07:57PM -0800, Nuno Das Neves wrote: > These non-nested msr and fast hypercall functions are present in x86, > but they must be available in both architetures for the root partition > driver code. > Reviewed-by: Stanislav Kinsburskii

Re: [PATCH v5 02/10] x86/mshyperv: Add support for extended Hyper-V features

2025-02-26 Thread Stanislav Kinsburskii
On Wed, Feb 26, 2025 at 03:07:56PM -0800, Nuno Das Neves wrote: > From: Stanislav Kinsburskii > > Extend the "ms_hyperv_info" structure to include a new field, > "ext_features", for capturing extended Hyper-V features. > Update the "ms_hyperv_init_platf

Re: [PATCH v5 01/10] hyperv: Convert Hyper-V status codes to strings

2025-02-26 Thread Stanislav Kinsburskii
mon.c | 65 ++ > drivers/hv/hv_proc.c | 13 --- > include/asm-generic/mshyperv.h | 1 + > 3 files changed, 74 insertions(+), 5 deletions(-) > Reviewed-by: Stanislav Kinsburskii

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

2025-01-08 Thread Stanislav Kinsburskii
On Wed, Jan 08, 2025 at 12:37:17PM -0800, Roman Kisel wrote: > > > On 1/8/2025 11:17 AM, Stanislav Kinsburskii wrote: > > On Tue, Jan 07, 2025 at 03:11:15PM -0800, Roman Kisel wrote: > > [...] > > > > > > > Avoiding using the output hypercall page lea

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

2025-01-08 Thread Stanislav Kinsburskii
On Tue, Jan 07, 2025 at 03:11:15PM -0800, Roman Kisel wrote: > > > On 1/7/2025 11:18 AM, Stanislav Kinsburskii wrote: > > On Mon, Jan 06, 2025 at 01:07:25PM -0800, Roman Kisel wrote: > > > > [...] > > > My point is that the proposed fix looks more like a

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

2025-01-07 Thread Stanislav Kinsburskii
On Mon, Jan 06, 2025 at 01:07:25PM -0800, Roman Kisel wrote: > > > On 1/6/2025 11:32 AM, Stanislav Kinsburskii wrote: > > On Mon, Jan 06, 2025 at 10:11:16AM -0800, Roman Kisel wrote: > [...]s > > > From my POV a decision between a unified approach and interim solut

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

2025-01-06 Thread Stanislav Kinsburskii
On Mon, Jan 06, 2025 at 07:49:15PM +, Michael Kelley wrote: > From: Stanislav Kinsburskii Sent: Monday, > January 6, 2025 11:19 AM > > > > On Mon, Jan 06, 2025 at 06:18:51PM +, Michael Kelley wrote: > > > From: Stanislav Kinsburskii Sent: > >

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

2025-01-06 Thread Stanislav Kinsburskii
On Mon, Jan 06, 2025 at 10:11:16AM -0800, Roman Kisel wrote: > > > On 1/6/2025 9:11 AM, Stanislav Kinsburskii wrote: > > On Fri, Jan 03, 2025 at 01:39:29PM -0800, Roman Kisel wrote: > > > > > [...] > > > > > > > > The issue is th

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

2025-01-06 Thread Stanislav Kinsburskii
On Mon, Jan 06, 2025 at 06:18:51PM +, Michael Kelley wrote: > From: Stanislav Kinsburskii Sent: Monday, > January 6, 2025 9:23 AM > > > > On Fri, Jan 03, 2025 at 10:08:05PM +, Michael Kelley wrote: > > > From: Stanislav Kinsburskii Sent: > > >

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

2025-01-06 Thread Stanislav Kinsburskii
On Fri, Jan 03, 2025 at 10:08:05PM +, Michael Kelley wrote: > From: Stanislav Kinsburskii Sent: Friday, > January 3, 2025 11:20 AM > > > > On Mon, Dec 30, 2024 at 10:09:39AM -0800, Roman Kisel wrote: > > > Due to the hypercall page not being allocated in the VTL m

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

2025-01-06 Thread Stanislav Kinsburskii
On Fri, Jan 03, 2025 at 01:39:29PM -0800, Roman Kisel wrote: > > > On 1/3/2025 11:20 AM, Stanislav Kinsburskii wrote: > > On Mon, Dec 30, 2024 at 10:09:39AM -0800, Roman Kisel wrote: > > > Due to the hypercall page not being allocated in the VTL mode, > > > th

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

2025-01-03 Thread Stanislav Kinsburskii
On Mon, Dec 30, 2024 at 10:09:39AM -0800, Roman Kisel wrote: > 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 dom

Re: [PATCH] x86/hyperv: Set X86_FEATURE_TSC_RELIABLE unconditionally

2024-12-11 Thread Stanislav Kinsburskii
On Tue, Nov 26, 2024 at 06:11:10AM +, Michael Kelley wrote: > From: Stanislav Kinsburskii Sent: Monday, > November 25, 2024 2:25 PM > > > > On Fri, Nov 22, 2024 at 06:33:12PM +, Michael Kelley wrote: > > > From: Stanislav Kinsburskii Sent: > > > Tu

Re: [PATCH] x86/hyperv: Set X86_FEATURE_TSC_RELIABLE unconditionally

2024-11-25 Thread Stanislav Kinsburskii
On Fri, Nov 22, 2024 at 06:33:12PM +, Michael Kelley wrote: > From: Stanislav Kinsburskii Sent: Tuesday, > November 19, 2024 4:51 PM > > > > On Tue, Nov 12, 2024 at 07:48:06PM +, Michael Kelley wrote: > > > From: Stanislav Kinsburskii Sent: > > >

Re: [PATCH] x86/hyperv: Set X86_FEATURE_TSC_RELIABLE unconditionally

2024-11-19 Thread Stanislav Kinsburskii
On Tue, Nov 12, 2024 at 07:48:06PM +, Michael Kelley wrote: > From: Stanislav Kinsburskii Sent: Tuesday, > November 12, 2024 10:18 AM > > > > Enable X86_FEATURE_TSC_RELIABLE by default as X86_FEATURE_TSC_RELIABLE is > > independent from invariant TSC and should have

[PATCH] x86/hyperv: Set X86_FEATURE_TSC_RELIABLE unconditionally

2024-11-12 Thread Stanislav Kinsburskii
writing the HV_X64_MSR_TSC_INVARIANT_CONTROL register. Not all guests will have this privilege and the hypervisor will automatically opt-in certain types of guests (e.g. EXO partitions) to invariant TSC, but this functionality is unrelated to the TSC reliability. Signed-off-by: Stanislav Kinsburskii

Re: [PATCH] TFrom: Stanislav Kinsburskii

2024-11-12 Thread Stanislav Kinsburskii
Please disregard. Stanislav On Tue, Nov 12, 2024 at 06:16:26PM +, Stanislav Kinsburskii wrote: > x86/hyperv: Set X86_FEATURE_TSC_RELIABLE unconditionally > > Enable X86_FEATURE_TSC_RELIABLE by default as X86_FEATURE_TSC_RELIABLE is > independent from invariant TSC and should hav

[PATCH] TFrom: Stanislav Kinsburskii

2024-11-12 Thread Stanislav Kinsburskii
TSC reliability. Signed-off-by: Stanislav Kinsburskii --- arch/x86/kernel/cpu/mshyperv.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c index d18078834ded..14412afcc398 100644 --- a/arch/x86/kernel/cpu

Re: [PATCH 5/5] hyperv: Use hvhdk.h instead of hyperv-tlfs.h in Hyper-V code

2024-10-04 Thread Stanislav Kinsburskii
Hi Nuno, On Thu, Oct 03, 2024 at 12:51:04PM -0700, Nuno Das Neves wrote: > diff --git a/arch/arm64/hyperv/hv_core.c b/arch/arm64/hyperv/hv_core.c > index 9d1969b875e9..bb7f28f74bf4 100644 > --- a/arch/arm64/hyperv/hv_core.c > +++ b/arch/arm64/hyperv/hv_core.c > @@ -14,6 +14,7 @@ > #include > #i