1. 05 Feb, 2022 1 commit
  2. 04 Feb, 2022 2 commits
    • Sean Christopherson's avatar
      KVM: x86: Use ERR_PTR_USR() to return -EFAULT as a __user pointer · 6e37ec88
      Sean Christopherson authored
      Use ERR_PTR_USR() when returning -EFAULT from kvm_get_attr_addr(), sparse
      complains about implicitly casting the kernel pointer from ERR_PTR() into
      a __user pointer.
      
      >> arch/x86/kvm/x86.c:4342:31: sparse: sparse: incorrect type in return expression
         (different address spaces) @@     expected void [noderef] __user * @@     got void * @@
         arch/x86/kvm/x86.c:4342:31: sparse:     expected void [noderef] __user *
         arch/x86/kvm/x86.c:4342:31: sparse:     got void *
      >> arch/x86/kvm/x86.c:4342:31: sparse: sparse: incorrect type in return expression
         (different address spaces) @@     expected void [noderef] __user * @@     got void * @@
         arch/x86/kvm/x86.c:4342:31: sparse:     expected void [noderef] __user *
         arch/x86/kvm/x86.c:4342:31: sparse:     got void *
      
      No functional change intended.
      
      Fixes: 56f289a8 ("KVM: x86: Add a helper to retrieve userspace address from kvm_device_attr")
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
      Message-Id: <20220202005157.2545816-1-seanjc@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      6e37ec88
    • Jim Mattson's avatar
      KVM: x86: Report deprecated x87 features in supported CPUID · e3bcfda0
      Jim Mattson authored
      CPUID.(EAX=7,ECX=0):EBX.FDP_EXCPTN_ONLY[bit 6] and
      CPUID.(EAX=7,ECX=0):EBX.ZERO_FCS_FDS[bit 13] are "defeature"
      bits. Unlike most of the other CPUID feature bits, these bits are
      clear if the features are present and set if the features are not
      present. These bits should be reported in KVM_GET_SUPPORTED_CPUID,
      because if these bits are set on hardware, they cannot be cleared in
      the guest CPUID. Doing so would claim guest support for a feature that
      the hardware doesn't support and that can't be efficiently emulated.
      
      Of course, any software (e.g WIN87EM.DLL) expecting these features to
      be present likely predates these CPUID feature bits and therefore
      doesn't know to check for them anyway.
      
      Aaron Lewis added the corresponding X86_FEATURE macros in
      commit cbb99c0f ("x86/cpufeatures: Add FDP_EXCPTN_ONLY and
      ZERO_FCS_FDS"), with the intention of reporting these bits in
      KVM_GET_SUPPORTED_CPUID, but I was unable to find a proposed patch on
      the kvm list.
      
      Opportunistically reordered the CPUID_7_0_EBX capability bits from
      least to most significant.
      
      Cc: Aaron Lewis <aaronlewis@google.com>
      Signed-off-by: default avatarJim Mattson <jmattson@google.com>
      Message-Id: <20220204001348.2844660-1-jmattson@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      e3bcfda0
  3. 03 Feb, 2022 3 commits
    • James Morse's avatar
      KVM: arm64: Workaround Cortex-A510's single-step and PAC trap errata · 1dd498e5
      James Morse authored
      Cortex-A510's erratum #2077057 causes SPSR_EL2 to be corrupted when
      single-stepping authenticated ERET instructions. A single step is
      expected, but a pointer authentication trap is taken instead. The
      erratum causes SPSR_EL1 to be copied to SPSR_EL2, which could allow
      EL1 to cause a return to EL2 with a guest controlled ELR_EL2.
      
      Because the conditions require an ERET into active-not-pending state,
      this is only a problem for the EL2 when EL2 is stepping EL1. In this case
      the previous SPSR_EL2 value is preserved in struct kvm_vcpu, and can be
      restored.
      
      Cc: stable@vger.kernel.org # 53960faf: arm64: Add Cortex-A510 CPU part definition
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJames Morse <james.morse@arm.com>
      [maz: fixup cpucaps ordering]
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      Link: https://lore.kernel.org/r/20220127122052.1584324-5-james.morse@arm.com
      1dd498e5
    • James Morse's avatar
      KVM: arm64: Stop handle_exit() from handling HVC twice when an SError occurs · 1229630a
      James Morse authored
      Prior to commit defe21f4 ("KVM: arm64: Move PC rollback on SError to
      HYP"), when an SError is synchronised due to another exception, KVM
      handles the SError first. If the guest survives, the instruction that
      triggered the original exception is re-exectued to handle the first
      exception. HVC is treated as a special case as the instruction wouldn't
      normally be re-exectued, as its not a trap.
      
      Commit defe21f4 didn't preserve the behaviour of the 'return 1'
      that skips the rest of handle_exit().
      
      Since commit defe21f4, KVM will try to handle the SError and the
      original exception at the same time. When the exception was an HVC,
      fixup_guest_exit() has already rolled back ELR_EL2, meaning if the
      guest has virtual SError masked, it will execute and handle the HVC
      twice.
      
      Restore the original behaviour.
      
      Fixes: defe21f4 ("KVM: arm64: Move PC rollback on SError to HYP")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJames Morse <james.morse@arm.com>
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      Link: https://lore.kernel.org/r/20220127122052.1584324-4-james.morse@arm.com
      1229630a
    • James Morse's avatar
      KVM: arm64: Avoid consuming a stale esr value when SError occur · 1c71dbc8
      James Morse authored
      When any exception other than an IRQ occurs, the CPU updates the ESR_EL2
      register with the exception syndrome. An SError may also become pending,
      and will be synchronised by KVM. KVM notes the exception type, and whether
      an SError was synchronised in exit_code.
      
      When an exception other than an IRQ occurs, fixup_guest_exit() updates
      vcpu->arch.fault.esr_el2 from the hardware register. When an SError was
      synchronised, the vcpu esr value is used to determine if the exception
      was due to an HVC. If so, ELR_EL2 is moved back one instruction. This
      is so that KVM can process the SError first, and re-execute the HVC if
      the guest survives the SError.
      
      But if an IRQ synchronises an SError, the vcpu's esr value is stale.
      If the previous non-IRQ exception was an HVC, KVM will corrupt ELR_EL2,
      causing an unrelated guest instruction to be executed twice.
      
      Check ARM_EXCEPTION_CODE() before messing with ELR_EL2, IRQs don't
      update this register so don't need to check.
      
      Fixes: defe21f4 ("KVM: arm64: Move PC rollback on SError to HYP")
      Cc: stable@vger.kernel.org
      Reported-by: default avatarSteven Price <steven.price@arm.com>
      Signed-off-by: default avatarJames Morse <james.morse@arm.com>
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      Link: https://lore.kernel.org/r/20220127122052.1584324-3-james.morse@arm.com
      1c71dbc8
  4. 02 Feb, 2022 4 commits
    • Paolo Bonzini's avatar
      Merge tag 'kvm-riscv-fixes-5.17-1' of https://github.com/kvm-riscv/linux into HEAD · cb4f0843
      Paolo Bonzini authored
      KVM/riscv fixes for 5.17, take #1
      
      - Rework guest entry logic
      
      - Make CY, TM, and IR counters accessible in VU mode
      
      - Fix SBI implementation version
      cb4f0843
    • Anup Patel's avatar
      RISC-V: KVM: Fix SBI implementation version · 40327154
      Anup Patel authored
      The SBI implementation version returned by KVM RISC-V should be the
      Host Linux version code.
      
      Fixes: c62a7685 ("RISC-V: KVM: Add SBI v0.2 base extension")
      Signed-off-by: default avatarAnup Patel <apatel@ventanamicro.com>
      Reviewed-by: default avatarAtish Patra <atishp@rivosinc.com>
      Signed-off-by: default avatarAnup Patel <anup@brainfault.org>
      40327154
    • Mayuresh Chitale's avatar
      RISC-V: KVM: make CY, TM, and IR counters accessible in VU mode · de1d7b6a
      Mayuresh Chitale authored
      Those applications that run in VU mode and access the time CSR cause
      a virtual instruction trap as Guest kernel currently does not
      initialize the scounteren CSR.
      
      To fix this, we should make CY, TM, and IR counters accessibile
      by default in VU mode (similar to OpenSBI).
      
      Fixes: a33c72fa ("RISC-V: KVM: Implement VCPU create, init and
      destroy functions")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMayuresh Chitale <mchitale@ventanamicro.com>
      Signed-off-by: default avatarAnup Patel <anup@brainfault.org>
      de1d7b6a
    • Mark Rutland's avatar
      kvm/riscv: rework guest entry logic · 6455317e
      Mark Rutland authored
      In kvm_arch_vcpu_ioctl_run() we enter an RCU extended quiescent state
      (EQS) by calling guest_enter_irqoff(), and unmask IRQs prior to exiting
      the EQS by calling guest_exit(). As the IRQ entry code will not wake RCU
      in this case, we may run the core IRQ code and IRQ handler without RCU
      watching, leading to various potential problems.
      
      Additionally, we do not inform lockdep or tracing that interrupts will
      be enabled during guest execution, which caan lead to misleading traces
      and warnings that interrupts have been enabled for overly-long periods.
      
      This patch fixes these issues by using the new timing and context
      entry/exit helpers to ensure that interrupts are handled during guest
      vtime but with RCU watching, with a sequence:
      
      	guest_timing_enter_irqoff();
      
      	guest_state_enter_irqoff();
      	< run the vcpu >
      	guest_state_exit_irqoff();
      
      	< take any pending IRQs >
      
      	guest_timing_exit_irqoff();
      
      Since instrumentation may make use of RCU, we must also ensure that no
      instrumented code is run during the EQS. I've split out the critical
      section into a new kvm_riscv_enter_exit_vcpu() helper which is marked
      noinstr.
      
      Fixes: 99cdc6c1 ("RISC-V: Add initial skeletal KVM support")
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: Anup Patel <anup@brainfault.org>
      Cc: Atish Patra <atishp@atishpatra.org>
      Cc: Frederic Weisbecker <frederic@kernel.org>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Paul E. McKenney <paulmck@kernel.org>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Tested-by: default avatarAnup Patel <anup@brainfault.org>
      Signed-off-by: default avatarAnup Patel <anup@brainfault.org>
      6455317e
  5. 01 Feb, 2022 5 commits
    • Mark Rutland's avatar
      kvm/arm64: rework guest entry logic · 8cfe148a
      Mark Rutland authored
      In kvm_arch_vcpu_ioctl_run() we enter an RCU extended quiescent state
      (EQS) by calling guest_enter_irqoff(), and unmasked IRQs prior to
      exiting the EQS by calling guest_exit(). As the IRQ entry code will not
      wake RCU in this case, we may run the core IRQ code and IRQ handler
      without RCU watching, leading to various potential problems.
      
      Additionally, we do not inform lockdep or tracing that interrupts will
      be enabled during guest execution, which caan lead to misleading traces
      and warnings that interrupts have been enabled for overly-long periods.
      
      This patch fixes these issues by using the new timing and context
      entry/exit helpers to ensure that interrupts are handled during guest
      vtime but with RCU watching, with a sequence:
      
      	guest_timing_enter_irqoff();
      
      	guest_state_enter_irqoff();
      	< run the vcpu >
      	guest_state_exit_irqoff();
      
      	< take any pending IRQs >
      
      	guest_timing_exit_irqoff();
      
      Since instrumentation may make use of RCU, we must also ensure that no
      instrumented code is run during the EQS. I've split out the critical
      section into a new kvm_arm_enter_exit_vcpu() helper which is marked
      noinstr.
      
      Fixes: 1b3d546d ("arm/arm64: KVM: Properly account for guest CPU time")
      Reported-by: default avatarNicolas Saenz Julienne <nsaenzju@redhat.com>
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Reviewed-by: default avatarMarc Zyngier <maz@kernel.org>
      Reviewed-by: default avatarNicolas Saenz Julienne <nsaenzju@redhat.com>
      Cc: Alexandru Elisei <alexandru.elisei@arm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Frederic Weisbecker <frederic@kernel.org>
      Cc: James Morse <james.morse@arm.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Paul E. McKenney <paulmck@kernel.org>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Message-Id: <20220201132926.3301912-3-mark.rutland@arm.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      8cfe148a
    • Mark Rutland's avatar
      kvm/x86: rework guest entry logic · b2d2af7e
      Mark Rutland authored
      For consistency and clarity, migrate x86 over to the generic helpers for
      guest timing and lockdep/RCU/tracing management, and remove the
      x86-specific helpers.
      
      Prior to this patch, the guest timing was entered in
      kvm_guest_enter_irqoff() (called by svm_vcpu_enter_exit() and
      svm_vcpu_enter_exit()), and was exited by the call to
      vtime_account_guest_exit() within vcpu_enter_guest().
      
      To minimize duplication and to more clearly balance entry and exit, both
      entry and exit of guest timing are placed in vcpu_enter_guest(), using
      the new guest_timing_{enter,exit}_irqoff() helpers. When context
      tracking is used a small amount of additional time will be accounted
      towards guests; tick-based accounting is unnaffected as IRQs are
      disabled at this point and not enabled until after the return from the
      guest.
      
      This also corrects (benign) mis-balanced context tracking accounting
      introduced in commits:
      
        ae95f566 ("KVM: X86: TSCDEADLINE MSR emulation fastpath")
        26efe2fd ("KVM: VMX: Handle preemption timer fastpath")
      
      Where KVM can enter a guest multiple times, calling vtime_guest_enter()
      without a corresponding call to vtime_account_guest_exit(), and with
      vtime_account_system() called when vtime_account_guest() should be used.
      As account_system_time() checks PF_VCPU and calls account_guest_time(),
      this doesn't result in any functional problem, but is unnecessarily
      confusing.
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Acked-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: default avatarNicolas Saenz Julienne <nsaenzju@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jim Mattson <jmattson@google.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Sean Christopherson <seanjc@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
      Cc: Wanpeng Li <wanpengli@tencent.com>
      Message-Id: <20220201132926.3301912-4-mark.rutland@arm.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      b2d2af7e
    • Mark Rutland's avatar
      kvm/mips: rework guest entry logic · 72e32445
      Mark Rutland authored
      In kvm_arch_vcpu_ioctl_run() we use guest_enter_irqoff() and
      guest_exit_irqoff() directly, with interrupts masked between these. As
      we don't handle any timer ticks during this window, we will not account
      time spent within the guest as guest time, which is unfortunate.
      
      Additionally, we do not inform lockdep or tracing that interrupts will
      be enabled during guest execution, which caan lead to misleading traces
      and warnings that interrupts have been enabled for overly-long periods.
      
      This patch fixes these issues by using the new timing and context
      entry/exit helpers to ensure that interrupts are handled during guest
      vtime but with RCU watching, with a sequence:
      
      	guest_timing_enter_irqoff();
      
      	guest_state_enter_irqoff();
      	< run the vcpu >
      	guest_state_exit_irqoff();
      
      	< take any pending IRQs >
      
      	guest_timing_exit_irqoff();
      
      In addition, as guest exits during the "run the vcpu" step are handled
      by kvm_mips_handle_exit(), a wrapper function is added which ensures
      that such exists are handled with a sequence:
      
      	guest_state_exit_irqoff();
      	< handle the exit >
      	guest_state_enter_irqoff();
      
      This means that exits which stop the vCPU running will have a redundant
      guest_state_enter_irqoff() .. guest_state_exit_irqoff() sequence, which
      can be addressed with future rework.
      
      Since instrumentation may make use of RCU, we must also ensure that no
      instrumented code is run during the EQS. I've split out the critical
      section into a new kvm_mips_enter_exit_vcpu() helper which is marked
      noinstr.
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Cc: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>
      Cc: Frederic Weisbecker <frederic@kernel.org>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Paul E. McKenney <paulmck@kernel.org>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Message-Id: <20220201132926.3301912-6-mark.rutland@arm.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      72e32445
    • Mark Rutland's avatar
      kvm: add guest_state_{enter,exit}_irqoff() · ef9989af
      Mark Rutland authored
      When transitioning to/from guest mode, it is necessary to inform
      lockdep, tracing, and RCU in a specific order, similar to the
      requirements for transitions to/from user mode. Additionally, it is
      necessary to perform vtime accounting for a window around running the
      guest, with RCU enabled, such that timer interrupts taken from the guest
      can be accounted as guest time.
      
      Most architectures don't handle all the necessary pieces, and a have a
      number of common bugs, including unsafe usage of RCU during the window
      between guest_enter() and guest_exit().
      
      On x86, this was dealt with across commits:
      
        87fa7f3e ("x86/kvm: Move context tracking where it belongs")
        0642391e ("x86/kvm/vmx: Add hardirq tracing to guest enter/exit")
        9fc975e9 ("x86/kvm/svm: Add hardirq tracing on guest enter/exit")
        3ebccdf3 ("x86/kvm/vmx: Move guest enter/exit into .noinstr.text")
        135961e0 ("x86/kvm/svm: Move guest enter/exit into .noinstr.text")
        16045714 ("KVM: x86: Defer vtime accounting 'til after IRQ handling")
        bc908e09 ("KVM: x86: Consolidate guest enter/exit logic to common helpers")
      
      ... but those fixes are specific to x86, and as the resulting logic
      (while correct) is split across generic helper functions and
      x86-specific helper functions, it is difficult to see that the
      entry/exit accounting is balanced.
      
      This patch adds generic helpers which architectures can use to handle
      guest entry/exit consistently and correctly. The guest_{enter,exit}()
      helpers are split into guest_timing_{enter,exit}() to perform vtime
      accounting, and guest_context_{enter,exit}() to perform the necessary
      context tracking and RCU management. The existing guest_{enter,exit}()
      heleprs are left as wrappers of these.
      
      Atop this, new guest_state_enter_irqoff() and guest_state_exit_irqoff()
      helpers are added to handle the ordering of lockdep, tracing, and RCU
      manageent. These are inteneded to mirror exit_to_user_mode() and
      enter_from_user_mode().
      
      Subsequent patches will migrate architectures over to the new helpers,
      following a sequence:
      
      	guest_timing_enter_irqoff();
      
      	guest_state_enter_irqoff();
      	< run the vcpu >
      	guest_state_exit_irqoff();
      
      	< take any pending IRQs >
      
      	guest_timing_exit_irqoff();
      
      This sequences handles all of the above correctly, and more clearly
      balances the entry and exit portions, making it easier to understand.
      
      The existing helpers are marked as deprecated, and will be removed once
      all architectures have been converted.
      
      There should be no functional change as a result of this patch.
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Reviewed-by: default avatarMarc Zyngier <maz@kernel.org>
      Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: default avatarNicolas Saenz Julienne <nsaenzju@redhat.com>
      Message-Id: <20220201132926.3301912-2-mark.rutland@arm.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      ef9989af
    • Sean Christopherson's avatar
      KVM: x86: Move delivery of non-APICv interrupt into vendor code · 57dfd7b5
      Sean Christopherson authored
      Handle non-APICv interrupt delivery in vendor code, even though it means
      VMX and SVM will temporarily have duplicate code.  SVM's AVIC has a race
      condition that requires KVM to fall back to legacy interrupt injection
      _after_ the interrupt has been logged in the vIRR, i.e. to fix the race,
      SVM will need to open code the full flow anyways[*].  Refactor the code
      so that the SVM bug without introducing other issues, e.g. SVM would
      return "success" and thus invoke trace_kvm_apicv_accept_irq() even when
      delivery through the AVIC failed, and to opportunistically prepare for
      using KVM_X86_OP to fill each vendor's kvm_x86_ops struct, which will
      rely on the vendor function matching the kvm_x86_op pointer name.
      
      No functional change intended.
      
      [*] https://lore.kernel.org/all/20211213104634.199141-4-mlevitsk@redhat.comSigned-off-by: default avatarSean Christopherson <seanjc@google.com>
      Message-Id: <20220128005208.4008533-3-seanjc@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      57dfd7b5
  6. 31 Jan, 2022 1 commit
  7. 30 Jan, 2022 18 commits
  8. 29 Jan, 2022 6 commits
    • Thomas Gleixner's avatar
      Merge tag 'irqchip-fixes-5.17-1' of... · 243d3080
      Thomas Gleixner authored
      Merge tag 'irqchip-fixes-5.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent
      
      Pull irqchip fixes from Marc Zyngier:
      
        - Drop an unused private data field in the AIC driver
      
        - Various fixes to the realtek-rtl driver
      
        - Make the GICv3 ITS driver compile again in !SMP configurations
      
        - Force reset of the GICv3 ITSs at probe time to avoid issues during kexec
      
        - Yet another kfree/bitmap_free conversion
      
        - Various DT updates (Renesas, SiFive)
      
      Link: https://lore.kernel.org/r/20220128174217.517041-1-maz@kernel.org
      243d3080
    • Linus Torvalds's avatar
      Merge tag 'pci-v5.17-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · f8c7e4ed
      Linus Torvalds authored
      Pull pci fixes from Bjorn Helgaas:
      
       - Fix compilation warnings in new mt7621 driver (Sergio Paracuellos)
      
       - Restore the sysfs "rom" file for VGA shadow ROMs, which was broken
         when converting "rom" to be a static attribute (Bjorn Helgaas)
      
      * tag 'pci-v5.17-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI/sysfs: Find shadow ROM before static attribute initialization
        PCI: mt7621: Remove unused function pcie_rmw()
        PCI: mt7621: Drop of_match_ptr() to avoid unused variable
      f8c7e4ed
    • Linus Torvalds's avatar
      Merge tag 'gpio-fixes-for-v5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux · 4cd90083
      Linus Torvalds authored
      Pull gpio fixes from Bartosz Golaszewski:
       "Two fixes for the gpio-simulator:
      
         - fix a bug with hogs not being set-up in gpio-sim when user-space
           sets the chip label to an empty string
      
         - include the gpio-sim documentation in the index"
      
      * tag 'gpio-fixes-for-v5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
        gpio: sim: add doc file to index file
        gpio: sim: check the label length when setting up device properties
      4cd90083
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · e255759e
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are two small char/misc driver fixes for 5.17-rc2 that fix some
        reported issues. They are:
      
         - fix up a merge issue in the at25.c driver that ended up dropping
           some lines in the driver. The removed lines ended being needed, so
           this restores it and the driver works again.
      
         - counter core fix where the wrong error was being returned, NULL
           should be the correct error for when memory is gone here, like the
           kmalloc() core does.
      
        Both of these have been in linux-next this week with no reported
        issues"
      
      * tag 'char-misc-5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        counter: fix an IS_ERR() vs NULL bug
        eeprom: at25: Restore missing allocation
      e255759e
    • Linus Torvalds's avatar
      Merge tag 'tty-5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · bb37101b
      Linus Torvalds authored
      Pull tty/serial driver fixes from Greg KH:
       "Here are some small bug fixes and reverts for reported problems with
        the tty core and drivers. They include:
      
         - revert the fifo use for the 8250 console mode. It caused too many
           regressions and problems, and had a bug in it as well. This is
           being reworked and should show up in a later -rc1 release, but it's
           not ready for 5.17
      
         - rpmsg tty race fix
      
         - restore the cyclades.h uapi header file. Turns out a compiler test
           suite used it for some unknown reason. Bring it back just for the
           parts that are used by the builder test so they continue to build.
           No functionality is restored as no one actually has this hardware
           anymore, nor is it really tested.
      
         - stm32 driver fixes
      
         - n_gsm flow control fixes
      
         - pl011 driver fix
      
         - rs485 initialization fix
      
        All of these have been in linux-next this week with no reported
        problems"
      
      * tag 'tty-5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        kbuild: remove include/linux/cyclades.h from header file check
        serial: core: Initialize rs485 RTS polarity already on probe
        serial: pl011: Fix incorrect rs485 RTS polarity on set_mctrl
        serial: stm32: fix software flow control transfer
        serial: stm32: prevent TDR register overwrite when sending x_char
        tty: n_gsm: fix SW flow control encoding/handling
        serial: 8250: of: Fix mapped region size when using reg-offset property
        tty: rpmsg: Fix race condition releasing tty port
        tty: Partially revert the removal of the Cyclades public API
        tty: Add support for Brainboxes UC cards.
        Revert "tty: serial: Use fifo in 8250 console driver"
      bb37101b
    • Linus Torvalds's avatar
      Merge tag 'usb-5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 44aa31a2
      Linus Torvalds authored
      Pull USB driver fixes from Greg KH:
       "Here are some small USB driver fixes for 5.17-rc2 that resolve a
        number of reported problems. These include:
      
         - typec driver fixes
      
         - xhci platform driver fixes for suspending
      
         - ulpi core fix
      
         - role.h build fix
      
         - new device ids
      
         - syzbot-reported bugfixes
      
         - gadget driver fixes
      
         - dwc3 driver fixes
      
         - other small fixes
      
        All of these have been in linux-next this week with no reported
        issues"
      
      * tag 'usb-5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        usb: cdnsp: Fix segmentation fault in cdns_lost_power function
        usb: dwc2: gadget: don't try to disable ep0 in dwc2_hsotg_suspend
        usb: gadget: at91_udc: fix incorrect print type
        usb: dwc3: xilinx: Fix error handling when getting USB3 PHY
        usb: dwc3: xilinx: Skip resets and USB3 register settings for USB2.0 mode
        usb: xhci-plat: fix crash when suspend if remote wake enable
        usb: common: ulpi: Fix crash in ulpi_match()
        usb: gadget: f_sourcesink: Fix isoc transfer for USB_SPEED_SUPER_PLUS
        ucsi_ccg: Check DEV_INT bit only when starting CCG4
        USB: core: Fix hang in usb_kill_urb by adding memory barriers
        usb-storage: Add unusual-devs entry for VL817 USB-SATA bridge
        usb: typec: tcpm: Do not disconnect when receiving VSAFE0V
        usb: typec: tcpm: Do not disconnect while receiving VBUS off
        usb: typec: Don't try to register component master without components
        usb: typec: Only attempt to link USB ports if there is fwnode
        usb: typec: tcpci: don't touch CC line if it's Vconn source
        usb: roles: fix include/linux/usb/role.h compile issue
      44aa31a2