Re: [PATCH hyperv-next v4 1/6] arm64: hyperv: Use SMCCC to detect hypervisor presence

2025-02-11 Thread Arnd Bergmann
On Wed, Feb 12, 2025, at 02:43, Roman Kisel wrote: > +static bool hyperv_detect_via_smccc(void) > +{ > + struct arm_smccc_res res = {}; > + > + if (arm_smccc_1_1_get_conduit() != SMCCC_CONDUIT_HVC) > + return false; > + arm_smccc_1_1_hvc(ARM_SMCCC_VENDOR_HYP_CALL_UID_FUNC_ID

Re: [PATCH hyperv-next v4 4/6] dt-bindings: microsoft,vmbus: Add GIC and DMA coherence to the example

2025-02-11 Thread Krzysztof Kozlowski
On Tue, Feb 11, 2025 at 05:43:19PM -0800, Roman Kisel wrote: > The existing example lacks the GIC interrupt controller property > making it not possible to boot on ARM64, and it lacks the DMA GIC controller is not relevant to this binding. > coherence property making the kernel do more work on ma

Re: [PATCH] hyperv: Add CONFIG_MSHV_ROOT to gate hv_root_partition checks

2025-02-11 Thread Easwar Hariharan
On 2/11/2025 2:21 PM, Nuno Das Neves wrote: > Introduce CONFIG_MSHV_ROOT as a tristate to enable root partition > booting and future mshv driver functionality. > > Change hv_root_partition into a function which always returns false > if CONFIG_MSHV_ROOT=n. > > Introduce hv_current_partition_type

Re: [PATCH v3 2/2] hyperv: Move arch/x86/hyperv/hv_proc.c to drivers/hv

2025-02-11 Thread Wei Liu
On Fri, Feb 07, 2025 at 11:03:22AM -0800, Nuno Das Neves wrote: > These helpers are not specific to x86_64 and will be needed by common code. > Remove some unnecessary #includes. > > Reviewed-by: Michael Kelley > Signed-off-by: Nuno Das Neves One comment about the ordering of the tag. You shoul

Re: [PATCH v3 0/2] hyperv: Move some features to common code

2025-02-11 Thread Wei Liu
On Fri, Feb 07, 2025 at 11:03:20AM -0800, Nuno Das Neves wrote: > There are several bits of Hyper-V-related code that today live in > arch/x86 but are not really specific to x86_64 and will work on arm64 > too. > > Some of these will be needed in the upcoming mshv driver code (for > Linux as root

Re: [PATCH] x86/hyperv/vtl: Stop kernel from probing VTL0 low memory

2025-02-11 Thread Wei Liu
On Fri, Jan 17, 2025 at 09:01:41AM -0800, Roman Kisel wrote: > > For Linux, running in Hyper-V VTL (Virtual Trust Level), kernel in VTL2 > > tries to access VTL0 low memory in probe_roms. This memory is not > > described in the e820 map. Initialize probe_roms call to no-ops > > during boot for VTL2

Re: [PATCH v2] PCI: hv: Correct a comment

2025-02-11 Thread Wei Liu
On Fri, Feb 07, 2025 at 07:07:15PM +, Easwar Hariharan wrote: > The VF driver controls an endpoint attached to the pci-hyperv > controller. An invalidation sent by the PF driver in the host would be > delivered *to* the endpoint driver by the controller driver. > > Signed-off-by: Easwar Hariha

Re: [PATCH hyperv-next 0/2] x86/hyperv: VTL mode reboot fixes

2025-02-11 Thread Wei Liu
On Fri, Jan 17, 2025 at 01:07:00PM -0800, Roman Kisel wrote: > The first patch defines a specialized machine emergency restart > callback not to write to the physical address of 0x472 which is > what the native_machine_emergency_restart() does unconditionally. > > I first wanted to tweak that func

[PATCH hyperv-next v4 6/6] PCI: hv: Get vPCI MSI IRQ domain from DeviceTree

2025-02-11 Thread Roman Kisel
The hyperv-pci driver uses ACPI for MSI IRQ domain configuration on arm64. It won't be able to do that in the VTL mode where only DeviceTree can be used. Update the hyperv-pci driver to get vPCI MSI IRQ domain in the DeviceTree case, too. Signed-off-by: Roman Kisel --- drivers/hv/vmbus_drv.c

[PATCH hyperv-next v4 5/6] Drivers: hv: vmbus: Get the IRQ number from DeviceTree

2025-02-11 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 from DT. Signed-off-by: Roman Kisel --- drivers/hv/vmbus_drv.c | 36 +++

[PATCH hyperv-next v4 3/6] Drivers: hv: Provide arch-neutral implementation of get_vtl()

2025-02-11 Thread Roman Kisel
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 that detects VTL, make it arch-neutral to be able to employ it to get the VTL on arm64. Signed-off-by: Roma

[PATCH hyperv-next v4 4/6] dt-bindings: microsoft,vmbus: Add GIC and DMA coherence to the example

2025-02-11 Thread Roman Kisel
The existing example lacks the GIC interrupt controller property making it not possible to boot on ARM64, and it lacks the DMA coherence property making the kernel do more work on maintaining CPU caches on ARM64 although the VMBus trancations are cache-coherent. Add the GIC node, specify DMA coher

[PATCH hyperv-next v4 2/6] Drivers: hv: Enable VTL mode for arm64

2025-02-11 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 unconditionally. Signed

[PATCH hyperv-next v4 1/6] arm64: hyperv: Use SMCCC to detect hypervisor presence

2025-02-11 Thread Roman Kisel
The arm64 Hyper-V startup path relies on ACPI to detect running under a Hyper-V compatible hypervisor. That doesn't work on non-ACPI systems. Hoist the ACPI detection logic into a separate function. Then use the vendor-specific hypervisor service call (implemented recently in Hyper-V) via SMCCC in

[PATCH hyperv-next v4 0/6] arm64: hyperv: Support Virtual Trust Level Boot

2025-02-11 Thread Roman Kisel
This patch set allows the Hyper-V code to boot on ARM64 inside a Virtual Trust Level. These levels are a part of the Virtual Secure Mode documented in the Top-Level Functional Specification available at https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/tlfs/vsm. The OpenHCL parav

Re: [PATCH net-next v3] hv_netvsc: Set device flags for properly indicating bonding in Hyper-V

2025-02-11 Thread Stephen Hemminger
On Tue, 11 Feb 2025 16:20:26 -0800 Jakub Kicinski wrote: > On Fri, 7 Feb 2025 13:55:37 -0800 lon...@linuxonhyperv.com wrote: > > On Hyper-V platforms, a slave VF netdev always bonds to Netvsc and remains > > as Netvsc's only active slave as long as the slave device is present. This > > behavior

Re: [PATCH net-next v3] hv_netvsc: Set device flags for properly indicating bonding in Hyper-V

2025-02-11 Thread Jakub Kicinski
On Fri, 7 Feb 2025 13:55:37 -0800 lon...@linuxonhyperv.com wrote: > On Hyper-V platforms, a slave VF netdev always bonds to Netvsc and remains > as Netvsc's only active slave as long as the slave device is present. This > behavior is the same as a bonded device, but it's not user-configurable. >

[PATCH] hyperv: Add CONFIG_MSHV_ROOT to gate hv_root_partition checks

2025-02-11 Thread Nuno Das Neves
Introduce CONFIG_MSHV_ROOT as a tristate to enable root partition booting and future mshv driver functionality. Change hv_root_partition into a function which always returns false if CONFIG_MSHV_ROOT=n. Introduce hv_current_partition_type to store the type of partition (guest, root, or other kind

Re: [PATCH 03/16] x86/tsc: Add helper to register CPU and TSC freq calibration routines

2025-02-11 Thread Borislav Petkov
On Tue, Feb 11, 2025 at 09:43:23AM -0800, Sean Christopherson wrote: > It conflates two very different things: host/bare metal support for memory > encryption, and SEV guest support. For kernels that will never run in a VM, > pulling in all the SEV guest code just to enable host-side support for S

Re: [PATCH v5 1/3] cpu: export lockdep_assert_cpus_held()

2025-02-11 Thread Hamza Mahfooz
ping? On Wed, Jan 22, 2025 at 03:37:44PM +, Michael Kelley wrote: > From: Hamza Mahfooz Sent: Friday, January > 17, 2025 12:33 PM > > > > If CONFIG_HYPERV=m, lockdep_assert_cpus_held() is undefined for HyperV. > > So, export the function so that GPL drivers can use it more broadly. > > > >

Re: [PATCH 03/16] x86/tsc: Add helper to register CPU and TSC freq calibration routines

2025-02-11 Thread Sean Christopherson
On Tue, Feb 11, 2025, Borislav Petkov wrote: > On Fri, Jan 31, 2025 at 06:17:05PM -0800, Sean Christopherson wrote: > > > Add a TODO to call out that AMD_MEM_ENCRYPT is a mess and doesn't depend on > > HYPERVISOR_GUEST because it gates both guest and host code. > > Why is it a mess? > > I don't

Re: [PATCH 03/16] x86/tsc: Add helper to register CPU and TSC freq calibration routines

2025-02-11 Thread Borislav Petkov
On Fri, Jan 31, 2025 at 06:17:05PM -0800, Sean Christopherson wrote: Drop: jailhouse-...@googlegroups.com Alexey Makhalov from Cc as they're bouncing. > Add a TODO to call out that AMD_MEM_ENCRYPT is a mess and doesn't depend on > HYPERVISOR_GUEST because it gates both guest and host code. Wh

Re: [PATCH] net: mana: Add debug logs in MANA network driver

2025-02-11 Thread Andrew Lunn
On Tue, Feb 11, 2025 at 01:51:55AM -0800, Erni Sri Satya Vennela wrote: > Add debug statements to assist in debugging and monitoring > driver behaviour, making it easier to identify potential > issues during development and testing. > > Signed-off-by: Erni Sri Satya Vennela > --- > .../net/ethe

RE: [PATCH] net: mana: Add debug logs in MANA network driver

2025-02-11 Thread Haiyang Zhang
> -Original Message- > From: Erni Sri Satya Vennela > Sent: Tuesday, February 11, 2025 4:52 AM > To: KY Srinivasan ; Haiyang Zhang > ; wei@kernel.org; Dexuan Cui > ; andrew+net...@lunn.ch; da...@davemloft.net; > eduma...@google.com; k...@kernel.org; pab...@redhat.com; > michal.swiat

[PATCH] net: mana: Add debug logs in MANA network driver

2025-02-11 Thread Erni Sri Satya Vennela
Add debug statements to assist in debugging and monitoring driver behaviour, making it easier to identify potential issues during development and testing. Signed-off-by: Erni Sri Satya Vennela --- .../net/ethernet/microsoft/mana/gdma_main.c | 52 + .../net/ethernet/microsoft/m