summaryrefslogtreecommitdiff
path: root/include/hw
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw')
-rw-r--r--include/hw/boards.h29
-rw-r--r--include/hw/virtio/virtio-net.h4
-rw-r--r--include/hw/xen/xen.h2
3 files changed, 28 insertions, 7 deletions
diff --git a/include/hw/boards.h b/include/hw/boards.h
index dd2c70da36..4345bd04fa 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -3,12 +3,13 @@
#ifndef HW_BOARDS_H
#define HW_BOARDS_H
+#include "qemu/typedefs.h"
#include "sysemu/blockdev.h"
#include "hw/qdev.h"
#include "qom/object.h"
typedef struct QEMUMachineInitArgs {
- const QEMUMachine *machine;
+ const MachineClass *machine;
ram_addr_t ram_size;
const char *boot_order;
const char *kernel_filename;
@@ -46,7 +47,6 @@ struct QEMUMachine {
const char *default_machine_opts;
const char *default_boot_order;
GlobalProperty *compat_props;
- struct QEMUMachine *next;
const char *hw_version;
};
@@ -63,7 +63,6 @@ int qemu_register_machine(QEMUMachine *m);
OBJECT_CLASS_CHECK(MachineClass, (klass), TYPE_MACHINE)
typedef struct MachineState MachineState;
-typedef struct MachineClass MachineClass;
MachineClass *find_default_machine(void);
extern MachineState *current_machine;
@@ -77,7 +76,29 @@ struct MachineClass {
ObjectClass parent_class;
/*< public >*/
- QEMUMachine *qemu_machine;
+ const char *name;
+ const char *alias;
+ const char *desc;
+
+ void (*init)(QEMUMachineInitArgs *args);
+ void (*reset)(void);
+ void (*hot_add_cpu)(const int64_t id, Error **errp);
+ int (*kvm_type)(const char *arg);
+
+ BlockInterfaceType block_default_type;
+ int max_cpus;
+ unsigned int no_serial:1,
+ no_parallel:1,
+ use_virtcon:1,
+ use_sclp:1,
+ no_floppy:1,
+ no_cdrom:1,
+ no_sdcard:1;
+ int is_default;
+ const char *default_machine_opts;
+ const char *default_boot_order;
+ GlobalProperty *compat_props;
+ const char *hw_version;
};
/**
diff --git a/include/hw/virtio/virtio-net.h b/include/hw/virtio/virtio-net.h
index df60f16a3e..4b32440837 100644
--- a/include/hw/virtio/virtio-net.h
+++ b/include/hw/virtio/virtio-net.h
@@ -176,8 +176,8 @@ typedef struct VirtIONet {
uint8_t nobcast;
uint8_t vhost_started;
struct {
- int in_use;
- int first_multi;
+ uint32_t in_use;
+ uint32_t first_multi;
uint8_t multi_overflow;
uint8_t uni_overflow;
uint8_t *macs;
diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
index 9d549fc83d..85fda3dee4 100644
--- a/include/hw/xen/xen.h
+++ b/include/hw/xen/xen.h
@@ -36,7 +36,7 @@ void xen_cmos_set_s3_resume(void *opaque, int irq, int level);
qemu_irq *xen_interrupt_controller_init(void);
-int xen_init(QEMUMachine *machine);
+int xen_init(MachineClass *mc);
int xen_hvm_init(MemoryRegion **ram_memory);
void xenstore_store_pv_console_info(int i, struct CharDriverState *chr);