]> git.ipfire.org Git - thirdparty/qemu.git/blame - xen-all.c
pc, Disable vmport initialisation with Xen.
[thirdparty/qemu.git] / xen-all.c
CommitLineData
3285cf4f
AP
1/*
2 * Copyright (C) 2010 Citrix Ltd.
3 *
4 * This work is licensed under the terms of the GNU GPL, version 2. See
5 * the COPYING file in the top-level directory.
6 *
7 */
8
9#include "hw/xen_common.h"
10#include "hw/xen_backend.h"
11
29d3ccde
AP
12/* VCPU Operations, MMIO, IO ring ... */
13
14static void xen_reset_vcpu(void *opaque)
15{
16 CPUState *env = opaque;
17
18 env->halted = 1;
19}
20
21void xen_vcpu_init(void)
22{
23 CPUState *first_cpu;
24
25 if ((first_cpu = qemu_get_cpu(0))) {
26 qemu_register_reset(xen_reset_vcpu, first_cpu);
27 xen_reset_vcpu(first_cpu);
28 }
29}
30
3285cf4f
AP
31/* Initialise Xen */
32
33int xen_init(void)
34{
35 xen_xc = xen_xc_interface_open(0, 0, 0);
36 if (xen_xc == XC_HANDLER_INITIAL_VALUE) {
37 xen_be_printf(NULL, 0, "can't open xen interface\n");
38 return -1;
39 }
40
41 return 0;
42}
29d3ccde
AP
43
44int xen_hvm_init(void)
45{
46 return 0;
47}