1. 16 Mar, 2018 13 commits
    • Sean Christopherson's avatar
      KVM: VMX: give unrestricted guest full control of CR3 · b4d18517
      Sean Christopherson authored
      Now CR3 is not forced to a host-controlled value when paging is
      disabled in an unrestricted guest, CR3 load/store exiting can be
      left disabled (for an unrestricted guest).  And because CR0.WP
      and CR4.PAE/PSE are also not force to host-controlled values,
      all of ept_update_paging_mode_cr0() is no longer needed, i.e.
      skip ept_update_paging_mode_cr0() for an unrestricted guest.
      
      Because MOV CR3 no longer exits when paging is disabled for an
      unrestricted guest, vmx_decache_cr3() must always read GUEST_CR3
      from the VMCS for an unrestricted guest.
      Signed-off-by: default avatarSean Christopherson <sean.j.christopherson@intel.com>
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      b4d18517
    • Sean Christopherson's avatar
      KVM: VMX: don't force CR4.PAE/PSE for unrestricted guest · 5dc1f044
      Sean Christopherson authored
      CR4.PAE - Unrestricted guest can only be enabled when EPT is
      enabled, and vmx_set_cr4() clears hardware CR0.PAE based on
      the guest's CR4.PAE, i.e. CR4.PAE always follows the guest's
      value when unrestricted guest is enabled.
      
      CR4.PSE - Unrestricted guest no longer uses the identity mapped
      IA32 page tables since CR0.PG can be cleared in hardware, thus
      there is no need to set CR4.PSE when paging is disabled in the
      guest (and EPT is enabled).
      
      Define KVM_VM_CR4_ALWAYS_ON_UNRESTRICTED_GUEST (to X86_CR4_VMXE)
      and use it in lieu of KVM_*MODE_VM_CR4_ALWAYS_ON when unrestricted
      guest is enabled, which removes the forcing of CR4.PAE.
      
      Skip the manipulation of CR4.PAE/PSE for EPT when unrestricted
      guest is enabled, as CR4.PAE isn't forced and so doesn't need to
      be manually cleared, and CR4.PSE does not need to be set when
      paging is disabled since the identity mapped IA32 page tables
      are not used.
      Signed-off-by: default avatarSean Christopherson <sean.j.christopherson@intel.com>
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      5dc1f044
    • Sean Christopherson's avatar
      KVM: VMX: remove CR0.WP from ..._ALWAYS_ON_UNRESTRICTED_GUEST · 1706bd0c
      Sean Christopherson authored
      Unrestricted guest can only be enabled when EPT is enabled, and
      when EPT is enabled, ept_update_paging_mode_cr0() will clear
      hardware CR0.WP based on the guest's CR0.WP, i.e. CR0.WP always
      follows the guest's value when unrestricted guest is enabled.
      Signed-off-by: default avatarSean Christopherson <sean.j.christopherson@intel.com>
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      1706bd0c
    • Sean Christopherson's avatar
      KVM: VMX: don't configure EPT identity map for unrestricted guest · e90008df
      Sean Christopherson authored
      An unrestricted guest can run with hardware CR0.PG==0, i.e.
      IA32 paging disabled, in which case there is no need to load
      the guest's CR3 with identity mapped IA32 page tables since
      hardware will effectively ignore CR3.  If unrestricted guest
      is enabled, don't configure the identity mapped IA32 page
      table and always load the guest's desired CR3.
      Signed-off-by: default avatarSean Christopherson <sean.j.christopherson@intel.com>
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      e90008df
    • Sean Christopherson's avatar
      KVM: VMX: don't configure RM TSS for unrestricted guest · f7eaeb0a
      Sean Christopherson authored
      An unrestricted guest can run with CR0.PG==0 and/or CR0.PE==0,
      e.g. it can run in Real Mode without requiring host emulation.
      The RM TSS is only used for emulating RM, i.e. it will never
      be used when unrestricted guest is enabled and so doesn't need
      to be configured.
      Signed-off-by: default avatarSean Christopherson <sean.j.christopherson@intel.com>
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      f7eaeb0a
    • Vitaly Kuznetsov's avatar
      x86/kvm/hyper-v: inject #GP only when invalid SINTx vector is unmasked · 915e6f78
      Vitaly Kuznetsov authored
      Hyper-V 2016 on KVM with SynIC enabled doesn't boot with the following
      trace:
      
          kvm_entry:            vcpu 0
          kvm_exit:             reason MSR_WRITE rip 0xfffff8000131c1e5 info 0 0
          kvm_hv_synic_set_msr: vcpu_id 0 msr 0x40000090 data 0x10000 host 0
          kvm_msr:              msr_write 40000090 = 0x10000 (#GP)
          kvm_inj_exception:    #GP (0x0)
      
      KVM acts according to the following statement from TLFS:
      
      "
      11.8.4 SINTx Registers
      ...
      Valid values for vector are 16-255 inclusive. Specifying an invalid
      vector number results in #GP.
      "
      
      However, I checked and genuine Hyper-V doesn't #GP when we write 0x10000
      to SINTx. I checked with Microsoft and they confirmed that if either the
      Masked bit (bit 16) or the Polling bit (bit 18) is set to 1, then they
      ignore the value of Vector. Make KVM act accordingly.
      Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
      Reviewed-by: default avatarRoman Kagan <rkagan@virtuozzo.com>
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      915e6f78
    • Vitaly Kuznetsov's avatar
      x86/kvm/hyper-v: remove stale entries from vec_bitmap/auto_eoi_bitmap on vector change · 98f65ad4
      Vitaly Kuznetsov authored
      When a new vector is written to SINx we update vec_bitmap/auto_eoi_bitmap
      but we forget to remove old vector from these masks (in case it is not
      present in some other SINTx).
      Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
      Reviewed-by: default avatarRoman Kagan <rkagan@virtuozzo.com>
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      98f65ad4
    • Vitaly Kuznetsov's avatar
      x86/kvm/hyper-v: add reenlightenment MSRs support · a2e164e7
      Vitaly Kuznetsov authored
      Nested Hyper-V/Windows guest running on top of KVM will use TSC page
      clocksource in two cases:
      - L0 exposes invariant TSC (CPUID.80000007H:EDX[8]).
      - L0 provides Hyper-V Reenlightenment support (CPUID.40000003H:EAX[13]).
      
      Exposing invariant TSC effectively blocks migration to hosts with different
      TSC frequencies, providing reenlightenment support will be needed when we
      start migrating nested workloads.
      
      Implement rudimentary support for reenlightenment MSRs. For now, these are
      just read/write MSRs with no effect.
      Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
      Reviewed-by: default avatarRoman Kagan <rkagan@virtuozzo.com>
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      a2e164e7
    • KarimAllah Ahmed's avatar
      KVM: x86: Update the exit_qualification access bits while walking an address · ddd6f0e9
      KarimAllah Ahmed authored
      ... to avoid having a stale value when handling an EPT misconfig for MMIO
      regions.
      
      MMIO regions that are not passed-through to the guest are handled through
      EPT misconfigs. The first time a certain MMIO page is touched it causes an
      EPT violation, then KVM marks the EPT entry to cause an EPT misconfig
      instead. Any subsequent accesses to the entry will generate an EPT
      misconfig.
      
      Things gets slightly complicated with nested guest handling for MMIO
      regions that are not passed through from L0 (i.e. emulated by L0
      user-space).
      
      An EPT violation for one of these MMIO regions from L2, exits to L0
      hypervisor. L0 would then look at the EPT12 mapping for L1 hypervisor and
      realize it is not present (or not sufficient to serve the request). Then L0
      injects an EPT violation to L1. L1 would then update its EPT mappings. The
      EXIT_QUALIFICATION value for L1 would come from exit_qualification variable
      in "struct vcpu". The problem is that this variable is only updated on EPT
      violation and not on EPT misconfig. So if an EPT violation because of a
      read happened first, then an EPT misconfig because of a write happened
      afterwards. The L0 hypervisor will still contain exit_qualification value
      from the previous read instead of the write and end up injecting an EPT
      violation to the L1 hypervisor with an out of date EXIT_QUALIFICATION.
      
      The EPT violation that is injected from L0 to L1 needs to have the correct
      EXIT_QUALIFICATION specially for the access bits because the individual
      access bits for MMIO EPTs are updated only on actual access of this
      specific type. So for the example above, the L1 hypervisor will keep
      updating only the read bit in the EPT then resume the L2 guest. The L2
      guest would end up causing another exit where the L0 *again* will inject
      another EPT violation to L1 hypervisor with *again* an out of date
      exit_qualification which indicates a read and not a write. Then this
      ping-pong just keeps happening without making any forward progress.
      
      The behavior of mapping MMIO regions changed in:
      
         commit a340b3e2 ("kvm: Map PFN-type memory regions as writable (if possible)")
      
      ... where an EPT violation for a read would also fixup the write bits to
      avoid another EPT violation which by acciddent would fix the bug mentioned
      above.
      
      This commit fixes this situation and ensures that the access bits for the
      exit_qualifcation is up to date. That ensures that even L1 hypervisor
      running with a KVM version before the commit mentioned above would still
      work.
      
      ( The description above assumes EPT to be available and used by L1
        hypervisor + the L1 hypervisor is passing through the MMIO region to the L2
        guest while this MMIO region is emulated by the L0 user-space ).
      
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: x86@kernel.org
      Cc: kvm@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarKarimAllah Ahmed <karahmed@amazon.de>
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      ddd6f0e9
    • Matthias Kaehlcke's avatar
      KVM: x86: Make enum conversion explicit in kvm_pdptr_read() · 1df372f4
      Matthias Kaehlcke authored
      The type 'enum kvm_reg_ex' is an extension of 'enum kvm_reg', however
      the extension is only semantical and the compiler doesn't know about the
      relationship between the two types. In kvm_pdptr_read() a value of the
      extended type is passed to kvm_x86_ops->cache_reg(), which expects a
      value of the base type. Clang raises the following warning about the
      type mismatch:
      
      arch/x86/kvm/kvm_cache_regs.h:44:32: warning: implicit conversion from
        enumeration type 'enum kvm_reg_ex' to different enumeration type
        'enum kvm_reg' [-Wenum-conversion]
          kvm_x86_ops->cache_reg(vcpu, VCPU_EXREG_PDPTR);
      
      Cast VCPU_EXREG_PDPTR to 'enum kvm_reg' to make the compiler happy.
      Signed-off-by: default avatarMatthias Kaehlcke <mka@chromium.org>
      Reviewed-by: default avatarGuenter Roeck <groeck@chromium.org>
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      1df372f4
    • Vitaly Kuznetsov's avatar
      KVM: lapic: stop advertising DIRECTED_EOI when in-kernel IOAPIC is in use · 0bcc3fb9
      Vitaly Kuznetsov authored
      Devices which use level-triggered interrupts under Windows 2016 with
      Hyper-V role enabled don't work: Windows disables EOI broadcast in SPIV
      unconditionally. Our in-kernel IOAPIC implementation emulates an old IOAPIC
      version which has no EOI register so EOI never happens.
      
      The issue was discovered and discussed a while ago:
      https://www.spinics.net/lists/kvm/msg148098.html
      
      While this is a guest OS bug (it should check that IOAPIC has the required
      capabilities before disabling EOI broadcast) we can workaround it in KVM:
      advertising DIRECTED_EOI with in-kernel IOAPIC makes little sense anyway.
      Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      0bcc3fb9
    • Janakarajan Natarajan's avatar
      KVM: x86: Add support for AMD Core Perf Extension in guest · c51eb52b
      Janakarajan Natarajan authored
      Add support for AMD Core Performance counters in the guest. The base
      event select and counter MSRs are changed. In addition, with the core
      extension, there are 2 extra counters available for performance
      measurements for a total of 6.
      
      With the new MSRs, the logic to map them to the gp_counters[] is changed.
      New functions are added to check the validity of the get/set MSRs.
      
      If the guest has the X86_FEATURE_PERFCTR_CORE cpuid flag set, the number
      of counters available to the vcpu is set to 6. It the flag is not set
      then it is 4.
      Signed-off-by: default avatarJanakarajan Natarajan <Janakarajan.Natarajan@amd.com>
      [Squashed "Expose AMD Core Perf Extension flag to guests" - Radim.]
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      c51eb52b
    • Janakarajan Natarajan's avatar
      x86/msr: Add AMD Core Perf Extension MSRs · e84b7119
      Janakarajan Natarajan authored
      Add the EventSelect and Counter MSRs for AMD Core Perf Extension.
      Signed-off-by: default avatarJanakarajan Natarajan <Janakarajan.Natarajan@amd.com>
      Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      e84b7119
  2. 08 Mar, 2018 1 commit
  3. 06 Mar, 2018 10 commits
  4. 04 Mar, 2018 6 commits
    • Linus Torvalds's avatar
      Linux 4.16-rc4 · 661e50bc
      Linus Torvalds authored
      661e50bc
    • Linus Torvalds's avatar
      Merge branch 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e64b9562
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "A small set of fixes for x86:
      
         - Add missing instruction suffixes to assembly code so it can be
           compiled by newer GAS versions without warnings.
      
         - Switch refcount WARN exceptions to UD2 as we did in general
      
         - Make the reboot on Intel Edison platforms work
      
         - A small documentation update so text and sample command match"
      
      * 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        Documentation, x86, resctrl: Make text and sample command match
        x86/platform/intel-mid: Handle Intel Edison reboot correctly
        x86/asm: Add instruction suffixes to bitops
        x86/entry/64: Add instruction suffix
        x86/refcounts: Switch to UD2 for exceptions
      e64b9562
    • Linus Torvalds's avatar
      Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 7225a442
      Linus Torvalds authored
      Pull x86/pti fixes from Thomas Gleixner:
       "Three fixes related to melted spectrum:
      
         - Sync the cpu_entry_area page table to initial_page_table on 32 bit.
      
           Otherwise suspend/resume fails because resume uses
           initial_page_table and triggers a triple fault when accessing the
           cpu entry area.
      
         - Zero the SPEC_CTL MRS on XEN before suspend to address a
           shortcoming in the hypervisor.
      
         - Fix another switch table detection issue in objtool"
      
      * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/cpu_entry_area: Sync cpu_entry_area to initial_page_table
        objtool: Fix another switch table detection issue
        x86/xen: Zero MSR_IA32_SPEC_CTRL before suspend
      7225a442
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4c4ce302
      Linus Torvalds authored
      Pull timer fixes from Thomas Gleixner:
       "A small set of fixes from the timer departement:
      
         - Add a missing timer wheel clock forward when migrating timers off a
           unplugged CPU to prevent operating on a stale clock base and
           missing timer deadlines.
      
         - Use the proper shift count to extract data from a register value to
           prevent evaluating unrelated bits
      
         - Make the error return check in the FSL timer driver work correctly.
           Checking an unsigned variable for less than zero does not really
           work well.
      
         - Clarify the confusing comments in the ARC timer code"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        timers: Forward timer base before migrating timers
        clocksource/drivers/arc_timer: Update some comments
        clocksource/drivers/mips-gic-timer: Use correct shift count to extract data
        clocksource/drivers/fsl_ftm_timer: Fix error return checking
      4c4ce302
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ff8d5836
      Linus Torvalds authored
      Pull irq fixlet from Thomas Gleixner:
       "Just a documentation update for the missing device tree property of
        the R-Car M3N interrupt controller"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        dt-bindings/irqchip/renesas-irqc: Document R-Car M3-N support
      ff8d5836
    • Linus Torvalds's avatar
      Merge tag 'for-4.16-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · af8c0816
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
      
       - when NR_CPUS is large, a SRCU structure can significantly inflate
         size of the main filesystem structure that would not be possible to
         allocate by kmalloc, so the kvalloc fallback is used
      
       - improved error handling
      
       - fix endiannes when printing some filesystem attributes via sysfs,
         this is could happen when a filesystem is moved between different
         endianity hosts
      
       - send fixes: the NO_HOLE mode should not send a write operation for a
         file hole
      
       - fix log replay for for special files followed by file hardlinks
      
       - fix log replay failure after unlink and link combination
      
       - fix max chunk size calculation for DUP allocation
      
      * tag 'for-4.16-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        Btrfs: fix log replay failure after unlink and link combination
        Btrfs: fix log replay failure after linking special file and fsync
        Btrfs: send, fix issuing write op when processing hole in no data mode
        btrfs: use proper endianness accessors for super_copy
        btrfs: alloc_chunk: fix DUP stripe size handling
        btrfs: Handle btrfs_set_extent_delalloc failure in relocate_file_extent_cluster
        btrfs: handle failure of add_pending_csums
        btrfs: use kvzalloc to allocate btrfs_fs_info
      af8c0816
  5. 03 Mar, 2018 10 commits
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 58bdf601
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "A driver fix and a documentation fix (which makes dependency handling
        for the next cycle easier)"
      
      * 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: octeon: Prevent error message on bus error
        dt-bindings: at24: sort manufacturers alphabetically
      58bdf601
    • Linus Torvalds's avatar
      Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · 20f14172
      Linus Torvalds authored
      Pull libnvdimm fixes from Dan Williams:
       "A 4.16 regression fix, three fixes for -stable, and a cleanup fix:
      
         - During the merge window support for the new ACPI NVDIMM Platform
           Capabilities structure disabled support for "deep flush", a
           force-unit- access like mechanism for persistent memory. Restore
           that mechanism.
      
         - VFIO like RDMA is yet one more memory registration / pinning
           interface that is incompatible with Filesystem-DAX. Disable long
           term pins of Filesystem-DAX mappings via VFIO.
      
         - The Filesystem-DAX detection to prevent long terms pins mistakenly
           also disabled Device-DAX pins which are not subject to the same
           block- map collision concerns.
      
         - Similar to the setup path, softlockup warnings can trigger in the
           shutdown path for large persistent memory namespaces. Teach
           for_each_device_pfn() to perform cond_resched() in all cases.
      
         - Boaz noticed that the might_sleep() in dax_direct_access() is stale
           as of the v4.15 kernel.
      
        These have received a build success notification from the 0day robot,
        and the longterm pin fixes have appeared in -next. However, I recently
        rebased the tree to remove some other fixes that need to be reworked
        after review feedback.
      
      * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        memremap: fix softlockup reports at teardown
        libnvdimm: re-enable deep flush for pmem devices via fsync()
        vfio: disable filesystem-dax page pinning
        dax: fix vma_is_fsdax() helper
        dax: ->direct_access does not sleep anymore
      20f14172
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v4.16' of... · 0eb3412a
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - suppress sparse warnings about unknown attributes
      
       - fix typos and stale comments
      
       - fix build error of arch/sh
      
       - fix wrong use of ld-option vs cc-ldoption
      
       - remove redundant GCC_PLUGINS_CFLAGS assignment
      
       - fix another memory leak of Kconfig
      
       - fix line number in error messages of Kconfig
      
       - do not write confusing CONFIG_DEFCONFIG_LIST out to .config
      
       - add xstrdup() to Kconfig to handle memory shortage errors
      
       - show also a Debian package name if ncurses is missing
      
      * tag 'kbuild-fixes-v4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        MAINTAINERS: take over Kconfig maintainership
        kconfig: fix line number in recursive inclusion error message
        Coccinelle: memdup: Fix typo in warning messages
        kconfig: Update ncurses package names for menuconfig
        kbuild/kallsyms: trivial typo fix
        kbuild: test --build-id linker flag by ld-option instead of cc-ldoption
        kbuild: drop superfluous GCC_PLUGINS_CFLAGS assignment
        kconfig: Don't leak choice names during parsing
        sh: fix build error for empty CONFIG_BUILTIN_DTB_SOURCE
        kconfig: set SYMBOL_AUTO to the symbol marked with defconfig_list
        kconfig: add xstrdup() helper
        kbuild: disable sparse warnings about unknown attributes
        Makefile: Fix lying comment re. silentoldconfig
      0eb3412a
    • Linus Torvalds's avatar
      Merge tag 'media/v4.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · 7cf901b3
      Linus Torvalds authored
      Pull media fixes from Mauro Carvalho Chehab:
      
        - some build fixes with randconfigs
      
        - an m88ds3103 fix to prevent an OOPS if the chip doesn't provide the
          right version during probe (with can happen if the hardware hangs)
      
        - a potential out of array bounds reference in tvp5150
      
        - some fixes and improvements in the DVB memory mapped API (added for
          kernel 4.16)
      
      * tag 'media/v4.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
        media: vb2: Makefile: place vb2-trace together with vb2-core
        media: Don't let tvp5150_get_vbi() go out of vbi_ram_default array
        media: dvb: update buffer mmaped flags and frame counter
        media: dvb: add continuity error indicators for memory mapped buffers
        media: dmxdev: Fix the logic that enables DMA mmap support
        media: dmxdev: fix error code for invalid ioctls
        media: m88ds3103: don't call a non-initalized function
        media: au0828: add VIDEO_V4L2 dependency
        media: dvb: fix DVB_MMAP dependency
        media: dvb: fix DVB_MMAP symbol name
        media: videobuf2: fix build issues with vb2-trace
        media: videobuf2: Add VIDEOBUF2_V4L2 Kconfig option for VB2 V4L2 part
      7cf901b3
    • Linus Torvalds's avatar
      Merge tag 'linux-watchdog-4.16-fixes-1' of git://www.linux-watchdog.org/linux-watchdog · d6d0972a
      Linus Torvalds authored
      Pull watchdog fixes from Wim Van Sebroeck:
      
       - rave-sp: add NVMEM dependency
      
       - build fixes for i6300esb_wdt, xen_wdt and sp5100_tco
      
      * tag 'linux-watchdog-4.16-fixes-1' of git://www.linux-watchdog.org/linux-watchdog:
        watchdog: sp5100_tco.c: fix potential build failure
        watchdog: xen_wdt: fix potential build failure
        watchdog: i6300esb: fix build failure
        watchdog: rave-sp: add NVMEM dependency
      d6d0972a
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 03a6c259
      Linus Torvalds authored
      Pull KVM fixes from Radim Krčmář:
       "x86:
      
         - fix NULL dereference when using userspace lapic
      
         - optimize spectre v1 mitigations by allowing guests to use LFENCE
      
         - make microcode revision configurable to prevent guests from
           unnecessarily blacklisting spectre v2 mitigation feature"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: x86: fix vcpu initialization with userspace lapic
        KVM: X86: Allow userspace to define the microcode version
        KVM: X86: Introduce kvm_get_msr_feature()
        KVM: SVM: Add MSR-based feature support for serializing LFENCE
        KVM: x86: Add a framework for supporting MSR-based features
      03a6c259
    • Dan Williams's avatar
      memremap: fix softlockup reports at teardown · 949b9325
      Dan Williams authored
      The cond_resched() currently in the setup path needs to be duplicated in
      the teardown path. Rather than require each instance of
      for_each_device_pfn() to open code the same sequence, embed it in the
      helper.
      
      Link: https://github.com/intel/ixpdimm_sw/issues/11
      Cc: "Jérôme Glisse" <jglisse@redhat.com>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: <stable@vger.kernel.org>
      Fixes: 71389703 ("mm, zone_device: Replace {get, put}_zone_device_page()...")
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      949b9325
    • Dave Jiang's avatar
      libnvdimm: re-enable deep flush for pmem devices via fsync() · 5fdf8e5b
      Dave Jiang authored
      Re-enable deep flush so that users always have a way to be sure that a
      write makes it all the way out to media. Writes from the PMEM driver
      always arrive at the NVDIMM since movnt is used to bypass the cache, and
      the driver relies on the ADR (Asynchronous DRAM Refresh) mechanism to
      flush write buffers on power failure. The Deep Flush mechanism is there
      to explicitly write buffers to protect against (rare) ADR failure.  This
      change prevents a regression in deep flush behavior so that applications
      can continue to depend on fsync() as a mechanism to trigger deep flush
      in the filesystem-DAX case.
      
      Fixes: 06e8ccda ("acpi: nfit: Add support for detect platform CPU cache...")
      Reviewed-by: default avatarJeff Moyer <jmoyer@redhat.com>
      Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      5fdf8e5b
    • Masahiro Yamada's avatar
      MAINTAINERS: take over Kconfig maintainership · 50186e12
      Masahiro Yamada authored
      I have recently picked up Kconfig patches to my tree without any
      declaration.  Making it official now.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      50186e12
    • Dan Williams's avatar
      vfio: disable filesystem-dax page pinning · 94db151d
      Dan Williams authored
      Filesystem-DAX is incompatible with 'longterm' page pinning. Without
      page cache indirection a DAX mapping maps filesystem blocks directly.
      This means that the filesystem must not modify a file's block map while
      any page in a mapping is pinned. In order to prevent the situation of
      userspace holding of filesystem operations indefinitely, disallow
      'longterm' Filesystem-DAX mappings.
      
      RDMA has the same conflict and the plan there is to add a 'with lease'
      mechanism to allow the kernel to notify userspace that the mapping is
      being torn down for block-map maintenance. Perhaps something similar can
      be put in place for vfio.
      
      Note that xfs and ext4 still report:
      
         "DAX enabled. Warning: EXPERIMENTAL, use at your own risk"
      
      ...at mount time, and resolving the dax-dma-vs-truncate problem is one
      of the last hurdles to remove that designation.
      Acked-by: default avatarAlex Williamson <alex.williamson@redhat.com>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: kvm@vger.kernel.org
      Cc: <stable@vger.kernel.org>
      Reported-by: default avatarHaozhong Zhang <haozhong.zhang@intel.com>
      Tested-by: default avatarHaozhong Zhang <haozhong.zhang@intel.com>
      Fixes: d475c634 ("dax,ext2: replace XIP read and write with DAX I/O")
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      94db151d