From: Don Slutz <dslutz@verizon.com>
To: xen-devel@lists.xen.org
Cc: Keir Fraser <keir@xen.org>,
Ian Campbell <ian.campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Eddie Dong <eddie.dong@intel.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Don Slutz <dslutz@verizon.com>, Jan Beulich <jbeulich@suse.com>,
Jun Nakajima <jun.nakajima@intel.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Subject: [RFC PATCH 09/10] libxl: Add VTPOWER, VTREBOOT and VTPING
Date: Thu, 12 Dec 2013 14:15:17 -0500 [thread overview]
Message-ID: <1386875718-28166-10-git-send-email-dslutz@terremark.com> (raw)
In-Reply-To: <1386875718-28166-1-git-send-email-dslutz@terremark.com>
From: Don Slutz <dslutz@verizon.com>
Signed-off-by: Don Slutz <dslutz@verizon.com>
---
tools/libxl/libxl.c | 12 ++++++++++++
tools/libxl/libxl_types.idl | 3 +++
tools/libxl/xl_cmdtable.c | 2 +-
xen/arch/x86/domctl.c | 34 ++++++++++++++++++++++++++++++++++
xen/include/public/domctl.h | 3 +++
5 files changed, 53 insertions(+), 1 deletion(-)
diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index fd8b988..1ec8484 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -5057,6 +5057,18 @@ int libxl_send_trigger(libxl_ctx *ctx, uint32_t domid,
rc = xc_domain_send_trigger(ctx->xch, domid,
XEN_DOMCTL_SENDTRIGGER_SLEEP, vcpuid);
break;
+ case LIBXL_TRIGGER_VTPOWER:
+ rc = xc_domain_send_trigger(ctx->xch, domid,
+ XEN_DOMCTL_SENDTRIGGER_VTPOWER, vcpuid);
+ break;
+ case LIBXL_TRIGGER_VTREBOOT:
+ rc = xc_domain_send_trigger(ctx->xch, domid,
+ XEN_DOMCTL_SENDTRIGGER_VTREBOOT, vcpuid);
+ break;
+ case LIBXL_TRIGGER_VTPING:
+ rc = xc_domain_send_trigger(ctx->xch, domid,
+ XEN_DOMCTL_SENDTRIGGER_VTPING, vcpuid);
+ break;
case LIBXL_TRIGGER_NMI:
rc = xc_domain_send_trigger(ctx->xch, domid,
XEN_DOMCTL_SENDTRIGGER_NMI, vcpuid);
diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
index 71ba64e..80a8ee8 100644
--- a/tools/libxl/libxl_types.idl
+++ b/tools/libxl/libxl_types.idl
@@ -105,6 +105,9 @@ libxl_trigger = Enumeration("trigger", [
(4, "INIT"),
(5, "RESET"),
(6, "S3RESUME"),
+ (7, "VTPOWER"),
+ (8, "VTREBOOT"),
+ (9, "VTPING"),
])
libxl_tsc_mode = Enumeration("tsc_mode", [
diff --git a/tools/libxl/xl_cmdtable.c b/tools/libxl/xl_cmdtable.c
index ebe0220..98db8ae 100644
--- a/tools/libxl/xl_cmdtable.c
+++ b/tools/libxl/xl_cmdtable.c
@@ -290,7 +290,7 @@ struct cmd_spec cmd_table[] = {
{ "trigger",
&main_trigger, 0, 1,
"Send a trigger to a domain",
- "<Domain> <nmi|reset|init|power|sleep|s3resume> [<VCPU>]",
+ "<Domain> <nmi|reset|init|power|sleep|s3resume|vtpower|vtreboot|vtping> [<VCPU>]",
},
{ "sysrq",
&main_sysrq, 0, 1,
diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
index ef6c140..8b77ce2 100644
--- a/xen/arch/x86/domctl.c
+++ b/xen/arch/x86/domctl.c
@@ -23,6 +23,7 @@
#include <xen/paging.h>
#include <asm/irq.h>
#include <asm/hvm/hvm.h>
+#include <asm/hvm/vmport.h>
#include <asm/hvm/support.h>
#include <asm/hvm/cacheattr.h>
#include <asm/processor.h>
@@ -577,6 +578,39 @@ long arch_do_domctl(
}
break;
+ case XEN_DOMCTL_SENDTRIGGER_VTPOWER:
+ {
+ ret = -EINVAL;
+ if ( is_hvm_domain(d) )
+ {
+ ret = 0;
+ vmport_ctrl_send(&d->arch.hvm_domain, "OS_Halt", 1);
+ }
+ }
+ break;
+
+ case XEN_DOMCTL_SENDTRIGGER_VTREBOOT:
+ {
+ ret = -EINVAL;
+ if ( is_hvm_domain(d) )
+ {
+ ret = 0;
+ vmport_ctrl_send(&d->arch.hvm_domain, "OS_Reboot", 2);
+ }
+ }
+ break;
+
+ case XEN_DOMCTL_SENDTRIGGER_VTPING:
+ {
+ ret = -EINVAL;
+ if ( is_hvm_domain(d) )
+ {
+ ret = 0;
+ vmport_ctrl_send(&d->arch.hvm_domain, "ping", 3);
+ }
+ }
+ break;
+
default:
ret = -ENOSYS;
}
diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h
index 01a3652..d71d57c 100644
--- a/xen/include/public/domctl.h
+++ b/xen/include/public/domctl.h
@@ -454,6 +454,9 @@ DEFINE_XEN_GUEST_HANDLE(xen_domctl_real_mode_area_t);
#define XEN_DOMCTL_SENDTRIGGER_INIT 2
#define XEN_DOMCTL_SENDTRIGGER_POWER 3
#define XEN_DOMCTL_SENDTRIGGER_SLEEP 4
+#define XEN_DOMCTL_SENDTRIGGER_VTPOWER 5
+#define XEN_DOMCTL_SENDTRIGGER_VTREBOOT 6
+#define XEN_DOMCTL_SENDTRIGGER_VTPING 7
struct xen_domctl_sendtrigger {
uint32_t trigger; /* IN */
uint32_t vcpu; /* IN */
--
1.8.4
next prev parent reply other threads:[~2013-12-12 19:15 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-12 19:15 [RFC PATCH 00/10] Xen VMware tools support Don Slutz
2013-12-12 19:15 ` [RFC PATCH 01/10] smbios: Add "plus VMware-Tools" to HVM_XS_SYSTEM_PRODUCT_NAME Don Slutz
2013-12-12 19:35 ` Olaf Hering
2013-12-12 22:07 ` Andrew Cooper
2013-12-13 18:03 ` Don Slutz
2013-12-12 19:15 ` [RFC PATCH 02/10] Add VMware HVM params Don Slutz
2013-12-12 22:32 ` Andrew Cooper
2013-12-13 18:12 ` Don Slutz
2013-12-13 10:52 ` Jan Beulich
2013-12-13 18:13 ` Don Slutz
2013-12-17 20:02 ` Konrad Rzeszutek Wilk
2013-12-19 0:47 ` Don Slutz
2013-12-12 19:15 ` [RFC PATCH 03/10] Add cpuid_vmware_leaves Don Slutz
2013-12-12 22:27 ` Andrew Cooper
2013-12-13 10:55 ` Jan Beulich
2013-12-13 13:38 ` Andrew Cooper
2013-12-13 18:55 ` Don Slutz
2013-12-16 8:13 ` Jan Beulich
2013-12-19 0:51 ` Don Slutz
2013-12-17 16:20 ` Don Slutz
2013-12-12 19:15 ` [RFC PATCH 04/10] tools: Add support for new HVM params Don Slutz
2013-12-12 22:36 ` Andrew Cooper
2013-12-13 23:23 ` Don Slutz
2013-12-12 19:15 ` [RFC PATCH 05/10] vmport: Add VMware provided include files Don Slutz
2013-12-17 20:22 ` Konrad Rzeszutek Wilk
2013-12-19 0:54 ` Don Slutz
2013-12-12 19:15 ` [RFC PATCH 06/10] Add vmport structs Don Slutz
2013-12-12 23:10 ` Andrew Cooper
2013-12-19 1:26 ` Don Slutz
2013-12-12 19:15 ` [RFC PATCH 07/10] Add new vmport code Don Slutz
2013-12-13 0:06 ` Andrew Cooper
2013-12-19 2:22 ` Don Slutz
2013-12-13 10:59 ` Jan Beulich
2013-12-19 2:25 ` Don Slutz
2013-12-17 20:36 ` Konrad Rzeszutek Wilk
2013-12-19 2:29 ` Don Slutz
2013-12-12 19:15 ` [RFC PATCH 08/10] connect vmport up Don Slutz
2013-12-13 0:51 ` Andrew Cooper
2013-12-19 2:53 ` Don Slutz
2013-12-13 15:46 ` Boris Ostrovsky
2013-12-19 3:45 ` Don Slutz
2013-12-17 20:37 ` Konrad Rzeszutek Wilk
2013-12-19 3:46 ` Don Slutz
2013-12-12 19:15 ` Don Slutz [this message]
2013-12-13 0:58 ` [RFC PATCH 09/10] libxl: Add VTPOWER, VTREBOOT and VTPING Andrew Cooper
2013-12-17 20:30 ` Konrad Rzeszutek Wilk
2013-12-12 19:15 ` [RFC PATCH 10/10] Add VMware guest info access Don Slutz
2013-12-13 1:08 ` Andrew Cooper
2013-12-13 5:32 ` Matthew Daley
2013-12-17 20:34 ` Konrad Rzeszutek Wilk
2013-12-17 19:03 ` [RFC PATCH 00/10] Xen VMware tools support Konrad Rzeszutek Wilk
2013-12-19 0:46 ` Don Slutz
2013-12-19 9:50 ` Ian Campbell
2013-12-19 14:08 ` Don Slutz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1386875718-28166-10-git-send-email-dslutz@terremark.com \
--to=dslutz@verizon.com \
--cc=boris.ostrovsky@oracle.com \
--cc=eddie.dong@intel.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=jun.nakajima@intel.com \
--cc=keir@xen.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).