[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/2] x86/domctl: Introduce XEN_DOMCTL_SENDTRIGGER_DEBUG



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 <ngoc-tu.dinh@xxxxxxxxxx>
---
 xen/arch/x86/domctl.c       | 5 +++++
 xen/include/public/domctl.h | 1 +
 2 files changed, 6 insertions(+)

diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
index 07f712a0a4..3b74ca1751 100644
--- 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;
+
         default:
             ret = -ENOSYS;
             break;
diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h
index 510300bb67..8362e4e8f5 100644
--- a/xen/include/public/domctl.h
+++ b/xen/include/public/domctl.h
@@ -541,6 +541,7 @@ struct xen_domctl_address_size {
 #define XEN_DOMCTL_SENDTRIGGER_INIT   2
 #define XEN_DOMCTL_SENDTRIGGER_POWER  3
 #define XEN_DOMCTL_SENDTRIGGER_SLEEP  4
+#define XEN_DOMCTL_SENDTRIGGER_DEBUG  5
 struct xen_domctl_sendtrigger {
     uint32_t  trigger;  /* IN */
     uint32_t  vcpu;     /* IN */
-- 
2.55.0



--
Ngoc Tu Dinh | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.