From dc0ca80eb1ea43fb0e65f7607c0c400feb30eeda Mon Sep 17 00:00:00 2001 From: Eric Auger Date: Mon, 4 Mar 2019 11:13:33 +0100 Subject: hw/boards: Add a MachineState parameter to kvm_type callback On ARM, the kvm_type will be resolved by querying the KVMState. Let's add the MachineState handle to the callback so that we can retrieve the KVMState handle. in kvm_init, when the callback is called, the kvm_state variable is not yet set. Signed-off-by: Eric Auger Acked-by: David Gibson Reviewed-by: Peter Maydell Reviewed-by: Igor Mammedov Message-id: 20190304101339.25970-5-eric.auger@redhat.com [ppc parts] Reviewed-by: Peter Maydell Reviewed-by: Igor Mammedov Signed-off-by: Peter Maydell --- hw/ppc/mac_newworld.c | 3 +-- hw/ppc/mac_oldworld.c | 2 +- hw/ppc/spapr.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) (limited to 'hw/ppc') diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index 9846105..97e8817 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -564,8 +564,7 @@ static char *core99_fw_dev_path(FWPathProvider *p, BusState *bus, return NULL; } - -static int core99_kvm_type(const char *arg) +static int core99_kvm_type(MachineState *machine, const char *arg) { /* Always force PR KVM */ return 2; diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c index 284431d..cc1e463 100644 --- a/hw/ppc/mac_oldworld.c +++ b/hw/ppc/mac_oldworld.c @@ -420,7 +420,7 @@ static char *heathrow_fw_dev_path(FWPathProvider *p, BusState *bus, return NULL; } -static int heathrow_kvm_type(const char *arg) +static int heathrow_kvm_type(MachineState *machine, const char *arg) { /* Always force PR KVM */ return 2; diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index b6a571b..d7850ad 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3023,7 +3023,7 @@ static void spapr_machine_init(MachineState *machine) } } -static int spapr_kvm_type(const char *vm_type) +static int spapr_kvm_type(MachineState *machine, const char *vm_type) { if (!vm_type) { return 0; -- cgit v1.1