[PATCH 3/3] use upstream version of kvm_arch_post_run

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Replace ours with qemu.git version. A couple of functions go
unused, and are deleted.

Signed-off-by: Glauber Costa <glommer@xxxxxxxxxx>
---
 qemu-kvm-x86.c    |   22 ----------------------
 qemu-kvm.c        |    5 -----
 qemu-kvm.h        |   11 -----------
 target-i386/kvm.c |    2 ++
 4 files changed, 2 insertions(+), 38 deletions(-)

diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
index b9ffabb..db0b351 100644
--- a/qemu-kvm-x86.c
+++ b/qemu-kvm-x86.c
@@ -515,21 +515,11 @@ void kvm_show_regs(CPUState *env)
 		sregs.efer);
 }
 
-static uint64_t kvm_get_apic_base(CPUState *env)
-{
-	return env->kvm_run->apic_base;
-}
-
 static void kvm_set_cr8(CPUState *env, uint64_t cr8)
 {
 	env->kvm_run->cr8 = cr8;
 }
 
-static __u64 kvm_get_cr8(CPUState *env)
-{
-	return env->kvm_run->cr8;
-}
-
 int kvm_setup_cpuid(CPUState *env, int nent,
 		    struct kvm_cpuid_entry *entries)
 {
@@ -1336,18 +1326,6 @@ int kvm_arch_pre_run(CPUState *env, struct kvm_run *run)
     return 0;
 }
 
-int kvm_arch_post_run(CPUState *env, struct kvm_run *run)
-{
-    cpu_single_env = env;
-
-    env->eflags = kvm_get_interrupt_flag(env)
-	? env->eflags | IF_MASK : env->eflags & ~IF_MASK;
-
-    cpu_set_apic_tpr(env, kvm_get_cr8(env));
-    cpu_set_apic_base(env, kvm_get_apic_base(env));
-    return 0;
-}
-
 int kvm_arch_has_work(CPUState *env)
 {
     if (((env->interrupt_request & CPU_INTERRUPT_HARD) &&
diff --git a/qemu-kvm.c b/qemu-kvm.c
index a883a48..57d8b1a 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -863,11 +863,6 @@ int pre_kvm_run(kvm_context_t kvm, CPUState *env)
     return 0;
 }
 
-int kvm_get_interrupt_flag(CPUState *env)
-{
-    return env->kvm_run->if_flag;
-}
-
 int kvm_is_ready_for_interrupt_injection(CPUState *env)
 {
     return env->kvm_run->ready_for_interrupt_injection;
diff --git a/qemu-kvm.h b/qemu-kvm.h
index b84fed1..57c8c86 100644
--- a/qemu-kvm.h
+++ b/qemu-kvm.h
@@ -190,17 +190,6 @@ void kvm_create_irqchip(kvm_context_t kvm);
 int kvm_run(CPUState *env);
 
 /*!
- * \brief Get interrupt flag from on last exit to userspace
- *
- * This gets the CPU interrupt flag 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 interrupt flag value (0 or 1)
- */
-int kvm_get_interrupt_flag(CPUState *env);
-
-/*!
  * \brief Check if a vcpu is ready for interrupt injection
  *
  * This checks if vcpu interrupts are not masked by mov ss or sti.
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 1cf0dc3..24c9903 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -748,6 +748,7 @@ int kvm_arch_pre_run(CPUState *env, struct kvm_run *run)
 
     return 0;
 }
+#endif
 
 int kvm_arch_post_run(CPUState *env, struct kvm_run *run)
 {
@@ -762,6 +763,7 @@ int kvm_arch_post_run(CPUState *env, struct kvm_run *run)
     return 0;
 }
 
+#ifdef KVM_UPSTREAM
 static int kvm_handle_halt(CPUState *env)
 {
     if (!((env->interrupt_request & CPU_INTERRUPT_HARD) &&
-- 
1.6.2.5

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux