Re: [PATCH 1/2] x86/domctl: Introduce XEN_DOMCTL_SENDTRIGGER_DEBUG
Jan Beulich <[email protected]>
| Newsgroups | org.xenproject.lists.xen-devel |
|---|---|
| Message-ID | <[email protected]> |
On 20.07.2026 11:25, Tu Dinh wrote: > VIRQ_DEBUG causes guests to print their diagnostic information. > Currently, the only way to send VIRQ_DEBUG to a domain is via the 'q' > debug key. This method indiscriminately sends VIRQ_DEBUG to all domains > and vcpus. > > When debugging guests, it's useful to have a way to target a specific > domain with VIRQ_DEBUG. Add XEN_DOMCTL_SENDTRIGGER_DEBUG for this > purpose. > > Signed-off-by: Tu Dinh <[email protected]> Fine in principle, but ... > --- a/xen/arch/x86/domctl.c > +++ b/xen/arch/x86/domctl.c > @@ -605,6 +605,11 @@ long arch_do_domctl( > } > break; > > + case XEN_DOMCTL_SENDTRIGGER_DEBUG: > + ret = 0; > + send_guest_vcpu_virq(v, VIRQ_DEBUG); > + break; ... unlike the other XEN_DOMCTL_SENDTRIGGER_* this one isn't really x86-specific. Hence, at the risk of being called guilty in causing scope creep, I think this wants some re-structuring. The handling of XEN_DOMCTL_sendtrigger wants to move to common code (at that occasion also making it properly use domain_vcpu()), with a new arch-specific handler to deal with non-generic XEN_DOMCTL_SENDTRIGGER_*. And then, if already moving this, it will also want considering where to move it in do_domctl(): It doesn't look as if holding the domctl lock would be required here. Jan