All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/4] target/loongarch: Solve some issues reported from coccinelle
@ 2025-03-19  2:08 Bibo Mao
  2025-03-19  2:08 ` [PATCH v4 1/4] target/loongarch: Fix error handling of KVM feature checks Bibo Mao
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Bibo Mao @ 2025-03-19  2:08 UTC (permalink / raw)
  To: Song Gao, Markus Armbruster; +Cc: Jiaxun Yang, qemu-devel, Paolo Bonzini

This patch set solves errors reported by coccinelle tool with commands:
  spatch --sp-file scripts/coccinelle/*.cocci --dir target/loongarch/
  spatch --sp-file scripts/coccinelle/*.cocci --dir hw/loongarch/

The main problem is that qemu should fail to run when feature is forced
to enabled however KVM does not support it, rather than report error and
continue to run.

---
  v3 ... v4:
    1. Add missed this cleanup with error and remove some local error
       object.
    2. Replace local error object with error_abort object in
       virt_cpu_irq_init(), since its return value is not checked.

  v2 ... v3:
    1. Add missing modification replacing error_propagate() + error_setg()
      with error_setg().
    2. Some enhancement about error handling, handling error
       symmetrically in many places

  v1 ... v2:
    1. Add fixes tag and change title with fix prefix in patch 1.
    2. Replace error_propagate() with error_setg(), and return directly
       for any error.
---
Bibo Mao (4):
  target/loongarch: Fix error handling of KVM feature checks
  hw/loongarch/virt: Remove unnecessary NULL pointer
  target/loongarch: Remove unnecessary temporary variable assignment
  target/loongarch: Set dest error with error_abort in virt_cpu_irq_init

 hw/loongarch/virt.c               | 40 +++++++++++++------------------
 target/loongarch/kvm/kvm.c        |  8 +++++--
 target/loongarch/tcg/tlb_helper.c |  5 ++--
 3 files changed, 24 insertions(+), 29 deletions(-)


base-commit: 1dae461a913f9da88df05de6e2020d3134356f2e
-- 
2.39.3



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-03-19  8:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-19  2:08 [PATCH v4 0/4] target/loongarch: Solve some issues reported from coccinelle Bibo Mao
2025-03-19  2:08 ` [PATCH v4 1/4] target/loongarch: Fix error handling of KVM feature checks Bibo Mao
2025-03-19  2:08 ` [PATCH v4 2/4] hw/loongarch/virt: Remove unnecessary NULL pointer Bibo Mao
2025-03-19  6:50   ` Markus Armbruster
2025-03-19  8:14     ` bibo mao
2025-03-19  8:43       ` Markus Armbruster
2025-03-19  2:08 ` [PATCH v4 3/4] target/loongarch: Remove unnecessary temporary variable assignment Bibo Mao
2025-03-19  2:08 ` [PATCH v4 4/4] target/loongarch: Set dest error with error_abort in virt_cpu_irq_init Bibo Mao
2025-03-19  6:09   ` Markus Armbruster
2025-03-19  7:58     ` bibo mao
2025-03-19  8:52       ` Markus Armbruster

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.