@@ -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) &&
@@ -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;
@@ -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.
@@ -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) &&