ia64/xen-unstable

view tools/xcutils/xc_restore.c @ 15841:c5f735271e22

[IA64] Foreign p2m: Fix vti domain builder.

It should set arch_domain::convmem_end.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Alex Williamson <alex.williamson@hp.com>
date Thu Sep 06 13:48:43 2007 -0600 (2007-09-06)
parents e518f2fbdd72
children 694b7daa353c
line source
1 /*
2 * This file is subject to the terms and conditions of the GNU General
3 * Public License. See the file "COPYING" in the main directory of
4 * this archive for more details.
5 *
6 * Copyright (C) 2005 by Christian Limpach
7 *
8 */
10 #include <err.h>
11 #include <stdlib.h>
12 #include <stdint.h>
13 #include <stdio.h>
15 #include <xenctrl.h>
16 #include <xenguest.h>
18 int
19 main(int argc, char **argv)
20 {
21 unsigned int xc_fd, io_fd, domid, store_evtchn, console_evtchn;
22 unsigned int hvm, pae, apic;
23 int ret;
24 unsigned long store_mfn, console_mfn;
26 if ( argc != 8 )
27 errx(1, "usage: %s iofd domid store_evtchn "
28 "console_evtchn hvm pae apic", argv[0]);
30 xc_fd = xc_interface_open();
31 if ( xc_fd < 0 )
32 errx(1, "failed to open control interface");
34 io_fd = atoi(argv[1]);
35 domid = atoi(argv[2]);
36 store_evtchn = atoi(argv[3]);
37 console_evtchn = atoi(argv[4]);
38 hvm = atoi(argv[5]);
39 pae = atoi(argv[6]);
40 apic = atoi(argv[7]);
42 ret = xc_domain_restore(xc_fd, io_fd, domid, store_evtchn, &store_mfn,
43 console_evtchn, &console_mfn, hvm, pae);
45 if ( ret == 0 )
46 {
47 printf("store-mfn %li\n", store_mfn);
48 if ( !hvm )
49 printf("console-mfn %li\n", console_mfn);
50 fflush(stdout);
51 }
53 xc_interface_close(xc_fd);
55 return ret;
56 }