[PATCH 11 of 19] Make functions in libkvm.c nonstatic

Jerone Young
2007-11-02T18:25:00Z

# Date 1194027873 18000
# Node ID 01b86b564fb9e751295ff8eddf5f38cfb24e1e34
# Parent 8dad7519cc92eabd7d66ea3ea20c983dade61243
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
@@ -38,4 +38,13 @@ void *kvm_create_userspace_phys_mem(kvm_
void *kvm_create_userspace_phys_mem(kvm_context_t kvm, unsigned long phys_start,
unsigned long len, int log, int writable);
#endif
+
+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
@@ -657,7 +657,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);
}
@@ -942,17 +942,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);
}
@@ -962,12 +962,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);
}