kvm: add machine state to kvm_arch_init
authorMarcel Apfelbaum <marcel@redhat.com>
Wed, 4 Feb 2015 15:43:51 +0000 (17:43 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 11 Mar 2015 17:16:17 +0000 (18:16 +0100)
Needed to query machine's properties.

Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
include/sysemu/kvm.h
kvm-all.c
target-arm/kvm.c
target-i386/kvm.c
target-mips/kvm.c
target-ppc/kvm.c
target-s390x/kvm.c

index 30cb84d2b815389a1cbef71bc500d6b531d7fa9a..3792463080806ccc899a31f2a45d583dc8adc21e 100644 (file)
@@ -259,7 +259,7 @@ int kvm_arch_get_registers(CPUState *cpu);
 
 int kvm_arch_put_registers(CPUState *cpu, int level);
 
-int kvm_arch_init(KVMState *s);
+int kvm_arch_init(MachineState *ms, KVMState *s);
 
 int kvm_arch_init_vcpu(CPUState *cpu);
 
index 729f3345acebb9a1501f4396db0ed49353197b16..cbedc2564eaf49a853d2f9d46cab1cbba053f4ff 100644 (file)
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1598,7 +1598,7 @@ static int kvm_init(MachineState *ms)
     kvm_resamplefds_allowed =
         (kvm_check_extension(s, KVM_CAP_IRQFD_RESAMPLE) > 0);
 
-    ret = kvm_arch_init(s);
+    ret = kvm_arch_init(ms, s);
     if (ret < 0) {
         goto err;
     }
index 23cefe98b46dd0b73bccb965efa92c814836a8f6..72c1fa1e641c396634d1f77e4fa6bdd5e147a252 100644 (file)
@@ -150,7 +150,7 @@ static const TypeInfo host_arm_cpu_type_info = {
     .class_size = sizeof(ARMHostCPUClass),
 };
 
-int kvm_arch_init(KVMState *s)
+int kvm_arch_init(MachineState *ms, KVMState *s)
 {
     /* For ARM interrupt delivery is always asynchronous,
      * whether we are using an in-kernel VGIC or not.
index 40d6a14c854d6966269d3636a95f8f4e154fd278..ce554e4665a3c966c0fdb0ebda97186de7ada062 100644 (file)
@@ -840,7 +840,7 @@ static int kvm_get_supported_msrs(KVMState *s)
     return ret;
 }
 
-int kvm_arch_init(KVMState *s)
+int kvm_arch_init(MachineState *ms, KVMState *s)
 {
     uint64_t identity_base = 0xfffbc000;
     uint64_t shadow_mem;
index b68191c88e8709cbf9a3308b2a78f411bb7a720c..4d1f7ead8142edc22f3c33fa706f9880f2df0a26 100644 (file)
@@ -40,7 +40,7 @@ unsigned long kvm_arch_vcpu_id(CPUState *cs)
     return cs->cpu_index;
 }
 
-int kvm_arch_init(KVMState *s)
+int kvm_arch_init(MachineState *ms, KVMState *s)
 {
     /* MIPS has 128 signals */
     kvm_set_sigmask_len(s, 16);
index 1edf2b5aeb77b36321c79dd7348c7873eeb1eada..12328a40270ea86d28a52151a24eb26645bb6a76 100644 (file)
@@ -95,7 +95,7 @@ static void kvm_kick_cpu(void *opaque)
 
 static int kvm_ppc_register_host_cpu_type(void);
 
-int kvm_arch_init(KVMState *s)
+int kvm_arch_init(MachineState *ms, KVMState *s)
 {
     cap_interrupt_unset = kvm_check_extension(s, KVM_CAP_PPC_UNSET_IRQ);
     cap_interrupt_level = kvm_check_extension(s, KVM_CAP_PPC_IRQ_LEVEL);
index 508cc0a0828af4ed7867fb8d5b473582897a1988..b1369d584febed4846034bdf29493b099e239198 100644 (file)
@@ -173,7 +173,7 @@ static void kvm_s390_enable_cmma(KVMState *s)
     trace_kvm_enable_cmma(rc);
 }
 
-int kvm_arch_init(KVMState *s)
+int kvm_arch_init(MachineState *ms, KVMState *s)
 {
     cap_sync_regs = kvm_check_extension(s, KVM_CAP_SYNC_REGS);
     cap_async_pf = kvm_check_extension(s, KVM_CAP_ASYNC_PF);