diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2013-12-23 21:10:40 +0530 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2014-03-05 03:06:24 +0100 |
commit | 135a129a1cd047cc913e88c795eda859a0ebb81f (patch) | |
tree | 989f0f2ab90da6d61caffa3af5ab22152c6a8e25 /include | |
parent | 9c06a1f79f959fffd09bfb7efc3d76051a6cd2da (diff) | |
download | qemu-135a129a1cd047cc913e88c795eda859a0ebb81f.zip qemu-135a129a1cd047cc913e88c795eda859a0ebb81f.tar.gz qemu-135a129a1cd047cc913e88c795eda859a0ebb81f.tar.bz2 |
kvm: Add a new machine option kvm-type
Targets like ppc64 support different types of KVM, one which use
hypervisor mode and the other which doesn't. Add a new machine
option kvm-type that helps in selecting the respective ones
We also add a new QEMUMachine callback get_vm_type that helps
in mapping the string representation of kvm type specified.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
[agraf: spelling fixes, use error_report(), use qemumachine.h]
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/boards.h | 3 | ||||
-rw-r--r-- | include/hw/xen/xen.h | 2 | ||||
-rw-r--r-- | include/sysemu/kvm.h | 2 | ||||
-rw-r--r-- | include/sysemu/qtest.h | 2 |
4 files changed, 6 insertions, 3 deletions
diff --git a/include/hw/boards.h b/include/hw/boards.h index ed6d9f8..c2096e6 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -23,6 +23,8 @@ typedef void QEMUMachineResetFunc(void); typedef void QEMUMachineHotAddCPUFunc(const int64_t id, Error **errp); +typedef int QEMUMachineGetKvmtypeFunc(const char *arg); + struct QEMUMachine { const char *name; const char *alias; @@ -30,6 +32,7 @@ struct QEMUMachine { QEMUMachineInitFunc *init; QEMUMachineResetFunc *reset; QEMUMachineHotAddCPUFunc *hot_add_cpu; + QEMUMachineGetKvmtypeFunc *kvm_type; BlockInterfaceType block_default_type; int max_cpus; unsigned int no_serial:1, diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h index 81e5bb1..e181821 100644 --- a/include/hw/xen/xen.h +++ b/include/hw/xen/xen.h @@ -37,7 +37,7 @@ void xen_cmos_set_s3_resume(void *opaque, int irq, int level); qemu_irq *xen_interrupt_controller_init(void); -int xen_init(void); +int xen_init(QEMUMachine *machine); int xen_hvm_init(MemoryRegion **ram_memory); void xenstore_store_pv_console_info(int i, struct CharDriverState *chr); diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index c982570..ed01998 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -153,7 +153,7 @@ extern KVMState *kvm_state; /* external API */ -int kvm_init(void); +int kvm_init(QEMUMachine *machine); int kvm_has_sync_mmu(void); int kvm_has_vcpu_events(void); diff --git a/include/sysemu/qtest.h b/include/sysemu/qtest.h index d6434cd..e62281d 100644 --- a/include/sysemu/qtest.h +++ b/include/sysemu/qtest.h @@ -27,7 +27,7 @@ static inline bool qtest_enabled(void) bool qtest_driver(void); -int qtest_init_accel(void); +int qtest_init_accel(QEMUMachine *machine); void qtest_init(const char *qtest_chrdev, const char *qtest_log, Error **errp); static inline int qtest_available(void) |