1. 21 Mar, 2024 1 commit
  2. 20 Mar, 2024 8 commits
    • Linus Torvalds's avatar
      Merge tag 'v6.9-rc-smb3-server-fixes' of git://git.samba.org/ksmbd · 23956900
      Linus Torvalds authored
      Pull smb server updates from Steve French:
      
       - add support for durable file handles (an important data integrity
         feature)
      
       - fixes for potential out of bounds issues
      
       - fix possible null dereference in close
      
       - getattr fixes
      
       - trivial typo fix and minor cleanup
      
      * tag 'v6.9-rc-smb3-server-fixes' of git://git.samba.org/ksmbd:
        ksmbd: remove module version
        ksmbd: fix potencial out-of-bounds when buffer offset is invalid
        ksmbd: fix slab-out-of-bounds in smb_strndup_from_utf16()
        ksmbd: Fix spelling mistake "connction" -> "connection"
        ksmbd: fix possible null-deref in smb_lazy_parent_lease_break_close
        ksmbd: add support for durable handles v1/v2
        ksmbd: mark SMB2_SESSION_EXPIRED to session when destroying previous session
        ksmbd: retrieve number of blocks using vfs_getattr in set_file_allocation_info
        ksmbd: replace generic_fillattr with vfs_getattr
      23956900
    • Linus Torvalds's avatar
      Merge tag 'trace-tools-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace · 42c2a756
      Linus Torvalds authored
      Pull trace tool updates from Steven Rostedt:
       "Tracing:
      
         - Update makefiles for latency-collector and RTLA, using tools/build/
           makefiles like perf does, inheriting its benefits. For example,
           having a proper way to handle library dependencies.
      
         - The timerlat tracer has an interface for any tool to use. rtla
           timerlat tool uses this interface dispatching its own threads as
           workload. But, rtla timerlat could also be used for any other
           process. So, add 'rtla timerlat -U' option, allowing the timerlat
           tool to measure the latency of any task using the timerlat tracer
           interface.
      
        Verification:
      
         - Update makefiles for verification/rv, using tools/build/ makefiles
           like perf does, inheriting its benefits. For example, having a
           proper way to handle dependencies"
      
      * tag 'trace-tools-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        tools/rtla: Add -U/--user-load option to timerlat
        tools/verification: Use tools/build makefiles on rv
        tools/rtla: Use tools/build makefiles to build rtla
        tools/tracing: Use tools/build makefiles on latency-collector
      42c2a756
    • Linus Torvalds's avatar
      Merge tag 'docs-6.9-2' of git://git.lwn.net/linux · dba89d1b
      Linus Torvalds authored
      Pull more documentation updates from Jonathan Corbet:
       "A handful of late-arriving documentation fixes and enhancements"
      
      * tag 'docs-6.9-2' of git://git.lwn.net/linux:
        docs: verify/bisect: remove a level of indenting
        docs: verify/bisect: drop 'v' prefix, EOL aspect, and assorted fixes
        docs: verify/bisect: check taint flag
        docs: verify/bisect: improve install instructions
        docs: handling-regressions.rst: Update regzbot command fixed-by to fix
        docs: *-regressions.rst: Add colon to regzbot commands
        doc: Fix typo in admin-guide/cifs/introduction.rst
        README: Fix spelling
      dba89d1b
    • Daniel Bristot de Oliveira's avatar
      tools/rtla: Add -U/--user-load option to timerlat · a23c05fd
      Daniel Bristot de Oliveira authored
      The timerlat tracer provides an interface for any application to wait
      for the timerlat's periodic wakeup. Currently, rtla timerlat uses it
      to dispatch its user-space workload (-u option).
      
      But as the tracer interface is generic, rtla timerlat can also be used
      to monitor any workload that uses it. For example, a user might
      place their own workload to wait on the tracer interface, and
      monitor the results with rtla timerlat.
      
      Add the -U option to rtla timerlat top and hist. With this option, rtla
      timerlat will not dispatch its workload but only setting up the
      system, waiting for a user to dispatch its workload.
      
      The sample code in this patch is an example of python application
      that loops in the timerlat tracer fd.
      
      To use it, dispatch:
      
       # rtla timerlat -U
      
      In a terminal, then run the python program on another terminal,
      specifying the CPU to run it. For example, setting on CPU 1:
      
       #./timerlat_load.py 1
      
      Then rtla timerlat will start printing the statistics of the
      ./timerlat_load.py app.
      
      An interesting point is that the "Ret user Timer Latency" value
      is the overall response time of the load. The sample load does
      a memory copy to exemplify that.
      
      The stop tracing options on rtla timerlat works in this setup
      as well, including auto analysis.
      
      Link: https://lkml.kernel.org/r/36e6bcf18fe15c7601048fd4c65aeb193c502cc8.1707229706.git.bristot@kernel.org
      
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Signed-off-by: default avatarDaniel Bristot de Oliveira <bristot@kernel.org>
      a23c05fd
    • Daniel Bristot de Oliveira's avatar
      tools/verification: Use tools/build makefiles on rv · 012e4e77
      Daniel Bristot de Oliveira authored
      Use tools/build/ makefiles to build rv, inheriting the benefits of
      it. For example, having a proper way to handle dependencies.
      
      Link: https://lkml.kernel.org/r/2a38a8f7b8dc65fa790381ec9ab42fb62beb2e25.1710519524.git.bristot@kernel.org
      
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Josh Poimboeuf <jpoimboe@kernel.org>
      Cc: John Kacur <jkacur@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarDaniel Bristot de Oliveira <bristot@kernel.org>
      012e4e77
    • Daniel Bristot de Oliveira's avatar
      tools/rtla: Use tools/build makefiles to build rtla · 01474dc7
      Daniel Bristot de Oliveira authored
      Use tools/build/ makefiles to build rtla, inheriting the benefits of
      it. For example, having a proper way to handle dependencies.
      
      rtla is built using perf infra-structure when building inside the
      kernel tree.
      
      At this point, rtla diverges from perf in two points: Documentation
      and tarball generation/build.
      
      At the documentation level, rtla is one step ahead, placing the
      documentation at Documentation/tools/rtla/, using the same build
      tools as kernel documentation. The idea is to move perf
      documentation to the same scheme and then share the same makefiles.
      
      rtla has a tarball target that the (old) RHEL8 uses. The tarball was
      kept using a simple standalone makefile for compatibility. The
      standalone makefile shares most of the code, e.g., flags, with
      regular buildings.
      
      The tarball method was set as deprecated. If necessary, we can make
      a rtla tarball like perf, which includes the entire tools/build.
      But this would also require changes in the user side (the directory
      structure changes, and probably the deps to build the package).
      
      Inspired on perf and objtool.
      
      Link: https://lkml.kernel.org/r/57563abf2715d22515c0c54a87cff3849eca5d52.1710519524.git.bristot@kernel.org
      
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Josh Poimboeuf <jpoimboe@kernel.org>
      Cc: John Kacur <jkacur@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarDaniel Bristot de Oliveira <bristot@kernel.org>
      01474dc7
    • Daniel Bristot de Oliveira's avatar
      tools/tracing: Use tools/build makefiles on latency-collector · 9d56c88e
      Daniel Bristot de Oliveira authored
      Use tools/build/ makefiles to build latency-collector, inheriting
      the benefits of it. For example: Before this patch, a missing
      tracefs/traceevents headers will result in fail like this:
      
        ~/linux/tools/tracing/latency $ make
        cc -Wall -Wextra -g -O2  -o latency-collector latency-collector.c -lpthread
        latency-collector.c:26:10: fatal error: tracefs.h: No such file or directory
           26 | #include <tracefs.h>
              |          ^~~~~~~~~~~
        compilation terminated.
        make: *** [Makefile:14: latency-collector] Error 1
      
      Which is not that helpful. After this change it reports:
      
        ~/linux/tools/tracing/latency# make
      
        Auto-detecting system features:
        ...                           libtraceevent: [ OFF ]
        ...                              libtracefs: [ OFF ]
      
        libtraceevent is missing. Please install libtraceevent-dev/libtraceevent-devel
        libtracefs is missing. Please install libtracefs-dev/libtracefs-devel
        Makefile.config:29: *** Please, check the errors above..  Stop.
      
      This type of output is common across other tools in tools/ like perf
      and objtool.
      
      Link: https://lkml.kernel.org/r/872420b0880b11304e4ba144a0086c6478c5b469.1710519524.git.bristot@kernel.org
      
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Josh Poimboeuf <jpoimboe@kernel.org>
      Cc: John Kacur <jkacur@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarDaniel Bristot de Oliveira <bristot@kernel.org>
      9d56c88e
    • Linus Torvalds's avatar
      Merge tag 'bcachefs-2024-03-19' of https://evilpiepirate.org/git/bcachefs · a4145ce1
      Linus Torvalds authored
      Pull bcachefs fixes from Kent Overstreet:
       "Assorted bugfixes.
      
        Most are fixes for simple assertion pops; the most significant fix is
        for a deadlock in recovery when we have to rewrite large numbers of
        btree nodes to fix errors. This was incorrectly running out of the
        same workqueue as the core interior btree update path - we now give it
        its own single threaded workqueue.
      
        This was visible to users as "bch2_btree_update_start(): error:
        BCH_ERR_journal_reclaim_would_deadlock" - and then recovery hanging"
      
      * tag 'bcachefs-2024-03-19' of https://evilpiepirate.org/git/bcachefs:
        bcachefs: Fix lost wakeup on journal shutdown
        bcachefs; Fix deadlock in bch2_btree_update_start()
        bcachefs: ratelimit errors from async_btree_node_rewrite
        bcachefs: Run check_topology() first
        bcachefs: Improve bch2_fatal_error()
        bcachefs: Fix lost transaction restart error
        bcachefs: Don't corrupt journal keys gap buffer when dropping alloc info
        bcachefs: fix for building in userspace
        bcachefs: bch2_snapshot_is_ancestor() now safe to call in early recovery
        bcachefs: Fix nested transaction restart handling in bch2_bucket_gens_init()
        bcachefs: Improve sysfs internal/btree_updates
        bcachefs: Split out btree_node_rewrite_worker
        bcachefs: Fix locking in bch2_alloc_write_key()
        bcachefs: Avoid extent entry type assertions in .invalid()
        bcachefs: Fix spurious -BCH_ERR_transaction_restart_nested
        bcachefs: Fix check_key_has_snapshot() call
        bcachefs: Change "accounting overran journal reservation" to a warning
      a4145ce1
  3. 19 Mar, 2024 31 commits
    • Linus Torvalds's avatar
      Merge tag 'soc-late-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 78c3925c
      Linus Torvalds authored
      Pull more ARM SoC updates from Arnd Bergmann:
       "These are changes that for some reason ended up not making it into the
        first four branches but that should still make it into 6.9:
      
         - A rework of the omap clock support that touches both drivers and
           device tree files
      
         - The reset controller branch changes that had a dependency on late
           bugfixes. Merging them here avoids a backmerge of 6.8-rc5 into the
           drivers branch
      
         - The RISC-V/starfive, RISC-V/microchip and ARM/Broadcom devicetree
           changes that got delayed and needed some extra time in linux-next
           for wider testing"
      
      * tag 'soc-late-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (31 commits)
        soc: fsl: dpio: fix kcalloc() argument order
        bus: ts-nbus: Improve error reporting
        bus: ts-nbus: Convert to atomic pwm API
        riscv: dts: starfive: jh7110: Add camera subsystem nodes
        ARM: bcm: stop selecing CONFIG_TICK_ONESHOT
        ARM: dts: omap3: Update clksel clocks to use reg instead of ti,bit-shift
        ARM: dts: am3: Update clksel clocks to use reg instead of ti,bit-shift
        clk: ti: Improve clksel clock bit parsing for reg property
        clk: ti: Handle possible address in the node name
        dt-bindings: pwm: opencores: Add compatible for StarFive JH8100
        dt-bindings: riscv: cpus: reg matches hart ID
        reset: Instantiate reset GPIO controller for shared reset-gpios
        reset: gpio: Add GPIO-based reset controller
        cpufreq: do not open-code of_phandle_args_equal()
        of: Add of_phandle_args_equal() helper
        reset: simple: add support for Sophgo SG2042
        dt-bindings: reset: sophgo: support SG2042
        riscv: dts: microchip: add specific compatible for mpfs pdma
        riscv: dts: microchip: add missing CAN bus clocks
        ARM: brcmstb: Add debug UART entry for 74165
        ...
      78c3925c
    • Linus Torvalds's avatar
      Merge tag 's390-6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · f9c03549
      Linus Torvalds authored
      Pull more s390 updates from Heiko Carstens:
      
       - Various virtual vs physical address usage fixes
      
       - Add new bitwise types and helper functions and use them in s390
         specific drivers and code to make it easier to find virtual vs
         physical address usage bugs.
      
         Right now virtual and physical addresses are identical for s390,
         except for module, vmalloc, and similar areas. This will be changed,
         hopefully with the next merge window, so that e.g. the kernel image
         and modules will be located close to each other, allowing for direct
         branches and also for some other simplifications.
      
         As a prerequisite this requires to fix all misuses of virtual and
         physical addresses. As it turned out people are so used to the
         concept that virtual and physical addresses are the same, that new
         bugs got added to code which was already fixed. In order to avoid
         that even more code gets merged which adds such bugs add and use new
         bitwise types, so that sparse can be used to find such usage bugs.
      
         Most likely the new types can go away again after some time
      
       - Provide a simple ARCH_HAS_DEBUG_VIRTUAL implementation
      
       - Fix kprobe branch handling: if an out-of-line single stepped relative
         branch instruction has a target address within a certain address area
         in the entry code, the program check handler may incorrectly execute
         cleanup code as if KVM code was executed, leading to crashes
      
       - Fix reference counting of zcrypt card objects
      
       - Various other small fixes and cleanups
      
      * tag 's390-6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (41 commits)
        s390/entry: compare gmap asce to determine guest/host fault
        s390/entry: remove OUTSIDE macro
        s390/entry: add CIF_SIE flag and remove sie64a() address check
        s390/cio: use while (i--) pattern to clean up
        s390/raw3270: make class3270 constant
        s390/raw3270: improve raw3270_init() readability
        s390/tape: make tape_class constant
        s390/vmlogrdr: make vmlogrdr_class constant
        s390/vmur: make vmur_class constant
        s390/zcrypt: make zcrypt_class constant
        s390/mm: provide simple ARCH_HAS_DEBUG_VIRTUAL support
        s390/vfio_ccw_cp: use new address translation helpers
        s390/iucv: use new address translation helpers
        s390/ctcm: use new address translation helpers
        s390/lcs: use new address translation helpers
        s390/qeth: use new address translation helpers
        s390/zfcp: use new address translation helpers
        s390/tape: fix virtual vs physical address confusion
        s390/3270: use new address translation helpers
        s390/3215: use new address translation helpers
        ...
      f9c03549
    • Steven Rostedt (Google)'s avatar
      tracing: Just use strcmp() for testing __string() and __assign_str() match · 24f5bb9f
      Steven Rostedt (Google) authored
      As __assign_str() no longer uses its "src" parameter, there's a check to
      make sure nothing depends on it being different than what was passed to
      __string(). It originally just compared the pointer passed to __string()
      with the pointer passed into __assign_str() via the "src" parameter. But
      there's a couple of outliers that just pass in a quoted string constant,
      where comparing the pointers is UB to the compiler, as the compiler is
      free to create multiple copies of the same string constant.
      
      Instead, just use strcmp(). It may slow down the trace event, but this
      will eventually be removed.
      
      Also, fix the issue of passing NULL to strcmp() by adding a WARN_ON() to
      make sure that both "src" and the pointer saved in __string() are either
      both NULL or have content, and then checking if "src" is not NULL before
      performing the strcmp().
      
      Link: https://lore.kernel.org/all/CAHk-=wjxX16kWd=uxG5wzqt=aXoYDf1BgWOKk+qVmAO0zh7sjA@mail.gmail.com/
      
      Fixes: b1afefa6 ("tracing: Use strcmp() in __assign_str() WARN_ON() check")
      Reported-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      24f5bb9f
    • Linus Torvalds's avatar
      Merge tag 'pm-6.9-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · fbd88dd0
      Linus Torvalds authored
      Pull more power management updates from Rafael Wysocki:
       "These update the Energy Model to make it prevent errors due to power
        unit mismatches, fix a typo in power management documentation, convert
        one driver to using a platform remove callback returning void, address
        two cpufreq issues (one in the core and one in the DT driver), and
        enable boost support in the SCMI cpufreq driver.
      
        Specifics:
      
         - Modify the Energy Model code to bail out and complain if the unit
           of power is not uW to prevent errors due to unit mismatches (Lukasz
           Luba)
      
         - Make the intel_rapl platform driver use a remove callback returning
           void (Uwe Kleine-König)
      
         - Fix typo in the suspend and interrupts document (Saravana Kannan)
      
         - Make per-policy boost flags actually take effect on platforms using
           cpufreq_boost_set_sw() (Sibi Sankar)
      
         - Enable boost support in the SCMI cpufreq driver (Sibi Sankar)
      
         - Make the DT cpufreq driver use zalloc_cpumask_var() for allocating
           cpumasks to avoid using unitinialized memory (Marek Szyprowski)"
      
      * tag 'pm-6.9-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpufreq: scmi: Enable boost support
        firmware: arm_scmi: Add support for marking certain frequencies as turbo
        cpufreq: dt: always allocate zeroed cpumask
        cpufreq: Fix per-policy boost behavior on SoCs using cpufreq_boost_set_sw()
        Documentation: power: Fix typo in suspend and interrupts doc
        PM: EM: Force device drivers to provide power in uW
        powercap: intel_rapl: Convert to platform remove callback returning void
      fbd88dd0
    • Linus Torvalds's avatar
      Merge tag 'acpi-6.9-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 6d37f7e7
      Linus Torvalds authored
      Pull more ACPI updates from Rafael Wysocki:
       "These update ACPI documentation and kerneldoc comments.
      
        Specifics:
      
         - Add markup to generate links from footnotes in the ACPI enumeration
           document (Chris Packham)
      
         - Update the handle_eject_request() kerneldoc comment to document the
           arguments of the function and improve kerneldoc comments for ACPI
           suspend and hibernation functions (Yang Li)"
      
      * tag 'acpi-6.9-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: PM: Improve kerneldoc comments for suspend and hibernation functions
        ACPI: docs: enumeration: Make footnotes links
        ACPI: Document handle_eject_request() arguments
      6d37f7e7
    • Linus Torvalds's avatar
      Merge tag 'thermal-6.9-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · ed302ad5
      Linus Torvalds authored
      Pull more thermal control updates from Rafael Wysocki:
       "These update thermal drivers for ARM platforms by adding new hardware
        support (r8a779h0, H616 THS), addressing issues (Mediatek LVTS,
        Mediatek MT7896, thermal-of) and cleaning up code.
      
        Specifics:
      
         - Fix memory leak in the error path at probe time in the Mediatek
           LVTS driver (Christophe Jaillet)
      
         - Fix control buffer enablement regression on Meditek MT7896 (Frank
           Wunderlich)
      
         - Drop spaces before TABs in different places: thermal-of, ST drivers
           and Makefile (Geert Uytterhoeven)
      
         - Adjust DT binding for NXP as fsl,tmu-range min/maxItems can vary
           among several SoC versions (Fabio Estevam)
      
         - Add support for the H616 THS controller on Sun8i platforms (Martin
           Botka)
      
         - Don't fail probe due to zone registration failure because there is
           no trip points defined in the DT (Mark Brown)
      
         - Support variable TMU array size for new platforms (Peng Fan)
      
         - Adjust the DT binding for thermal-of and make the polling time not
           required and assume it is zero when not found in the DT (Konrad
           Dybcio)
      
         - Add r8a779h0 support in both the DT and the rcar_gen3 driver (Geert
           Uytterhoeven)"
      
      * tag 'thermal-6.9-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        thermal/drivers/rcar_gen3: Add support for R-Car V4M
        dt-bindings: thermal: rcar-gen3-thermal: Add r8a779h0 support
        thermal/of: Assume polling-delay(-passive) 0 when absent
        dt-bindings: thermal-zones: Don't require polling-delay(-passive)
        thermal/drivers/qoriq: Fix getting tmu range
        thermal/drivers/sun8i: Don't fail probe due to zone registration failure
        thermal/drivers/sun8i: Add support for H616 THS controller
        thermal/drivers/sun8i: Add SRAM register access code
        thermal/drivers/sun8i: Extend H6 calibration to support 4 sensors
        thermal/drivers/sun8i: Explain unknown H6 register value
        dt-bindings: thermal: sun8i: Add H616 THS controller
        soc: sunxi: sram: export register 0 for THS on H616
        dt-bindings: thermal: qoriq-thermal: Adjust fsl,tmu-range min/maxItems
        thermal: Drop spaces before TABs
        thermal/drivers/mediatek: Fix control buffer enablement on MT7896
        thermal/drivers/mediatek/lvts_thermal: Fix a memory leak in an error handling path
      ed302ad5
    • Linus Torvalds's avatar
      Merge tag 'ata-6.9-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux · 2f3c2b39
      Linus Torvalds authored
      Pull ata fix from Niklas Cassel:
       "A single fix for ASMedia HBAs.
      
        These HBAs do not indicate that they support SATA Port Multipliers
        CAP.SPM (Supports Port Multiplier) is not set.
      
        Likewise, they do not allow you to probe the devices behind an
        attached PMP, as defined according to the SATA-IO PMP specification.
      
        Instead, they have decided to implement their own version of PMP,
        and because of this, plugging in a PMP actually works, even if the
        HBA claims that it does not support PMP.
      
        Revert a recent quirk for these HBAs, as that breaks ASMedia's own
        implementation of PMP.
      
        Unfortunately, this will once again give some users of these HBAs
        significantly increased boot time. However, a longer boot time for
        some, is the lesser evil compared to some other users not being able
        to detect their drives at all"
      
      * tag 'ata-6.9-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
        ahci: asm1064: asm1166: don't limit reported ports
      2f3c2b39
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · d95fcdf4
      Linus Torvalds authored
      Pull virtio updates from Michael Tsirkin:
      
       - Per vq sizes in vdpa
      
       - Info query for block devices support in vdpa
      
       - DMA sync callbacks in vduse
      
       - Fixes, cleanups
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (35 commits)
        virtio_net: rename free_old_xmit_skbs to free_old_xmit
        virtio_net: unify the code for recycling the xmit ptr
        virtio-net: add cond_resched() to the command waiting loop
        virtio-net: convert rx mode setting to use workqueue
        virtio: packed: fix unmap leak for indirect desc table
        vDPA: report virtio-blk flush info to user space
        vDPA: report virtio-block read-only info to user space
        vDPA: report virtio-block write zeroes configuration to user space
        vDPA: report virtio-block discarding configuration to user space
        vDPA: report virtio-block topology info to user space
        vDPA: report virtio-block MQ info to user space
        vDPA: report virtio-block max segments in a request to user space
        vDPA: report virtio-block block-size to user space
        vDPA: report virtio-block max segment size to user space
        vDPA: report virtio-block capacity to user space
        virtio: make virtio_bus const
        vdpa: make vdpa_bus const
        vDPA/ifcvf: implement vdpa_config_ops.get_vq_num_min
        vDPA/ifcvf: get_max_vq_size to return max size
        virtio_vdpa: create vqs with the actual size
        ...
      d95fcdf4
    • Linus Torvalds's avatar
      Merge tag 'for-linus-6.9-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 0815d5cc
      Linus Torvalds authored
      Pull xen updates from Juergen Gross:
      
       - Xen event channel handling fix for a regression with a rare kernel
         config and some added hardening
      
       - better support of running Xen dom0 in PVH mode
      
       - a cleanup for the xen grant-dma-iommu driver
      
      * tag 'for-linus-6.9-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen/events: increment refcnt only if event channel is refcounted
        xen/evtchn: avoid WARN() when unbinding an event channel
        x86/xen: attempt to inflate the memory balloon on PVH
        xen/grant-dma-iommu: Convert to platform remove callback returning void
      0815d5cc
    • Rafael J. Wysocki's avatar
      Merge branches 'pm-em', 'pm-powercap' and 'pm-sleep' · a6d65909
      Rafael J. Wysocki authored
      Merge additional updates related to the Energy Model, power capping
      and system-wide power management for 6.9-rc1:
      
       - Modify the Energy Model code to bail out and complain if the unit of
         power is not uW to prevent errors due to unit mismatches (Lukasz
         Luba).
      
       - Make the intel_rapl platform driver use a remove callback returning
         void (Uwe Kleine-König).
      
       - Fix typo in the suspend and interrupts document (Saravana Kannan).
      
      * pm-em:
        PM: EM: Force device drivers to provide power in uW
      
      * pm-powercap:
        powercap: intel_rapl: Convert to platform remove callback returning void
      
      * pm-sleep:
        Documentation: power: Fix typo in suspend and interrupts doc
      a6d65909
    • Rafael J. Wysocki's avatar
      Merge branch 'acpi-docs' · a873add2
      Rafael J. Wysocki authored
      Merge an ACPI documentation update for 6.9-rc1 which adds markup to
      generate links from footnotes in the enumeration document.
      
      * acpi-docs:
        ACPI: docs: enumeration: Make footnotes links
      a873add2
    • Conrad Kostecki's avatar
      ahci: asm1064: asm1166: don't limit reported ports · 6cd8adc3
      Conrad Kostecki authored
      Previously, patches have been added to limit the reported count of SATA
      ports for asm1064 and asm1166 SATA controllers, as those controllers do
      report more ports than physically having.
      
      While it is allowed to report more ports than physically having in CAP.NP,
      it is not allowed to report more ports than physically having in the PI
      (Ports Implemented) register, which is what these HBAs do.
      (This is a AHCI spec violation.)
      
      Unfortunately, it seems that the PMP implementation in these ASMedia HBAs
      is also violating the AHCI and SATA-IO PMP specification.
      
      What these HBAs do is that they do not report that they support PMP
      (CAP.SPM (Supports Port Multiplier) is not set).
      
      Instead, they have decided to add extra "virtual" ports in the PI register
      that is used if a port multiplier is connected to any of the physical
      ports of the HBA.
      
      Enumerating the devices behind the PMP as specified in the AHCI and
      SATA-IO specifications, by using PMP READ and PMP WRITE commands to the
      physical ports of the HBA is not possible, you have to use the "virtual"
      ports.
      
      This is of course bad, because this gives us no way to detect the device
      and vendor ID of the PMP actually connected to the HBA, which means that
      we can not apply the proper PMP quirks for the PMP that is connected to
      the HBA.
      
      Limiting the port map will thus stop these controllers from working with
      SATA Port Multipliers.
      
      This patch reverts both patches for asm1064 and asm1166, so old behavior
      is restored and SATA PMP will work again, but it will also reintroduce the
      (minutes long) extra boot time for the ASMedia controllers that do not
      have a PMP connected (either on the PCIe card itself, or an external PMP).
      
      However, a longer boot time for some, is the lesser evil compared to some
      other users not being able to detect their drives at all.
      
      Fixes: 0077a504 ("ahci: asm1166: correct count of reported ports")
      Fixes: 9815e396 ("ahci: asm1064: correct count of reported ports")
      Cc: stable@vger.kernel.org
      Reported-by: default avatarMatt <cryptearth@googlemail.com>
      Signed-off-by: default avatarConrad Kostecki <conikost@gentoo.org>
      Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      [cassel: rewrote commit message]
      Signed-off-by: default avatarNiklas Cassel <cassel@kernel.org>
      6cd8adc3
    • Xuan Zhuo's avatar
      virtio_net: rename free_old_xmit_skbs to free_old_xmit · 5da7137d
      Xuan Zhuo authored
      Since free_old_xmit_skbs not only deals with skb, but also xdp frame and
      subsequent added xsk, so change the name of this function to
      free_old_xmit.
      Signed-off-by: default avatarXuan Zhuo <xuanzhuo@linux.alibaba.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Message-Id: <20240229072044.77388-19-xuanzhuo@linux.alibaba.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      5da7137d
    • Xuan Zhuo's avatar
      virtio_net: unify the code for recycling the xmit ptr · b1dc24ab
      Xuan Zhuo authored
      There are two completely similar and independent implementations. This
      is inconvenient for the subsequent addition of new types. So extract a
      function from this piece of code and call this function uniformly to
      recover old xmit ptr.
      Signed-off-by: default avatarXuan Zhuo <xuanzhuo@linux.alibaba.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Message-Id: <20240229072044.77388-18-xuanzhuo@linux.alibaba.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      b1dc24ab
    • Jason Wang's avatar
      virtio-net: add cond_resched() to the command waiting loop · 0d197a14
      Jason Wang authored
      Adding cond_resched() to the command waiting loop for a better
      co-operation with the scheduler. This allows to give CPU a breath to
      run other task(workqueue) instead of busy looping when preemption is
      not allowed on a device whose CVQ might be slow.
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      Message-Id: <20230720083839.481487-3-jasowang@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: default avatarShannon Nelson <shannon.nelson@amd.com>
      0d197a14
    • Jason Wang's avatar
      virtio-net: convert rx mode setting to use workqueue · b9f74252
      Jason Wang authored
      This patch convert rx mode setting to be done in a workqueue, this is
      a must for allow to sleep when waiting for the cvq command to
      response since current code is executed under addr spin lock.
      
      Note that we need to disable and flush the workqueue during freeze,
      this means the rx mode setting is lost after resuming. This is not the
      bug of this patch as we never try to restore rx mode setting during
      resume.
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      Message-Id: <20230720083839.481487-2-jasowang@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: default avatarShannon Nelson <shannon.nelson@amd.com>
      b9f74252
    • Xuan Zhuo's avatar
      virtio: packed: fix unmap leak for indirect desc table · d5c0ed17
      Xuan Zhuo authored
      When use_dma_api and premapped are true, then the do_unmap is false.
      
      Because the do_unmap is false, vring_unmap_extra_packed is not called by
      detach_buf_packed.
      
        if (unlikely(vq->do_unmap)) {
                      curr = id;
                      for (i = 0; i < state->num; i++) {
                              vring_unmap_extra_packed(vq,
                                                       &vq->packed.desc_extra[curr]);
                              curr = vq->packed.desc_extra[curr].next;
                      }
        }
      
      So the indirect desc table is not unmapped. This causes the unmap leak.
      
      So here, we check vq->use_dma_api instead. Synchronously, dma info is
      updated based on use_dma_api judgment
      
      This bug does not occur, because no driver use the premapped with
      indirect.
      
      Fixes: b319940f ("virtio_ring: skip unmap for premapped")
      Signed-off-by: default avatarXuan Zhuo <xuanzhuo@linux.alibaba.com>
      Message-Id: <20240223071833.26095-1-xuanzhuo@linux.alibaba.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      d5c0ed17
    • Zhu Lingshan's avatar
      vDPA: report virtio-blk flush info to user space · 1ac61ddf
      Zhu Lingshan authored
      This commit reports whether a virtio-blk device
      support cache flush command to user space
      Signed-off-by: default avatarZhu Lingshan <lingshan.zhu@intel.com>
      Message-Id: <20240218185606.13509-11-lingshan.zhu@intel.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      1ac61ddf
    • Zhu Lingshan's avatar
      vDPA: report virtio-block read-only info to user space · ae1374b7
      Zhu Lingshan authored
      This commit report read-only information of
      virtio-blk devices to user space.
      Signed-off-by: default avatarZhu Lingshan <lingshan.zhu@intel.com>
      Message-Id: <20240218185606.13509-10-lingshan.zhu@intel.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      ae1374b7
    • Zhu Lingshan's avatar
      vDPA: report virtio-block write zeroes configuration to user space · 6bdc7846
      Zhu Lingshan authored
      This commits reports write zeroes configuration of
      virtio-block devices to user space, includes:
      1)maximum write zeroes sectors size
      2)maximum write zeroes segment number
      Signed-off-by: default avatarZhu Lingshan <lingshan.zhu@intel.com>
      Message-Id: <20240218185606.13509-9-lingshan.zhu@intel.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      6bdc7846
    • Zhu Lingshan's avatar
      vDPA: report virtio-block discarding configuration to user space · 65848f46
      Zhu Lingshan authored
      This commit reports virtio-blk discarding configuration
      to user space,includes:
      1) the maximum discard sectors
      2) maximum number of discard segments for the block driver to use
      3) the alignment for splitting a discarding request
      Signed-off-by: default avatarZhu Lingshan <lingshan.zhu@intel.com>
      Message-Id: <20240218185606.13509-8-lingshan.zhu@intel.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      65848f46
    • Zhu Lingshan's avatar
      vDPA: report virtio-block topology info to user space · c9d989b4
      Zhu Lingshan authored
      This commit allows vDPA reporting topology information of
      virtio-blk devices to user space, includes:
      1) the number of logical blocks per physical block
      2) offset of first aligned logical block
      3) suggested minimum I/O size in blocks
      4) optimal (suggested maximum) I/O size in blocks
      Signed-off-by: default avatarZhu Lingshan <lingshan.zhu@intel.com>
      Message-Id: <20240218185606.13509-7-lingshan.zhu@intel.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      c9d989b4
    • Zhu Lingshan's avatar
      vDPA: report virtio-block MQ info to user space · 54fb04b0
      Zhu Lingshan authored
      This commits allows vDPA reporting virtio-block multi-queue
      configuration to user sapce.
      Signed-off-by: default avatarZhu Lingshan <lingshan.zhu@intel.com>
      Message-Id: <20240218185606.13509-6-lingshan.zhu@intel.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      54fb04b0
    • Zhu Lingshan's avatar
      vDPA: report virtio-block max segments in a request to user space · 81f64e1d
      Zhu Lingshan authored
      This commit allows vDPA reporting the maximum number of
      segments in a request of virtio-block devices to
      user space.
      Signed-off-by: default avatarZhu Lingshan <lingshan.zhu@intel.com>
      Message-Id: <20240218185606.13509-5-lingshan.zhu@intel.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      81f64e1d
    • Zhu Lingshan's avatar
      vDPA: report virtio-block block-size to user space · 3a1d33fb
      Zhu Lingshan authored
      This commit allows reporting the block size of a
      virtio-block device to user space.
      Signed-off-by: default avatarZhu Lingshan <lingshan.zhu@intel.com>
      Message-Id: <20240218185606.13509-4-lingshan.zhu@intel.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      3a1d33fb
    • Zhu Lingshan's avatar
      vDPA: report virtio-block max segment size to user space · 330b8aea
      Zhu Lingshan authored
      This commit allows reporting the max size of any
      single segment of virtio-block devices to user space.
      Signed-off-by: default avatarZhu Lingshan <lingshan.zhu@intel.com>
      Message-Id: <20240218185606.13509-3-lingshan.zhu@intel.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      330b8aea
    • Zhu Lingshan's avatar
      vDPA: report virtio-block capacity to user space · c2475a9a
      Zhu Lingshan authored
      This commit allows userspace to query capacity of
      a virtio-block device.
      Signed-off-by: default avatarZhu Lingshan <lingshan.zhu@intel.com>
      Message-Id: <20240218185606.13509-2-lingshan.zhu@intel.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      c2475a9a
    • Ricardo B. Marliere's avatar
      virtio: make virtio_bus const · 2b666ee2
      Ricardo B. Marliere authored
      Now that the driver core can properly handle constant struct bus_type,
      move the virtio_bus variable to be a constant structure as well,
      placing it into read-only memory which can not be modified at runtime.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Suggested-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarRicardo B. Marliere <ricardo@marliere.net>
      Message-Id: <20240204-bus_cleanup-virtio-v1-1-3bcb2212aaa0@marliere.net>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      2b666ee2
    • Ricardo B. Marliere's avatar
      vdpa: make vdpa_bus const · 8169ed62
      Ricardo B. Marliere authored
      Now that the driver core can properly handle constant struct bus_type,
      move the vdpa_bus variable to be a constant structure as well,
      placing it into read-only memory which can not be modified at runtime.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Suggested-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarRicardo B. Marliere <ricardo@marliere.net>
      Message-Id: <20240204-bus_cleanup-vdpa-v1-1-1745eccb0a5c@marliere.net>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8169ed62
    • Zhu Lingshan's avatar
      vDPA/ifcvf: implement vdpa_config_ops.get_vq_num_min · 56d61ae5
      Zhu Lingshan authored
      IFCVF HW supports operation with vq size less than the max size,
      as the spec required.
      
      This commit implements vdpa_config_ops.get_vq_num_min to report
      the minimal size of the virtqueues, which gives vDPA framework
      a chance to reduce the vring size.
      
      We need at least one descriptor to be functional, but it is better
      no less than 64 to meet ceratin performance requirements.
      Actually the framework would allocate at least a PAGE for the vq.
      Signed-off-by: default avatarZhu Lingshan <lingshan.zhu@intel.com>
      Message-Id: <20240202163905.8834-11-lingshan.zhu@intel.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      56d61ae5
    • Zhu Lingshan's avatar
      vDPA/ifcvf: get_max_vq_size to return max size · cd214706
      Zhu Lingshan authored
      Since we already implemented vdpa_config_ops.get_vq_size,
      so get_max_vq_size can return the acutal max size of the
      virtqueues other than the max allowed safe size.
      Signed-off-by: default avatarZhu Lingshan <lingshan.zhu@intel.com>
      Message-Id: <20240202163905.8834-10-lingshan.zhu@intel.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      cd214706