KVM: Split QEMUMachine typedef into separate header
[qemu.git] / include / hw / boards.h
1 /* Declarations for use by board files for creating devices. */
2
3 #ifndef HW_BOARDS_H
4 #define HW_BOARDS_H
5
6 #include "sysemu/blockdev.h"
7 #include "sysemu/qemumachine.h"
8 #include "hw/qdev.h"
9
10 typedef struct QEMUMachineInitArgs {
11 const QEMUMachine *machine;
12 ram_addr_t ram_size;
13 const char *boot_order;
14 const char *kernel_filename;
15 const char *kernel_cmdline;
16 const char *initrd_filename;
17 const char *cpu_model;
18 } QEMUMachineInitArgs;
19
20 typedef void QEMUMachineInitFunc(QEMUMachineInitArgs *args);
21
22 typedef void QEMUMachineResetFunc(void);
23
24 typedef void QEMUMachineHotAddCPUFunc(const int64_t id, Error **errp);
25
26 struct QEMUMachine {
27 const char *name;
28 const char *alias;
29 const char *desc;
30 QEMUMachineInitFunc *init;
31 QEMUMachineResetFunc *reset;
32 QEMUMachineHotAddCPUFunc *hot_add_cpu;
33 BlockInterfaceType block_default_type;
34 int max_cpus;
35 unsigned int no_serial:1,
36 no_parallel:1,
37 use_virtcon:1,
38 use_sclp:1,
39 no_floppy:1,
40 no_cdrom:1,
41 no_sdcard:1;
42 int is_default;
43 const char *default_machine_opts;
44 const char *default_boot_order;
45 GlobalProperty *compat_props;
46 struct QEMUMachine *next;
47 const char *hw_version;
48 };
49
50 int qemu_register_machine(QEMUMachine *m);
51 QEMUMachine *find_default_machine(void);
52
53 extern QEMUMachine *current_machine;
54
55 #endif