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. --- 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 (3): target/loongarch: Fix error handling of KVM feature checks hw/loongarch/virt: Remove unnecessary NULL pointer checking target/loongarch: Remove unnecessary temporary variable assignment hw/loongarch/virt.c | 25 +++++++++++-------------- target/loongarch/kvm/kvm.c | 8 ++++++-- target/loongarch/tcg/tlb_helper.c | 5 ++--- 3 files changed, 19 insertions(+), 19 deletions(-) base-commit: 4c33c097f3a8a8093bcbaf097c3a178051e51b3e -- 2.39.3