diff options
author | Dario Faggioli <dario.faggioli@citrix.com> | 2013-09-10 19:53:57 +0200 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2013-09-13 13:10:02 +0100 |
commit | 2e2fa6ef6071d0369905e019b0273f3537cf5b9f (patch) | |
tree | 8bb355fb27c8284b5d1411f4007ee1d7306a9f4a /tools/libxc/xc_domain_restore.c | |
parent | 6164856fa7300bf914fc4a53f012ff3941fe19b7 (diff) | |
download | xen-2e2fa6ef6071d0369905e019b0273f3537cf5b9f.tar.gz xen-2e2fa6ef6071d0369905e019b0273f3537cf5b9f.tar.bz2 xen-2e2fa6ef6071d0369905e019b0273f3537cf5b9f.zip |
libxc: use xc_vcpu_getinfo() instead of calling do_domctl()
The wrapper is there already, so better use it in place of
all the stuff required to issue a call to do_domctl() for
XEN_DOMCTL_getdomaininfo.
Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libxc/xc_domain_restore.c')
-rw-r--r-- | tools/libxc/xc_domain_restore.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/libxc/xc_domain_restore.c b/tools/libxc/xc_domain_restore.c index 41a63cbe26..b418963e4b 100644 --- a/tools/libxc/xc_domain_restore.c +++ b/tools/libxc/xc_domain_restore.c @@ -1406,6 +1406,7 @@ int xc_domain_restore(xc_interface *xch, int io_fd, uint32_t dom, struct restore_callbacks *callbacks) { DECLARE_DOMCTL; + xc_dominfo_t info; int rc = 1, frc, i, j, n, m, pae_extended_cr3 = 0, ext_vcpucontext = 0; int vcpuextstate = 0; uint32_t vcpuextstate_size = 0; @@ -1562,14 +1563,12 @@ int xc_domain_restore(xc_interface *xch, int io_fd, uint32_t dom, ROUNDUP(MAX_BATCH_SIZE * sizeof(xen_pfn_t), PAGE_SHIFT)); /* Get the domain's shared-info frame. */ - domctl.cmd = XEN_DOMCTL_getdomaininfo; - domctl.domain = (domid_t)dom; - if ( xc_domctl(xch, &domctl) < 0 ) + if ( xc_domain_getinfo(xch, (domid_t)dom, 1, &info) != 1 ) { PERROR("Could not get information on new domain"); goto out; } - shared_info_frame = domctl.u.getdomaininfo.shared_info_frame; + shared_info_frame = info.shared_info_frame; /* Mark all PFNs as invalid; we allocate on demand */ for ( pfn = 0; pfn < dinfo->p2m_size; pfn++ ) |