Re: [PATCH] clocksource: hyper-v: Use lapic timer in a TDX VM without paravisor

2024-06-20 Thread Roman Kisel
+ ce->set_state_shutdown = hv_ce_shutdown; ce->set_state_oneshot = hv_ce_set_oneshot; ce->set_next_event = hv_ce_set_next_event; LGTM. Reviewed-by: Roman Kisel -- Thank you, Roman

Re: [PATCH v2 1/6] arm64/hyperv: Support DeviceTree

2024-06-11 Thread Roman Kisel
On 5/16/2024 8:27 AM, Roman Kisel wrote: On 5/15/2024 3:02 PM, Elliot Berman wrote: On Tue, May 14, 2024 at 03:43:48PM -0700, Roman Kisel wrote: The Virtual Trust Level platforms rely on DeviceTree, and the arm64/hyperv code supports ACPI only. Update the logic to support DeviceTree

Re: [PATCH 1/1] x86/hyperv: Set X86_FEATURE_TSC_KNOWN_FREQ when Hyper-V provides frequency

2024-06-11 Thread Roman Kisel
_khz; x86_platform.calibrate_cpu = hv_get_tsc_khz; + setup_force_cpu_cap(X86_FEATURE_TSC_KNOWN_FREQ); } if (ms_hyperv.priv_high & HV_ISOLATION) { LGTM Reviewed-by: Roman Kisel -- Thank you, Roman

Re: [PATCH v2 6/6] drivers/pci/hyperv/arm64: vPCI MSI IRQ domain from DT

2024-06-11 Thread Roman Kisel
On 6/7/2024 12:55 PM, Bjorn Helgaas wrote: On Wed, May 15, 2024 at 01:12:38PM -0500, Bjorn Helgaas wrote: On Wed, May 15, 2024 at 09:34:09AM -0700, Roman Kisel wrote: On 5/15/2024 2:48 AM, Saurabh Singh Sengar wrote: On Tue, May 14, 2024 at 03:43:53PM -0700, Roman Kisel wrote

Re: [PATCH v2 1/6] arm64/hyperv: Support DeviceTree

2024-05-20 Thread Roman Kisel
On 5/19/2024 11:45 PM, Krzysztof Kozlowski wrote: On 15/05/2024 19:33, Roman Kisel wrote: static bool hyperv_initialized; @@ -27,6 +30,29 @@ int hv_get_hypervisor_version(union hv_hypervisor_version_info *info) return 0; } +static bool hyperv_detect_fdt(void) +{ +#ifdef

Re: [PATCH v2 5/6] drivers/hv/vmbus: Get the irq number from DeviceTree

2024-05-20 Thread Roman Kisel
On 5/17/2024 10:14 AM, Rob Herring wrote: On Tue, May 14, 2024 at 5:45 PM Roman Kisel wrote: The vmbus driver uses ACPI for interrupt assignment on arm64 hence it won't function in the VTL mode where only DeviceTree can be used. Update the vmbus driver to discover interrupt configuration

Re: [PATCH 1/6] arm64/hyperv: Support DeviceTree

2024-05-20 Thread Roman Kisel
On 5/14/2024 5:00 PM, Easwar Hariharan wrote: On 5/14/2024 4:17 PM, Roman Kisel wrote: On 5/14/2024 3:46 PM, Easwar Hariharan wrote: On 5/10/2024 10:42 AM, Roman Kisel wrote: On 5/10/2024 10:04 AM, Easwar Hariharan wrote: On 5/10/2024 9:05 AM, rom...@linux.microsoft.com wrote: From

Re: [PATCH 2/6] drivers/hv: Enable VTL mode for arm64

2024-05-20 Thread Roman Kisel
On 5/15/2024 12:43 AM, Wei Liu wrote: On Fri, May 10, 2024 at 09:05:01AM -0700, rom...@linux.microsoft.com wrote: From: Roman Kisel This change removes dependency on ACPI when buidling the hv drivers to allow Virtual Trust Level boot with DeviceTree. Signed-off-by: Roman Kisel

Re: [PATCH v2 1/6] arm64/hyperv: Support DeviceTree

2024-05-16 Thread Roman Kisel
On 5/15/2024 3:02 PM, Elliot Berman wrote: On Tue, May 14, 2024 at 03:43:48PM -0700, Roman Kisel wrote: The Virtual Trust Level platforms rely on DeviceTree, and the arm64/hyperv code supports ACPI only. Update the logic to support DeviceTree on boot as well as ACPI. Could you use Call UID

Re: [PATCH v2 6/6] drivers/pci/hyperv/arm64: vPCI MSI IRQ domain from DT

2024-05-15 Thread Roman Kisel
On 5/15/2024 11:12 AM, Bjorn Helgaas wrote: On Wed, May 15, 2024 at 09:34:09AM -0700, Roman Kisel wrote: On 5/15/2024 2:48 AM, Saurabh Singh Sengar wrote: On Tue, May 14, 2024 at 03:43:53PM -0700, Roman Kisel wrote: The hyperv-pci driver uses ACPI for MSI IRQ domain configuration

Re: [PATCH v2 6/6] drivers/pci/hyperv/arm64: vPCI MSI IRQ domain from DT

2024-05-15 Thread Roman Kisel
On 5/15/2024 6:47 AM, Michael Kelley wrote: From: Roman Kisel Sent: Tuesday, May 14, 2024 3:44 PM The hyperv-pci driver uses ACPI for MSI IRQ domain configuration on arm64 thereby it won't be able to do that in the VTL mode where only DeviceTree can be used. That sentence seems a bit

Re: [PATCH v2 5/6] drivers/hv/vmbus: Get the irq number from DeviceTree

2024-05-15 Thread Roman Kisel
On 5/15/2024 6:44 AM, Michael Kelley wrote: From: Roman Kisel Sent: Tuesday, May 14, 2024 3:44 PM The vmbus driver uses ACPI for interrupt assignment on arm64 hence it won't function in the VTL mode where only DeviceTree can be used. Update the vmbus driver to discover interrupt

Re: [PATCH v2 4/6] arm64/hyperv: Boot in a Virtual Trust Level

2024-05-15 Thread Roman Kisel
On 5/15/2024 6:39 AM, Michael Kelley wrote: From: Roman Kisel Sent: Tuesday, May 14, 2024 3:44 PM To run in the VTL mode, Hyper-V drivers have to know what VTL the system boots in, and the arm64/hyperv code does not update the variable that stores the value. Update the variable to enable

Re: [PATCH v2 3/6] drivers/hv: arch-neutral implementation of get_vtl()

2024-05-15 Thread Roman Kisel
On 5/15/2024 6:38 AM, Michael Kelley wrote: From: Roman Kisel Sent: Tuesday, May 14, 2024 3:44 PM To run in the VTL mode, Hyper-V drivers have to know what VTL the system boots in, and the arm64/hyperv code does not have the means to compute that. Refactor the code to hoist the function

Re: [PATCH v2 2/6] drivers/hv: Enable VTL mode for arm64

2024-05-15 Thread Roman Kisel
On 5/15/2024 6:37 AM, Michael Kelley wrote: From: Roman Kisel Sent: Tuesday, May 14, 2024 3:44 PM Kconfig dependencies for arm64 guests on Hyper-V require that be ACPI enabled, and limit VTL mode to x86/x64. To enable VTL mode on arm64 as well, update the dependencies. Since VTL mode

Re: [PATCH v2 1/6] arm64/hyperv: Support DeviceTree

2024-05-15 Thread Roman Kisel
On 5/15/2024 12:45 AM, Krzysztof Kozlowski wrote: On 15/05/2024 00:43, Roman Kisel wrote: The Virtual Trust Level platforms rely on DeviceTree, and the arm64/hyperv code supports ACPI only. Update the logic to support DeviceTree on boot as well as ACPI. Signed-off-by: Roman Kisel

Re: [PATCH v2 5/6] drivers/hv/vmbus: Get the irq number from DeviceTree

2024-05-15 Thread Roman Kisel
On 5/15/2024 12:47 AM, Krzysztof Kozlowski wrote: On 15/05/2024 00:43, Roman Kisel wrote: The vmbus driver uses ACPI for interrupt assignment on arm64 hence it won't function in the VTL mode where only DeviceTree can be used. Update the vmbus driver to discover interrupt configuration via

Re: [PATCH v2 6/6] drivers/pci/hyperv/arm64: vPCI MSI IRQ domain from DT

2024-05-15 Thread Roman Kisel
On 5/15/2024 2:48 AM, Saurabh Singh Sengar wrote: On Tue, May 14, 2024 at 03:43:53PM -0700, Roman Kisel wrote: The hyperv-pci driver uses ACPI for MSI IRQ domain configuration on arm64 thereby it won't be able to do that in the VTL mode where only DeviceTree can be used. Update the hyperv

Re: [PATCH v2 5/6] drivers/hv/vmbus: Get the irq number from DeviceTree

2024-05-15 Thread Roman Kisel
On 5/15/2024 2:42 AM, Saurabh Singh Sengar wrote: On Tue, May 14, 2024 at 03:43:52PM -0700, Roman Kisel wrote: The vmbus driver uses ACPI for interrupt assignment on In subject use the prefix "Drivers: hv: vmbus:". It is preferred to us "VMbus/VMBus" instead of "

Re: [PATCH 1/6] arm64/hyperv: Support DeviceTree

2024-05-14 Thread Roman Kisel
On 5/14/2024 3:46 PM, Easwar Hariharan wrote: On 5/10/2024 10:42 AM, Roman Kisel wrote: On 5/10/2024 10:04 AM, Easwar Hariharan wrote: On 5/10/2024 9:05 AM, rom...@linux.microsoft.com wrote: From: Roman Kisel Update the driver to support DeviceTree boot as well along with ACPI

[PATCH v2 6/6] drivers/pci/hyperv/arm64: vPCI MSI IRQ domain from DT

2024-05-14 Thread Roman Kisel
The hyperv-pci driver uses ACPI for MSI IRQ domain configuration on arm64 thereby it won't be able to do that in the VTL mode where only DeviceTree can be used. Update the hyperv-pci driver to discover interrupt configuration via DeviceTree. Signed-off-by: Roman Kisel --- drivers/pci

[PATCH v2 1/6] arm64/hyperv: Support DeviceTree

2024-05-14 Thread Roman Kisel
The Virtual Trust Level platforms rely on DeviceTree, and the arm64/hyperv code supports ACPI only. Update the logic to support DeviceTree on boot as well as ACPI. Signed-off-by: Roman Kisel --- arch/arm64/hyperv/mshyperv.c | 34 +- 1 file changed, 29 insertions

[PATCH v2 5/6] drivers/hv/vmbus: Get the irq number from DeviceTree

2024-05-14 Thread Roman Kisel
The vmbus driver uses ACPI for interrupt assignment on arm64 hence it won't function in the VTL mode where only DeviceTree can be used. Update the vmbus driver to discover interrupt configuration via DeviceTree. Signed-off-by: Roman Kisel --- drivers/hv/vmbus_drv.c | 37

[PATCH v2 4/6] arm64/hyperv: Boot in a Virtual Trust Level

2024-05-14 Thread Roman Kisel
(C) 2023, Microsoft, Inc. + * + * Author : Roman Kisel + */ + +#include + +void __init hv_vtl_init_platform(void) +{ + pr_info("Linux runs in Hyper-V Virtual Trust Level %d\n", ms_hyperv.vtl); +} + +int __init hv_vtl_early_init(void) +{ + return 0; +} +early_initcall(hv_vtl_

[PATCH v2 3/6] drivers/hv: arch-neutral implementation of get_vtl()

2024-05-14 Thread Roman Kisel
-by: Roman Kisel --- arch/x86/hyperv/hv_init.c | 34 --- arch/x86/include/asm/hyperv-tlfs.h | 7 - drivers/hv/hv_common.c | 43 ++ include/asm-generic/hyperv-tlfs.h | 7 + include/asm-generic/mshyperv.h | 6 + 5 files

[PATCH v2 2/6] drivers/hv: Enable VTL mode for arm64

2024-05-14 Thread Roman Kisel
Kconfig dependencies for arm64 guests on Hyper-V require that be ACPI enabled, and limit VTL mode to x86/x64. To enable VTL mode on arm64 as well, update the dependencies. Since VTL mode requires DeviceTree instead of ACPI, don’t require arm64 guests on Hyper-V to have ACPI. Signed-off-by: Roman

[PATCH v2 0/6] arm64/hyperv: Support Virtual Trust Level Boot

2024-05-14 Thread Roman Kisel
] - Decreased number of #ifdef's - Updated the wording in the commit messages to adhere to the guidlines - Sending to the correct set of maintainers and mail lists Roman Kisel (6): arm64/hyperv: Support DeviceTree drivers/hv: Enable VTL mode for arm64 drivers/hv: arch-neutral implementation

Re: [PATCH 1/6] arm64/hyperv: Support DeviceTree

2024-05-10 Thread Roman Kisel
On 5/10/2024 10:04 AM, Easwar Hariharan wrote: On 5/10/2024 9:05 AM, rom...@linux.microsoft.com wrote: From: Roman Kisel Update the driver to support DeviceTree boot as well along with ACPI. This enables the Virtual Trust Level platforms boot up on ARM64. Signed-off-by: Roman Kisel