Skip to content
  1. Sep 07, 2023
  2. Sep 05, 2023
    • Linus Torvalds's avatar
      Merge tag 'printk-for-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux · 3c31041e
      Linus Torvalds authored
      Pull printk updates from Petr Mladek:
      
       - Do not try to get the console lock when it is not need or useful in
         panic()
      
       - Replace the global console_suspended state by a per-console flag
      
       - Export symbols needed for dumping the raw printk buffer in panic()
      
       - Fix documentation of printf formats for integer types
      
       - Moved Sergey Senozhatsky to the reviewer role
      
       - Misc cleanups
      
      * tag 'printk-for-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux:
        printk: export symbols for debug modules
        lib: test_scanf: Add explicit type cast to result initialization in test_number_prefix()
        printk: ringbuffer: Fix truncating buffer size min_t cast
        printk: Rename abandon_console_lock_in_panic() to other_cpu_in_panic()
        printk: Add per-console suspended state
        printk: Consolidate console deferred printing
        printk: Do not take console lock for console_flush_on_panic()
        printk: Keep non-panic-CPUs out of console lock
        printk: Reduce console_unblank() usage in unsafe scenarios
        kdb: Do not assume write() callback available
        docs: printk-formats: Treat char as always unsigned
        docs: printk-formats: Fix hex printing of signed values
        MAINTAINERS: adjust printk/vsprintf entries
      3c31041e
    • Linus Torvalds's avatar
      Merge tag 'timers-core-2023-09-04-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4accdb98
      Linus Torvalds authored
      Pull clocksource/clockevent driver updates from Thomas Gleixner:
      
       - Remove the OXNAS driver instead of adding a new one!
      
       - A set of boring fixes, cleanups and improvements
      
      * tag 'timers-core-2023-09-04-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        clocksource: Explicitly include correct DT includes
        clocksource/drivers/sun5i: Convert to platform device driver
        clocksource/drivers/sun5i: Remove pointless struct
        clocksource/drivers/sun5i: Remove duplication of code and data
        clocksource/drivers/loongson1: Set variable ls1x_timer_lock storage-class-specifier to static
        clocksource/drivers/arm_arch_timer: Disable timer before programming CVAL
        dt-bindings: timer: oxsemi,rps-timer: remove obsolete bindings
        clocksource/drivers/timer-oxnas-rps: Remove obsolete timer driver
      4accdb98
    • Linus Torvalds's avatar
      Merge tag 'm68knommu-for-v6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu · 7a1415ee
      Linus Torvalds authored
      Pull m68knommu updates from Greg Ungerer:
       "Two changes, one a trivial white space clean up, the other removes the
        unnecessary local pcibios_setup() code"
      
      * tag 'm68knommu-for-v6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
        m68k: coldfire: dma_timer: ERROR: "foo __init bar" should be "foo __init bar"
        m68k/pci: Drop useless pcibios_setup()
      7a1415ee
    • Linus Torvalds's avatar
      Merge tag 'uml-for-linus-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux · 68d76d4e
      Linus Torvalds authored
      Pull UML updates from Richard Weinberger:
      
       - Drop 32-bit checksum implementation and re-use it from arch/x86
      
       - String function cleanup
      
       - Fixes for -Wmissing-variable-declarations and -Wmissing-prototypes
         builds
      
      * tag 'uml-for-linus-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux:
        um: virt-pci: fix missing declaration warning
        um: Refactor deprecated strncpy to memcpy
        um: fix 3 instances of -Wmissing-prototypes
        um: port_kern: fix -Wmissing-variable-declarations
        uml: audio: fix -Wmissing-variable-declarations
        um: vector: refactor deprecated strncpy
        um: use obj-y to descend into arch/um/*/
        um: Hard-code the result of 'uname -s'
        um: Use the x86 checksum implementation on 32-bit
        asm-generic: current: Don't include thread-info.h if building asm
        um: Remove unsued extern declaration ldt_host_info()
        um: Fix hostaudio build errors
        um: Remove strlcpy usage
      68d76d4e
    • Linus Torvalds's avatar
      Merge tag 'hyperv-next-signed-20230902' of... · 0b90c563
      Linus Torvalds authored
      Merge tag 'hyperv-next-signed-20230902' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux
      
      Pull hyperv updates from Wei Liu:
      
       - Support for SEV-SNP guests on Hyper-V (Tianyu Lan)
      
       - Support for TDX guests on Hyper-V (Dexuan Cui)
      
       - Use SBRM API in Hyper-V balloon driver (Mitchell Levy)
      
       - Avoid dereferencing ACPI root object handle in VMBus driver (Maciej
         Szmigiero)
      
       - A few misecllaneous fixes (Jiapeng Chong, Nathan Chancellor, Saurabh
         Sengar)
      
      * tag 'hyperv-next-signed-20230902' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: (24 commits)
        x86/hyperv: Remove duplicate include
        x86/hyperv: Move the code in ivm.c around to avoid unnecessary ifdef's
        x86/hyperv: Remove hv_isolation_type_en_snp
        x86/hyperv: Use TDX GHCI to access some MSRs in a TDX VM with the paravisor
        Drivers: hv: vmbus: Bring the post_msg_page back for TDX VMs with the paravisor
        x86/hyperv: Introduce a global variable hyperv_paravisor_present
        Drivers: hv: vmbus: Support >64 VPs for a fully enlightened TDX/SNP VM
        x86/hyperv: Fix serial console interrupts for fully enlightened TDX guests
        Drivers: hv: vmbus: Support fully enlightened TDX guests
        x86/hyperv: Support hypercalls for fully enlightened TDX guests
        x86/hyperv: Add hv_isolation_type_tdx() to detect TDX guests
        x86/hyperv: Fix undefined reference to isolation_type_en_snp without CONFIG_HYPERV
        x86/hyperv: Add missing 'inline' to hv_snp_boot_ap() stub
        hv: hyperv.h: Replace one-element array with flexible-array member
        Drivers: hv: vmbus: Don't dereference ACPI root object handle
        x86/hyperv: Add hyperv-specific handling for VMMCALL under SEV-ES
        x86/hyperv: Add smp support for SEV-SNP guest
        clocksource: hyper-v: Mark hyperv tsc page unencrypted in sev-snp enlightened guest
        x86/hyperv: Use vmmcall to implement Hyper-V hypercall in sev-snp enlightened guest
        drivers: hv: Mark percpu hvcall input arg page unencrypted in SEV-SNP enlightened guest
        ...
      0b90c563
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · e4f1b820
      Linus Torvalds authored
      Pull virtio updates from Michael Tsirkin:
       "A small pull request this time around, mostly because the vduse
        network got postponed to next relase so we can be sure we got the
        security store right"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        virtio_ring: fix avail_wrap_counter in virtqueue_add_packed
        virtio_vdpa: build affinity masks conditionally
        virtio_net: merge dma operations when filling mergeable buffers
        virtio_ring: introduce dma sync api for virtqueue
        virtio_ring: introduce dma map api for virtqueue
        virtio_ring: introduce virtqueue_reset()
        virtio_ring: separate the logic of reset/enable from virtqueue_resize
        virtio_ring: correct the expression of the description of virtqueue_resize()
        virtio_ring: skip unmap for premapped
        virtio_ring: introduce virtqueue_dma_dev()
        virtio_ring: support add premapped buf
        virtio_ring: introduce virtqueue_set_dma_premapped()
        virtio_ring: put mapping error check in vring_map_one_sg
        virtio_ring: check use_dma_api before unmap desc for indirect
        vdpa_sim: offer VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK
        vdpa: add get_backend_features vdpa operation
        vdpa: accept VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK backend feature
        vdpa: add VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK flag
        vdpa/mlx5: Remove unused function declarations
      e4f1b820
    • Linus Torvalds's avatar
      Merge tag 'tomoyo-pr-20230903' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1 · 5c5e0e81
      Linus Torvalds authored
      Pull tomoyo updates from Tetsuo Handa:
       "Three cleanup patches, no behavior changes"
      
      * tag 'tomoyo-pr-20230903' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1:
        tomoyo: remove unused function declaration
        tomoyo: refactor deprecated strncpy
        tomoyo: add format attributes to functions
      5c5e0e81
  3. Sep 04, 2023
    • Petr Mladek's avatar
      f0f69239
    • Petr Mladek's avatar
      b3553628
    • Yuan Yao's avatar
      virtio_ring: fix avail_wrap_counter in virtqueue_add_packed · 1acfe2c1
      Yuan Yao authored
      In current packed virtqueue implementation, the avail_wrap_counter won't
      flip, in the case when the driver supplies a descriptor chain with a
      length equals to the queue size; total_sg == vq->packed.vring.num.
      
      Let’s assume the following situation:
      vq->packed.vring.num=4
      vq->packed.next_avail_idx: 1
      vq->packed.avail_wrap_counter: 0
      
      Then the driver adds a descriptor chain containing 4 descriptors.
      
      We expect the following result with avail_wrap_counter flipped:
      vq->packed.next_avail_idx: 1
      vq->packed.avail_wrap_counter: 1
      
      But, the current implementation gives the following result:
      vq->packed.next_avail_idx: 1
      vq->packed.avail_wrap_counter: 0
      
      To reproduce the bug, you can set a packed queue size as small as
      possible, so that the driver is more likely to provide a descriptor
      chain with a length equal to the packed queue size. For example, in
      qemu run following commands:
      sudo qemu-system-x86_64 \
      -enable-kvm \
      -nographic \
      -kernel "path/to/kernel_image" \
      -m 1G \
      -drive file="path/to/rootfs",if=none,id=disk \
      -device virtio-blk,drive=disk \
      -drive file="path/to/disk_image",if=none,id=rwdisk \
      -device virtio-blk,drive=rwdisk,packed=on,queue-size=4,\
      indirect_desc=off \
      -append "console=ttyS0 root=/dev/vda rw init=/bin/bash"
      
      Inside the VM, create a directory and mount the rwdisk device on it. The
      rwdisk will hang and mount operation will not complete.
      
      This commit fixes the wrap counter error by flipping the
      packed.avail_wrap_counter, when start of descriptor chain equals to the
      end of descriptor chain (head == i).
      
      Fixes: 1ce9e605
      
       ("virtio_ring: introduce packed ring support")
      Signed-off-by: default avatarYuan Yao <yuanyaogoog@chromium.org>
      Message-Id: <20230808051110.3492693-1-yuanyaogoog@chromium.org>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      1acfe2c1
    • Jason Wang's avatar
      virtio_vdpa: build affinity masks conditionally · ae15acea
      Jason Wang authored
      We try to build affinity mask via create_affinity_masks()
      unconditionally which may lead several issues:
      
      - the affinity mask is not used for parent without affinity support
        (only VDUSE support the affinity now)
      - the logic of create_affinity_masks() might not work for devices
        other than block. For example it's not rare in the networking device
        where the number of queues could exceed the number of CPUs. Such
        case breaks the current affinity logic which is based on
        group_cpus_evenly() who assumes the number of CPUs are not less than
        the number of groups. This can trigger a warning[1]:
      
      	if (ret >= 0)
      		WARN_ON(nr_present + nr_others < numgrps);
      
      Fixing this by only build the affinity masks only when
      
      - Driver passes affinity descriptor, driver like virtio-blk can make
        sure to limit the number of queues when it exceeds the number of CPUs
      - Parent support affinity setting config ops
      
      This help to avoid the warning. More optimizations could be done on
      top.
      
      [1]
      [  682.146655] WARNING: CPU: 6 PID: 1550 at lib/group_cpus.c:400 group_cpus_evenly+0x1aa/0x1c0
      [  682.146668] CPU: 6 PID: 1550 Comm: vdpa Not tainted 6.5.0-rc5jason+ #79
      [  682.146671] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.2-0-gea1b7a073390-prebuilt.qemu.org 04/01/2014
      [  682.146673] RIP: 0010:group_cpus_evenly+0x1aa/0x1c0
      [  682.146676] Code: 4c 89 e0 5b 5d 41 5c 41 5d 41 5e c3 cc cc cc cc e8 1b c4 74 ff 48 89 ef e8 13 ac 98 ff 4c 89 e7 45 31 e4 e8 08 ac 98 ff eb c2 <0f> 0b eb b6 e8 fd 05 c3 00 45 31 e4 eb e5 cc cc cc cc cc cc cc cc
      [  682.146679] RSP: 0018:ffffc9000215f498 EFLAGS: 00010293
      [  682.146682] RAX: 000000000001f1e0 RBX: 0000000000000041 RCX: 0000000000000000
      [  682.146684] RDX: ffff888109922058 RSI: 0000000000000041 RDI: 0000000000000030
      [  682.146686] RBP: ffff888109922058 R08: ffffc9000215f498 R09: ffffc9000215f4a0
      [  682.146687] R10: 00000000000198d0 R11: 0000000000000030 R12: ffff888107e02800
      [  682.146689] R13: 0000000000000030 R14: 0000000000000030 R15: 0000000000000041
      [  682.146692] FS:  00007fef52315740(0000) GS:ffff888237380000(0000) knlGS:0000000000000000
      [  682.146695] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  682.146696] CR2: 00007fef52509000 CR3: 0000000110dbc004 CR4: 0000000000370ee0
      [  682.146698] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [  682.146700] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [  682.146701] Call Trace:
      [  682.146703]  <TASK>
      [  682.146705]  ? __warn+0x7b/0x130
      [  682.146709]  ? group_cpus_evenly+0x1aa/0x1c0
      [  682.146712]  ? report_bug+0x1c8/0x1e0
      [  682.146717]  ? handle_bug+0x3c/0x70
      [  682.146721]  ? exc_invalid_op+0x14/0x70
      [  682.146723]  ? asm_exc_invalid_op+0x16/0x20
      [  682.146727]  ? group_cpus_evenly+0x1aa/0x1c0
      [  682.146729]  ? group_cpus_evenly+0x15c/0x1c0
      [  682.146731]  create_affinity_masks+0xaf/0x1a0
      [  682.146735]  virtio_vdpa_find_vqs+0x83/0x1d0
      [  682.146738]  ? __pfx_default_calc_sets+0x10/0x10
      [  682.146742]  virtnet_find_vqs+0x1f0/0x370
      [  682.146747]  virtnet_probe+0x501/0xcd0
      [  682.146749]  ? vp_modern_get_status+0x12/0x20
      [  682.146751]  ? get_cap_addr.isra.0+0x10/0xc0
      [  682.146754]  virtio_dev_probe+0x1af/0x260
      [  682.146759]  really_probe+0x1a5/0x410
      
      Fixes: 3dad5682
      
       ("virtio-vdpa: Support interrupt affinity spreading mechanism")
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      Message-Id: <20230811091539.1359865-1-jasowang@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      ae15acea
    • Xuan Zhuo's avatar
      virtio_net: merge dma operations when filling mergeable buffers · 295525e2
      Xuan Zhuo authored
      
      
      Currently, the virtio core will perform a dma operation for each
      buffer. Although, the same page may be operated multiple times.
      
      This patch, the driver does the dma operation and manages the dma
      address based the feature premapped of virtio core.
      
      This way, we can perform only one dma operation for the pages of the
      alloc frag. This is beneficial for the iommu device.
      
      kernel command line: intel_iommu=on iommu.passthrough=0
      
             |  strict=0  | strict=1
      Before |  775496pps | 428614pps
      After  | 1109316pps | 742853pps
      
      Signed-off-by: default avatarXuan Zhuo <xuanzhuo@linux.alibaba.com>
      Message-Id: <20230810123057.43407-13-xuanzhuo@linux.alibaba.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      295525e2
    • Xuan Zhuo's avatar
      virtio_ring: introduce dma sync api for virtqueue · 8bd2f710
      Xuan Zhuo authored
      
      
      These API has been introduced:
      
      * virtqueue_dma_need_sync
      * virtqueue_dma_sync_single_range_for_cpu
      * virtqueue_dma_sync_single_range_for_device
      
      These APIs can be used together with the premapped mechanism to sync the
      DMA address.
      
      Signed-off-by: default avatarXuan Zhuo <xuanzhuo@linux.alibaba.com>
      Message-Id: <20230810123057.43407-12-xuanzhuo@linux.alibaba.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      8bd2f710
    • Xuan Zhuo's avatar
      virtio_ring: introduce dma map api for virtqueue · b6253b4e
      Xuan Zhuo authored
      
      
      Added virtqueue_dma_map_api* to map DMA addresses for virtual memory in
      advance. The purpose is to keep memory mapped across multiple add/get
      buf operations.
      
      Signed-off-by: default avatarXuan Zhuo <xuanzhuo@linux.alibaba.com>
      Message-Id: <20230810123057.43407-11-xuanzhuo@linux.alibaba.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      b6253b4e
    • Xuan Zhuo's avatar
      virtio_ring: introduce virtqueue_reset() · ba3e0c47
      Xuan Zhuo authored
      
      
      Introduce virtqueue_reset() to release all buffer inside vq.
      
      Signed-off-by: default avatarXuan Zhuo <xuanzhuo@linux.alibaba.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Message-Id: <20230810123057.43407-10-xuanzhuo@linux.alibaba.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      ba3e0c47
    • Xuan Zhuo's avatar
      virtio_ring: separate the logic of reset/enable from virtqueue_resize · ad48d53b
      Xuan Zhuo authored
      
      
      The subsequent reset function will reuse these logic.
      
      Signed-off-by: default avatarXuan Zhuo <xuanzhuo@linux.alibaba.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Message-Id: <20230810123057.43407-9-xuanzhuo@linux.alibaba.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      ad48d53b
    • Xuan Zhuo's avatar
      virtio_ring: correct the expression of the description of virtqueue_resize() · 4d09f240
      Xuan Zhuo authored
      
      
      Modify the "useless" to a more accurate "unused".
      
      Signed-off-by: default avatarXuan Zhuo <xuanzhuo@linux.alibaba.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Message-Id: <20230810123057.43407-8-xuanzhuo@linux.alibaba.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      4d09f240
    • Xuan Zhuo's avatar
      virtio_ring: skip unmap for premapped · b319940f
      Xuan Zhuo authored
      
      
      Now we add a case where we skip dma unmap, the vq->premapped is true.
      
      We can't just rely on use_dma_api to determine whether to skip the dma
      operation. For convenience, I introduced the "do_unmap". By default, it
      is the same as use_dma_api. If the driver is configured with premapped,
      then do_unmap is false.
      
      So as long as do_unmap is false, for addr of desc, we should skip dma
      unmap operation.
      
      Signed-off-by: default avatarXuan Zhuo <xuanzhuo@linux.alibaba.com>
      Message-Id: <20230810123057.43407-7-xuanzhuo@linux.alibaba.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      b319940f
    • Xuan Zhuo's avatar
      virtio_ring: introduce virtqueue_dma_dev() · 2df64759
      Xuan Zhuo authored
      
      
      Added virtqueue_dma_dev() to get DMA device for virtio. Then the
      caller can do dma operation in advance. The purpose is to keep memory
      mapped across multiple add/get buf operations.
      
      Signed-off-by: default avatarXuan Zhuo <xuanzhuo@linux.alibaba.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Message-Id: <20230810123057.43407-6-xuanzhuo@linux.alibaba.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      2df64759
    • Xuan Zhuo's avatar
      virtio_ring: support add premapped buf · d7344a2f
      Xuan Zhuo authored
      
      
      If the vq is the premapped mode, use the sg_dma_address() directly.
      
      Signed-off-by: default avatarXuan Zhuo <xuanzhuo@linux.alibaba.com>
      Message-Id: <20230810123057.43407-5-xuanzhuo@linux.alibaba.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      d7344a2f
    • Xuan Zhuo's avatar
      virtio_ring: introduce virtqueue_set_dma_premapped() · 8daafe9e
      Xuan Zhuo authored
      
      
      This helper allows the driver change the dma mode to premapped mode.
      Under the premapped mode, the virtio core do not do dma mapping
      internally.
      
      This just work when the use_dma_api is true. If the use_dma_api is false,
      the dma options is not through the DMA APIs, that is not the standard
      way of the linux kernel.
      
      Signed-off-by: default avatarXuan Zhuo <xuanzhuo@linux.alibaba.com>
      Message-Id: <20230810123057.43407-4-xuanzhuo@linux.alibaba.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      8daafe9e
    • Xuan Zhuo's avatar
      virtio_ring: put mapping error check in vring_map_one_sg · 0e27fa6d
      Xuan Zhuo authored
      
      
      This patch put the dma addr error check in vring_map_one_sg().
      
      The benefits of doing this:
      
      1. reduce one judgment of vq->use_dma_api.
      2. make vring_map_one_sg more simple, without calling
         vring_mapping_error to check the return value. simplifies subsequent
         code
      
      Signed-off-by: default avatarXuan Zhuo <xuanzhuo@linux.alibaba.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Message-Id: <20230810123057.43407-3-xuanzhuo@linux.alibaba.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      0e27fa6d
    • Xuan Zhuo's avatar
      virtio_ring: check use_dma_api before unmap desc for indirect · 610c708b
      Xuan Zhuo authored
      
      
      Inside detach_buf_split(), if use_dma_api is false,
      vring_unmap_one_split_indirect will be called many times, but actually
      nothing is done. So this patch check use_dma_api firstly.
      
      Signed-off-by: default avatarXuan Zhuo <xuanzhuo@linux.alibaba.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Message-Id: <20230810123057.43407-2-xuanzhuo@linux.alibaba.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      610c708b
    • Eugenio Pérez's avatar
      vdpa_sim: offer VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK · 2c9c6371
      Eugenio Pérez authored
      
      
      Start offering the feature in the simulator.  Other parent drivers can
      follow this code to offer it too.
      
      Signed-off-by: default avatarEugenio Pérez <eperezma@redhat.com>
      Acked-by: default avatarShannon Nelson <shannon.nelson@amd.com>
      Message-Id: <20230609092127.170673-5-eperezma@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      2c9c6371
    • Eugenio Pérez's avatar
      vdpa: add get_backend_features vdpa operation · b63e5c70
      Eugenio Pérez authored
      
      
      This operation allow vdpa parent to expose its own backend feature bits.
      
      Next patches introduce a feature not compatible with all parent drivers:
      the ability to enable vq after driver_ok.  Each parent must declare if
      it allows it or not.
      
      Signed-off-by: default avatarEugenio Pérez <eperezma@redhat.com>
      Acked-by: default avatarShannon Nelson <shannon.nelson@amd.com>
      Message-Id: <20230609092127.170673-4-eperezma@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      b63e5c70
    • Eugenio Pérez's avatar
      vdpa: accept VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK backend feature · 9f09fd61
      Eugenio Pérez authored
      
      
      Accepting VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK backend feature if
      userland sets it.
      
      Signed-off-by: default avatarEugenio Pérez <eperezma@redhat.com>
      Acked-by: default avatarShannon Nelson <shannon.nelson@amd.com>
      Message-Id: <20230609092127.170673-3-eperezma@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      9f09fd61
    • Eugenio Pérez's avatar
      vdpa: add VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK flag · 8b59b4da
      Eugenio Pérez authored
      
      
      This feature flag allows the driver enabling virtqueues both before and
      after DRIVER_OK.
      
      This is needed for software assisted live migration, so userland can
      restore the device status in devices with control virtqueue before the
      dataplane is enabled.
      
      Signed-off-by: default avatarEugenio Pérez <eperezma@redhat.com>
      Acked-by: default avatarShannon Nelson <shannon.nelson@amd.com>
      Message-Id: <20230609092127.170673-2-eperezma@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      8b59b4da
    • Yue Haibing's avatar
      vdpa/mlx5: Remove unused function declarations · c1081002
      Yue Haibing authored
      Commit 29064bfd
      
       ("vdpa/mlx5: Add support library for mlx5 VDPA implementation")
      declared but never implemented these.
      
      Signed-off-by: default avatarYue Haibing <yuehaibing@huawei.com>
      Message-Id: <20230803143041.23388-1-yuehaibing@huawei.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      c1081002
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine · 708283ab
      Linus Torvalds authored
      Pull dmaengine updates from Vinod Koul:
       "New controller support and updates to drivers.
      
        New support:
         - Qualcomm SM6115 and QCM2290 dmaengine support
         - at_xdma support for microchip,sam9x7 controller
      
        Updates:
         - idxd updates for wq simplification and ats knob updates
         - fsl edma updates for v3 support
         - Xilinx AXI4-Stream control support
         - Yaml conversion for bcm dma binding"
      
      * tag 'dmaengine-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (53 commits)
        dmaengine: fsl-edma: integrate v3 support
        dt-bindings: fsl-dma: fsl-edma: add edma3 compatible string
        dmaengine: fsl-edma: move tcd into struct fsl_dma_chan
        dmaengine: fsl-edma: refactor chan_name setup and safety
        dmaengine: fsl-edma: move clearing of register interrupt into setup_irq function
        dmaengine: fsl-edma: refactor using devm_clk_get_enabled
        dmaengine: fsl-edma: simply ATTR_DSIZE and ATTR_SSIZE by using ffs()
        dmaengine: fsl-edma: move common IRQ handler to common.c
        dmaengine: fsl-edma: Remove enum edma_version
        dmaengine: fsl-edma: transition from bool fields to bitmask flags in drvdata
        dmaengine: fsl-edma: clean up EXPORT_SYMBOL_GPL in fsl-edma-common.c
        dmaengine: fsl-edma: fix build error when arch is s390
        dmaengine: idxd: Fix issues with PRS disable sysfs knob
        dmaengine: idxd: Allow ATS disable update only for configurable devices
        dmaengine: xilinx_dma: Program interrupt delay timeout
        dmaengine: xilinx_dma: Use tasklet_hi_schedule for timing critical usecase
        dmaengine: xilinx_dma: Freeup active list based on descriptor completion bit
        dmaengine: xilinx_dma: Increase AXI DMA transaction segment count
        dmaengine: xilinx_dma: Pass AXI4-Stream control words to dma client
        dt-bindings: dmaengine: xilinx_dma: Add xlnx,irq-delay property
        ...
      708283ab
    • Linus Torvalds's avatar
      Merge tag 'phy-for-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy · db906f0c
      Linus Torvalds authored
      Pull phy updates from Vinod Koul:
       "As usual a couple of new drivers, a bunch of new device support and
        few updates to existing drivers
      
        New Support:
         - Starfive dphy rx, JH7110 usb and pcie support
         - Rockchip rv1126 inno-dsi phy, rk3588 usb and pcie support
         - Qualcomm sa8775p PCIe support, M31 USB PHY driver
         - Samsung Exynos850 usb support
      
        Updates:
         - Mediatek dsi driver clock updates
         - Qualcomm sm8150 combo phy with reworking of qmp pcie driver
         - Xilinx zynqmp runtime PM support"
      
      * tag 'phy-for-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: (83 commits)
        phy: exynos5-usbdrd: Add Exynos850 support
        phy: exynos5-usbdrd: Add 26MHz ref clk support
        phy: exynos5-usbdrd: Make it possible to pass custom phy ops
        dt-bindings: phy: samsung,usb3-drd-phy: Add Exynos850 support
        phy: qcom-qmp-combo: fix clock probing
        phy: qcom-qmp-pcie: support SM8150 PCIe QMP PHYs
        phy: qcom-qmp-pcie: populate offsets configuration
        phy: qcom-qmp-pcie: simplify clock handling
        phy: qcom-qmp-pcie: keep offset tables sorted
        phy: qcom-qmp-pcie: drop ln_shrd from v5_20 config
        dt-bindings: phy: qcom,qmp-pcie: describe SM8150 PCIe PHYs
        dt-bindings: phy: migrate QMP PCIe PHY bindings to qcom,sc8280xp-qmp-pcie-phy.yaml
        phy: fsl-imx8mq-usb: add dev_err_probe if getting vbus failed
        phy: qcom: Introduce M31 USB PHY driver
        dt-bindings: phy: qcom,m31: Document qcom,m31 USB phy
        phy: rockchip: inno-dsidphy: Add rv1126 support
        dt-bindings: phy: rockchip-inno-dsidphy: Document rv1126
        dt-bindings: phy: mediatek,tphy: allow simple nodename pattern
        phy: amlogic: meson-g12a-usb2: fix Wvoid-pointer-to-enum-cast warning
        phy: marvell pxa-usb: fix Wvoid-pointer-to-enum-cast warning
        ...
      db906f0c
    • Linus Torvalds's avatar
      Merge tag 'soundwire-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire · 6e32dfcc
      Linus Torvalds authored
      Pull soundwire updates from Vinod Koul:
       "Device numbering and intel driver changes are main features:
      
         - Core support for soundwire device number allocation
      
         - intel driver updates for adding hw_params for DAI ops, hybrid
           number allocation and power managemnt callback updates
      
         - DT header include changes for subsystem"
      
      * tag 'soundwire-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire:
        soundwire: intel_ace2x: add DAI hw_params/prepare/hw_free callbacks
        soundwire: intel_auxdevice: add hybrid IDA-based device_number allocation
        soundwire: bus: add callbacks for device_number allocation
        soundwire: extend parameters of new_peripheral_assigned() callback
        soundWire: intel_auxdevice: resume 'sdw-master' on startup and system resume
        soundwire: intel_auxdevice: enable pm_runtime earlier on startup
        soundwire: Explicitly include correct DT includes
      6e32dfcc
    • Linus Torvalds's avatar
      Merge tag 'mtd/for-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux · bac8a20f
      Linus Torvalds authored
      Pull MTD updates from Miquel Raynal:
       "Core MTD changes:
         - Use refcount to prevent corruption
         - Call external _get and _put in right order
         - Fix use-after-free in mtd release
         - Explicitly include correct DT includes
         - Clean refcounting with MTD_PARTITIONED_MASTER
         - mtdblock: make warning messages ratelimited
         - dt-bindings: Add SEAMA partition bindings
      
        Device driver changes:
         - Use devm helper functions
         - Fix questionable cast, remove pointless ones.
         - error handling fixes
         - add support for new chip versions
         - update DT bindings
         - misc cleanups - fix typos, whitespace, indentation"
      
      * tag 'mtd/for-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (105 commits)
        dt-bindings: mtd: amlogic,meson-nand: drop unneeded quotes
        mtd: spear_smi: Use helper function devm_clk_get_enabled()
        mtd: rawnand: orion: Use helper function devm_clk_get_optional_enabled()
        mtd: rawnand: vf610_nfc: Use helper function devm_clk_get_enabled()
        mtd: rawnand: sunxi: Use helper function devm_clk_get_enabled()
        mtd: rawnand: stm32_fmc2: Use helper function devm_clk_get_enabled()
        mtd: rawnand: mtk: Use helper function devm_clk_get_enabled()
        mtd: rawnand: mpc5121: Use helper function devm_clk_get_enabled()
        mtd: rawnand: lpc32xx_slc: Use helper function devm_clk_get_enabled()
        mtd: rawnand: intel: Use helper function devm_clk_get_enabled()
        mtd: rawnand: fsmc: Use helper function devm_clk_get_enabled()
        mtd: rawnand: arasan: Use helper function devm_clk_get_enabled()
        mtd: rawnand: qcom: Add read/read_start ops in exec_op path
        mtd: rawnand: qcom: Clear buf_count and buf_start in raw read
        mtd: maps: fix -Wvoid-pointer-to-enum-cast warning
        mtd: rawnand: fix -Wvoid-pointer-to-enum-cast warning
        mtd: rawnand: fsmc: handle clk prepare error in fsmc_nand_resume()
        mtd: rawnand: Propagate error and simplify ternary operators for brcmstb_nand_wait_for_completion()
        mtd: rawnand: qcom: Sort includes alphabetically
        mtd: rawnand: qcom: Do not override the error no of submit_descs()
        ...
      bac8a20f
  4. Sep 03, 2023
    • Linus Torvalds's avatar
      Merge tag 'f2fs-for-6-6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs · 92901222
      Linus Torvalds authored
      Pull f2fs updates from Jaegeuk Kim:
       "In this cycle, we don't have a highlighted feature enhancement, but
        mostly have fixed issues mainly in two parts: 1) zoned block device,
        and 2) compression support.
      
        For zoned block device, we've tried to improve the power-off recovery
        flow as much as possible. For compression, we found some corner cases
        caused by wrong compression policy and logics. Other than them, there
        were some reverts and stat corrections.
      
        Bug fixes:
         - use finish zone command when closing a zone
         - check zone type before sending async reset zone command
         - fix to assign compress_level for lz4 correctly
         - fix error path of f2fs_submit_page_read()
         - don't {,de}compress non-full cluster
         - send small discard commands during checkpoint back
         - flush inode if atomic file is aborted
         - correct to account gc/cp stats
      
        And, there are minor bug fixes, avoiding false lockdep warning, and
        clean-ups"
      
      * tag 'f2fs-for-6-6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (25 commits)
        f2fs: use finish zone command when closing a zone
        f2fs: compress: fix to assign compress_level for lz4 correctly
        f2fs: fix error path of f2fs_submit_page_read()
        f2fs: clean up error handling in sanity_check_{compress_,}inode()
        f2fs: avoid false alarm of circular locking
        Revert "f2fs: do not issue small discard commands during checkpoint"
        f2fs: doc: fix description of max_small_discards
        f2fs: should update REQ_TIME for direct write
        f2fs: fix to account cp stats correctly
        f2fs: fix to account gc stats correctly
        f2fs: remove unneeded check condition in __f2fs_setxattr()
        f2fs: fix to update i_ctime in __f2fs_setxattr()
        Revert "f2fs: fix to do sanity check on extent cache correctly"
        f2fs: increase usage of folio_next_index() helper
        f2fs: Only lfs mode is allowed with zoned block device feature
        f2fs: check zone type before sending async reset zone command
        f2fs: compress: don't {,de}compress non-full cluster
        f2fs: allow f2fs_ioc_{,de}compress_file to be interrupted
        f2fs: don't reopen the main block device in f2fs_scan_devices
        f2fs: fix to avoid mmap vs set_compress_option case
        ...
      92901222
    • Linus Torvalds's avatar
      Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · b89b0293
      Linus Torvalds authored
      Pull SCSI updates from James Bottomley:
       "Updates to the usual drivers (ufs, lpfc, qla2xxx, mpi3mr, libsas) and
        the usual minor updates and bug fixes but no significant core changes"
      
      * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (116 commits)
        scsi: storvsc: Handle additional SRB status values
        scsi: libsas: Delete sas_ata_task.retry_count
        scsi: libsas: Delete sas_ata_task.stp_affil_pol
        scsi: libsas: Delete sas_ata_task.set_affil_pol
        scsi: libsas: Delete sas_ssp_task.task_prio
        scsi: libsas: Delete sas_ssp_task.enable_first_burst
        scsi: libsas: Delete sas_ssp_task.retry_count
        scsi: libsas: Delete struct scsi_core
        scsi: libsas: Delete enum sas_phy_type
        scsi: libsas: Delete enum sas_class
        scsi: libsas: Delete sas_ha_struct.lldd_module
        scsi: target: Fix write perf due to unneeded throttling
        scsi: lpfc: Do not abuse UUID APIs and LPFC_COMPRESS_VMID_SIZE
        scsi: pm8001: Remove unused declarations
        scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock
        scsi: elx: sli4: Remove code duplication
        scsi: bfa: Replace one-element array with flexible-array member in struct fc_rscn_pl_s
        scsi: qla2xxx: Remove unused declarations
        scsi: pmcraid: Use pci_dev_id() to simplify the code
        scsi: pm80xx: Set RETFIS when requested by libsas
        ...
      b89b0293
    • Linus Torvalds's avatar
      Merge tag 'probes-v6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace · b70100f2
      Linus Torvalds authored
      Pull probes updates from Masami Hiramatsu:
      
       - kprobes: use struct_size() for variable size kretprobe_instance data
         structure.
      
       - eprobe: Simplify trace_eprobe list iteration.
      
       - probe events: Data structure field access support on BTF argument.
      
           - Update BTF argument support on the functions in the kernel
             loadable modules (only loaded modules are supported).
      
           - Move generic BTF access function (search function prototype and
             get function parameters) to a separated file.
      
           - Add a function to search a member of data structure in BTF.
      
           - Support accessing BTF data structure member from probe args by
             C-like arrow('->') and dot('.') operators. e.g.
                't sched_switch next=next->pid vruntime=next->se.vruntime'
      
           - Support accessing BTF data structure member from $retval. e.g.
                'f getname_flags%return +0($retval->name):string'
      
           - Add string type checking if BTF type info is available. This will
             reject if user specify ":string" type for non "char pointer"
             type.
      
           - Automatically assume the fprobe event as a function return event
             if $retval is used.
      
       - selftests/ftrace: Add BTF data field access test cases.
      
       - Documentation: Update fprobe event example with BTF data field.
      
      * tag 'probes-v6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        Documentation: tracing: Update fprobe event example with BTF field
        selftests/ftrace: Add BTF fields access testcases
        tracing/fprobe-event: Assume fprobe is a return event by $retval
        tracing/probes: Add string type check with BTF
        tracing/probes: Support BTF field access from $retval
        tracing/probes: Support BTF based data structure field access
        tracing/probes: Add a function to search a member of a struct/union
        tracing/probes: Move finding func-proto API and getting func-param API to trace_btf
        tracing/probes: Support BTF argument on module functions
        tracing/eprobe: Iterate trace_eprobe directly
        kernel: kprobes: Use struct_size()
      b70100f2
    • Linus Torvalds's avatar
      Merge tag 'trace-v6.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace · e021c5f1
      Linus Torvalds authored
      Pull more tracing updates from Steven Rostedt:
       "Tracing fixes and clean ups:
      
         - Replace strlcpy() with strscpy()
      
         - Initialize the pipe cpumask to zero on allocation
      
         - Use within_module() instead of open coding it
      
         - Remove extra space in hwlat_detectory/mode output
      
         - Use LIST_HEAD() instead of open coding it
      
         - A bunch of clean ups and fixes for the cpumask filter
      
         - Set local da_mon_##name to static
      
         - Fix race in snapshot buffer between cpu write and swap"
      
      * tag 'trace-v6.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        tracing/filters: Fix coding style issues
        tracing/filters: Change parse_pred() cpulist ternary into an if block
        tracing/filters: Fix double-free of struct filter_pred.mask
        tracing/filters: Fix error-handling of cpulist parsing buffer
        tracing: Zero the pipe cpumask on alloc to avoid spurious -EBUSY
        ftrace: Use LIST_HEAD to initialize clear_hash
        ftrace: Use within_module to check rec->ip within specified module.
        tracing: Replace strlcpy with strscpy in trace/events/task.h
        tracing: Fix race issue between cpu buffer write and swap
        tracing: Remove extra space at the end of hwlat_detector/mode
        rv: Set variable 'da_mon_##name' to static
      e021c5f1
    • Linus Torvalds's avatar
      Merge tag 'pstore-v6.6-rc1-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · 82c5561b
      Linus Torvalds authored
      Pull pstore fix from Kees Cook:
      
       - Adjust sizes of buffers just avoid uncompress failures (Ard
         Biesheuvel)
      
      * tag 'pstore-v6.6-rc1-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        pstore: Base compression input buffer size on estimated compressed size
      82c5561b
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2023-09-02' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · fdde6187
      Linus Torvalds authored
      Pull x86 selftest fix from Ingo Molnar:
       "Fix the __NR_map_shadow_stack syscall-renumbering fallout in the x86
        self-test code.
      
        [ Arguably the existing code was unnecessarily fragile, and tooling
          should have picked up the new syscall number, and a wider fix is
          being worked on - but meanwhile, let's not have the old syscall
          number in the kernel tree. ]"
      
      * tag 'x86-urgent-2023-09-02' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        selftests/x86: Update map_shadow_stack syscall nr
      fdde6187
    • Linus Torvalds's avatar
      Merge tag 'timers-urgent-2023-09-02' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a6216978
      Linus Torvalds authored
      Pull timer fix from Ingo Molnar:
       "Fix false positive 'softirq work is pending' messages on -rt kernels,
        caused by a buggy factoring-out of existing code"
      
      * tag 'timers-urgent-2023-09-02' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        tick/rcu: Fix false positive "softirq work is pending" messages
      a6216978