Skip to content
  1. Sep 02, 2022
  2. Aug 25, 2022
  3. Aug 12, 2022
    • Lukas Bulwahn's avatar
      MAINTAINERS: add xen config fragments to XEN HYPERVISOR sections · 5ad3134d
      Lukas Bulwahn authored
      
      
      Make changes to the xen config fragments reach the XEN HYPERVISOR
      maintainers and mailing list.
      
      Signed-off-by: default avatarLukas Bulwahn <lukas.bulwahn@gmail.com>
      Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
      Link: https://lore.kernel.org/r/20220810050712.9539-5-lukas.bulwahn@gmail.com
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      5ad3134d
    • Lukas Bulwahn's avatar
      xen: remove XEN_SCRUB_PAGES in xen.config · aa6d1e5b
      Lukas Bulwahn authored
      Commit 197ecb38
      
       ("xen/balloon: add runtime control for scrubbing
      ballooned out pages") changed config XEN_SCRUB_PAGES to config
      XEN_SCRUB_PAGES_DEFAULT. As xen.config sets 'XEN_BALLOON=y' and
      XEN_SCRUB_PAGES_DEFAULT defaults to yes, there is no further need to set
      this config in the xen.config file.
      
      Remove setting XEN_SCRUB_PAGES in xen.config, which is without
      effect since the commit above anyway.
      
      Signed-off-by: default avatarLukas Bulwahn <lukas.bulwahn@gmail.com>
      Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
      Link: https://lore.kernel.org/r/20220810050712.9539-3-lukas.bulwahn@gmail.com
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      aa6d1e5b
    • Jason Wang's avatar
      xen/pciback: Fix comment typo · ced3c742
      Jason Wang authored
      
      
      The double `the' is duplicated in the comment, remove one.
      
      Signed-off-by: default avatarJason Wang <wangborong@cdjrlc.com>
      Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
      Link: https://lore.kernel.org/r/20220811120918.17961-1-wangborong@cdjrlc.com
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      ced3c742
    • Dan Carpenter's avatar
      xen/xenbus: fix return type in xenbus_file_read() · 32ad1112
      Dan Carpenter authored
      This code tries to store -EFAULT in an unsigned int.  The
      xenbus_file_read() function returns type ssize_t so the negative value
      is returned as a positive value to the user.
      
      This change forces another change to the min() macro.  Originally, the
      min() macro used "unsigned" type which checkpatch complains about.  Also
      unsigned type would break if "len" were not capped at MAX_RW_COUNT.  Use
      size_t for the min().  (No effect on runtime for the min_t() change).
      
      Fixes: 2fb3683e
      
       ("xen: Add xenbus device driver")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: default avatarOleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
      Link: https://lore.kernel.org/r/YutxJUaUYRG/VLVc@kili
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      32ad1112
    • SeongJae Park's avatar
      xen-blkfront: Apply 'feature_persistent' parameter when connect · 402c43ea
      SeongJae Park authored
      In some use cases[1], the backend is created while the frontend doesn't
      support the persistent grants feature, but later the frontend can be
      changed to support the feature and reconnect.  In the past, 'blkback'
      enabled the persistent grants feature since it unconditionally checked
      if frontend supports the persistent grants feature for every connect
      ('connect_ring()') and decided whether it should use persistent grans or
      not.
      
      However, commit aac8a70d ("xen-blkback: add a parameter for
      disabling of persistent grants") has mistakenly changed the behavior.
      It made the frontend feature support check to not be repeated once it
      shown the 'feature_persistent' as 'false', or the frontend doesn't
      support persistent grants.
      
      Similar behavioral change has made on 'blkfront' by commit 74a85247
      ("xen-blkfront: add a parameter for disabling of persistent grants").
      This commit changes the behavior of the parameter to make effect for
      every connect, so that the previous behavior of 'blkfront' can be
      restored.
      
      [1] https://lore.kernel.org/xen-devel/CAJwUmVB6H3iTs-C+U=v-pwJB7-_ZRHPxHzKRJZ22xEPW7z8a=g@mail.gmail.com/
      
      Fixes: 74a85247
      
       ("xen-blkfront: add a parameter for disabling of persistent grants")
      Cc: <stable@vger.kernel.org> # 5.10.x
      Signed-off-by: default avatarSeongJae Park <sj@kernel.org>
      Reviewed-by: default avatarMaximilian Heyne <mheyne@amazon.de>
      Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
      Link: https://lore.kernel.org/r/20220715225108.193398-4-sj@kernel.org
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      402c43ea
    • Maximilian Heyne's avatar
      xen-blkback: Apply 'feature_persistent' parameter when connect · e94c6101
      Maximilian Heyne authored
      In some use cases[1], the backend is created while the frontend doesn't
      support the persistent grants feature, but later the frontend can be
      changed to support the feature and reconnect.  In the past, 'blkback'
      enabled the persistent grants feature since it unconditionally checked
      if frontend supports the persistent grants feature for every connect
      ('connect_ring()') and decided whether it should use persistent grans or
      not.
      
      However, commit aac8a70d
      
       ("xen-blkback: add a parameter for
      disabling of persistent grants") has mistakenly changed the behavior.
      It made the frontend feature support check to not be repeated once it
      shown the 'feature_persistent' as 'false', or the frontend doesn't
      support persistent grants.
      
      This commit changes the behavior of the parameter to make effect for
      every connect, so that the previous workflow can work again as expected.
      
      [1] https://lore.kernel.org/xen-devel/CAJwUmVB6H3iTs-C+U=v-pwJB7-_ZRHPxHzKRJZ22xEPW7z8a=g@mail.gmail.com/
      
      Reported-by: default avatarAndrii Chepurnyi <andrii.chepurnyi82@gmail.com>
      Fixes: aac8a70d
      
       ("xen-blkback: add a parameter for disabling of persistent grants")
      Cc: <stable@vger.kernel.org> # 5.10.x
      Signed-off-by: default avatarMaximilian Heyne <mheyne@amazon.de>
      Signed-off-by: default avatarSeongJae Park <sj@kernel.org>
      Reviewed-by: default avatarMaximilian Heyne <mheyne@amazon.de>
      Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
      Link: https://lore.kernel.org/r/20220715225108.193398-3-sj@kernel.org
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      e94c6101
    • SeongJae Park's avatar
      xen-blkback: fix persistent grants negotiation · fc9be616
      SeongJae Park authored
      Persistent grants feature can be used only when both backend and the
      frontend supports the feature.  The feature was always supported by
      'blkback', but commit aac8a70d ("xen-blkback: add a parameter for
      disabling of persistent grants") has introduced a parameter for
      disabling it runtime.
      
      To avoid the parameter be updated while being used by 'blkback', the
      commit caches the parameter into 'vbd->feature_gnt_persistent' in
      'xen_vbd_create()', and then check if the guest also supports the
      feature and finally updates the field in 'connect_ring()'.
      
      However, 'connect_ring()' could be called before 'xen_vbd_create()', so
      later execution of 'xen_vbd_create()' can wrongly overwrite 'true' to
      'vbd->feature_gnt_persistent'.  As a result, 'blkback' could try to use
      'persistent grants' feature even if the guest doesn't support the
      feature.
      
      This commit fixes the issue by moving the parameter value caching to
      'xen_blkif_alloc()', which allocates the 'blkif'.  Because the struct
      embeds 'vbd' object, which will be used by 'connect_ring()' later, this
      should be called before 'connect_ring()' and therefore this should be
      the right and safe place to do the caching.
      
      Fixes: aac8a70d
      
       ("xen-blkback: add a parameter for disabling of persistent grants")
      Cc: <stable@vger.kernel.org> # 5.10.x
      Signed-off-by: default avatarMaximilian Heyne <mheyne@amazon.de>
      Signed-off-by: default avatarSeongJae Park <sj@kernel.org>
      Reviewed-by: default avatarMaximilian Heyne <mheyne@amazon.de>
      Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
      Link: https://lore.kernel.org/r/20220715225108.193398-2-sj@kernel.org
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      fc9be616
    • Jane Malalane's avatar
      x86/xen: Add support for HVMOP_set_evtchn_upcall_vector · b1c3497e
      Jane Malalane authored
      
      
      Implement support for the HVMOP_set_evtchn_upcall_vector hypercall in
      order to set the per-vCPU event channel vector callback on Linux and
      use it in preference of HVM_PARAM_CALLBACK_IRQ.
      
      If the per-VCPU vector setup is successful on BSP, use this method
      for the APs. If not, fallback to the global vector-type callback.
      
      Also register callback_irq at per-vCPU event channel setup to trick
      toolstack to think the domain is enlightened.
      
      Suggested-by: default avatar"Roger Pau Monné" <roger.pau@citrix.com>
      Signed-off-by: default avatarJane Malalane <jane.malalane@citrix.com>
      Reviewed-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Link: https://lore.kernel.org/r/20220729070416.23306-1-jane.malalane@citrix.com
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      b1c3497e
  4. Aug 01, 2022
  5. Jul 31, 2022
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm · 6a010258
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "Last set of ARM fixes for 5.19:
      
         - fix for MAX_DMA_ADDRESS overflow
      
         - fix for find_*_bit performing an out of bounds memory access"
      
      * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
        ARM: findbit: fix overflowing offset
        ARM: 9216/1: Fix MAX_DMA_ADDRESS overflow
      6a010258
  6. Jul 30, 2022
    • Waiman Long's avatar
      locking/rwsem: Allow slowpath writer to ignore handoff bit if not set by first waiter · 6eebd5fb
      Waiman Long authored
      With commit d257cc8c ("locking/rwsem: Make handoff bit handling more
      consistent"), the writer that sets the handoff bit can be interrupted
      out without clearing the bit if the wait queue isn't empty. This disables
      reader and writer optimistic lock spinning and stealing.
      
      Now if a non-first writer in the queue is somehow woken up or a new
      waiter enters the slowpath, it can't acquire the lock.  This is not the
      case before commit d257cc8c as the writer that set the handoff bit
      will clear it when exiting out via the out_nolock path. This is less
      efficient as the busy rwsem stays in an unlock state for a longer time.
      
      In some cases, this new behavior may cause lockups as shown in [1] and
      [2].
      
      This patch allows a non-first writer to ignore the handoff bit if it
      is not originally set or initiated by the first waiter. This patch is
      shown to be effective in fixing the lockup problem reported in [1].
      
      [1] https://lore.kernel.org/lkml/20220617134325.GC30825@techsingularity.net/
      [2] https://lore.kernel.org/lkml/3f02975c-1a9d-be20-32cf-f1d8e3dfafcc@oracle.com/
      
      Fixes: d257cc8c
      
       ("locking/rwsem: Make handoff bit handling more consistent")
      Signed-off-by: default avatarWaiman Long <longman@redhat.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: default avatarJohn Donnelly <john.p.donnelly@oracle.com>
      Tested-by: default avatarMel Gorman <mgorman@techsingularity.net>
      Link: https://lore.kernel.org/r/20220622200419.778799-1-longman@redhat.com
      6eebd5fb
    • Linus Torvalds's avatar
      Merge tag 'mm-hotfixes-stable-2022-07-29' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm · 62072526
      Linus Torvalds authored
      Pull misc fixes from Andrew Morton:
       "Two hotfixes, both cc:stable"
      
      * tag 'mm-hotfixes-stable-2022-07-29' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
        mm/hmm: fault non-owner device private entries
        page_alloc: fix invalid watermark check on a negative value
      62072526
    • Linus Torvalds's avatar
      Merge tag 'block-5.19-2022-07-29' of git://git.kernel.dk/linux-block · 8a91f86f
      Linus Torvalds authored
      Pull block fix from Jens Axboe:
       "Just a single fix for NVMe, yet another quirk addition"
      
      * tag 'block-5.19-2022-07-29' of git://git.kernel.dk/linux-block:
        nvme-pci: Crucial P2 has bogus namespace ids
      8a91f86f
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2022-07-30' of git://anongit.freedesktop.org/drm/drm · e65c6a46
      Linus Torvalds authored
      Pull more drm fixes from Dave Airlie:
       "Maxime had the dog^Wmailing list server eat his homework^Wmisc pull
        request.
      
        Two more small fixes, one in nouveau svm code and the other in
        simpledrm.
      
        nouveau:
         - page migration fix
      
        simpledrm:
         - fix mode_valid return value"
      
      * tag 'drm-fixes-2022-07-30' of git://anongit.freedesktop.org/drm/drm:
        nouveau/svm: Fix to migrate all requested pages
        drm/simpledrm: Fix return type of simpledrm_simple_display_pipe_mode_valid()
      e65c6a46
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2022-07-29' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · ce156c8a
      Dave Airlie authored
      
      
      One fix to fix simpledrm mode_valid return value, and one for page
      migration in nouveau
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Maxime Ripard <maxime@cerno.tech>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220729094514.sfzhc3gqjgwgal62@penduick
      ce156c8a
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 1c8ac1c4
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Four fixes, three in drivers.
      
        The two biggest fixes are ufs and the remaining driver and core fix
        are small and obvious (and the core fix is low risk)"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: ufs: core: Fix a race condition related to device management
        scsi: core: Fix warning in scsi_alloc_sgtables()
        scsi: ufs: host: Hold reference returned by of_parse_phandle()
        scsi: mpt3sas: Stop fw fault watchdog work item during system shutdown
      1c8ac1c4
    • Eiichi Tsukata's avatar
      docs/kernel-parameters: Update descriptions for "mitigations=" param with retbleed · ea304a8b
      Eiichi Tsukata authored
      
      
      Updates descriptions for "mitigations=off" and "mitigations=auto,nosmt"
      with the respective retbleed= settings.
      
      Signed-off-by: default avatarEiichi Tsukata <eiichi.tsukata@nutanix.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: corbet@lwn.net
      Link: https://lore.kernel.org/r/20220728043907.165688-1-eiichi.tsukata@nutanix.com
      ea304a8b
    • Ralph Campbell's avatar
      mm/hmm: fault non-owner device private entries · 8a295dbb
      Ralph Campbell authored
      If hmm_range_fault() is called with the HMM_PFN_REQ_FAULT flag and a
      device private PTE is found, the hmm_range::dev_private_owner page is used
      to determine if the device private page should not be faulted in. 
      However, if the device private page is not owned by the caller,
      hmm_range_fault() returns an error instead of calling migrate_to_ram() to
      fault in the page.
      
      For example, if a page is migrated to GPU private memory and a RDMA fault
      capable NIC tries to read the migrated page, without this patch it will
      get an error.  With this patch, the page will be migrated back to system
      memory and the NIC will be able to read the data.
      
      Link: https://lkml.kernel.org/r/20220727000837.4128709-2-rcampbell@nvidia.com
      Link: https://lkml.kernel.org/r/20220725183615.4118795-2-rcampbell@nvidia.com
      Fixes: 08ddddda
      
       ("mm/hmm: check the device private page owner in hmm_range_fault()")
      Signed-off-by: default avatarRalph Campbell <rcampbell@nvidia.com>
      Reported-by: default avatarFelix Kuehling <felix.kuehling@amd.com>
      Reviewed-by: default avatarAlistair Popple <apopple@nvidia.com>
      Cc: Philip Yang <Philip.Yang@amd.com>
      Cc: Jason Gunthorpe <jgg@nvidia.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      8a295dbb
    • Jaewon Kim's avatar
      page_alloc: fix invalid watermark check on a negative value · 9282012f
      Jaewon Kim authored
      There was a report that a task is waiting at the
      throttle_direct_reclaim. The pgscan_direct_throttle in vmstat was
      increasing.
      
      This is a bug where zone_watermark_fast returns true even when the free
      is very low. The commit f27ce0e1 ("page_alloc: consider highatomic
      reserve in watermark fast") changed the watermark fast to consider
      highatomic reserve. But it did not handle a negative value case which
      can be happened when reserved_highatomic pageblock is bigger than the
      actual free.
      
      If watermark is considered as ok for the negative value, allocating
      contexts for order-0 will consume all free pages without direct reclaim,
      and finally free page may become depleted except highatomic free.
      
      Then allocating contexts may fall into throttle_direct_reclaim. This
      symptom may easily happen in a system where wmark min is low and other
      reclaimers like kswapd does not make free pages quickly.
      
      Handle the negative case by using MIN.
      
      Link: https://lkml.kernel.org/r/20220725095212.25388-1-jaewon31.kim@samsung.com
      Fixes: f27ce0e1
      
       ("page_alloc: consider highatomic reserve in watermark fast")
      Signed-off-by: default avatarJaewon Kim <jaewon31.kim@samsung.com>
      Reported-by: default avatarGyeongHwan Hong <gh21.hong@samsung.com>
      Acked-by: default avatarMel Gorman <mgorman@techsingularity.net>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Baoquan He <bhe@redhat.com>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Michal Hocko <mhocko@kernel.org>
      Cc: Yong-Taek Lee <ytk.lee@samsung.com>
      Cc: <stable@vger.kerenl.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      9282012f
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v5.19-2022-07-29' of... · bb83c99d
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v5.19-2022-07-29' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - Fix addresses for bss symbols, describing variables used in resolving
         data access in tools such as 'perf c2c' and 'perf mem'.
      
       - Skip symbols if SHF_ALLOC flag is not set, a technique used for
         listing deprecated symbols, its addresses are zeros, so not useful.
      
       - Remove undefined behavior from bpf_perf_object__next() when dealing
         with an empty bpf_objects_list list.
      
       - Make a ARM CoreSight disasm script work with both python2 and
         python3.
      
       - Sync x86's cpufeatures header with with the kernel sources.
      
      * tag 'perf-tools-fixes-for-v5.19-2022-07-29' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf bpf: Remove undefined behavior from bpf_perf_object__next()
        perf symbol: Skip symbols if SHF_ALLOC flag is not set
        perf symbol: Correct address for bss symbols
        perf scripts python: Let script to be python2 compliant
        tools headers cpufeatures: Sync with the kernel sources
      bb83c99d
    • Linus Torvalds's avatar
      Merge tag 'wq-for-5.19-rc8-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq · 4b20426d
      Linus Torvalds authored
      Pull workqueue fix from Tejun Heo:
       "Just one commit to suppress a spurious warning added during the 5.19
        cycle"
      
      * tag 'wq-for-5.19-rc8-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
        workqueue: Avoid a false warning in unbind_workers()
      4b20426d
    • Linus Torvalds's avatar
      Merge tag 'pm-5.19-rc9' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 506e6dfb
      Linus Torvalds authored
      Pull power management fix from Rafael Wysocki:
       "Make some false positive RCU splats resulting from a recent intel_idle
        driver change go away (Waiman Long)"
      
      * tag 'pm-5.19-rc9' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        intel_idle: Fix false positive RCU splats due to incorrect hardirqs state
      506e6dfb
    • Lai Jiangshan's avatar
      workqueue: Avoid a false warning in unbind_workers() · 46a4d679
      Lai Jiangshan authored
      Doing set_cpus_allowed_ptr() with wq_unbound_cpumask can be possible
      fails and trigger the false warning.
      
      Use cpu_possible_mask instead when wq_unbound_cpumask has no active CPUs.
      
      It is very easy to trigger the warning:
        Set wq_unbound_cpumask to a small set of CPUs.
        Offline all the CPUs of wq_unbound_cpumask.
        Offline an extra CPU and trigger the warning.
      
      Fixes: 10a5a651
      
       ("workqueue: Restrict kworker in the offline CPU pool running on housekeeping CPUs")
      Signed-off-by: default avatarLai Jiangshan <jiangshan.ljs@antgroup.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      46a4d679
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-5.19-rc9' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · e4d8b09d
      Linus Torvalds authored
      Pull RISC-V fix from Palmer Dabbelt:
       "A build fix for 'make vdso_install' that avoids an issue trying to
        install the compat VDSO"
      
      * tag 'riscv-for-linus-5.19-rc9' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: compat: vdso: Fix vdso_install target
      e4d8b09d