From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vitaly Kuznetsov Subject: [PATCH v7 06/10] libxc: support XEN_DOMCTL_soft_reset operation Date: Wed, 27 May 2015 17:25:42 +0200 Message-ID: <1432740346-7887-7-git-send-email-vkuznets@redhat.com> References: <1432740346-7887-1-git-send-email-vkuznets@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YxdDs-00015w-9P for xen-devel@lists.xenproject.org; Wed, 27 May 2015 15:26:24 +0000 In-Reply-To: <1432740346-7887-1-git-send-email-vkuznets@redhat.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Andrew Jones , Julien Grall , Keir Fraser , Ian Campbell , Stefano Stabellini , Andrew Cooper , Ian Jackson , Olaf Hering , Tim Deegan , David Vrabel , Jan Beulich , Wei Liu , Daniel De Graaf List-Id: xen-devel@lists.xenproject.org Introduce xc_domain_soft_reset() function supporting XEN_DOMCTL_soft_reset. Signed-off-by: Vitaly Kuznetsov --- Changes in v7: - XENMEM_soft_reset -> XEN_DOMCTL_soft_reset. - xc_memory_soft_reset -> xc_domain_soft_reset --- tools/libxc/include/xenctrl.h | 4 ++++ tools/libxc/xc_domain.c | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h index 09a7450..ceb64d5 100644 --- a/tools/libxc/include/xenctrl.h +++ b/tools/libxc/include/xenctrl.h @@ -1301,6 +1301,10 @@ int xc_domain_setvnuma(xc_interface *xch, unsigned int *vcpu_to_vnode, unsigned int *vnode_to_pnode); +int xc_domain_soft_reset(xc_interface *xch, + uint32_t source_domid, + uint32_t dest_domid); + #if defined(__i386__) || defined(__x86_64__) /* * PC BIOS standard E820 types and structure. diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c index a7079a1..51f2833 100644 --- a/tools/libxc/xc_domain.c +++ b/tools/libxc/xc_domain.c @@ -2459,6 +2459,18 @@ int xc_domain_setvnuma(xc_interface *xch, return rc; } + +int xc_domain_soft_reset(xc_interface *xch, + uint32_t source_domid, + uint32_t dest_domid) +{ + DECLARE_DOMCTL; + domctl.cmd = XEN_DOMCTL_soft_reset; + domctl.domain = (domid_t)source_domid; + domctl.u.soft_reset.dest_domain = (domid_t)dest_domid; + domctl.u.soft_reset.gmfn_start = 0; + return do_domctl(xch, &domctl); +} /* * Local variables: * mode: C -- 1.9.3