1. 02 8月, 2018 1 次提交
  2. 26 7月, 2018 3 次提交
    • P
      KVM: PPC: Book3S HV: Read kvm->arch.emul_smt_mode under kvm->lock · b5c6f760
      Paul Mackerras 提交于
      Commit 1e175d2e ("KVM: PPC: Book3S HV: Pack VCORE IDs to access full
      VCPU ID space", 2018-07-25) added code that uses kvm->arch.emul_smt_mode
      before any VCPUs are created.  However, userspace can change
      kvm->arch.emul_smt_mode at any time up until the first VCPU is created.
      Hence it is (theoretically) possible for the check in
      kvmppc_core_vcpu_create_hv() to race with another userspace thread
      changing kvm->arch.emul_smt_mode.
      
      This fixes it by moving the test that uses kvm->arch.emul_smt_mode into
      the block where kvm->lock is held.
      Signed-off-by: NPaul Mackerras <paulus@ozlabs.org>
      b5c6f760
    • P
      KVM: PPC: Book3S HV: Allow creating max number of VCPUs on POWER9 · 1ebe6b81
      Paul Mackerras 提交于
      Commit 1e175d2e ("KVM: PPC: Book3S HV: Pack VCORE IDs to access full
      VCPU ID space", 2018-07-25) allowed use of VCPU IDs up to
      KVM_MAX_VCPU_ID on POWER9 in all guest SMT modes and guest emulated
      hardware SMT modes.  However, with the current definition of
      KVM_MAX_VCPU_ID, a guest SMT mode of 1 and an emulated SMT mode of 8,
      it is only possible to create KVM_MAX_VCPUS / 2 VCPUS, because
      threads_per_subcore is 4 on POWER9 CPUs.  (Using an emulated SMT mode
      of 8 is useful when migrating VMs to or from POWER8 hosts.)
      
      This increases KVM_MAX_VCPU_ID to 8 * KVM_MAX_VCPUS when HV KVM is
      configured in, so that a full complement of KVM_MAX_VCPUS VCPUs can
      be created on POWER9 in all guest SMT modes and emulated hardware
      SMT modes.
      Signed-off-by: NPaul Mackerras <paulus@ozlabs.org>
      1ebe6b81
    • S
      KVM: PPC: Book3S HV: Pack VCORE IDs to access full VCPU ID space · 1e175d2e
      Sam Bobroff 提交于
      It is not currently possible to create the full number of possible
      VCPUs (KVM_MAX_VCPUS) on Power9 with KVM-HV when the guest uses fewer
      threads per core than its core stride (or "VSMT mode"). This is
      because the VCORE ID and XIVE offsets grow beyond KVM_MAX_VCPUS
      even though the VCPU ID is less than KVM_MAX_VCPU_ID.
      
      To address this, "pack" the VCORE ID and XIVE offsets by using
      knowledge of the way the VCPU IDs will be used when there are fewer
      guest threads per core than the core stride. The primary thread of
      each core will always be used first. Then, if the guest uses more than
      one thread per core, these secondary threads will sequentially follow
      the primary in each core.
      
      So, the only way an ID above KVM_MAX_VCPUS can be seen, is if the
      VCPUs are being spaced apart, so at least half of each core is empty,
      and IDs between KVM_MAX_VCPUS and (KVM_MAX_VCPUS * 2) can be mapped
      into the second half of each core (4..7, in an 8-thread core).
      
      Similarly, if IDs above KVM_MAX_VCPUS * 2 are seen, at least 3/4 of
      each core is being left empty, and we can map down into the second and
      third quarters of each core (2, 3 and 5, 6 in an 8-thread core).
      
      Lastly, if IDs above KVM_MAX_VCPUS * 4 are seen, only the primary
      threads are being used and 7/8 of the core is empty, allowing use of
      the 1, 5, 3 and 7 thread slots.
      
      (Strides less than 8 are handled similarly.)
      
      This allows the VCORE ID or offset to be calculated quickly from the
      VCPU ID or XIVE server numbers, without access to the VCPU structure.
      
      [paulus@ozlabs.org - tidied up comment a little, changed some WARN_ONCE
       to pr_devel, wrapped line, fixed id check.]
      Signed-off-by: NSam Bobroff <sam.bobroff@au1.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@ozlabs.org>
      1e175d2e
  3. 18 7月, 2018 4 次提交
    • N
      KVM: PPC: Book3S HV: Fix constant size warning · 0abb75b7
      Nicholas Mc Guire 提交于
      The constants are 64bit but not explicitly declared UL resulting
      in sparse warnings. Fix this by declaring the constants UL.
      Signed-off-by: NNicholas Mc Guire <hofrat@osadl.org>
      Signed-off-by: NPaul Mackerras <paulus@ozlabs.org>
      0abb75b7
    • N
      KVM: PPC: Book3S HV: Add of_node_put() in success path · 51eaa08f
      Nicholas Mc Guire 提交于
      The call to of_find_compatible_node() is returning a pointer with
      incremented refcount so it must be explicitly decremented after the
      last use. As here it is only being used for checking of node presence
      but the result is not actually used in the success path it can be
      dropped immediately.
      Signed-off-by: NNicholas Mc Guire <hofrat@osadl.org>
      Fixes: commit f725758b ("KVM: PPC: Book3S HV: Use OPAL XICS emulation on POWER9")
      Signed-off-by: NPaul Mackerras <paulus@ozlabs.org>
      51eaa08f
    • A
      KVM: PPC: Book3S: Fix matching of hardware and emulated TCE tables · 76346cd9
      Alexey Kardashevskiy 提交于
      When attaching a hardware table to LIOBN in KVM, we match table parameters
      such as page size, table offset and table size. However the tables are
      created via very different paths - VFIO and KVM - and the VFIO path goes
      through the platform code which has minimum TCE page size requirement
      (which is 4K but since we allocate memory by pages and cannot avoid
      alignment anyway, we align to 64k pages for powernv_defconfig).
      
      So when we match the tables, one might be bigger that the other which
      means the hardware table cannot get attached to LIOBN and DMA mapping
      fails.
      
      This removes the table size alignment from the guest visible table.
      This does not affect the memory allocation which is still aligned -
      kvmppc_tce_pages() takes care of this.
      
      This relaxes the check we do when attaching tables to allow the hardware
      table be bigger than the guest visible table.
      
      Ideally we want the KVM table to cover the same space as the hardware
      table does but since the hardware table may use multiple levels, and
      all levels must use the same table size (IODA2 design), the area it can
      actually cover might get very different from the window size which
      the guest requested, even though the guest won't map it all.
      
      Fixes: ca1fc489 "KVM: PPC: Book3S: Allow backing bigger guest IOMMU pages with smaller physical pages"
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NPaul Mackerras <paulus@ozlabs.org>
      76346cd9
    • S
      KVM: PPC: Remove mmio_vsx_tx_sx_enabled in KVM MMIO emulation · 4eeb8556
      Simon Guo 提交于
      Originally PPC KVM MMIO emulation uses only 0~31#(5 bits) for VSR
      reg number, and use mmio_vsx_tx_sx_enabled field together for
      0~63# VSR regs.
      
      Currently PPC KVM MMIO emulation is reimplemented with analyse_instr()
      assistance.  analyse_instr() returns 0~63 for VSR register number, so
      it is not necessary to use additional mmio_vsx_tx_sx_enabled field
      any more.
      
      This patch extends related reg bits (expand io_gpr to u16 from u8
      and use 6 bits for VSR reg#), so that mmio_vsx_tx_sx_enabled can
      be removed.
      Signed-off-by: NSimon Guo <wei.guo.simon@gmail.com>
      Signed-off-by: NPaul Mackerras <paulus@ozlabs.org>
      4eeb8556
  4. 25 6月, 2018 1 次提交
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 6f0d349d
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Fix netpoll OOPS in r8169, from Ville Syrjälä.
      
       2) Fix bpf instruction alignment on powerpc et al., from Eric Dumazet.
      
       3) Don't ignore IFLA_MTU attribute when creating new ipvlan links. From
          Xin Long.
      
       4) Fix use after free in AF_PACKET, from Eric Dumazet.
      
       5) Mis-matched RTNL unlock in xen-netfront, from Ross Lagerwall.
      
       6) Fix VSOCK loopback on big-endian, from Claudio Imbrenda.
      
       7) Missing RX buffer offset correction when computing DMA addresses in
          mvneta driver, from Antoine Tenart.
      
       8) Fix crashes in DCCP's ccid3_hc_rx_send_feedback, from Eric Dumazet.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (34 commits)
        sfc: make function efx_rps_hash_bucket static
        strparser: Corrected typo in documentation.
        qmi_wwan: add support for the Dell Wireless 5821e module
        cxgb4: when disabling dcb set txq dcb priority to 0
        net_sched: remove a bogus warning in hfsc
        net: dccp: switch rx_tstamp_last_feedback to monotonic clock
        net: dccp: avoid crash in ccid3_hc_rx_send_feedback()
        net: Remove depends on HAS_DMA in case of platform dependency
        MAINTAINERS: Add file patterns for dsa device tree bindings
        net: mscc: make sparse happy
        net: mvneta: fix the Rx desc DMA address in the Rx path
        Documentation: e1000: Fix docs build error
        Documentation: e100: Fix docs build error
        Documentation: e1000: Use correct heading adornment
        Documentation: e100: Use correct heading adornment
        ipv6: mcast: fix unsolicited report interval after receiving querys
        vhost_net: validate sock before trying to put its fd
        VSOCK: fix loopback on big-endian systems
        net: ethernet: ti: davinci_cpdma: make function cpdma_desc_pool_create static
        xen-netfront: Update features after registering netdev
        ...
      6f0d349d
  5. 24 6月, 2018 22 次提交
    • C
      sfc: make function efx_rps_hash_bucket static · 829eb053
      Colin Ian King 提交于
      The function efx_rps_hash_bucket is local to the source and
      does not need to be in global scope, so make it static.
      
      Cleans up sparse warning:
      symbol 'efx_rps_hash_bucket' was not declared. Should it be static?
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      829eb053
    • L
      Linux 4.18-rc2 · 7daf201d
      Linus Torvalds 提交于
      7daf201d
    • L
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · c81b995f
      Linus Torvalds 提交于
      Pull perf fixes from Thomas Gleixner:
       "A pile of perf updates:
      
        Kernel side:
      
         - Remove an incorrect warning in uprobe_init_insn() when
           insn_get_length() fails. The error return code is handled at the
           call site.
      
         - Move the inline keyword to the right place in the perf ringbuffer
           code to address a W=1 build warning.
      
        Tooling:
      
        perf stat:
      
         - Fix metric column header display alignment
      
         - Improve error messages for default attributes, providing better
           output for error in command line.
      
         - Add --interval-clear option, to provide a 'watch' like printing
      
        perf script:
      
         - Show hw-cache events too
      
        perf c2c:
      
         - Fix data dependency problem in layout of 'struct c2c_hist_entry'
      
        Core:
      
         - Do not blindly assume that 'struct perf_evsel' can be obtained via
           a straight forward container_of() as there are call sites which
           hand in a plain 'struct hist' which is not part of a container.
      
         - Fix error index in the PMU event parser, so that error messages can
           point to the problematic token"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/core: Move the inline keyword at the beginning of the function declaration
        uprobes/x86: Remove incorrect WARN_ON() in uprobe_init_insn()
        perf script: Show hw-cache events
        perf c2c: Keep struct hist_entry at the end of struct c2c_hist_entry
        perf stat: Add event parsing error handling to add_default_attributes
        perf stat: Allow to specify specific metric column len
        perf stat: Fix metric column header display alignment
        perf stat: Use only color_fprintf call in print_metric_only
        perf stat: Add --interval-clear option
        perf tools: Fix error index for pmu event parser
        perf hists: Reimplement hists__has_callchains()
        perf hists browser gtk: Use hist_entry__has_callchains()
        perf hists: Make hist_entry__has_callchains() work with 'perf c2c'
        perf hists: Save the callchain_size in struct hist_entry
      c81b995f
    • L
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 2ce413ec
      Linus Torvalds 提交于
      Pull rseq fixes from Thomas Gleixer:
       "A pile of rseq related fixups:
      
         - Prevent infinite recursion when delivering SIGSEGV
      
         - Remove the abort of rseq critical section on fork() as syscalls
           inside rseq critical sections are explicitely forbidden. So no
           point in doing the abort on the child.
      
         - Align the rseq structure on 32 bytes in the ARM selftest code.
      
         - Fix file permissions of the test script"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        rseq: Avoid infinite recursion when delivering SIGSEGV
        rseq/cleanup: Do not abort rseq c.s. in child on fork()
        rseq/selftests/arm: Align 'struct rseq_cs' on 32 bytes
        rseq/selftests: Make run_param_test.sh executable
      2ce413ec
    • L
      Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 64dd7655
      Linus Torvalds 提交于
      Pull EFI fixes from Thomas Gleixner:
       "Two fixlets for the EFI maze:
      
         - Properly zero variables to prevent an early boot hang on EFI mixed
           mode systems
      
         - Fix the fallout of merging the 32bit and 64bit variants of EFI PCI
           related code which ended up chosing the 32bit variant of the actual
           EFi call invocation which leads to failures on 64bit"
      
      * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        efi/x86: Fix incorrect invocation of PciIo->Attributes()
        efi/libstub/tpm: Initialize efi_physical_addr_t vars to zero for mixed mode
      64dd7655
    • L
      Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d3a6749c
      Linus Torvalds 提交于
      Pull core fixes from Thomas Gleixner:
       "Two tiny fixes:
      
         - Add the missing machine_real_restart() to objtools noreturn list so
           it stops complaining
      
         - Fix a trivial comment typo"
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        kernel.h: Fix a typo in comment
        objtool: Add machine_real_restart() to the noreturn list
      d3a6749c
    • L
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d4e860ea
      Linus Torvalds 提交于
      Pull x86 fixes from Thomas Gleixner:
       "A set of fixes for x86:
      
         - Make Xen PV guest deal with speculative store bypass correctly
      
         - Address more fallout from the 5-Level pagetable handling. Undo an
           __initdata annotation to avoid section mismatch and malfunction
           when post init code would touch the freed variable.
      
         - Handle exception fixup in math_error() before calling notify_die().
           The reverse call order incorrectly triggers notify_die() listeners
           for soemthing which is handled correctly at the site which issues
           the floating point instruction.
      
         - Fix an off by one in the LLC topology calculation on AMD
      
         - Handle non standard memory block sizes gracefully un UV platforms
      
         - Plug a memory leak in the microcode loader
      
         - Sanitize the purgatory build magic
      
         - Add the x86 specific device tree bindings directory to the x86
           MAINTAINER file patterns"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mm: Fix 'no5lvl' handling
        Revert "x86/mm: Mark __pgtable_l5_enabled __initdata"
        x86/CPU/AMD: Fix LLC ID bit-shift calculation
        MAINTAINERS: Add file patterns for x86 device tree bindings
        x86/microcode/intel: Fix memleak in save_microcode_patch()
        x86/platform/UV: Add kernel parameter to set memory block size
        x86/platform/UV: Use new set memory block size function
        x86/platform/UV: Add adjustable set memory block size function
        x86/build: Remove unnecessary preparation for purgatory
        Revert "kexec/purgatory: Add clean-up for purgatory directory"
        x86/xen: Add call of speculative_store_bypass_ht_init() to PV paths
        x86: Call fixup_exception() before notify_die() in math_error()
      d4e860ea
    • L
      Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 177d363e
      Linus Torvalds 提交于
      Pull x86 pti fixes from Thomas Gleixner:
       "Two small updates for the speculative distractions:
      
         - Make it more clear to the compiler that array_index_mask_nospec()
           is not subject for optimizations. It's not perfect, but ...
      
         - Don't report XEN PV guests as vulnerable because their mitigation
           state depends on the hypervisor. Report unknown and refer to the
           hypervisor requirement"
      
      * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/spectre_v1: Disable compiler optimizations over array_index_mask_nospec()
        x86/pti: Don't report XenPV as vulnerable
      177d363e
    • L
      Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 2da2ca24
      Linus Torvalds 提交于
      Pull locking fixes from Thomas Gleixner:
       "A set of fixes and updates for the locking code:
      
         - Prevent lockdep from updating irq state within its own code and
           thereby confusing itself.
      
         - Buid fix for older GCCs which mistreat anonymous unions
      
         - Add a missing lockdep annotation in down_read_non_onwer() which
           causes up_read_non_owner() to emit a lockdep splat
      
         - Remove the custom alpha dec_and_lock() implementation which is
           incorrect in terms of ordering and use the generic one.
      
        The remaining two commits are not strictly fixes. They provide irqsave
        variants of atomic_dec_and_lock() and refcount_dec_and_lock(). These
        are required to merge the relevant updates and cleanups into different
        maintainer trees for 4.19, so routing them into mainline without
        actual users is the sanest approach.
      
        They should have been in -rc1, but last weekend I took the liberty to
        just avoid computers in order to regain some mental sanity"
      
      * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        locking/qspinlock: Fix build for anonymous union in older GCC compilers
        locking/lockdep: Do not record IRQ state within lockdep code
        locking/rwsem: Fix up_read_non_owner() warning with DEBUG_RWSEMS
        locking/refcounts: Implement refcount_dec_and_lock_irqsave()
        atomic: Add irqsave variant of atomic_dec_and_lock()
        alpha: Remove custom dec_and_lock() implementation
      2da2ca24
    • L
      Merge branch 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a43de489
      Linus Torvalds 提交于
      Pull ras fixes from Thomas Gleixner:
       "A set of fixes for RAS/MCE:
      
         - Improve the error message when the kernel cannot recover from a MCE
           so the maximum amount of information gets provided.
      
         - Individually check MCE recovery features on SkyLake CPUs instead of
           assuming none when the CAPID0 register does not advertise the
           general ability for recovery.
      
         - Prevent MCE to output inconsistent messages which first show an
           error location and then claim that the source is unknown.
      
         - Prevent overwriting MCi_STATUS in the attempt to gather more
           information when a fatal MCE has alreay been detected. This leads
           to empty status values in the printout and failing to react
           promptly on the fatal event"
      
      * 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mce: Fix incorrect "Machine check from unknown source" message
        x86/mce: Do not overwrite MCi_STATUS in mce_no_way_out()
        x86/mce: Check for alternate indication of machine check recovery on Skylake
        x86/mce: Improve error message when kernel cannot recover
      a43de489
    • L
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 6242258b
      Linus Torvalds 提交于
      Pull timer fixes from Thomas Gleixner:
       "A small set of fixes for time(r) related issues:
      
         - Fix a long standing conversion issue in jiffies_to_msecs() for odd
           HZ values like 1024 or 1200 which resulted in returning 0 for small
           jiffies values due to rounding down.
      
         - Use the proper CONFIG symbol in the new Y2038 safe compat code for
           posix-timers. Not yet a visible breakage, but this will immediately
           trigger when the architecture support for the new interfaces is
           merged.
      
         - Return an error code in the STM32 clocksource driver on failure
           instead of success.
      
         - Remove the redundant and stale irq disabled check in the posix cpu
           timer code. The check is at the wrong place anyway and lockdep
           already covers it via the sighand lock locking coverage"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        time: Make sure jiffies_to_msecs() preserves non-zero time periods
        posix-timers: Fix nanosleep_copyout() for CONFIG_COMPAT_32BIT_TIME
        clocksource/drivers/stm32: Fix error return code
        posix-cpu-timers: Remove lockdep_assert_irqs_disabled()
      6242258b
    • L
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 78fea633
      Linus Torvalds 提交于
      Pull irq fixes from Thomas Gleixner:
       "A set of fixes mostly for the ARM/GIC world:
      
         - Fix the MSI affinity handling in the ls-scfg irq chip driver so it
           updates and uses the effective affinity mask correctly
      
         - Prevent binding LPIs to offline CPUs and respect the Cavium erratum
           which requires that LPIs which belong to an offline NUMA node are
           not bound to a CPU on a different NUMA node.
      
         - Free only the amount of allocated interrupts in the GIC-V2M driver
           instead of trying to free log2(nrirqs).
      
         - Prevent emitting SYNC and VSYNC targetting non existing interrupt
           collections in the GIC-V3 ITS driver
      
         - Ensure that the GIV-V3 interrupt redistributor is correctly
           reprogrammed on CPU hotplug
      
         - Remove a stale unused helper function"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqdesc: Delete irq_desc_get_msi_desc()
        irqchip/gic-v3-its: Fix reprogramming of redistributors on CPU hotplug
        irqchip/gic-v3-its: Only emit VSYNC if targetting a valid collection
        irqchip/gic-v3-its: Only emit SYNC if targetting a valid collection
        irqchip/gic-v3-its: Don't bind LPI to unavailable NUMA node
        irqchip/gic-v2m: Fix SPI release on error path
        irqchip/ls-scfg-msi: Fix MSI affinity handling
        genirq/debugfs: Add missing IRQCHIP_SUPPORTS_LEVEL_MSI debug
      78fea633
    • L
      Merge tag 'mips_fixes_4.18_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · e0bc833d
      Linus Torvalds 提交于
      Pull MIPS fixes from Paul Burton:
       "A few MIPS fixes for 4.18:
      
         - a GPIO device name fix for a regression in v4.15-rc1.
      
         - an errata workaround for the BCM5300X platform.
      
         - a fix to ftrace function graph tracing, broken for a long time with
           the fix applying cleanly back as far as v3.17.
      
         - addition of read barriers to in{b,w,l,q}() functions, matching
           behavior of other architectures & mirroring the equivalent addition
           to read{b,w,l,q} in v4.17-rc2.
      
        Plus changes to wire up new syscalls introduced in the 4.18 cycle:
      
         - Restartable sequences support is added, including MIPS support in
           the selftests.
      
         - io_pgetevents is wired up"
      
      * tag 'mips_fixes_4.18_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MIPS: Wire up io_pgetevents syscall
        rseq/selftests: Implement MIPS support
        MIPS: Wire up the restartable sequences (rseq) syscall
        MIPS: Add syscall detection for restartable sequences
        MIPS: Add support for restartable sequences
        MIPS: io: Add barrier after register read in inX()
        mips: ftrace: fix static function graph tracing
        MIPS: BCM47XX: Enable 74K Core ExternalSync for PCIe erratum
        MIPS: pb44: Fix i2c-gpio GPIO descriptor table
      e0bc833d
    • V
      strparser: Corrected typo in documentation. · 3531456a
      Vakul Garg 提交于
      Replaced strp_pause() with strp_unpause() to correct a seemingly copy
      paste documentation mistake.
      Signed-off-by: NVakul Garg <vakul.garg@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3531456a
    • A
      efi/x86: Fix incorrect invocation of PciIo->Attributes() · 2e6eb40c
      Ard Biesheuvel 提交于
      The following commit:
      
        2c3625cb ("efi/x86: Fold __setup_efi_pci32() and __setup_efi_pci64() into one function")
      
      ... merged the two versions of __setup_efi_pciXX(), without taking into
      account that the 32-bit version used a rather dodgy trick to pass an
      immediate 0 constant as argument for a uint64_t parameter.
      
      The issue is caused by the fact that on x86, UEFI protocol method calls
      are redirected via struct efi_config::call(), which is a variadic function,
      and so the compiler has to infer the types of the parameters from the
      arguments rather than from the prototype.
      
      As the 32-bit x86 calling convention passes arguments via the stack,
      passing the unqualified constant 0 twice is the same as passing 0ULL,
      which is why the 32-bit code in __setup_efi_pci32() contained the
      following call:
      
        status = efi_early->call(pci->attributes, pci,
                                 EfiPciIoAttributeOperationGet, 0, 0,
                                 &attributes);
      
      to invoke this UEFI protocol method:
      
        typedef
        EFI_STATUS
        (EFIAPI *EFI_PCI_IO_PROTOCOL_ATTRIBUTES) (
          IN  EFI_PCI_IO_PROTOCOL                     *This,
          IN  EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION Operation,
          IN  UINT64                                  Attributes,
          OUT UINT64                                  *Result OPTIONAL
          );
      
      After the merge, we inadvertently ended up with this version for both
      32-bit and 64-bit builds, breaking the latter.
      
      So replace the two zeroes with the explicitly typed constant 0ULL,
      which works as expected on both 32-bit and 64-bit builds.
      
      Wilfried tested the 64-bit build, and I checked the generated assembly
      of a 32-bit build with and without this patch, and they are identical.
      Reported-by: NWilfried Klaebe <linux-kernel@lebenslange-mailadresse.de>
      Tested-by: NWilfried Klaebe <linux-kernel@lebenslange-mailadresse.de>
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: hdegoede@redhat.com
      Cc: linux-efi@vger.kernel.org
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      2e6eb40c
    • A
      qmi_wwan: add support for the Dell Wireless 5821e module · e7e197ed
      Aleksander Morgado 提交于
      This module exposes two USB configurations: a QMI+AT capable setup on
      USB config #1 and a MBIM capable setup on USB config #2.
      
      By default the kernel will choose the MBIM capable configuration as
      long as the cdc_mbim driver is available. This patch adds support for
      the QMI port in the secondary configuration.
      Signed-off-by: NAleksander Morgado <aleksander@aleksander.es>
      Acked-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e7e197ed
    • G
      cxgb4: when disabling dcb set txq dcb priority to 0 · 5ce36338
      Ganesh Goudar 提交于
      When we are disabling DCB, store "0" in txq->dcb_prio
      since that's used for future TX Work Request "OVLAN_IDX"
      values. Setting non zero priority upon disabling DCB
      would halt the traffic.
      Reported-by: NAMG Zollner Robert <robert@cloudmedia.eu>
      CC: David Ahern <dsa@cumulusnetworks.com>
      Signed-off-by: NCasey Leedom <leedom@chelsio.com>
      Signed-off-by: NGanesh Goudar <ganeshgr@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5ce36338
    • L
      Merge tag 'for-linus-20180623' of git://git.kernel.dk/linux-block · 77072ca5
      Linus Torvalds 提交于
      Pull block fixes from Jens Axboe:
      
       - Further timeout fixes. We aren't quite there yet, so expect another
         round of fixes for that to completely close some of the IRQ vs
         completion races. (Christoph/Bart)
      
       - Set of NVMe fixes from the usual suspects, mostly error handling
      
       - Two off-by-one fixes (Dan)
      
       - Another bdi race fix (Jan)
      
       - Fix nbd reconfigure with NBD_DISCONNECT_ON_CLOSE (Doron)
      
      * tag 'for-linus-20180623' of git://git.kernel.dk/linux-block:
        blk-mq: Fix timeout handling in case the timeout handler returns BLK_EH_DONE
        bdi: Fix another oops in wb_workfn()
        lightnvm: Remove depends on HAS_DMA in case of platform dependency
        nvme-pci: limit max IO size and segments to avoid high order allocations
        nvme-pci: move nvme_kill_queues to nvme_remove_dead_ctrl
        nvme-fc: release io queues to allow fast fail
        nbd: Add the nbd NBD_DISCONNECT_ON_CLOSE config flag.
        block: sed-opal: Fix a couple off by one bugs
        blk-mq-debugfs: Off by one in blk_mq_rq_state_name()
        nvmet: reset keep alive timer in controller enable
        nvme-rdma: don't override opts->queue_size
        nvme-rdma: Fix command completion race at error recovery
        nvme-rdma: fix possible free of a non-allocated async event buffer
        nvme-rdma: fix possible double free condition when failing to create a controller
        Revert "block: Add warning for bi_next not NULL in bio_endio()"
        block: fix timeout changes for legacy request drivers
      77072ca5
    • L
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 2dd3f7c9
      Linus Torvalds 提交于
      Pull crypto fixes from Herbert Xu:
      
       - Fix use after free in chtls
      
       - Fix RBP breakage in sha3
      
       - Fix use after free in hwrng_unregister
      
       - Fix overread in morus640
      
       - Move sleep out of kernel_neon in arm64/aes-blk
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        hwrng: core - Always drop the RNG in hwrng_unregister()
        crypto: morus640 - Fix out-of-bounds access
        crypto: don't optimize keccakf()
        crypto: arm64/aes-blk - fix and move skcipher_walk_done out of kernel_neon_begin, _end
        crypto: chtls - use after free in chtls_pt_recvmsg()
      2dd3f7c9
    • L
      Merge tag 'linux-kselftest-4.18-rc2' of... · b13fbe77
      Linus Torvalds 提交于
      Merge tag 'linux-kselftest-4.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kselftest fixes from Shuah Khan:
      
       - fix new sparc64 adi driver test compile errors on non-sparc systems
      
       - fix config fragment for sync framework for improved test coverage
      
       - fix several tests to return correct Kselftest skip code
      
      * tag 'linux-kselftest-4.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests: sparc64: Add missing SPDX License Identifiers
        selftests: sparc64: delete RUN_TESTS and EMIT_TESTS overrides
        selftests: sparc64: Fix to do nothing on non-sparc64
        selftests: sync: add config fragment for testing sync framework
        selftests: vm: return Kselftest Skip code for skipped tests
        selftests: zram: return Kselftest Skip code for skipped tests
        selftests: user: return Kselftest Skip code for skipped tests
        selftests: sysctl: return Kselftest Skip code for skipped tests
        selftests: static_keys: return Kselftest Skip code for skipped tests
        selftests: pstore: return Kselftest Skip code for skipped tests
      b13fbe77
    • L
      Merge tag 'trace-v4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 81f9c4e4
      Linus Torvalds 提交于
      Pull tracing fixes from Steven Rostedt:
       "This contains a few fixes and a clean up.
      
         - a bad merge caused an "endif" to go in the wrong place in
           scripts/Makefile.build
      
         - softirq tracing fix for tracing that corrupts lockdep and causes a
           false splat
      
         - histogram documentation typo fixes
      
         - fix a bad memory reference when passing in no filter to the filter
           code
      
         - simplify code by using the swap macro instead of open coding the
           swap"
      
      * tag 'trace-v4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing: Fix SKIP_STACK_VALIDATION=1 build due to bad merge with -mrecord-mcount
        tracing: Fix some errors in histogram documentation
        tracing: Use swap macro in update_max_tr
        softirq: Reorder trace_softirqs_on to prevent lockdep splat
        tracing: Check for no filter when processing event filters
      81f9c4e4
    • B
      blk-mq: Fix timeout handling in case the timeout handler returns BLK_EH_DONE · f5e350f0
      Bart Van Assche 提交于
      Make sure that RQF_TIMED_OUT is cleared when a request is reused
      after a block driver timeout handler has returned BLK_EH_DONE.
      
      Fixes: da661267 ("blk-mq: don't time out requests again that are in the timeout handler")
      Signed-off-by: NBart Van Assche <bart.vanassche@wdc.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Jianchao Wang <jianchao.w.wang@oracle.com>
      Cc: Andrew Randrianasulu <randrianasulu@gmail.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      f5e350f0
  6. 23 6月, 2018 9 次提交
    • L
      Merge tag 'powerpc-4.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 5e220483
      Linus Torvalds 提交于
      Pull powerpc fixes from Michael Ellerman:
      
       - a fix for hugetlb with 4K pages, broken by our recent changes for
         split PMD PTL.
      
       - set the correct assembler machine type on e500mc, needed since
         binutils 2.26 introduced two forms for the "wait" instruction.
      
       - a fix for potential missed TLB flushes with MADV_[FREE|DONTNEED] etc.
         and THP on Power9 Radix.
      
       - three fixes to try and make our panic handling more robust by hard
         disabling interrupts, and not marking stopped CPUs as offline because
         they haven't been properly offlined.
      
       - three other minor fixes.
      
      Thanks to: Aneesh Kumar K.V, Michael Jeanson, Nicholas Piggin.
      
      * tag 'powerpc-4.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/mm/hash/4k: Free hugetlb page table caches correctly.
        powerpc/64s/radix: Fix radix_kvm_prefetch_workaround paca access of not possible CPU
        powerpc/64s: Fix build failures with CONFIG_NMI_IPI=n
        powerpc/64: hard disable irqs on the panic()ing CPU
        powerpc: smp_send_stop do not offline stopped CPUs
        powerpc/64: hard disable irqs in panic_smp_self_stop
        powerpc/64s: Fix DT CPU features Power9 DD2.1 logic
        powerpc/64s/radix: Fix MADV_[FREE|DONTNEED] TLB flush miss problem with THP
        powerpc/e500mc: Set assembler machine type to e500mc
      5e220483
    • L
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 7ab366e4
      Linus Torvalds 提交于
      Pull arm64 fixes from Catalin Marinas:
      
       - clear buffers allocated with FORCE_CONTIGUOUS explicitly until the
         CMA code honours __GFP_ZERO
      
       - notrace annotation for secondary_start_kernel()
      
       - use early_param() instead of __setup() for "kpti=" as it is needed
         for the cpufeature callback remapping swapper to non-global mappings
      
       - ensure writes to swapper are ordered wrt subsequent cache maintenance
         in the kpti non-global remapping code
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: mm: Ensure writes to swapper are ordered wrt subsequent cache maintenance
        arm64: kpti: Use early_param for kpti= command-line option
        arm64: make secondary_start_kernel() notrace
        arm64: dma-mapping: clear buffers allocated with FORCE_CONTIGUOUS flag
      7ab366e4
    • L
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 8b88ed3c
      Linus Torvalds 提交于
      Pull KVM fixes from Radim Krčmář:
       "ARM:
         - Lazy FPSIMD switching fixes
         - Really disable compat ioctls on architectures that don't want it
         - Disable compat on arm64 (it was never implemented...)
         - Rely on architectural requirements for GICV on GICv3
         - Detect bad alignments in unmap_stage2_range
      
        x86:
         - Add nested VM entry checks to avoid broken error recovery path
         - Minor documentation fix"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: fix KVM_CAP_HYPERV_TLBFLUSH paragraph number
        kvm: vmx: Nested VM-entry prereqs for event inj.
        KVM: arm64: Prevent KVM_COMPAT from being selected
        KVM: Enforce error in ioctl for compat tasks when !KVM_COMPAT
        KVM: arm/arm64: add WARN_ON if size is not PAGE_SIZE aligned in unmap_stage2_range
        KVM: arm64: Avoid mistaken attempts to save SVE state for vcpus
        KVM: arm64/sve: Fix SVE trap restoration for non-current tasks
        KVM: arm64: Don't mask softirq with IRQs disabled in vcpu_put()
        arm64: Introduce sysreg_clear_set()
        KVM: arm/arm64: Drop resource size check for GICV window
      8b88ed3c
    • L
      Merge tag 'for-linus-4.18-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 4ab59fcf
      Linus Torvalds 提交于
      Pull xen fixes from Juergen Gross:
       "This contains the following fixes/cleanups:
      
         - the removal of a BUG_ON() which wasn't necessary and which could
           trigger now due to a recent change
      
         - a correction of a long standing bug happening very rarely in Xen
           dom0 when a hypercall buffer from user land was not accessible by
           the hypervisor for very short periods of time due to e.g. page
           migration or compaction
      
         - usage of EXPORT_SYMBOL_GPL() instead of EXPORT_SYMBOL() in a
           Xen-related driver (no breakage possible as using those symbols
           without others already exported via EXPORT-SYMBOL_GPL() wouldn't
           make any sense)
      
         - a simplification for Xen PVH or Xen ARM guests
      
         - some additional error handling for callers of xenbus_printf()"
      
      * tag 'for-linus-4.18-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen: Remove unnecessary BUG_ON from __unbind_from_irq()
        xen: add new hypercall buffer mapping device
        xen/scsiback: add error handling for xenbus_printf
        scsi: xen-scsifront: add error handling for xenbus_printf
        xen/grant-table: Export gnttab_{alloc|free}_pages as GPL
        xen: add error handling for xenbus_printf
        xen: share start flags between PV and PVH
      4ab59fcf
    • K
      x86/mm: Fix 'no5lvl' handling · 2458e53f
      Kirill A. Shutemov 提交于
      early_identify_cpu() has to use early version of pgtable_l5_enabled()
      that doesn't rely on cpu_feature_enabled().
      
      Defining USE_EARLY_PGTABLE_L5 before all includes does the trick.
      
      I lost the define in one of reworks of the original patch.
      
      Fixes: 372fddf7 ("x86/mm: Introduce the 'no5lvl' kernel parameter")
      Signed-off-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Link: https://lkml.kernel.org/r/20180622220841.54135-3-kirill.shutemov@linux.intel.com
      2458e53f
    • K
      Revert "x86/mm: Mark __pgtable_l5_enabled __initdata" · 51be1335
      Kirill A. Shutemov 提交于
      This reverts commit e4e961e3.
      
      We need to use early version of pgtable_l5_enabled() in
      early_identify_cpu() as this code runs before cpu_feature_enabled() is
      usable.
      
      But it leads to section mismatch:
      
      cpu_init()
        load_mm_ldt()
          ldt_slot_va()
            LDT_BASE_ADDR
              LDT_PGD_ENTRY
      	  pgtable_l5_enabled()
      	    __pgtable_l5_enabled
      
      __pgtable_l5_enabled marked as __initdata, but cpu_init() is not __init.
      
      It's fixable: early code can be isolated into a separate translation unit,
      but such change collides with other work in the area.  That's too much
      hassle to save 4 bytes of memory.
      
      Return __pgtable_l5_enabled back to be __ro_after_init.
      Signed-off-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Link: https://lkml.kernel.org/r/20180622220841.54135-2-kirill.shutemov@linux.intel.com
      51be1335
    • C
      net_sched: remove a bogus warning in hfsc · 35b42da6
      Cong Wang 提交于
      In update_vf():
      
        cftree_remove(cl);
        update_cfmin(cl->cl_parent);
      
      the cl_cfmin of cl->cl_parent is intentionally updated to 0
      when that parent only has one child. And if this parent is
      root qdisc, we could end up, in hfsc_schedule_watchdog(),
      that we can't decide the next schedule time for qdisc watchdog.
      But it seems safe that we can just skip it, as this watchdog is
      not always scheduled anyway.
      
      Thanks to Marco for testing all the cases, nothing is broken.
      Reported-by: NMarco Berizzi <pupilla@libero.it>
      Tested-by: NMarco Berizzi <pupilla@libero.it>
      Signed-off-by: NCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      35b42da6
    • D
      Merge branch 'dccp-fixes-around-rx_tstamp_last_feedback' · 2ca4eb85
      David S. Miller 提交于
      Eric Dumazet says:
      
      ====================
      net: dccp: fixes around rx_tstamp_last_feedback
      
      This patch series fix some issues with rx_tstamp_last_feedback.
      
      - Switch to monotonic clock.
      - Avoid potential overflows on fast hosts/networks.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2ca4eb85
    • E
      net: dccp: switch rx_tstamp_last_feedback to monotonic clock · 0ce4e70f
      Eric Dumazet 提交于
      To compute delays, better not use time of the day which can
      be changed by admins or malicious programs.
      
      Also change ccid3_first_li() to use s64 type for delta variable
      to avoid potential overflows.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Gerrit Renker <gerrit@erg.abdn.ac.uk>
      Cc: dccp@vger.kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0ce4e70f