On 26.06.2024 11:28, Federico Serafini wrote:
> @@ -2798,11 +2800,12 @@ void hvm_emulate_one_vm_event(enum emul_kind kind,
> unsigned int trapnr,
> hvio->mmio_insn_bytes = sizeof(hvio->mmio_insn);
> memcpy(hvio->mmio_insn, curr->arch.vm_event->emul.insn.data,
> hvio->mmio_insn_bytes);
> + fallthrough;
> }
> - /* Fall-through */
> default:
Can you clarify for me please whether this arrangement actually helps?
I'm pretty sure it'll result in a Coverity complaint, as my understanding
is that for them the marker (comment or pseudo-keyword) has to immediately
precede the subsequent label. IOW even if you confirmed that Eclair is
smarter in this regard, it may still need converting to
hvio->mmio_insn_bytes = sizeof(hvio->mmio_insn);
memcpy(hvio->mmio_insn, curr->arch.vm_event->emul.insn.data,
hvio->mmio_insn_bytes);
}
fallthrough;
default:
> --- a/xen/arch/x86/hvm/hypercall.c
> +++ b/xen/arch/x86/hvm/hypercall.c
> @@ -111,6 +111,7 @@ int hvm_hypercall(struct cpu_user_regs *regs)
> case 8:
> eax = regs->rax;
> /* Fallthrough to permission check. */
> + fallthrough;
> case 4:
> case 2:
> if ( currd->arch.monitor.guest_request_userspace_enabled &&
Arguably the comment could then be dropped in exchange. Yet I won't
insist on you doing so (and others may also disagree).
Jan