lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 14 Aug 2020 13:32:11 +0000
From:   Michael Kelley <mikelley@...rosoft.com>
To:     Wei Liu <wei.liu@...nel.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        KY Srinivasan <kys@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "bp@...en8.de" <bp@...en8.de>, "x86@...nel.org" <x86@...nel.org>,
        "hpa@...or.com" <hpa@...or.com>
Subject: RE: [PATCH 1/1] Drivers: hv: vmbus: Add parsing of VMbus interrupt in
 ACPI DSDT

From: Wei Liu <wei.liu@...nel.org> Sent: Friday, August 14, 2020 2:44 AM
> 
> On Thu, Aug 13, 2020 at 04:51:19PM -0700, Michael Kelley wrote:
> > On ARM64, Hyper-V now specifies the interrupt to be used by VMbus
> > in the ACPI DSDT.  This information is not used on x86 because the
> > interrupt vector must be hardcoded.  But update the generic
> > VMbus driver to do the parsing and pass the information to the
> > architecture specific code that sets up the Linux IRQ.  Update
> > consumers of the interrupt to get it from an architecture specific
> > function.
> >
> > Signed-off-by: Michael Kelley <mikelley@...rosoft.com>
> > ---
> >  arch/x86/include/asm/mshyperv.h |  1 +
> >  arch/x86/kernel/cpu/mshyperv.c  |  3 ++-
> >  drivers/hv/hv.c                 |  2 +-
> >  drivers/hv/vmbus_drv.c          | 30 +++++++++++++++++++++++++++---
> >  include/asm-generic/mshyperv.h  |  4 +++-
> >  5 files changed, 34 insertions(+), 6 deletions(-)
> >
> > diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h
> > index 4f77b8f..ffc2899 100644
> > --- a/arch/x86/include/asm/mshyperv.h
> > +++ b/arch/x86/include/asm/mshyperv.h
> > @@ -54,6 +54,7 @@ typedef int (*hyperv_fill_flush_list_func)(
> >  #define hv_enable_vdso_clocksource() \
> >  	vclocks_set_used(VDSO_CLOCKMODE_HVCLOCK);
> >  #define hv_get_raw_timer() rdtsc_ordered()
> > +#define hv_get_vector() HYPERVISOR_CALLBACK_VECTOR
> >
> >  /*
> >   * Reference to pv_ops must be inline so objtool
> > diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
> > index 3112544..538aa87 100644
> > --- a/arch/x86/kernel/cpu/mshyperv.c
> > +++ b/arch/x86/kernel/cpu/mshyperv.c
> > @@ -55,9 +55,10 @@
> >  	set_irq_regs(old_regs);
> >  }
> >
> > -void hv_setup_vmbus_irq(void (*handler)(void))
> > +int hv_setup_vmbus_irq(int irq, void (*handler)(void))
> >  {
> 
> irq is not used here. Did you perhaps forget to commit a chunk of code?

No, this is correct.  Per the commit message, the irq information
parsed from the DSDT is not used in the x86 code.  But it is used on the
ARM64 side.  I should add a comment to that effect here in the x86
code so there's no confusion.

Michael

> 
> >  	vmbus_handler = handler;
> > +	return 0;
> >  }
> 
> Wei.

Powered by blists - more mailing lists