1. 07 11月, 2021 2 次提交
  2. 29 10月, 2021 2 次提交
  3. 28 10月, 2021 4 次提交
  4. 27 10月, 2021 2 次提交
  5. 26 10月, 2021 1 次提交
  6. 25 10月, 2021 6 次提交
    • D
      KVM: x86/xen: Fix kvm_xen_has_interrupt() sleeping in kvm_vcpu_block() · 0985dba8
      David Woodhouse 提交于
      In kvm_vcpu_block, the current task is set to TASK_INTERRUPTIBLE before
      making a final check whether the vCPU should be woken from HLT by any
      incoming interrupt.
      
      This is a problem for the get_user() in __kvm_xen_has_interrupt(), which
      really shouldn't be sleeping when the task state has already been set.
      I think it's actually harmless as it would just manifest itself as a
      spurious wakeup, but it's causing a debug warning:
      
      [  230.963649] do not call blocking ops when !TASK_RUNNING; state=1 set at [<00000000b6bcdbc9>] prepare_to_swait_exclusive+0x30/0x80
      
      Fix the warning by turning it into an *explicit* spurious wakeup. When
      invoked with !task_is_running(current) (and we might as well add
      in_atomic() there while we're at it), just return 1 to indicate that
      an IRQ is pending, which will cause a wakeup and then something will
      call it again in a context that *can* sleep so it can fault the page
      back in.
      
      Cc: stable@vger.kernel.org
      Fixes: 40da8ccd ("KVM: x86/xen: Add event channel interrupt vector upcall")
      Signed-off-by: NDavid Woodhouse <dwmw@amazon.co.uk>
      
      Message-Id: <168bf8c689561da904e48e2ff5ae4713eaef9e2d.camel@infradead.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0985dba8
    • D
      KVM: x86: switch pvclock_gtod_sync_lock to a raw spinlock · 8228c77d
      David Woodhouse 提交于
      On the preemption path when updating a Xen guest's runstate times, this
      lock is taken inside the scheduler rq->lock, which is a raw spinlock.
      This was shown in a lockdep warning:
      
      [   89.138354] =============================
      [   89.138356] [ BUG: Invalid wait context ]
      [   89.138358] 5.15.0-rc5+ #834 Tainted: G S        I E
      [   89.138360] -----------------------------
      [   89.138361] xen_shinfo_test/2575 is trying to lock:
      [   89.138363] ffffa34a0364efd8 (&kvm->arch.pvclock_gtod_sync_lock){....}-{3:3}, at: get_kvmclock_ns+0x1f/0x130 [kvm]
      [   89.138442] other info that might help us debug this:
      [   89.138444] context-{5:5}
      [   89.138445] 4 locks held by xen_shinfo_test/2575:
      [   89.138447]  #0: ffff972bdc3b8108 (&vcpu->mutex){+.+.}-{4:4}, at: kvm_vcpu_ioctl+0x77/0x6f0 [kvm]
      [   89.138483]  #1: ffffa34a03662e90 (&kvm->srcu){....}-{0:0}, at: kvm_arch_vcpu_ioctl_run+0xdc/0x8b0 [kvm]
      [   89.138526]  #2: ffff97331fdbac98 (&rq->__lock){-.-.}-{2:2}, at: __schedule+0xff/0xbd0
      [   89.138534]  #3: ffffa34a03662e90 (&kvm->srcu){....}-{0:0}, at: kvm_arch_vcpu_put+0x26/0x170 [kvm]
      ...
      [   89.138695]  get_kvmclock_ns+0x1f/0x130 [kvm]
      [   89.138734]  kvm_xen_update_runstate+0x14/0x90 [kvm]
      [   89.138783]  kvm_xen_update_runstate_guest+0x15/0xd0 [kvm]
      [   89.138830]  kvm_arch_vcpu_put+0xe6/0x170 [kvm]
      [   89.138870]  kvm_sched_out+0x2f/0x40 [kvm]
      [   89.138900]  __schedule+0x5de/0xbd0
      
      Cc: stable@vger.kernel.org
      Reported-by: syzbot+b282b65c2c68492df769@syzkaller.appspotmail.com
      Fixes: 30b5c851 ("KVM: x86/xen: Add support for vCPU runstate information")
      Signed-off-by: NDavid Woodhouse <dwmw@amazon.co.uk>
      Message-Id: <1b02a06421c17993df337493a68ba923f3bd5c0f.camel@infradead.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      8228c77d
    • L
      ARM: 9148/1: handle CONFIG_CPU_ENDIAN_BE32 in arch/arm/kernel/head.S · 00568b8a
      LABBE Corentin 提交于
      My intel-ixp42x-welltech-epbx100 no longer boot since 4.14.
      This is due to commit 463dbba4 ("ARM: 9104/2: Fix Keystone 2 kernel
      mapping regression")
      which forgot to handle CONFIG_CPU_ENDIAN_BE32 as possible BE config.
      Suggested-by: NKrzysztof Hałasa <khalasa@piap.pl>
      Fixes: 463dbba4 ("ARM: 9104/2: Fix Keystone 2 kernel mapping regression")
      Signed-off-by: NCorentin Labbe <clabbe.montjoie@gmail.com>
      Signed-off-by: NRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      00568b8a
    • A
      powerpc/pseries/iommu: Create huge DMA window if no MMIO32 is present · d853adc7
      Alexey Kardashevskiy 提交于
      The iommu_init_table() helper takes an address range to reserve in
      the IOMMU table being initialized to exclude MMIO addresses, this is
      useful if the window stretches far beyond 4GB (although wastes some TCEs).
      At the moment the code searches for such MMIO32 range and fails if none
      found which is considered a problem while it really is not: it is actually
      better as this says there is no MMIO32 to reserve and we can use
      usually wasted TCEs. Furthermore PHYP never actually allows creating
      windows starting at busaddress=0 so this MMIO32 range is never useful.
      
      This removes error exit and initializes the table with zero range if
      no MMIO32 is detected.
      
      Fixes: 381ceda8 ("powerpc/pseries/iommu: Make use of DDW for indirect mapping")
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20211020132315.2287178-5-aik@ozlabs.ru
      d853adc7
    • A
      powerpc/pseries/iommu: Check if the default window in use before removing it · 92fe01b7
      Alexey Kardashevskiy 提交于
      At the moment this check is performed after we remove the default window
      which is late and disallows to revert whatever changes enable_ddw()
      has made to DMA windows.
      
      This moves the check and error exit before removing the window.
      
      This raised the message severity from "debug" to "warning" as this
      should not happen in practice and cannot be triggered by the userspace.
      
      Fixes: 381ceda8 ("powerpc/pseries/iommu: Make use of DDW for indirect mapping")
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20211020132315.2287178-4-aik@ozlabs.ru
      92fe01b7
    • A
      powerpc/pseries/iommu: Use correct vfree for it_map · 41ee7232
      Alexey Kardashevskiy 提交于
      The it_map array is vzalloc'ed so use vfree() for it when creating
      a huge DMA window failed for whatever reason.
      
      While at this, write zero to it_map.
      
      Fixes: 381ceda8 ("powerpc/pseries/iommu: Make use of DDW for indirect mapping")
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20211020132315.2287178-3-aik@ozlabs.ru
      41ee7232
  7. 23 10月, 2021 2 次提交
  8. 22 10月, 2021 9 次提交
  9. 21 10月, 2021 3 次提交
  10. 20 10月, 2021 4 次提交
  11. 19 10月, 2021 5 次提交