# HG changeset patch
# User Jerone Young <[EMAIL PROTECTED]>
# Date 1193849564 18000
# Node ID 1e5d53747cb7e5b3ec8a35e36d7d4c9f35cb7c6b
# Parent  fe1300ca9f861d5cf635d147485c8ef333bbac5a
Move kvm_get_apic to kvmctl-x86.c

Moves apic function since it is x86 only.

Signed-off-by: Jerone Young <[EMAIL PROTECTED]>

diff --git a/libkvm/libkvm-x86.c b/libkvm/libkvm-x86.c
--- a/libkvm/libkvm-x86.c
+++ b/libkvm/libkvm-x86.c
@@ -712,4 +712,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-x86.h b/libkvm/libkvm-x86.h
--- a/libkvm/libkvm-x86.h
+++ b/libkvm/libkvm-x86.h
@@ -76,4 +76,16 @@ int kvm_set_msrs(kvm_context_t, int vcpu
  */
 void kvm_show_regs(kvm_context_t kvm, int vcpu);
 
+/*!
+ * \brief Get the value of the APIC_BASE msr as of last exit to userspace
+ *
+ * This gets the APIC_BASE msr as it was on the last exit to userspace.
+ *
+ * \param kvm Pointer to the current kvm_context
+ * \param vcpu Which virtual CPU should get dumped
+ * \return APIC_BASE msr contents
+ */
+uint64_t kvm_get_apic_base(kvm_context_t kvm, int vcpu);
+
+
 #endif
diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c
--- a/libkvm/libkvm.c
+++ b/libkvm/libkvm.c
@@ -750,15 +750,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];
diff --git a/libkvm/libkvm.h b/libkvm/libkvm.h
--- a/libkvm/libkvm.h
+++ b/libkvm/libkvm.h
@@ -233,17 +233,6 @@ int kvm_get_interrupt_flag(kvm_context_t
 int kvm_get_interrupt_flag(kvm_context_t kvm, int vcpu);
 
 /*!
- * \brief Get the value of the APIC_BASE msr as of last exit to userspace
- *
- * This gets the APIC_BASE msr as it was on the last exit to userspace.
- *
- * \param kvm Pointer to the current kvm_context
- * \param vcpu Which virtual CPU should get dumped
- * \return APIC_BASE msr contents
- */
-uint64_t kvm_get_apic_base(kvm_context_t kvm, int vcpu);
-
-/*!
  * \brief Check if a vcpu is ready for interrupt injection
  *
  * This checks if vcpu interrupts are not masked by mov ss or sti.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to