From 73aaec4a39b3cf11082303a6cf6bcde8796c09c6 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Fri, 21 Jan 2011 21:48:06 +0100 Subject: kvm: Stop on all fatal exit reasons Ensure that we stop the guest whenever we face a fatal or unknown exit reason. If we stop, we also have to enforce a cpu loop exit. Signed-off-by: Jan Kiszka Signed-off-by: Marcelo Tosatti --- target-ppc/kvm.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'target-ppc') diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index 5caa07c..849b404 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -307,6 +307,10 @@ int kvm_arch_handle_exit(CPUState *env, struct kvm_run *run) dprintf("handle halt\n"); ret = kvmppc_handle_halt(env); break; + default: + fprintf(stderr, "KVM: unknown exit reason %d\n", run->exit_reason); + ret = -1; + break; } return ret; -- cgit v1.1 From cad1e2827b616487e3574300f2eaeea13a355197 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Fri, 21 Jan 2011 21:48:16 +0100 Subject: kvm: Drop smp_cpus argument from init functions No longer used. Signed-off-by: Jan Kiszka Signed-off-by: Marcelo Tosatti --- target-ppc/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target-ppc') diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index 849b404..3c05630 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -56,7 +56,7 @@ static void kvm_kick_env(void *env) qemu_cpu_kick(env); } -int kvm_arch_init(KVMState *s, int smp_cpus) +int kvm_arch_init(KVMState *s) { #ifdef KVM_CAP_PPC_UNSET_IRQ cap_interrupt_unset = kvm_check_extension(s, KVM_CAP_PPC_UNSET_IRQ); -- cgit v1.1 From 94a8d39afd8ccfdbf578af04c3385fdb5f545af1 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Fri, 21 Jan 2011 21:48:17 +0100 Subject: kvm: Consolidate must-have capability checks Instead of splattering the code with #ifdefs and runtime checks for capabilities we cannot work without anyway, provide central test infrastructure for verifying their availability both at build and runtime. Signed-off-by: Jan Kiszka Signed-off-by: Marcelo Tosatti --- target-ppc/kvm.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'target-ppc') diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index 3c05630..710eca1 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -37,6 +37,10 @@ do { } while (0) #endif +const KVMCapabilityInfo kvm_arch_required_capabilities[] = { + KVM_CAP_LAST_INFO +}; + static int cap_interrupt_unset = false; static int cap_interrupt_level = false; -- cgit v1.1