1. 20 1月, 2022 4 次提交
  2. 10 11月, 2021 1 次提交
  3. 07 11月, 2021 2 次提交
  4. 05 11月, 2021 1 次提交
  5. 02 11月, 2021 1 次提交
  6. 01 11月, 2021 2 次提交
    • B
      RISC-V: KVM: fix boolreturn.cocci warnings · bbd5ba8d
      Bixuan Cui 提交于
      Fix boolreturn.cocci warnings:
      ./arch/riscv/kvm/mmu.c:603:9-10: WARNING: return of 0/1 in function
      'kvm_age_gfn' with return type bool
      ./arch/riscv/kvm/mmu.c:582:9-10: WARNING: return of 0/1 in function
      'kvm_set_spte_gfn' with return type bool
      ./arch/riscv/kvm/mmu.c:621:9-10: WARNING: return of 0/1 in function
      'kvm_test_age_gfn' with return type bool
      ./arch/riscv/kvm/mmu.c:568:9-10: WARNING: return of 0/1 in function
      'kvm_unmap_gfn_range' with return type bool
      Signed-off-by: NBixuan Cui <cuibixuan@linux.alibaba.com>
      Signed-off-by: NAnup Patel <anup.patel@wdc.com>
      bbd5ba8d
    • R
      RISC-V: KVM: remove unneeded semicolon · 7b161d9c
      ran jianping 提交于
       Elimate the following coccinelle check warning:
       ./arch/riscv/kvm/vcpu_sbi.c:169:2-3: Unneeded semicolon
       ./arch/riscv/kvm/vcpu_exit.c:397:2-3: Unneeded semicolon
       ./arch/riscv/kvm/vcpu_exit.c:687:2-3: Unneeded semicolon
       ./arch/riscv/kvm/vcpu_exit.c:645:2-3: Unneeded semicolon
       ./arch/riscv/kvm/vcpu.c:247:2-3: Unneeded semicolon
       ./arch/riscv/kvm/vcpu.c:284:2-3: Unneeded semicolon
       ./arch/riscv/kvm/vcpu_timer.c:123:2-3: Unneeded semicolon
       ./arch/riscv/kvm/vcpu_timer.c:170:2-3: Unneeded semicolon
      Reported-by: NZeal Robot <zealci@zte.com.cn>
      Signed-off-by: Nran jianping <ran.jianping@zte.com.cn>
      Signed-off-by: NAnup Patel <anup.patel@wdc.com>
      7b161d9c
  7. 31 10月, 2021 2 次提交
    • A
      RISC-V: KVM: Fix GPA passed to __kvm_riscv_hfence_gvma_xyz() functions · 7c8de080
      Anup Patel 提交于
      The parameter passed to HFENCE.GVMA instruction in rs1 register
      is guest physical address right shifted by 2 (i.e. divided by 4).
      
      Unfortunately, we overlooked the semantics of rs1 registers for
      HFENCE.GVMA instruction and never right shifted guest physical
      address by 2. This issue did not manifest for hypervisors till
      now because:
        1) Currently, only __kvm_riscv_hfence_gvma_all() and SBI
           HFENCE calls are used to invalidate TLB.
        2) All H-extension implementations (such as QEMU, Spike,
           Rocket Core FPGA, etc) that we tried till now were
           conservatively flushing everything upon any HFENCE.GVMA
           instruction.
      
      This patch fixes GPA passed to __kvm_riscv_hfence_gvma_vmid_gpa()
      and __kvm_riscv_hfence_gvma_gpa() functions.
      
      Fixes: fd7bb4a2 ("RISC-V: KVM: Implement VMID allocator")
      Reported-by: NIan Huang <ihuang@ventanamicro.com>
      Signed-off-by: NAnup Patel <anup.patel@wdc.com>
      Message-Id: <20211026170136.2147619-4-anup.patel@wdc.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7c8de080
    • A
      RISC-V: KVM: Factor-out FP virtualization into separate sources · 0a86512d
      Anup Patel 提交于
      The timer and SBI virtualization is already in separate sources.
      In future, we will have vector and AIA virtualization also added
      as separate sources.
      
      To align with above described modularity, we factor-out FP
      virtualization into separate sources.
      Signed-off-by: NAnup Patel <anup.patel@wdc.com>
      Message-Id: <20211026170136.2147619-3-anup.patel@wdc.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0a86512d
  8. 29 10月, 2021 2 次提交
  9. 28 10月, 2021 4 次提交
  10. 27 10月, 2021 3 次提交
    • ftrace: disable preemption when recursion locked · ce5e4803
      王贇 提交于
      As the documentation explained, ftrace_test_recursion_trylock()
      and ftrace_test_recursion_unlock() were supposed to disable and
      enable preemption properly, however currently this work is done
      outside of the function, which could be missing by mistake.
      
      And since the internal using of trace_test_and_set_recursion()
      and trace_clear_recursion() also require preemption disabled, we
      can just merge the logical.
      
      This patch will make sure the preemption has been disabled when
      trace_test_and_set_recursion() return bit >= 0, and
      trace_clear_recursion() will enable the preemption if previously
      enabled.
      
      Link: https://lkml.kernel.org/r/13bde807-779c-aa4c-0672-20515ae365ea@linux.alibaba.com
      
      CC: Petr Mladek <pmladek@suse.com>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Jiri Kosina <jikos@kernel.org>
      Cc: Joe Lawrence <joe.lawrence@redhat.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Jisheng Zhang <jszhang@kernel.org>
      CC: Steven Rostedt <rostedt@goodmis.org>
      CC: Miroslav Benes <mbenes@suse.cz>
      Reported-by: NAbaci <abaci@linux.alibaba.com>
      Suggested-by: NPeter Zijlstra <peterz@infradead.org>
      Signed-off-by: NMichael Wang <yun.wang@linux.alibaba.com>
      [ Removed extra line in comment - SDR ]
      Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      ce5e4803
    • K
      riscv/vdso: Drop unneeded part due to merge issue · 683b33f7
      Kefeng Wang 提交于
      It seems that something is wrong when patch "riscv/vdso:
      Refactor asm/vdso.h" is merged.
      
      Let's fix the merge issue.
      
      Fixes: 8edab023 ("Merge remote-tracking branch 'palmer/riscv-vdso-cleanup' into for-next")
      Signed-off-by: NKefeng Wang <wangkefeng.wang@huawei.com>
      Signed-off-by: NPalmer Dabbelt <palmerdabbelt@google.com>
      683b33f7
    • V
      riscv: remove .text section size limitation for XIP · f9ace4ed
      Vitaly Wool 提交于
      Currently there's a limit of 8MB for the .text section of a RISC-V
      image in the XIP case. This breaks compilation of many automatic
      builds and is generally inconvenient. This patch removes that
      limitation and optimizes XIP image file size at the same time.
      Signed-off-by: NVitaly Wool <vitaly.wool@konsulko.com>
      Signed-off-by: NPalmer Dabbelt <palmerdabbelt@google.com>
      f9ace4ed
  11. 26 10月, 2021 2 次提交
    • M
      irq: remove handle_domain_{irq,nmi}() · 0953fb26
      Mark Rutland 提交于
      Now that entry code handles IRQ entry (including setting the IRQ regs)
      before calling irqchip code, irqchip code can safely call
      generic_handle_domain_irq(), and there's no functional reason for it to
      call handle_domain_irq().
      
      Let's cement this split of responsibility and remove handle_domain_irq()
      entirely, updating irqchip drivers to call generic_handle_domain_irq().
      
      For consistency, handle_domain_nmi() is similarly removed and replaced
      with a generic_handle_domain_nmi() function which also does not perform
      any entry logic.
      
      Previously handle_domain_{irq,nmi}() had a WARN_ON() which would fire
      when they were called in an inappropriate context. So that we can
      identify similar issues going forward, similar WARN_ON_ONCE() logic is
      added to the generic_handle_*() functions, and comments are updated for
      clarity and consistency.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Reviewed-by: NMarc Zyngier <maz@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      0953fb26
    • M
      irq: riscv: perform irqentry in entry code · 7ecbc648
      Mark Rutland 提交于
      In preparation for removing HANDLE_DOMAIN_IRQ_IRQENTRY, have arch/riscv
      perform all the irqentry accounting in its entry code. As arch/riscv
      uses GENERIC_IRQ_MULTI_HANDLER, we can use generic_handle_arch_irq() to
      do so.
      
      Since generic_handle_arch_irq() handles the irq entry and setting the
      irq regs, and happens before the irqchip code calls handle_IPI(), we can
      remove the redundant irq entry and irq regs manipulation from
      handle_IPI().
      
      There should be no functional change as a result of this patch.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Reviewed-by: NGuo Ren <guoren@kernel.org>
      Reviewed-by: NMarc Zyngier <maz@kernel.org>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      7ecbc648
  12. 25 10月, 2021 1 次提交
    • M
      irq: add a (temporary) CONFIG_HANDLE_DOMAIN_IRQ_IRQENTRY · 2fe35f8e
      Mark Rutland 提交于
      Going forward we want architecture/entry code to perform all the
      necessary work to enter/exit IRQ context, with irqchip code merely
      handling the mapping of the interrupt to any handler(s). Among other
      reasons, this is necessary to consistently fix some longstanding issues
      with the ordering of lockdep/RCU/tracing instrumentation which many
      architectures get wrong today in their entry code.
      
      Importantly, rcu_irq_{enter,exit}() must be called precisely once per
      IRQ exception, so that rcu_is_cpu_rrupt_from_idle() can correctly
      identify when an interrupt was taken from an idle context which must be
      explicitly preempted. Currently handle_domain_irq() calls
      rcu_irq_{enter,exit}() via irq_{enter,exit}(), but entry code needs to
      be able to call rcu_irq_{enter,exit}() earlier for correct ordering
      across lockdep/RCU/tracing updates for sequences such as:
      
        lockdep_hardirqs_off(CALLER_ADDR0);
        rcu_irq_enter();
        trace_hardirqs_off_finish();
      
      To permit each architecture to be converted to the new style in turn,
      this patch adds a new CONFIG_HANDLE_DOMAIN_IRQ_IRQENTRY selected by all
      current users of HANDLE_DOMAIN_IRQ, which gates the existing behaviour.
      When CONFIG_HANDLE_DOMAIN_IRQ_IRQENTRY is not selected,
      handle_domain_irq() requires entry code to perform the
      irq_{enter,exit}() work, with an explicit check for this matching the
      style of handle_domain_nmi().
      
      Subsequent patches will:
      
      1) Add the necessary IRQ entry accounting to each architecture in turn,
         dropping CONFIG_HANDLE_DOMAIN_IRQ_IRQENTRY from that architecture's
         Kconfig.
      
      2) Remove CONFIG_HANDLE_DOMAIN_IRQ_IRQENTRY once it is no longer
         selected.
      
      3) Convert irqchip drivers to consistently use
         generic_handle_domain_irq() rather than handle_domain_irq().
      
      4) Remove handle_domain_irq() and CONFIG_HANDLE_DOMAIN_IRQ.
      
      ... which should leave us with a clear split of responsiblity across the
      entry and irqchip code, making it possible to perform additional
      cleanups and fixes for the aforementioned longstanding issues with entry
      code.
      
      There should be no functional change as a result of this patch.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Reviewed-by: NMarc Zyngier <maz@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      2fe35f8e
  13. 24 10月, 2021 1 次提交
  14. 23 10月, 2021 1 次提交
  15. 22 10月, 2021 1 次提交
  16. 21 10月, 2021 1 次提交
  17. 19 10月, 2021 5 次提交
  18. 15 10月, 2021 1 次提交
  19. 09 10月, 2021 1 次提交
  20. 08 10月, 2021 4 次提交