1. Feb 07, 2024
    • Sean Christopherson's avatar
      KVM: selftests: Don't assert on exact number of 4KiB in dirty log split test · 6fd78bee
      Sean Christopherson authored
      
      
      Drop dirty_log_page_splitting_test's assertion that the number of 4KiB
      pages remains the same across dirty logging being enabled and disabled, as
      the test doesn't guarantee that mappings outside of the memslots being
      dirty logged are stable, e.g. KVM's mappings for code and pages in
      memslot0 can be zapped by things like NUMA balancing.
      
      To preserve the spirit of the check, assert that (a) the number of 4KiB
      pages after splitting is _at least_ the number of 4KiB pages across all
      memslots under test, and (b) the number of hugepages before splitting adds
      up to the number of pages across all memslots under test.  (b) is a little
      tenuous as it relies on memslot0 being incompatible with transparent
      hugepages, but that holds true for now as selftests explicitly madvise()
      MADV_NOHUGEPAGE for memslot0 (__vm_create() unconditionally specifies the
      backing type as VM_MEM_SRC_ANONYMOUS).
      
      Reported-by: default avatarYi Lai <yi1.lai@intel.com>
      Reported-by: default avatarTao Su <tao1.su@linux.intel.com>
      Reviewed-by: default avatarTao Su <tao1.su@linux.intel.com>
      Link: https://lore.kernel.org/r/20240131222728.4100079-1-seanjc@google.com
      
      
      Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
      6fd78bee
    • Sean Christopherson's avatar
      KVM: selftests: Fix a semaphore imbalance in the dirty ring logging test · ba58f873
      Sean Christopherson authored
      
      
      When finishing the final iteration of dirty_log_test testcase, set
      host_quit _before_ the final "continue" so that the vCPU worker doesn't
      run an extra iteration, and delete the hack-a-fix of an extra "continue"
      from the dirty ring testcase.  This fixes a bug where the extra post to
      sem_vcpu_cont may not be consumed, which results in failures in subsequent
      runs of the testcases.  The bug likely was missed during development as
      x86 supports only a single "guest mode", i.e. there aren't any subsequent
      testcases after the dirty ring test, because for_each_guest_mode() only
      runs a single iteration.
      
      For the regular dirty log testcases, letting the vCPU run one extra
      iteration is a non-issue as the vCPU worker waits on sem_vcpu_cont if and
      only if the worker is explicitly told to stop (vcpu_sync_stop_requested).
      But for the dirty ring test, which needs to periodically stop the vCPU to
      reap the dirty ring, letting the vCPU resume the guest _after_ the last
      iteration means the vCPU will get stuck without an extra "continue".
      
      However, blindly firing off an post to sem_vcpu_cont isn't guaranteed to
      be consumed, e.g. if the vCPU worker sees host_quit==true before resuming
      the guest.  This results in a dangling sem_vcpu_cont, which leads to
      subsequent iterations getting out of sync, as the vCPU worker will
      continue on before the main task is ready for it to resume the guest,
      leading to a variety of asserts, e.g.
      
        ==== Test Assertion Failure ====
        dirty_log_test.c:384: dirty_ring_vcpu_ring_full
        pid=14854 tid=14854 errno=22 - Invalid argument
           1  0x00000000004033eb: dirty_ring_collect_dirty_pages at dirty_log_test.c:384
           2  0x0000000000402d27: log_mode_collect_dirty_pages at dirty_log_test.c:505
           3   (inlined by) run_test at dirty_log_test.c:802
           4  0x0000000000403dc7: for_each_guest_mode at guest_modes.c:100
           5  0x0000000000401dff: main at dirty_log_test.c:941 (discriminator 3)
           6  0x0000ffff9be173c7: ?? ??:0
           7  0x0000ffff9be1749f: ?? ??:0
           8  0x000000000040206f: _start at ??:?
        Didn't continue vcpu even without ring full
      
      Alternatively, the test could simply reset the semaphores before each
      testcase, but papering over hacks with more hacks usually ends in tears.
      
      Reported-by: default avatarShaoqin Huang <shahuang@redhat.com>
      Fixes: 84292e56
      
       ("KVM: selftests: Add dirty ring buffer test")
      Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
      Reviewed-by: default avatarShaoqin Huang <shahuang@redhat.com>
      Link: https://lore.kernel.org/r/20240202231831.354848-1-seanjc@google.com
      
      
      Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
      ba58f873
  2. Feb 02, 2024
  3. Jan 31, 2024
  4. Jan 30, 2024
  5. Jan 29, 2024
  6. Jan 28, 2024
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v6.8-2' of... · 8a696a29
      Linus Torvalds authored
      Merge tag 'platform-drivers-x86-v6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
      
      Pull x86 platform driver fixes from Hans de Goede:
      
       - WMI bus driver fixes
      
       - Second attempt (previously reverted) at P2SB PCI rescan deadlock fix
      
       - AMD PMF driver improvements
      
       - MAINTAINERS updates
      
       - Misc other small fixes and hw-id additions
      
      * tag 'platform-drivers-x86-v6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
        platform/x86: touchscreen_dmi: Add info for the TECLAST X16 Plus tablet
        platform/x86/intel/ifs: Call release_firmware() when handling errors.
        platform/x86/amd/pmf: Fix memory leak in amd_pmf_get_pb_data()
        platform/x86/amd/pmf: Get ambient light information from AMD SFH driver
        platform/x86/amd/pmf: Get Human presence information from AMD SFH driver
        platform/mellanox: mlxbf-pmc: Fix offset calculation for crspace events
        platform/mellanox: mlxbf-tmfifo: Drop Tx network packet when Tx TmFIFO is full
        MAINTAINERS: remove defunct acpi4asus project info from asus notebooks section
        MAINTAINERS: add Luke Jones as maintainer for asus notebooks
        MAINTAINERS: Remove Perry Yuan as DELL WMI HARDWARE PRIVACY SUPPORT maintainer
        platform/x86: silicom-platform: Add missing "Description:" for power_cycle sysfs attr
        platform/x86: intel-wmi-sbl-fw-update: Fix function name in error message
        platform/x86: p2sb: Use pci_resource_n() in p2sb_read_bar0()
        platform/x86: p2sb: Allow p2sb_bar() calls during PCI device probe
        platform/x86: intel-uncore-freq: Fix types in sysfs callbacks
        platform/x86: wmi: Fix wmi_dev_probe()
        platform/x86: wmi: Fix notify callback locking
        platform/x86: wmi: Decouple legacy WMI notify handlers from wmi_block_list
        platform/x86: wmi: Return immediately if an suitable WMI event is found
        platform/x86: wmi: Fix error handling in legacy WMI notify handler functions
      8a696a29
    • Linus Torvalds's avatar
      Merge tag 'loongarch-fixes-6.8-1' of... · 95534043
      Linus Torvalds authored
      Merge tag 'loongarch-fixes-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
      
      Pull LoongArch fixes from Huacai Chen:
       "Fix boot failure on machines with more than 8 nodes, and fix two build
        errors about KVM"
      
      * tag 'loongarch-fixes-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson:
        LoongArch: KVM: Add returns to SIMD stubs
        LoongArch: KVM: Fix build due to API changes
        LoongArch/smp: Call rcutree_report_cpu_starting() at tlb_init()
      95534043
    • Linus Torvalds's avatar
      Merge tag 'xfs-6.8-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · cd2286fc
      Linus Torvalds authored
      Pull xfs fix from Chandan Babu:
      
       - Fix read only mounts when using fsopen mount API
      
      * tag 'xfs-6.8-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: read only mounts with fsopen mount API are busted
      cd2286fc
    • Linus Torvalds's avatar
      Merge tag 'bcachefs-2024-01-26' of https://evilpiepirate.org/git/bcachefs · 064a4a5b
      Linus Torvalds authored
      Pull bcachefs fixes from Kent Overstreet:
      
       - fix for REQ_OP_FLUSH usage; this fixes filesystems going read only
         with -EOPNOTSUPP from the block layer.
      
         (this really should have gone in with the block layer patch causing
         the -EOPNOTSUPP, or should have gone in before).
      
       - fix an allocation in non-sleepable context
      
       - fix one source of srcu lock latency, on devices with terrible discard
         latency
      
       - fix a reattach_inode() issue in fsck
      
      * tag 'bcachefs-2024-01-26' of https://evilpiepirate.org/git/bcachefs:
        bcachefs: __lookup_dirent() works in snapshot, not subvol
        bcachefs: discard path uses unlock_long()
        bcachefs: fix incorrect usage of REQ_OP_FLUSH
        bcachefs: Add gfp flags param to bch2_prt_task_backtrace()
      064a4a5b
    • Linus Torvalds's avatar
      Merge tag '6.8-rc2-smb3-server-fixes' of git://git.samba.org/ksmbd · 8c6f6a76
      Linus Torvalds authored
      Pull smb server fixes from Steve French:
      
       - Fix netlink OOB
      
       - Minor kernel doc fix
      
      * tag '6.8-rc2-smb3-server-fixes' of git://git.samba.org/ksmbd:
        ksmbd: fix global oob in ksmbd_nl_policy
        smb: Fix some kernel-doc comments
      8c6f6a76
    • Linus Torvalds's avatar
      Merge tag '6.8-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 · d1bba17e
      Linus Torvalds authored
      Pull smb client fixes from Steve French:
       "Nine cifs/smb client fixes
      
         - Four network error fixes (three relating to replays of requests
           that need to be retried, and one fixing some places where we were
           returning the wrong rc up the stack on network errors)
      
         - Two multichannel fixes including locking fix and case where subset
           of channels need reconnect
      
         - netfs integration fixup: share remote i_size with netfslib
      
         - Two small cleanups (one for addressing a clang warning)"
      
      * tag '6.8-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: fix stray unlock in cifs_chan_skip_or_disable
        cifs: set replay flag for retries of write command
        cifs: commands that are retried should have replay flag set
        cifs: helper function to check replayable error codes
        cifs: translate network errors on send to -ECONNABORTED
        cifs: cifs_pick_channel should try selecting active channels
        cifs: Share server EOF pos with netfslib
        smb: Work around Clang __bdos() type confusion
        smb: client: delete "true", "false" defines
      d1bba17e
  7. Jan 27, 2024
    • Xi Ruoyao's avatar
      mips: Call lose_fpu(0) before initializing fcr31 in mips_set_personality_nan · 59be5c35
      Xi Ruoyao authored
      If we still own the FPU after initializing fcr31, when we are preempted
      the dirty value in the FPU will be read out and stored into fcr31,
      clobbering our setting.  This can cause an improper floating-point
      environment after execve().  For example:
      
          zsh% cat measure.c
          #include <fenv.h>
          int main() { return fetestexcept(FE_INEXACT); }
          zsh% cc measure.c -o measure -lm
          zsh% echo $((1.0/3)) # raising FE_INEXACT
          0.33333333333333331
          zsh% while ./measure; do ; done
          (stopped in seconds)
      
      Call lose_fpu(0) before setting fcr31 to prevent this.
      
      Closes: https://lore.kernel.org/linux-mips/7a6aa1bbdbbe2e63ae96ff163fab0349f58f1b9e.camel@xry111.site/
      Fixes: 9b26616c
      
       ("MIPS: Respect the ISA level in FCSR handling")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarXi Ruoyao <xry111@xry111.site>
      Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
      59be5c35
    • Huang Pei's avatar
      MIPS: loongson64: set nid for reserved memblock region · 822df315
      Huang Pei authored
      Commit 61167ad5("mm: pass nid to reserve_bootmem_region()") reveals
      that reserved memblock regions have no valid node id set, just set it
      right since loongson64 firmware makes it clear in memory layout info.
      
      This works around booting failure on 3A1000+ since commit 61167ad5
      
      
      ("mm: pass nid to reserve_bootmem_region()") under
      CONFIG_DEFERRED_STRUCT_PAGE_INIT.
      
      Signed-off-by: default avatarHuang Pei <huangpei@loongson.cn>
      Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
      822df315
    • Thomas Bogendoerfer's avatar
    • Linus Torvalds's avatar
      Merge tag 'ata-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux · 3a5879d4
      Linus Torvalds authored
      Pull ata updates from Niklas Cassel:
      
       - Fix an incorrect link_power_management_policy sysfs attribute value.
      
         We were previously using the same attribute value for two different
         LPM policies (me)
      
       - Add a ASMedia ASM1166 quirk.
      
         The SATA host controller always reports that it has 32 ports, even
         though it only has six ports. Add a quirk that overrides the value
         reported by the controller (Conrad)
      
       - Add a ASMedia ASM1061 quirk.
      
         The SATA host controller completely ignores the upper 21 bits of the
         DMA address. This causes IOMMU error events when a (valid) DMA
         address actually has any of the upper 21 bits set. Add a quirk that
         limits the dma_mask to 43-bits (Lennert)
      
      * tag 'ata-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
        ahci: add 43-bit DMA address quirk for ASMedia ASM1061 controllers
        ahci: asm1166: correct count of reported ports
        ata: libata-sata: improve sysfs description for ATA_LPM_UNKNOWN
      3a5879d4
    • Linus Torvalds's avatar
      Merge tag 'block-6.8-2024-01-26' of git://git.kernel.dk/linux · 914e1708
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - RCU warning fix for md (Mikulas)
      
       - Fix for an aoe issue that lockdep rightfully complained about
         (Maksim)
      
       - Fix for an error code change in partitioning that caused a regression
         with some tools (Li)
      
       - Fix for a data direction warning with bi-direction commands
         (Christian)
      
      * tag 'block-6.8-2024-01-26' of git://git.kernel.dk/linux:
        md: fix a suspicious RCU usage warning
        aoe: avoid potential deadlock at set_capacity
        block: Fix WARNING in _copy_from_iter
        block: Move checking GENHD_FL_NO_PART to bdev_add_partition()
      914e1708
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.8-2024-01-26' of git://git.kernel.dk/linux · cced1c5e
      Linus Torvalds authored
      Pull io_uring fix from Jens Axboe:
       "Just a single tweak to the newly added IORING_OP_FIXED_FD_INSTALL from
        Paul, ensuring it goes via the audit path and playing it safe by
        excluding it from using registered creds"
      
      * tag 'io_uring-6.8-2024-01-26' of git://git.kernel.dk/linux:
        io_uring: enable audit and restrict cred override for IORING_OP_FIXED_FD_INSTALL
      cced1c5e
    • Linus Torvalds's avatar
      Merge tag 'thermal-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 667c8893
      Linus Torvalds authored
      Pull thermal control update from Rafael Wysocki:
       "Remove some dead code from the Intel powerclamp thermal control driver
        (Srinivas Pandruvada)"
      
      * tag 'thermal-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        thermal: intel: powerclamp: Remove dead code for target mwait value
      667c8893
    • Linus Torvalds's avatar
      Merge tag 'pm-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 0c879d88
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "These fix two cpufreq drivers and the cpupower utility.
      
        Specifics:
      
         - Fix the handling of scaling_max/min_freq sysfs attributes in the
           AMD P-state cpufreq driver (Mario Limonciello)
      
         - Make the intel_pstate cpufreq driver avoid unnecessary computation
           of the HWP performance level corresponding to a given frequency in
           the cases when it is known already, which also helps to avoid
           reducing the maximum CPU capacity artificially on some systems
           (Rafael J. Wysocki)
      
         - Fix compilation of the cpupower utility when CFLAGS is passed as a
           make argument for cpupower, but it does not take effect as expected
           due to mishandling (Stanley Chan)"
      
      * tag 'pm-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpufreq/amd-pstate: Fix setting scaling max/min freq values
        cpufreq: intel_pstate: Refine computation of P-state for given frequency
        tools cpupower bench: Override CFLAGS assignments
      0c879d88
    • Linus Torvalds's avatar
      Merge tag 'docs-6.8-fixes' of git://git.lwn.net/linux · 70da22eb
      Linus Torvalds authored
      Pull documentation fixes from Jonathan Corbet:
       "A handful of relatively boring documentation fixes"
      
      * tag 'docs-6.8-fixes' of git://git.lwn.net/linux:
        docs: admin-guide: remove obsolete advice related to SLAB allocator
        doc: admin-guide/kernel-parameters: remove useless comment
        docs/accel: correct links to mailing list archives
        docs/sphinx: Fix TOC scroll hack for the home page
      70da22eb
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2024-01-27' of git://anongit.freedesktop.org/drm/drm · 168174d7
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Lots going on for rc2, ivpu has a bunch of stabilisation and debugging
        work, then amdgpu and xe are the main fixes. i915, exynos have a few,
        then some misc panel and bridge fixes.
      
        Worth mentioning are three regressions. One of the nouveau fixes in
        6.7 for a serious deadlock had side effects, so I guess we will bring
        back the deadlock until I can figure out what should be done properly.
        There was a scheduler regression vs amdgpu which was reported in a few
        places and is now fixed. There was an i915 vs simpledrm problem
        resulting in black screens, that is reverted also.
      
        I'll be working on a proper nouveau fix, it kinda looks like one of
        those cases where someone tried to use an atomic where they should
        have probably used a lock, but I'll see.
      
        fb:
         - fix simpledrm/i915 regression by reverting change
      
        scheduler:
         - fix regression affecting amdgpu users due to sched draining
      
        nouveau:
         - revert 6.7 deadlock fix as it has side effects
      
        dp:
         - fix documentation warning
      
        ttm:
         - fix dummy page read on some platforms
      
        bridge:
         - anx7625 suspend fix
         - sii902x: fix probing and audio registration
         - parade-ps8640: fix suspend of bridge, aux fixes
         - samsung-dsim: avoid using FORCE_STOP_STATE
      
        panel:
         - simple add missing bus flags
         - fix samsung-s6d7aa0 flags
      
        amdgpu:
         - AC/DC power supply tracking fix
         - Don't show invalid vram vendor data
         - SMU 13.0.x fixes
         - GART fix for umr on systems without VRAM
         - GFX 10/11 UNORD_DISPATCH fixes
         - IPS display fixes (required for S0ix on some platforms)
         - Misc fixes
      
        i915:
         - DSI sequence revert to fix GitLab #10071 and DP test-pattern fix
         - Drop -Wstringop-overflow (broken on GCC11)
      
        ivpu:
         - fix recovery/reset support
         - improve submit ioctl stability
         - fix dev open/close races on unbind
         - PLL disable reset fix
         - deprecate context priority param
         - improve debug buffer logging
         - disable buffer sharing across VPU contexts
         - free buffer sgt on unbind
         - fix missing lock around shmem vmap
         - add better boot diagnostics
         - add more debug prints around mapping
         - dump MMU events in case of timeout
      
        v3d:
         - NULL ptr dereference fix
      
        exynos:
         - fix stack usage
         - fix incorrect type
         - fix dt typo
         - fix gsc runtime resume
      
        xe:
         - Make an ops struct static
         - Fix an implicit 0 to NULL conversion
         - A couple of 32-bit fixes
         - A migration coherency fix for Lunar Lake.
         - An error path vm id leak fix
         - Remove PVC references in kunit tests"
      
      * tag 'drm-fixes-2024-01-27' of git://anongit.freedesktop.org/drm/drm: (66 commits)
        Revert "nouveau: push event block/allowing out of the fence context"
        drm: bridge: samsung-dsim: Don't use FORCE_STOP_STATE
        drm/sched: Drain all entities in DRM sched run job worker
        drm/amd/display: "Enable IPS by default"
        drm/amd: Add a DC debug mask for IPS
        drm/amd/display: Disable ips before dc interrupt setting
        drm/amd/display: Replay + IPS + ABM in Full Screen VPB
        drm/amd/display: Add IPS checks before dcn register access
        drm/amd/display: Add Replay IPS register for DMUB command table
        drm/amd/display: Allow IPS2 during Replay
        drm/amdgpu/gfx11: set UNORD_DISPATCH in compute MQDs
        drm/amdgpu/gfx10: set UNORD_DISPATCH in compute MQDs
        drm/amd/amdgpu: Assign GART pages to AMD device mapping
        drm/amd/pm: Fetch current power limit from FW
        drm/amdgpu: Fix null pointer dereference
        drm/amdgpu: Show vram vendor only if available
        drm/amd/pm: update the power cap setting
        drm/amdgpu: Avoid fetching vram vendor information
        drm/amdgpu/pm: Fix the power source flag error
        drm/amd/display: Fix uninitialized variable usage in core_link_ 'read_dpcd() & write_dpcd()' functions
        ...
      168174d7