21 Jul, 2018

12 commits

  • Implement the required MMIO accessors for GICv2 and GICv3 for the
    IGROUPR distributor and redistributor registers.

    This can allow guests to change behavior compared to running on previous
    versions of KVM, but only to align with the architecture and hardware
    implementations.

    This also allows userspace to configure the interrupts groups for GICv3.
    We don't allow userspace to write the groups on GICv2 just yet, because
    that would result in GICv2 guests not receiving interrupts after
    migrating from an older kernel that exposes GICv2 interrupts as group 1.

    Reviewed-by: Andrew Jones
    Signed-off-by: Christoffer Dall
    Signed-off-by: Marc Zyngier

    Christoffer Dall
     
  • If userspace attempts to write a GICD_IIDR that does not match the
    kernel version, return an error to userspace. The intention is to allow
    implementation changes inside KVM while avoiding silently breaking
    migration resulting in guests not running without any clear indication
    of what went wrong.

    Reviewed-by: Andrew Jones
    Signed-off-by: Christoffer Dall
    Signed-off-by: Marc Zyngier

    Christoffer Dall
     
  • Currently we do not allow any vgic mmio write operations to fail, which
    makes sense from mmio traps from the guest. However, we should be able
    to report failures to userspace, if userspace writes incompatible values
    to read-only registers. Rework the internal interface to allow errors
    to be returned on the write side for userspace writes.

    Reviewed-by: Andrew Jones
    Signed-off-by: Christoffer Dall
    Signed-off-by: Marc Zyngier

    Christoffer Dall
     
  • Now when we have a group configuration on the struct IRQ, use this state
    when populating the LR and signaling interrupts as either group 0 or
    group 1 to the VM. Depending on the model of the emulated GIC, and the
    guest's configuration of the VMCR, interrupts may be signaled as IRQs or
    FIQs to the VM.

    Reviewed-by: Andrew Jones
    Signed-off-by: Christoffer Dall
    Signed-off-by: Marc Zyngier

    Christoffer Dall
     
  • In preparation for proper group 0 and group 1 support in the vgic, we
    add a field in the struct irq to store the group of all interrupts.

    We initialize the group to group 0 when emulating GICv2 and to group 1
    when emulating GICv3, just like we treat them today. LPIs are always
    group 1. We also continue to ignore writes from the guest, preserving
    existing functionality, for now.

    Finally, we also add this field to the vgic debug logic to show the
    group for all interrupts.

    Reviewed-by: Andrew Jones
    Signed-off-by: Christoffer Dall
    Signed-off-by: Marc Zyngier

    Christoffer Dall
     
  • We currently don't support grouping in the emulated VGIC, which is a
    known defect on KVM (not hurting any currently used guests as far as
    we're aware). This is currently handled by treating all interrupts as
    group 0 interrupts for an emulated GICv2 and always signaling interrupts
    as group 0 to the virtual CPU interface.

    However, when reading which group interrupts belongs to in the guest
    from the emulated VGIC, the VGIC currently reports group 1 instead of
    group 0, which is misleading. Fix this temporarily before introducing
    full group support by changing the hander to _raz instead of _rao.

    Fixes: fb848db39661a "KVM: arm/arm64: vgic-new: Add GICv2 MMIO handling framework"
    Reviewed-by: Andrew Jones
    Signed-off-by: Christoffer Dall
    Signed-off-by: Marc Zyngier

    Christoffer Dall
     
  • As we are about to tweak implementation aspects of the VGIC emulation,
    while still preserving some level of backwards compatibility support,
    add a field to keep track of the implementation revision field which is
    reported to the VM and to userspace.

    Reviewed-by: Andrew Jones
    Signed-off-by: Christoffer Dall
    Signed-off-by: Marc Zyngier

    Christoffer Dall
     
  • Instead of hardcoding the shifts and masks in the GICD_IIDR register
    emulation, let's add the definition of these fields to the GIC header
    files and use them.

    This will make things more obvious when we're going to bump the revision
    in the IIDR when we'll make guest-visible changes to the implementation.

    Reviewed-by: Andrew Jones
    Signed-off-by: Christoffer Dall
    Signed-off-by: Marc Zyngier

    Christoffer Dall
     
  • When running on a non-VHE system, we initialize tpidr_el2 to
    contain the per-CPU offset required to reach per-cpu variables.

    Actually, we initialize it twice: the first time as part of the
    EL2 initialization, by copying tpidr_el1 into its el2 counterpart,
    and another time by calling into __kvm_set_tpidr_el2.

    It turns out that the first part is wrong, as it includes the
    distance between the kernel mapping and the linear mapping, while
    EL2 only cares about the linear mapping. This was the last vestige
    of the first per-cpu use of tpidr_el2 that came in with SDEI.
    The only caller then was hyp_panic(), and its now using the
    pc-relative get_host_ctxt() stuff, instead of kimage addresses
    from the literal pool.

    It is not a big deal, as we override it straight away, but it is
    slightly confusing. In order to clear said confusion, let's
    set this directly as part of the hyp-init code, and drop the
    ad-hoc HYP helper.

    Reviewed-by: James Morse
    Acked-by: Christoffer Dall
    Signed-off-by: Marc Zyngier

    Marc Zyngier
     
  • The vgic debugfs file only knows about SGI/PPI/SPI interrupts, and
    completely ignores LPIs. Let's fix that.

    Signed-off-by: Marc Zyngier

    Marc Zyngier
     
  • In the quest to remove all stack VLA usage from the kernel[1], this
    switches to using a maximum size and adds sanity checks. Additionally
    cleans up some of the int-vs-u32 usage and adds additional bounds checking.
    As it currently stands, this will always be 8 bytes until the ABI changes.

    [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com

    Cc: Christoffer Dall
    Cc: Eric Auger
    Cc: Andre Przywara
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: kvmarm@lists.cs.columbia.edu
    Signed-off-by: Kees Cook
    [maz: dropped WARN_ONs]
    Signed-off-by: Marc Zyngier

    Kees Cook
     
  • The vgic_init function can race with kvm_arch_vcpu_create() which does
    not hold kvm_lock() and we therefore have no synchronization primitives
    to ensure we're doing the right thing.

    As the user is trying to initialize or run the VM while at the same time
    creating more VCPUs, we just have to refuse to initialize the VGIC in
    this case rather than silently failing with a broken VCPU.

    Reviewed-by: Eric Auger
    Signed-off-by: Christoffer Dall
    Signed-off-by: Marc Zyngier

    Christoffer Dall
     

09 Jul, 2018

16 commits

  • Trapping blocking WFE is extremely beneficial in situations where
    the system is oversubscribed, as it allows another thread to run
    while being blocked. In a non-oversubscribed environment, this is
    the complete opposite, and trapping WFE is just unnecessary overhead.

    Let's only enable WFE trapping if the CPU has more than a single task
    to run (that is, more than just the vcpu thread).

    Reviewed-by: Christoffer Dall
    Signed-off-by: Marc Zyngier

    Marc Zyngier
     
  • There is no need to perform cache maintenance operations when
    creating the HYP page tables if we have the multiprocessing
    extensions. ARMv7 mandates them with the virtualization support,
    and ARMv8 just mandates them unconditionally.

    Let's remove these operations.

    Acked-by: Mark Rutland
    Acked-by: Christoffer Dall
    Signed-off-by: Marc Zyngier

    Marc Zyngier
     
  • The {pmd,pud,pgd}_populate accessors usage have always been a bit weird
    in KVM. We don't have a struct mm to pass (and neither does the kernel
    most of the time, but still...), and the 32bit code has all kind of
    cache maintenance that doesn't make sense on ARMv7+ when MP extensions
    are mandatory (which is the case when the VEs are present).

    Let's bite the bullet and provide our own implementations. The only bit
    of architectural code left has to do with building the table entry
    itself (arm64 having up to 52bit PA, arm lacking PUD level).

    Acked-by: Mark Rutland
    Acked-by: Christoffer Dall
    Signed-off-by: Marc Zyngier

    Marc Zyngier
     
  • The arm and arm64 KVM page tables accessors are pointlessly different
    between the two architectures, and likely both wrong one way or another:
    arm64 lacks a dsb(), and arm doesn't use WRITE_ONCE.

    Let's unify them.

    Acked-by: Mark Rutland
    Acked-by: Christoffer Dall
    Signed-off-by: Marc Zyngier

    Marc Zyngier
     
  • On systems where CTR_EL0.DIC is set, we don't need to perform
    icache invalidation to guarantee that we'll fetch the right
    instruction stream.

    This also means that taking a permission fault to invalidate the
    icache is an unnecessary overhead.

    On such systems, we can safely leave the page as being executable.

    Acked-by: Catalin Marinas
    Acked-by: Mark Rutland
    Acked-by: Christoffer Dall
    Signed-off-by: Marc Zyngier

    Marc Zyngier
     
  • Set/Way handling is one of the ugliest corners of KVM. We shouldn't
    have to handle that, but better safe than sorry.

    Thankfully, FWB fixes this for us by not requiering any maintenance
    (the guest is forced to use cacheable memory, no matter what it says,
    and the whole system is garanteed to be cache coherent), which means
    we don't have to emulate S/W CMOs, and don't have to track VM ops either.

    We still have to trap S/W though, if only to prevent the guest from
    doing something bad.

    Reviewed-by: Christoffer Dall
    Signed-off-by: Marc Zyngier

    Marc Zyngier
     
  • Up to ARMv8.3, the combinaison of Stage-1 and Stage-2 attributes
    results in the strongest attribute of the two stages. This means
    that the hypervisor has to perform quite a lot of cache maintenance
    just in case the guest has some non-cacheable mappings around.

    ARMv8.4 solves this problem by offering a different mode (FWB) where
    Stage-2 has total control over the memory attribute (this is limited
    to systems where both I/O and instruction fetches are coherent with
    the dcache). This is achieved by having a different set of memory
    attributes in the page tables, and a new bit set in HCR_EL2.

    On such a system, we can then safely sidestep any form of dcache
    management.

    Acked-by: Catalin Marinas
    Reviewed-by: Christoffer Dall
    Signed-off-by: Marc Zyngier

    Marc Zyngier
     
  • Linus Torvalds
     
  • Pull ARM SoC fixes from Olof Johansson:
    "A small collection of fixes, sort of the usual at this point, all for
    i.MX or OMAP:

    - Enable ULPI drivers on i.MX to avoid a hang

    - Pinctrl fix for touchscreen on i.MX51 ZII RDU1

    - Fixes for ethernet clock references on am3517

    - mmc0 write protect detection fix for am335x

    - kzalloc->kcalloc conversion in an OMAP driver

    - USB metastability fix for USB on dra7

    - Fix touchscreen wakeup on am437x"

    * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    ARM: imx_v4_v5_defconfig: Select ULPI support
    ARM: imx_v6_v7_defconfig: Select ULPI support
    ARM: dts: omap3: Fix am3517 mdio and emac clock references
    ARM: dts: am335x-bone-common: Fix mmc0 Write Protect
    bus: ti-sysc: Use 2-factor allocator arguments
    ARM: dts: dra7: Disable metastability workaround for USB2
    ARM: dts: imx51-zii-rdu1: fix touchscreen pinctrl
    ARM: dts: am437x: make edt-ft5x06 a wakeup source

    Linus Torvalds
     
  • Pull x86/pti updates from Thomas Gleixner:
    "Two small fixes correcting the handling of SSB mitigations on AMD
    processors"

    * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/bugs: Fix the AMD SSBD usage of the SPEC_CTRL MSR
    x86/bugs: Update when to check for the LS_CFG SSBD mitigation

    Linus Torvalds
     
  • Pull x86 fixes from Thomas Gleixner:

    - Prevent an out-of-bounds access in mtrr_write()

    - Break a circular dependency in the new hyperv IPI acceleration code

    - Address the build breakage related to inline functions by enforcing
    gnu_inline and explicitly bringing native_save_fl() out of line,
    which also adds a set of _ARM_ARG macros which provide 32/64bit
    safety.

    - Initialize the shadow CR4 per cpu variable before using it.

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/mtrr: Don't copy out-of-bounds data in mtrr_write
    x86/hyper-v: Fix the circular dependency in IPI enlightenment
    x86/paravirt: Make native_save_fl() extern inline
    x86/asm: Add _ASM_ARG* constants for argument registers to
    compiler-gcc.h: Add __attribute__((gnu_inline)) to all inline declarations
    x86/mm/32: Initialize the CR4 shadow before __flush_tlb_all()

    Linus Torvalds
     
  • Pull scheduler fixes from Thomas Gleixner:

    - The hopefully final fix for the reported race problems in
    kthread_parkme(). The previous attempt still left a hole and was
    partially wrong.

    - Plug a race in the remote tick mechanism which triggers a warning
    about updates not being done correctly. That's a false positive if
    the race condition is hit as the remote CPU is idle. Plug it by
    checking the condition again when holding run queue lock.

    - Fix a bug in the utilization estimation of a run queue which causes
    the estimation to be 0 when a run queue is throttled.

    - Advance the global expiration of the period timer when the timer is
    restarted after a idle period. Otherwise the expiry time is stale and
    the timer fires prematurely.

    - Cure the drift between the bandwidth timer and the runqueue
    accounting, which leads to bogus throttling of runqueues

    - Place the call to cpufreq_update_util() correctly so the function
    will observe the correct number of running RT tasks and not a stale
    one.

    * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    kthread, sched/core: Fix kthread_parkme() (again...)
    sched/util_est: Fix util_est_dequeue() for throttled cfs_rq
    sched/fair: Advance global expiration when period timer is restarted
    sched/fair: Fix bandwidth timer clock drift condition
    sched/rt: Fix call to cpufreq_update_util()
    sched/nohz: Skip remote tick on idle task entirely

    Linus Torvalds
     
  • Pull objtool fix from Thomas Gleixner:
    "A single fix for objtool to address a bug in handling the cold
    subfunction detection for aliased functions which was added recently.
    The bug causes objtool to enter an infinite loop"

    * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    objtool: Support GCC 8 '-fnoreorder-functions'

    Linus Torvalds
     
  • Pull crypto fixes from Herbert Xu:

    - add missing RETs in x86 aegis/morus

    - fix build error in arm speck

    * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    crypto: x86 - Add missing RETs
    crypto: arm/speck - fix building in Thumb2 mode

    Linus Torvalds
     
  • Pull ext4 bugfixes from Ted Ts'o:
    "Bug fixes for ext4; most of which relate to vulnerabilities where a
    maliciously crafted file system image can result in a kernel OOPS or
    hang.

    At least one fix addresses an inline data bug could be triggered by
    userspace without the need of a crafted file system (although it does
    require that the inline data feature be enabled)"

    * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
    ext4: check superblock mapped prior to committing
    ext4: add more mount time checks of the superblock
    ext4: add more inode number paranoia checks
    ext4: avoid running out of journal credits when appending to an inline file
    jbd2: don't mark block as modified if the handle is out of credits
    ext4: never move the system.data xattr out of the inode body
    ext4: clear i_data in ext4_inode_info when removing inline data
    ext4: include the illegal physical block in the bad map ext4_error msg
    ext4: verify the depth of extent tree in ext4_find_extent()
    ext4: only look at the bg_flags field if it is valid
    ext4: make sure bitmaps and the inode table don't overlap with bg descriptors
    ext4: always check block group bounds in ext4_init_block_bitmap()
    ext4: always verify the magic number in xattr blocks
    ext4: add corruption check in ext4_xattr_set_entry()
    ext4: add warn_on_error mount option

    Linus Torvalds
     
  • Pull PCI fixes from Bjorn Helgaas:

    - Fix a use-after-free in the endpoint code (Dan Carpenter)

    - Stop defaulting CONFIG_PCIE_DW_PLAT_HOST to yes (Geert Uytterhoeven)

    - Fix an nfp regression caused by a change in how we limit the number
    of VFs we can enable (Jakub Kicinski)

    - Fix failure path cleanup issues in the new R-Car gen3 PHY support
    (Marek Vasut)

    - Fix leaks of OF nodes in faraday, xilinx-nwl, xilinx (Nicholas Mc
    Guire)

    * tag 'pci-v4.18-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
    nfp: stop limiting VFs to 0
    PCI/IOV: Reset total_VFs limit after detaching PF driver
    PCI: faraday: Add missing of_node_put()
    PCI: xilinx-nwl: Add missing of_node_put()
    PCI: xilinx: Add missing of_node_put()
    PCI: endpoint: Use after free in pci_epf_unregister_driver()
    PCI: controller: dwc: Do not let PCIE_DW_PLAT_HOST default to yes
    PCI: rcar: Clean up PHY init on failure
    PCI: rcar: Shut the PHY down in failpath

    Linus Torvalds
     

08 Jul, 2018

6 commits

  • Pull cifs fixes from Steve French:
    "Five smb3/cifs fixes for stable (including for some leaks and memory
    overwrites) and also a few fixes for recent regressions in packet
    signing.

    Additional testing at the recent SMB3 test event, and some good work
    by Paulo and others spotted the issues fixed here. In addition to my
    xfstest runs on these, Aurelien and Stefano did additional test runs
    to verify this set"

    * tag '4.18-rc3-smb3fixes' of git://git.samba.org/sfrench/cifs-2.6:
    cifs: Fix stack out-of-bounds in smb{2,3}_create_lease_buf()
    cifs: Fix infinite loop when using hard mount option
    cifs: Fix slab-out-of-bounds in send_set_info() on SMB2 ACE setting
    cifs: Fix memory leak in smb2_set_ea()
    cifs: fix SMB1 breakage
    cifs: Fix validation of signed data in smb2
    cifs: Fix validation of signed data in smb3+
    cifs: Fix use after free of a mid_q_entry

    Linus Torvalds
     
  • Pull dma-mapping fix from Christoph Hellwig:
    "Revert an incorrect dma-mapping commit for 4.18-rc"

    * tag 'dma-mapping-4.18-3' of git://git.infradead.org/users/hch/dma-mapping:
    Revert "iommu/intel-iommu: Enable CONFIG_DMA_DIRECT_OPS=y and clean up intel_{alloc,free}_coherent()"

    Linus Torvalds
     
  • Pull dmaengine fixes from Vinod Koul:
    "We have few odd driver fixes and one email update change for you this
    time:

    - Driver fixes for k3dma (off by one), pl330 (burst residue
    granularity) and omap-dma (incorrect residue_granularity)

    - Sinan's email update"

    * tag 'dmaengine-fix-4.18-rc4' of git://git.infradead.org/users/vkoul/slave-dma:
    dmaengine: k3dma: Off by one in k3_of_dma_simple_xlate()
    dmaengine: pl330: report BURST residue granularity
    MAINTAINERS: Update email-id of Sinan Kaya
    dmaengine: ti: omap-dma: Fix OMAP1510 incorrect residue_granularity

    Linus Torvalds
     
  • Pull IPMI fixes from Corey Minyard:
    "A couple of small fixes: one to the BMC side of things that fixes an
    interrupt issue, and one oops fix if init fails in a certain way on
    the client driver"

    * tag 'for-linus-4.18-2' of git://github.com/cminyard/linux-ipmi:
    ipmi: kcs_bmc: fix IRQ exception if the channel is not open
    ipmi: Cleanup oops on initialization failure

    Linus Torvalds
     
  • Pull arm64 LDFLAGS clean-up from Catalin Marinas:

    - use aarch64elf instead of aarch64linux

    - move endianness options to LDFLAGS instead from LD

    - remove no-op '-p' linker flag

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
    arm64: remove no-op -p linker flag
    arm64: add endianness option to LDFLAGS instead of LD
    arm64: Use aarch64elf and aarch64elfb emulation mode variants

    Linus Torvalds
     
  • Don't access the provided buffer out of bounds - this can cause a kernel
    out-of-bounds read when invoked through sys_splice() or other things that
    use kernel_write()/__kernel_write().

    Fixes: 7f8ec5a4f01a ("x86/mtrr: Convert to use strncpy_from_user() helper")
    Signed-off-by: Jann Horn
    Signed-off-by: Thomas Gleixner
    Cc: Andy Shevchenko
    Cc: "H. Peter Anvin"
    Cc: stable@vger.kernel.org
    Link: https://lkml.kernel.org/r/20180706215003.156702-1-jannh@google.com

    Jann Horn
     

07 Jul, 2018

5 commits

  • Pull SCSI fixes from James Bottomley:
    "This is two minor bug fixes (aacraid, target) and a fix for a
    potential exploit in the way sg handles teardown"

    * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
    scsi: sg: mitigate read/write abuse
    scsi: aacraid: Fix PD performance regression over incorrect qd being set
    scsi: target: Fix truncated PR-in ReadKeys response

    Linus Torvalds
     
  • Pull block fixes from Jens Axboe:
    "Two minor fixes for this series:

    - add LOOP_SET_BLOCK_SIZE as compat ioctl (Evan Green)

    - drbd use-after-free fix (Lars Ellenberg)"

    * tag 'for-linus-20180706' of git://git.kernel.dk/linux-block:
    loop: Add LOOP_SET_BLOCK_SIZE in compat ioctl
    drbd: fix access after free

    Linus Torvalds
     
  • Pull clk fixes from Stephen Boyd:
    "The usual collection of driver fixlets:

    - build cleanup/fix for the sunxi makefile that tried to save size
    but failed and prevented dead code elimination from working

    - two Davinci clk driver fixes for a typo causing build failures in
    different configurations and an error check that checks the wrong
    variable.

    - undo the DT ABI breaking imx6ul binding header shuffle that got
    merged this cycle"

    * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
    dt-bindings: clock: imx6ul: Do not change the clock definition order
    clk: davinci: fix a typo (which leads to build failures)
    clk: davinci: cfgchip: testing the wrong variable
    clk: sunxi-ng: replace lib-y with obj-y

    Linus Torvalds
     
  • Pull VFIO fixes from Alex Williamson:

    - Make vfio-pci IGD extensions optional via Kconfig (Alex Williamson)

    - Remove unused and soon to be removed map_atomic callback from mbochs
    sample driver, add unmap callback to avoid dmabuf leaks (Gerd
    Hoffmann)

    - Fix usage of get_user_pages_longterm() (Jason Gunthorpe)

    - Fix sample mbochs driver vm_operations_struct.fault return type
    (Souptick Joarder)

    * tag 'vfio-v4.18-rc4' of git://github.com/awilliam/linux-vfio:
    sample/vfio-mdev: Change return type to vm_fault_t
    vfio: Use get_user_pages_longterm correctly
    sample/mdev/mbochs: add mbochs_kunmap_dmabuf
    sample/mdev/mbochs: remove mbochs_kmap_atomic_dmabuf
    vfio/pci: Make IGD support a configurable option

    Linus Torvalds
     
  • Pull s390 fixes from Martin Schwidefsky:
    "A few more changes for v4.18:

    - wire up the two new system calls io_pgetevents and rseq

    - fix a register corruption in the expolines code for machines
    without EXRL

    - drastically reduce the memory utilization of the dasd driver

    - fix reference counting for KVM page table pages"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
    s390: wire up rseq system call
    s390: wire up io_pgetevents system call
    s390/mm: fix refcount usage for 4K pgste
    s390/dasd: reduce the default queue depth and nr of hardware queues
    s390: Correct register corruption in critical section cleanup

    Linus Torvalds
     

06 Jul, 2018

1 commit

  • The IPI hypercalls depend on being able to map the Linux notion of CPU ID
    to the hypervisor's notion of the CPU ID. The array hv_vp_index[] provides
    this mapping. Code for populating this array depends on the IPI functionality.
    Break this circular dependency.

    [ tglx: Use a proper define instead of '-1' with a u32 variable as pointed
    out by Vitaly ]

    Fixes: 68bb7bfb7985 ("X86/Hyper-V: Enable IPI enlightenments")
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: Thomas Gleixner
    Tested-by: Michael Kelley
    Cc: gregkh@linuxfoundation.org
    Cc: devel@linuxdriverproject.org
    Cc: olaf@aepfle.de
    Cc: apw@canonical.com
    Cc: jasowang@redhat.com
    Cc: hpa@zytor.com
    Cc: sthemmin@microsoft.com
    Cc: Michael.H.Kelley@microsoft.com
    Cc: vkuznets@redhat.com
    Link: https://lkml.kernel.org/r/20180703230155.15160-1-kys@linuxonhyperv.com

    K. Y. Srinivasan