Skip to content
  1. Oct 12, 2017
    • Wanpeng Li's avatar
      KVM: LAPIC: Apply change to TDCR right away to the timer · c301b909
      Wanpeng Li authored
      
      
      The description in the Intel SDM of how the divide configuration
      register is used: "The APIC timer frequency will be the processor's bus
      clock or core crystal clock frequency divided by the value specified in
      the divide configuration register."
      
      Observation of baremetal shown that when the TDCR is change, the TMCCT
      does not change or make a big jump in value, but the rate at which it
      count down change.
      
      The patch update the emulation to APIC timer to so that a change to the
      divide configuration would be reflected in the value of the counter and
      when the next interrupt is triggered.
      
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Signed-off-by: default avatarWanpeng Li <wanpeng.li@hotmail.com>
      [Fixed some whitespace and added a check for negative delta and running
       timer. - Radim]
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      c301b909
    • Wanpeng Li's avatar
      KVM: LAPIC: Keep timer running when switching between one-shot and periodic mode · dedf9c5e
      Wanpeng Li authored
      
      
      If we take TSC-deadline mode timer out of the picture, the Intel SDM
      does not say that the timer is disable when the timer mode is change,
      either from one-shot to periodic or vice versa.
      
      After this patch, the timer is no longer disarmed on change of mode, so
      the counter (TMCCT) keeps counting down.
      
      So what does a write to LVTT changes ? On baremetal, the change of mode
      is probably taken into account only when the counter reach 0. When this
      happen, LVTT is use to figure out if the counter should restard counting
      down from TMICT (so periodic mode) or stop counting (if one-shot mode).
      
      This patch is based on observation of the behavior of the APIC timer on
      baremetal as well as check that they does not go against the description
      written in the Intel SDM.
      
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Signed-off-by: default avatarWanpeng Li <wanpeng.li@hotmail.com>
      [Fixed rate limiting of periodic timer.]
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      dedf9c5e
    • Wanpeng Li's avatar
      KVM: LAPIC: Introduce limit_periodic_timer_frequency · ccbfa1d3
      Wanpeng Li authored
      
      
      Extract the logic of limit lapic periodic timer frequency to a new function,
      this function will be used by later patches.
      
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Signed-off-by: default avatarWanpeng Li <wanpeng.li@hotmail.com>
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      ccbfa1d3
    • Wanpeng Li's avatar
      KVM: LAPIC: Fix lapic timer mode transition · c69518c8
      Wanpeng Li authored
      
      
      SDM 10.5.4.1 TSC-Deadline Mode mentioned that "Transitioning between TSC-Deadline
      mode and other timer modes also disarms the timer". So the APIC Timer Initial Count
      Register for one-shot/periodic mode should be reset. This patch do it.
      
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Signed-off-by: default avatarWanpeng Li <wanpeng.li@hotmail.com>
      [Removed unnecessary definition of APIC_LVT_TIMER_MASK.]
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      c69518c8
    • Jeremy Cline's avatar
      tools/kvm_stat: Add Python 3 support to kvm_stat · 9cc5fbbb
      Jeremy Cline authored
      
      
      Make kvm_stat support Python 3 by changing the use of "print" to a
      function rather than a statement, switching from "iteritems" and
      "iterkeys" (removed in Python 3) to "items" and "keys" respectively,
      and decoding bytes to strings when dealing with text.
      
      With this change, kvm_stat is usable with Python 2.6 and greater.
      
      Signed-off-by: default avatarJeremy Cline <jeremy@jcline.org>
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      9cc5fbbb
    • Wanpeng Li's avatar
      KVM: VMX: Don't expose PLE enable if there is no hardware support · 0f107682
      Wanpeng Li authored
      
      
      KVM doesn't expose the PLE capability to the L1 hypervisor, however,
      ple_window still shows the default value on L1 hypervisor. This patch
      fixes it by clearing all the PLE related module parameter if there is
      no PLE capability.
      
      Reviewed-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Signed-off-by: default avatarWanpeng Li <wanpeng.li@hotmail.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      0f107682
    • Thomas Huth's avatar
      MAINTAINERS: Add Paul Mackerras as maintainer for KVM/powerpc · 8a60aea6
      Thomas Huth authored
      
      
      Paul is handling almost all of the powerpc related KVM patches nowadays,
      so he should be mentioned in the MAINTAINERS file accordingly.
      
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      8a60aea6
    • Haozhong Zhang's avatar
      KVM: nVMX: fix guest CR4 loading when emulating L2 to L1 exit · 8eb3f87d
      Haozhong Zhang authored
      When KVM emulates an exit from L2 to L1, it loads L1 CR4 into the
      guest CR4. Before this CR4 loading, the guest CR4 refers to L2
      CR4. Because these two CR4's are in different levels of guest, we
      should vmx_set_cr4() rather than kvm_set_cr4() here. The latter, which
      is used to handle guest writes to its CR4, checks the guest change to
      CR4 and may fail if the change is invalid.
      
      The failure may cause trouble. Consider we start
        a L1 guest with non-zero L1 PCID in use,
           (i.e. L1 CR4.PCIDE == 1 && L1 CR3.PCID != 0)
      and
        a L2 guest with L2 PCID disabled,
           (i.e. L2 CR4.PCIDE == 0)
      and following events may happen:
      
      1. If kvm_set_cr4() is used in load_vmcs12_host_state() to load L1 CR4
         into guest CR4 (in VMCS01) for L2 to L1 exit, it will fail because
         of PCID check. As a result, the guest CR4 recorded in L0 KVM (i.e.
         vcpu->arch.cr4) is left to the value of L2 CR4.
      
      2. Later, if L1 attempts to change its CR4, e.g., clearing VMXE bit,
         kvm_set_cr4() in L0 KVM will think L1 also wants to enable PCID,
         because the wrong L2 CR4 is used by L0 KVM as L1 CR4. As L1
         CR3.PCID != 0, L0 KVM will inject GP to L1 guest.
      
      Fixes: 4704d0be
      
       ("KVM: nVMX: Exiting from L2 to L1")
      Cc: qemu-stable@nongnu.org
      Signed-off-by: default avatarHaozhong Zhang <haozhong.zhang@intel.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      8eb3f87d
  2. Oct 10, 2017
    • Ladi Prosek's avatar
      KVM: MMU: always terminate page walks at level 1 · 829ee279
      Ladi Prosek authored
      is_last_gpte() is not equivalent to the pseudo-code given in commit
      6bb69c9b ("KVM: MMU: simplify last_pte_bitmap") because an incorrect
      value of last_nonleaf_level may override the result even if level == 1.
      
      It is critical for is_last_gpte() to return true on level == 1 to
      terminate page walks. Otherwise memory corruption may occur as level
      is used as an index to various data structures throughout the page
      walking code.  Even though the actual bug would be wherever the MMU is
      initialized (as in the previous patch), be defensive and ensure here
      that is_last_gpte() returns the correct value.
      
      This patch is also enough to fix CVE-2017-12188.
      
      Fixes: 6bb69c9b
      
      
      Cc: stable@vger.kernel.org
      Cc: Andy Honig <ahonig@google.com>
      Signed-off-by: default avatarLadi Prosek <lprosek@redhat.com>
      [Panic if walk_addr_generic gets an incorrect level; this is a serious
       bug and it's not worth a WARN_ON where the recovery path might hide
       further exploitable issues; suggested by Andrew Honig. - Paolo]
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      829ee279
    • Ladi Prosek's avatar
      KVM: nVMX: update last_nonleaf_level when initializing nested EPT · fd19d3b4
      Ladi Prosek authored
      The function updates context->root_level but didn't call
      update_last_nonleaf_level so the previous and potentially wrong value
      was used for page walks.  For example, a zero value of last_nonleaf_level
      would allow a potential out-of-bounds access in arch/x86/mmu/paging_tmpl.h's
      walk_addr_generic function (CVE-2017-12188).
      
      Fixes: 155a97a3
      
      
      Signed-off-by: default avatarLadi Prosek <lprosek@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      fd19d3b4
  3. Oct 09, 2017
  4. Oct 08, 2017
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 85b1bb24
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
      
       - a couple of serious fixes: use after free and blacklist for WRITE
         SAME
      
       - one error leg fix: write_pending failure
      
       - one user experience problem: do not override max_sectors_kb
      
       - one minor unused function removal
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: ibmvscsis: Fix write_pending failure path
        scsi: libiscsi: Remove iscsi_destroy_session
        scsi: libiscsi: Fix use-after-free race during iscsi_session_teardown
        scsi: sd: Do not override max_sectors_kb sysfs setting
        scsi: sd: Implement blacklist option for WRITE SAME w/ UNMAP
      85b1bb24
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 67936a41
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "I2C has three driver fixes for the newly introduced drivers and one ID
        addition for the i801 driver"
      
      * 'i2c/for-current-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: i2c-stm32f7: make structure stm32f7_setup static const
        i2c: ensure termination of *_device_id tables
        i2c: i801: Add support for Intel Cedar Fork
        i2c: stm32f7: fix setup structure
      67936a41
    • Linus Torvalds's avatar
      Merge tag 'mmc-v4.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 031b8140
      Linus Torvalds authored
      Pull MMC fixes from Ulf Hansson:
       "MMC core:
      
         - Fix driver strength selection when selecting hs400es
      
         - Delete bounce buffer handling:
      
           This change fixes a problem related to how bounce buffers are being
           allocated. However, instead of trying to fix that, let's just
           remove the mmc bounce buffer code altogether, as it has practically
           no use.
      
        MMC host:
      
         - meson-gx: A couple of fixes related to clock/phase/tuning
      
         - sdhci-xenon: Fix clock resource by adding an optional bus clock"
      
      * tag 'mmc-v4.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: sdhci-xenon: Fix clock resource by adding an optional bus clock
        mmc: meson-gx: include tx phase in the tuning process
        mmc: meson-gx: fix rx phase reset
        mmc: meson-gx: make sure the clock is rounded down
        mmc: Delete bounce buffer handling
        mmc: core: add driver strength selection when selecting hs400es
      031b8140
  5. Oct 07, 2017
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-linus-v4.14-rc4' of... · 1c86f2e4
      Linus Torvalds authored
      Merge tag 'hwmon-for-linus-v4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
      
      Pull hwmon fix from Guenter Roeck:
       "Fix up error path in xgene driver"
      
      * tag 'hwmon-for-linus-v4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (xgene) Fix up error handling path mixup in 'xgene_hwmon_probe()'
      1c86f2e4
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · dbeb1a8f
      Linus Torvalds authored
      Pull clk fixes from Stephen Boyd:
      
       - build fix to export the clk_bulk_prepare() symbol
      
       - suspend fix for Samsung Exynos SoCs where we need to keep clks on
         across suspend
      
       - two critical clk markings for clks that shouldn't ever turn off on
         Rockchip SoCs
      
       - a fix for a copy-paste mistake on Rockchip rk3128 causing some clks
         to touch the same bit and trample over one another
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: samsung: exynos4: Enable VPLL and EPLL clocks for suspend/resume cycle
        clk: Export clk_bulk_prepare()
        clk: rockchip: add sclk_timer5 as critical clock on rk3128
        clk: rockchip: fix up rk3128 pvtm and mipi_24m gate regs error
        clk: rockchip: add pclk_pmu as critical clock on rk3128
      dbeb1a8f
    • Linus Torvalds's avatar
      Merge tag 'arc-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc · ed0f72f4
      Linus Torvalds authored
      Pull ARC udpates from Vineet Gupta:
      
       - updates for various platforms
      
       - boot log updates for upcoming HS48 family of cores (dual issue)
      
      * tag 'arc-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
        ARC: [plat-hsdk]: Add reset controller node to manage ethernet reset
        ARC: [plat-hsdk]: Temporary fix to set CPU frequency to 1GHz
        ARC: fix allnoconfig build warning
        ARCv2: boot log: identify HS48 cores (dual issue)
        ARC: boot log: decontaminate ARCv2 ISA_CONFIG register
        arc: remove redundant UTS_MACHINE define in arch/arc/Makefile
        ARC: [plat-eznps] Update platform maintainer as Noam left
        ARC: [plat-hsdk] use actual clk driver to manage cpu clk
        ARC: [*defconfig] Reenable soft lock-up detector
        ARC: [plat-axs10x] sdio: Temporary fix of sdio ciu frequency
        ARC: [plat-hsdk] sdio: Temporary fix of sdio ciu frequency
        ARC: [plat-axs103] Add temporary quirk to reset ethernet IP
      ed0f72f4
    • Linus Torvalds's avatar
      Merge tag 'xfs-4.14-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · eab26ad1
      Linus Torvalds authored
      Pull xfs fixes from Darrick Wong:
      
       - fix a race between overlapping copy on write aio
      
       - fix cow fork swapping when we defragment reflinked files
      
      * tag 'xfs-4.14-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: handle racy AIO in xfs_reflink_end_cow
        xfs: always swap the cow forks when swapping extents
      eab26ad1
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · 17d084c8
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "A collection of fixes for this series. This contains:
      
         - NVMe pull request from Christoph, one uuid attribute fix, and one
           fix for the controller memory buffer address for remapped BARs.
      
         - use-after-free fix for bsg, from Benjamin Block.
      
         - bcache race/use-after-free fix for a list traversal, fixing a
           regression in this merge window. From Coly Li.
      
         - null_blk change configfs dependency change from a 'depends' to a
           'select'. This is a change from this merge window as well. From me.
      
         - nbd signal fix from Josef, fixing a regression introduced with the
           status code changes.
      
         - nbd MAINTAINERS mailing list entry update.
      
         - blk-throttle stall fix from Joseph Qi.
      
         - blk-mq-debugfs fix from Omar, fixing an issue where we don't
           register the IO scheduler debugfs directory, if the driver is
           loaded with it. Only shows up if you switch through the sysfs
           interface"
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        bsg-lib: fix use-after-free under memory-pressure
        nvme-pci: Use PCI bus address for data/queues in CMB
        blk-mq-debugfs: fix device sched directory for default scheduler
        null_blk: change configfs dependency to select
        blk-throttle: fix possible io stall when upgrade to max
        MAINTAINERS: update list for NBD
        nbd: fix -ERESTARTSYS handling
        nvme: fix visibility of "uuid" ns attribute
        bcache: use llist_for_each_entry_safe() in __closure_wake_up()
      17d084c8
    • Linus Torvalds's avatar
      Merge tag 'pci-v4.14-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 80cf1f8c
      Linus Torvalds authored
      Pull PCI fixes from Bjorn Helgaas:
       "Fix legacy IDE probe issues exposed by recent PCI core IRQ mapping
        changes (Bartlomiej Zolnierkiewicz, Lorenzo Pieralisi)"
      
      * tag 'pci-v4.14-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        ide: fix IRQ assignment for PCI bus order probing
        ide: pci: free PCI BARs on initialization failure
        ide: free hwif->portdev on hwif_init() failure
      80cf1f8c
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 27549068
      Linus Torvalds authored
      Pull arm64 fixes from Catalin Marinas:
      
       - Bring initialisation of user space undefined instruction handling
         early (core_initcall) since late_initcall() happens after modprobe in
         initramfs is invoked. Similar fix for fpsimd initialisation
      
       - Increase the kernel stack when KASAN is enabled
      
       - Bring the PCI ACS enabling earlier via the
         iort_init_platform_devices()
      
       - Fix misleading data abort address printing (decimal vs hex)
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: Ensure fpsimd support is ready before userspace is active
        arm64: Ensure the instruction emulation is ready for userspace
        arm64: Use larger stacks when KASAN is selected
        ACPI/IORT: Fix PCI ACS enablement
        arm64: fix misleading data abort decoding
      27549068
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 8d473320
      Linus Torvalds authored
      Pull KVM fixes from Radim Krčmář:
      
       - fix PPC XIVE interrupt delivery
      
       - fix x86 RCU breakage from asynchronous page faults when built without
         PREEMPT_COUNT
      
       - fix x86 build with -frecord-gcc-switches
      
       - fix x86 build without X86_LOCAL_APIC
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: add X86_LOCAL_APIC dependency
        x86/kvm: Move kvm_fastop_exception to .fixup section
        kvm/x86: Avoid async PF preempting the kernel incorrectly
        KVM: PPC: Book3S: Fix server always zero from kvmppc_xive_get_xive()
      8d473320
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma · d109d83f
      Linus Torvalds authored
      Pull rdma fixes from Doug Ledford:
       "This is a pretty small pull request. Only 6 patches in total. There
        are no outstanding -rc patches on the mailing list after this pull
        request, so only if some new issues are discovered in the remainder of
        the rc cycles will you hear from me again.
      
        Summary:
         - a fix for iwpm netlink usage
         - a fix for error unwinding in mlx5
         - two fixes to vlan handling in qedr
         - a couple small i40iw fixes"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
        i40iw: Fix port number for query QP
        i40iw: Add missing memory barriers
        RDMA/qedr: Parse vlan priority as sl
        RDMA/qedr: Parse VLAN ID correctly and ignore the value of zero
        IB/mlx5: Fix label order in error path handling
        RDMA/iwpm: Properly mark end of NL messages
      d109d83f
    • Linus Torvalds's avatar
      Merge branch 'for-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · bf2db0b9
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
       "Two more fixes for bugs introduced in 4.13.
      
        The sector_t problem with 32bit architecture and !LBDAF config seems
        serious but the number of affected deployments is hopefully low.
      
        The clashing status bits could lead to a confusing in-memory state of
        the whole-filesystem operations if used with the quota override sysfs
        knob"
      
      * 'for-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        Btrfs: fix overlap of fs_info::flags values
        btrfs: avoid overflow when sector_t is 32 bit
      bf2db0b9
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-4.14-rc4' of git://github.com/ceph/ceph-client · b77779b9
      Linus Torvalds authored
      Pull ceph fixes from Ilya Dryomov:
       "Two fixups for CephFS snapshot-handling patches in -rc1"
      
      * tag 'ceph-for-4.14-rc4' of git://github.com/ceph/ceph-client:
        ceph: fix __choose_mds() for LSSNAP request
        ceph: properly queue cap snap for newly created snap realm
      b77779b9
  6. Oct 06, 2017
    • Eugeniy Paltsev's avatar
      ARC: [plat-hsdk]: Add reset controller node to manage ethernet reset · ab8eb7db
      Eugeniy Paltsev authored
      
      
      DW ethernet controller on HSDK hangs sometimes after SW reset, so
      add reset node to make possible to reset DW ethernet controller HW.
      
      Signed-off-by: default avatarEugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
      Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
      ab8eb7db
    • Linus Torvalds's avatar
      Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs · 8d4ef4e1
      Linus Torvalds authored
      Pull overlayfs fixes from Miklos Szeredi:
       "Fix a regression in 4.14 and one in 4.13. The latter is a case when
        Docker is doing something it really shouldn't and gets away with it.
        We now print a warning instead of erroring out.
      
        There are also fixes to several error paths"
      
      * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs:
        ovl: fix regression caused by exclusive upper/work dir protection
        ovl: fix missing unlock_rename() in ovl_do_copy_up()
        ovl: fix dentry leak in ovl_indexdir_cleanup()
        ovl: fix dput() of ERR_PTR in ovl_cleanup_index()
        ovl: fix error value printed in ovl_lookup_index()
        ovl: fix may_write_real() for overlayfs directories
      8d4ef4e1
    • Linus Torvalds's avatar
      Merge tag 'powerpc-4.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 1249b571
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "Nine small fixes, really nothing that stands out.
      
        A work-around for a spurious MCE on Power9. A CXL fault handling fix,
        some fixes to the new XIVE code, and a fix to the new 32-bit
        STRICT_KERNEL_RWX code.
      
        Fixes for old code/stable: an fix to an incorrect TLB flush on boot
        but not on any current machines, a compile error on 4xx and a fix to
        memory hotplug when using radix (Power9).
      
        Thanks to: Anton Blanchard, Cédric Le Goater, Christian Lamparter,
        Christophe Leroy, Christophe Lombard, Guenter Roeck, Jeremy Kerr,
        Michael Neuling, Nicholas Piggin"
      
      * tag 'powerpc-4.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/powernv: Increase memory block size to 1GB on radix
        powerpc/mm: Call flush_tlb_kernel_range with interrupts enabled
        powerpc/xive: Clear XIVE internal structures when a CPU is removed
        powerpc/xive: Fix IPI reset
        powerpc/4xx: Fix compile error with 64K pages on 40x, 44x
        powerpc: Fix action argument for cpufeatures-based TLB flush
        cxl: Fix memory page not handled
        powerpc: Fix workaround for spurious MCE on POWER9
        powerpc: Handle MCE on POWER9 with only DSISR bit 30 set
      1249b571
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-for-v4.14-rc4' of git://people.freedesktop.org/~airlied/linux · 9c0c1ada
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Some i915 fixes from the last two weeks (as they were on a strange
        base and I just waited for rc3), also a single sun4i hdmi fix"
      
      * tag 'drm-fixes-for-v4.14-rc4' of git://people.freedesktop.org/~airlied/linux:
        drm/i915/glk: Fix DMC/DC state idleness calculation
        drm/i915/cnl: Reprogram DMC firmware after S3/S4 resume
        drm/i915: Fix DDI PHY init if it was already on
        drm/sun4i: hdmi: Disable clks in bind function error path and unbind function
        drm/i915/bios: ignore HDMI on port A
        drm/i915: remove redundant variable hw_check
        drm/i915: always update ELD connector type after get modes
      9c0c1ada
    • Linus Torvalds's avatar
      Merge branch 'core-watchdog-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 27efed3e
      Linus Torvalds authored
      Pull watchddog clean-up and fixes from Thomas Gleixner:
       "The watchdog (hard/softlockup detector) code is pretty much broken in
        its current state. The patch series addresses this by removing all
        duct tape and refactoring it into a workable state.
      
        The reasons why I ask for inclusion that late in the cycle are:
      
         1) The code causes lockdep splats vs. hotplug locking which get
            reported over and over. Unfortunately there is no easy fix.
      
         2) The risk of breakage is minimal because it's already broken
      
         3) As 4.14 is a long term stable kernel, I prefer to have working
            watchdog code in that and the lockdep issues resolved. I wouldn't
            ask you to pull if 4.14 wouldn't be a LTS kernel or if the
            solution would be easy to backport.
      
         4) The series was around before the merge window opened, but then got
            delayed due to the UP failure caused by the for_each_cpu()
            surprise which we discussed recently.
      
        Changes vs. V1:
      
         - Addressed your review points
      
         - Addressed the warning in the powerpc code which was discovered late
      
         - Changed two function names which made sense up to a certain point
           in the series. Now they match what they do in the end.
      
         - Fixed a 'unused variable' warning, which got not detected by the
           intel robot. I triggered it when trying all possible related config
           combinations manually. Randconfig testing seems not random enough.
      
        The changes have been tested by and reviewed by Don Zickus and tested
        and acked by Micheal Ellerman for powerpc"
      
      * 'core-watchdog-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (36 commits)
        watchdog/core: Put softlockup_threads_initialized under ifdef guard
        watchdog/core: Rename some softlockup_* functions
        powerpc/watchdog: Make use of watchdog_nmi_probe()
        watchdog/core, powerpc: Lock cpus across reconfiguration
        watchdog/core, powerpc: Replace watchdog_nmi_reconfigure()
        watchdog/hardlockup/perf: Fix spelling mistake: "permanetely" -> "permanently"
        watchdog/hardlockup/perf: Cure UP damage
        watchdog/hardlockup: Clean up hotplug locking mess
        watchdog/hardlockup/perf: Simplify deferred event destroy
        watchdog/hardlockup/perf: Use new perf CPU enable mechanism
        watchdog/hardlockup/perf: Implement CPU enable replacement
        watchdog/hardlockup/perf: Implement init time detection of perf
        watchdog/hardlockup/perf: Implement init time perf validation
        watchdog/core: Get rid of the racy update loop
        watchdog/core, powerpc: Make watchdog_nmi_reconfigure() two stage
        watchdog/sysctl: Clean up sysctl variable name space
        watchdog/sysctl: Get rid of the #ifdeffery
        watchdog/core: Clean up header mess
        watchdog/core: Further simplify sysctl handling
        watchdog/core: Get rid of the thread teardown/setup dance
        ...
      27efed3e
    • Suzuki K Poulose's avatar
      arm64: Ensure fpsimd support is ready before userspace is active · ae2e972d
      Suzuki K Poulose authored
      
      
      We register the pm/hotplug callbacks for FPSIMD as late_initcall,
      which happens after the userspace is active (from initramfs via
      populate_rootfs, a rootfs_initcall). Make sure we are ready even
      before the userspace could potentially use it, by promoting to
      a core_initcall.
      
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Dave Martin <dave.martin@arm.com>
      Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      ae2e972d
    • Suzuki K Poulose's avatar
      arm64: Ensure the instruction emulation is ready for userspace · c0d8832e
      Suzuki K Poulose authored
      
      
      We trap and emulate some instructions (e.g, mrs, deprecated instructions)
      for the userspace. However the handlers for these are registered as
      late_initcalls and the userspace could be up and running from the initramfs
      by that time (with populate_rootfs, which is a rootfs_initcall()). This
      could cause problems for the early applications ending up in failure
      like :
      
      [   11.152061] modprobe[93]: undefined instruction: pc=0000ffff8ca48ff4
      
      This patch promotes the specific calls to core_initcalls, which are
      guaranteed to be completed before we hit userspace.
      
      Cc: stable@vger.kernel.org
      Cc: Dave Martin <dave.martin@arm.com>
      Cc: Matthias Brugger <mbrugger@suse.com>
      Cc: James Morse <james.morse@arm.com>
      Reported-by: default avatarMatwey V. Kornilov <matwey.kornilov@gmail.com>
      Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      c0d8832e
    • Anton Blanchard's avatar
      powerpc/powernv: Increase memory block size to 1GB on radix · 53ecde0b
      Anton Blanchard authored
      Memory hot unplug on PowerNV radix hosts is broken. Our memory block
      size is 256MB but since we map the linear region with very large
      pages, each pte we tear down maps 1GB.
      
      A hot unplug of one 256MB memory block results in 768MB of memory
      getting unintentionally unmapped. At this point we are likely to oops.
      
      Fix this by increasing our memory block size to 1GB on PowerNV radix
      hosts.
      
      Fixes: 4b5d62ca
      
       ("powerpc/mm: add radix__remove_section_mapping()")
      Cc: stable@vger.kernel.org # v4.11+
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      53ecde0b
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2017-10-05' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes · baf7c1f7
      Dave Airlie authored
      One bugfix in sun4i for 4.14
      
      * tag 'drm-misc-fixes-2017-10-05' of git://anongit.freedesktop.org/git/drm-misc:
        drm/sun4i: hdmi: Disable clks in bind function error path and unbind function
      baf7c1f7
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2017-10-04' of... · 00bb09c4
      Dave Airlie authored
      Merge tag 'drm-intel-fixes-2017-10-04' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes
      
      drm/i915 fixes for 4.14-rc4:
      
      All 3 highest GLK bugs fixed by Imre:
      - GLK drv reload - Fix DDI Phy init if it was already on.
      - GLK suspend resume - Reprogram DMC firmware after s3/s4.
      - GLK DC states - Fix idleness calculation.
      
      * tag 'drm-intel-fixes-2017-10-04' of git://anongit.freedesktop.org/git/drm-intel:
        drm/i915/glk: Fix DMC/DC state idleness calculation
        drm/i915/cnl: Reprogram DMC firmware after S3/S4 resume
        drm/i915: Fix DDI PHY init if it was already on
      00bb09c4
    • Linus Torvalds's avatar
      Merge tag 'pm-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 7a92616c
      Linus Torvalds authored
      Pull power management fix from Rafael Wysocki:
       "This fixes a code ordering issue in the main suspend-to-idle loop that
        causes some "low power S0 idle" conditions to be incorrectly reported
        as unmet with suspend/resume debug messages enabled"
      
      * tag 'pm-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        PM / s2idle: Invoke the ->wake() platform callback earlier
      7a92616c
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-sleep' · ca935f8e
      Rafael J. Wysocki authored
      * pm-sleep:
        PM / s2idle: Invoke the ->wake() platform callback earlier
      ca935f8e
    • Linus Torvalds's avatar
      Merge tag 'for-4.14/dm-fixes' of... · 076264ad
      Linus Torvalds authored
      Merge tag 'for-4.14/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
      
      Pull device mapper fixes from Mike Snitzer:
      
       - a stable fix for the alignment of the event number reported at the
         end of the 'DM_LIST_DEVICES' ioctl.
      
       - a couple stable fixes for the DM crypt target.
      
       - a DM raid health status reporting fix.
      
      * tag 'for-4.14/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm raid: fix incorrect status output at the end of a "recover" process
        dm crypt: reject sector_size feature if device length is not aligned to it
        dm crypt: fix memory leak in crypt_ctr_cipher_old()
        dm ioctl: fix alignment of event number in the device list
      076264ad
    • Jonathan Brassow's avatar
      dm raid: fix incorrect status output at the end of a "recover" process · 41dcf197
      Jonathan Brassow authored
      
      
      There are three important fields that indicate the overall health and
      status of an array: dev_health, sync_ratio, and sync_action.  They tell
      us the condition of the devices in the array, and the degree to which
      the array is synchronized.
      
      This commit fixes a condition that is reported incorrectly.  When a member
      of the array is being rebuilt or a new device is added, the "recover"
      process is used to synchronize it with the rest of the array.  When the
      process is complete, but the sync thread hasn't yet been reaped, it is
      possible for the state of MD to be:
       mddev->recovery = [ MD_RECOVERY_RUNNING MD_RECOVERY_RECOVER MD_RECOVERY_DONE ]
       curr_resync_completed = <max dev size> (but not MaxSector)
       and all rdevs to be In_sync.
      This causes the 'array_in_sync' output parameter that is passed to
      rs_get_progress() to be computed incorrectly and reported as 'false' --
      or not in-sync.  This in turn causes the dev_health status characters to
      be reported as all 'a', rather than the proper 'A'.
      
      This can cause erroneous output for several seconds at a time when tools
      will want to be checking the condition due to events that are raised at
      the end of a sync process.  Fix this by properly calculating the
      'array_in_sync' return parameter in rs_get_progress().
      
      Also, remove an unnecessary intermediate 'recovery_cp' variable in
      rs_get_progress().
      
      Signed-off-by: default avatarJonathan Brassow <jbrassow@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      41dcf197
    • Arnd Bergmann's avatar
      KVM: add X86_LOCAL_APIC dependency · e42eef4b
      Arnd Bergmann authored
      The rework of the posted interrupt handling broke building without
      support for the local APIC:
      
      ERROR: "boot_cpu_physical_apicid" [arch/x86/kvm/kvm-intel.ko] undefined!
      
      That configuration is probably not particularly useful anyway, so
      we can avoid the randconfig failures by adding a Kconfig dependency.
      
      Fixes: 8b306e2f
      
       ("KVM: VMX: avoid double list add with VT-d posted interrupts")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      e42eef4b