ia64/xen-unstable

view tools/ioemu/hw/xen_machine_pv.c @ 17246:0f204e41cc93

stubdom: disable xen_blktap

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Mar 18 13:13:31 2008 +0000 (2008-03-18)
parents f07a7ba63885
children
line source
1 /*
2 * QEMU Xen PV Machine
3 *
4 * Copyright (c) 2007 Red Hat
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 */
25 #include "vl.h"
26 #include "xen_console.h"
27 #include "xenfb.h"
29 extern void init_blktap(void);
32 /* The Xen PV machine currently provides
33 * - a virtual framebuffer
34 * - ....
35 */
36 static void xen_init_pv(uint64_t ram_size, int vga_ram_size, char *boot_device,
37 DisplayState *ds, const char **fd_filename,
38 int snapshot,
39 const char *kernel_filename,
40 const char *kernel_cmdline,
41 const char *initrd_filename,
42 const char *direct_pci)
43 {
44 struct xenfb *xenfb;
45 extern int domid;
48 #ifndef CONFIG_STUBDOM
49 /* Initialize tapdisk client */
50 init_blktap();
51 #endif
53 /* Connect to text console */
54 if (serial_hds[0]) {
55 if (xencons_init(domid, serial_hds[0]) < 0) {
56 fprintf(stderr, "Could not connect to domain console\n");
57 exit(1);
58 }
59 }
61 /* Prepare PVFB state */
62 xenfb = xenfb_new(domid, ds);
63 if (xenfb == NULL) {
64 fprintf(stderr, "Could not create framebuffer (%s)\n",
65 strerror(errno));
66 exit(1);
67 }
68 }
70 QEMUMachine xenpv_machine = {
71 "xenpv",
72 "Xen Para-virtualized PC",
73 xen_init_pv,
74 };
76 /*
77 * Local variables:
78 * indent-tabs-mode: nil
79 * c-indent-level: 4
80 * c-basic-offset: 4
81 * tab-width: 4
82 * End:
83 */