[PATCH 09 of 17] Make functions in libkvm.c nonstatic

Jerone Young
2007-11-06T16:48:50Z

# Date 1194367651 21600
# Node ID b0f337ae377c7e9050251057a88219d4877c159f
# Parent 739af911ff85420dc4bb367584a1113ca5c82551
Make functions in libkvm.c nonstatic.

This patch makes the following functions nonstatic. These
functions are potentially reusable by other archs, but are
need by arch specific code in libkvm-x86.c.

These functions include:
handle_halt
handle_shutdown
post_kvm_run
pre_kvm_run
handle_io_window
handle_debug

Signed-off-by: Jerone Young <jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>

diff --git a/libkvm/kvm-common.h b/libkvm/kvm-common.h
--- a/libkvm/kvm-common.h
+++ b/libkvm/kvm-common.h
@@ -65,4 +65,12 @@ int kvm_arch_create_default_phys_mem(kvm
unsigned long phys_mem_bytes,
void **vm_mem);

+int handle_halt(kvm_context_t kvm, int vcpu);
+int handle_shutdown(kvm_context_t kvm, int vcpu);
+void post_kvm_run(kvm_context_t kvm, int vcpu);
+int pre_kvm_run(kvm_context_t kvm, int vcpu);
+int handle_io_window(kvm_context_t kvm);
+int handle_debug(kvm_context_t kvm, int vcpu);
+int try_push_interrupts(kvm_context_t kvm);
+
#endif
diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c
--- a/libkvm/libkvm.c
+++ b/libkvm/libkvm.c
@@ -754,7 +754,7 @@ static int handle_io(kvm_context_t kvm,
return 0;
}

-static int handle_debug(kvm_context_t kvm, int vcpu)
+int handle_debug(kvm_context_t kvm, int vcpu)
{
return kvm->callbacks->debug(kvm->opaque, vcpu);
}
@@ -1039,17 +1039,17 @@ static int handle_mmio(kvm_context_t kvm
return r;
}

-static int handle_io_window(kvm_context_t kvm)
+int handle_io_window(kvm_context_t kvm)
{
return kvm->callbacks->io_window(kvm->opaque);
}

-static int handle_halt(kvm_context_t kvm, int vcpu)
+int handle_halt(kvm_context_t kvm, int vcpu)
{
return kvm->callbacks->halt(kvm->opaque, vcpu);
}

-static int handle_shutdown(kvm_context_t kvm, int vcpu)
+int handle_shutdown(kvm_context_t kvm, int vcpu)
{
return kvm->callbacks->shutdown(kvm->opaque, vcpu);
}
@@ -1059,12 +1059,12 @@ int try_push_interrupts(kvm_context_t kv
return kvm->callbacks->try_push_interrupts(kvm->opaque);
}

-static void post_kvm_run(kvm_context_t kvm, int vcpu)
+void post_kvm_run(kvm_context_t kvm, int vcpu)
{
kvm->callbacks->post_kvm_run(kvm->opaque, vcpu);
}

-static int pre_kvm_run(kvm_context_t kvm, int vcpu)
+int pre_kvm_run(kvm_context_t kvm, int vcpu)
{
return kvm->callbacks->pre_kvm_run(kvm->opaque, vcpu);