Message ID | 1628092359-61351-6-git-send-email-mikelley@microsoft.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Enable Linux guests on Hyper-V on ARM64 | expand |
On Wed, Aug 04, 2021 at 08:52:39AM -0700, Michael Kelley wrote: > Update drivers/hv/Kconfig so CONFIG_HYPERV can be selected on > ARM64, causing the Hyper-V specific code to be built. Exclude the > Hyper-V enlightened clocks/timers code from being built for ARM64. > > Signed-off-by: Michael Kelley <mikelley@microsoft.com> > Reviewed-by: Boqun Feng <boqun.feng@gmail.com> > Acked-by: Marc Zyngier <maz@kernel.org> > Acked-by: Mark Rutland <mark.rutland@arm.com> > > --- > drivers/hv/Kconfig | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/hv/Kconfig b/drivers/hv/Kconfig > index 66c794d..e509d5d 100644 > --- a/drivers/hv/Kconfig > +++ b/drivers/hv/Kconfig > @@ -4,7 +4,8 @@ menu "Microsoft Hyper-V guest support" > > config HYPERV > tristate "Microsoft Hyper-V client drivers" > - depends on X86 && ACPI && X86_LOCAL_APIC && HYPERVISOR_GUEST > + depends on ACPI && ((X86 && X86_LOCAL_APIC && HYPERVISOR_GUEST) \ > + || (ARM64 && !CPU_BIG_ENDIAN)) > select PARAVIRT > select X86_HV_CALLBACK_VECTOR Does this need to be: select X86_HV_CALLBACK_VECTOR if X86 I haven't checked whether it gives a warning on arm64 but that symbol doesn't exist. Anyway, I can fix it up locally. As an additional patch (it can be done later, once this goes upstream) I think we should replace the depends on with a single ARCH_HAS_HYPERV.
On Wed, Aug 04, 2021 at 05:10:41PM +0100, Catalin Marinas wrote: > On Wed, Aug 04, 2021 at 08:52:39AM -0700, Michael Kelley wrote: > > Update drivers/hv/Kconfig so CONFIG_HYPERV can be selected on > > ARM64, causing the Hyper-V specific code to be built. Exclude the > > Hyper-V enlightened clocks/timers code from being built for ARM64. > > > > Signed-off-by: Michael Kelley <mikelley@microsoft.com> > > Reviewed-by: Boqun Feng <boqun.feng@gmail.com> > > Acked-by: Marc Zyngier <maz@kernel.org> > > Acked-by: Mark Rutland <mark.rutland@arm.com> > > > > --- > > drivers/hv/Kconfig | 5 +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/hv/Kconfig b/drivers/hv/Kconfig > > index 66c794d..e509d5d 100644 > > --- a/drivers/hv/Kconfig > > +++ b/drivers/hv/Kconfig > > @@ -4,7 +4,8 @@ menu "Microsoft Hyper-V guest support" > > > > config HYPERV > > tristate "Microsoft Hyper-V client drivers" > > - depends on X86 && ACPI && X86_LOCAL_APIC && HYPERVISOR_GUEST > > + depends on ACPI && ((X86 && X86_LOCAL_APIC && HYPERVISOR_GUEST) \ > > + || (ARM64 && !CPU_BIG_ENDIAN)) > > select PARAVIRT > > select X86_HV_CALLBACK_VECTOR > > Does this need to be: > > select X86_HV_CALLBACK_VECTOR if X86 > > I haven't checked whether it gives a warning on arm64 but that symbol > doesn't exist. > > Anyway, I can fix it up locally. I can fix it up while I queue these patches. Wei.
From: Wei Liu <wei.liu@kernel.org> Sent: Wednesday, August 4, 2021 9:40 AM > > On Wed, Aug 04, 2021 at 05:10:41PM +0100, Catalin Marinas wrote: > > On Wed, Aug 04, 2021 at 08:52:39AM -0700, Michael Kelley wrote: > > > Update drivers/hv/Kconfig so CONFIG_HYPERV can be selected on > > > ARM64, causing the Hyper-V specific code to be built. Exclude the > > > Hyper-V enlightened clocks/timers code from being built for ARM64. > > > > > > Signed-off-by: Michael Kelley <mikelley@microsoft.com> > > > Reviewed-by: Boqun Feng <boqun.feng@gmail.com> > > > Acked-by: Marc Zyngier <maz@kernel.org> > > > Acked-by: Mark Rutland <mark.rutland@arm.com> > > > > > > --- > > > drivers/hv/Kconfig | 5 +++-- > > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/hv/Kconfig b/drivers/hv/Kconfig > > > index 66c794d..e509d5d 100644 > > > --- a/drivers/hv/Kconfig > > > +++ b/drivers/hv/Kconfig > > > @@ -4,7 +4,8 @@ menu "Microsoft Hyper-V guest support" > > > > > > config HYPERV > > > tristate "Microsoft Hyper-V client drivers" > > > - depends on X86 && ACPI && X86_LOCAL_APIC && HYPERVISOR_GUEST > > > + depends on ACPI && ((X86 && X86_LOCAL_APIC && HYPERVISOR_GUEST) \ > > > + || (ARM64 && !CPU_BIG_ENDIAN)) > > > select PARAVIRT > > > select X86_HV_CALLBACK_VECTOR > > > > Does this need to be: > > > > select X86_HV_CALLBACK_VECTOR if X86 > > > > I haven't checked whether it gives a warning on arm64 but that symbol > > doesn't exist. The symbol is only referenced in code under arch/x86, so there's no warning when building for arm64. But yes, it would be good hygiene to add the "if X86". Michael > > > > Anyway, I can fix it up locally. > > I can fix it up while I queue these patches. > > Wei.
diff --git a/drivers/hv/Kconfig b/drivers/hv/Kconfig index 66c794d..e509d5d 100644 --- a/drivers/hv/Kconfig +++ b/drivers/hv/Kconfig @@ -4,7 +4,8 @@ menu "Microsoft Hyper-V guest support" config HYPERV tristate "Microsoft Hyper-V client drivers" - depends on X86 && ACPI && X86_LOCAL_APIC && HYPERVISOR_GUEST + depends on ACPI && ((X86 && X86_LOCAL_APIC && HYPERVISOR_GUEST) \ + || (ARM64 && !CPU_BIG_ENDIAN)) select PARAVIRT select X86_HV_CALLBACK_VECTOR help @@ -12,7 +13,7 @@ config HYPERV system. config HYPERV_TIMER - def_bool HYPERV + def_bool HYPERV && X86 config HYPERV_UTILS tristate "Microsoft Hyper-V Utilities driver"