[PATCH 14 of 17] Move kvm_get_apic to libkvm-x86.c

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

# Date 1194367655 21600
# Node ID 7ef9d60771ef7e6d32919ace92d078a482b9d589
# Parent 3c691b26a79c2e589e20d5c8245a7c30ec456976
Move kvm_get_apic to libkvm-x86.c

Moves apic function since it is x86 only.

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

diff --git a/libkvm/libkvm-x86.c b/libkvm/libkvm-x86.c
--- a/libkvm/libkvm-x86.c
+++ b/libkvm/libkvm-x86.c
@@ -703,4 +703,12 @@ void kvm_show_regs(kvm_context_t kvm, in
sregs.efer);
}

-
+uint64_t kvm_get_apic_base(kvm_context_t kvm, int vcpu)
+{
+ struct kvm_run *run = kvm->run[vcpu];
+
+ if (kvm_abi == 10)
+ return ((struct kvm_run_abi10 *)run)->apic_base;
+ return run->apic_base;
+}
+
diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c
--- a/libkvm/libkvm.c
+++ b/libkvm/libkvm.c
@@ -815,15 +815,6 @@ int kvm_get_interrupt_flag(kvm_context_t
return run->if_flag;
}

-uint64_t kvm_get_apic_base(kvm_context_t kvm, int vcpu)
-{
- struct kvm_run *run = kvm->run[vcpu];
-
- if (kvm_abi == 10)
- return ((struct kvm_run_abi10 *)run)->apic_base;
- return run->apic_base;
-}
-
int kvm_is_ready_for_interrupt_injection(kvm_context_t kvm, int vcpu)
{
struct kvm_run *run = kvm->run[vcpu];