aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlauber Costa <gcosta@redhat.com>2008-06-05 23:36:27 -0300
committerAvi Kivity <avi@qumranet.com>2008-06-12 15:55:11 +0300
commit5f1f6e840baafa06e0405f2c1d18da3a73709931 (patch)
treeef9c57d2e1ab3c150c7ec1ba07f1c8035dc5bbc3
parentkvm: kvmtrace: kvmtrace_format for supporting big_endian (diff)
downloadqemu-kvm-5f1f6e840baafa06e0405f2c1d18da3a73709931.tar.gz
qemu-kvm-5f1f6e840baafa06e0405f2c1d18da3a73709931.tar.bz2
qemu-kvm-5f1f6e840baafa06e0405f2c1d18da3a73709931.zip
Remove env->ready_for_interrupt_injection
There's no need to polute the already poluted CPUState with "ready_for_interrupt_injection". We can compute it in the few times we use it, and be fine. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r--qemu-kvm-powerpc.c4
-rw-r--r--qemu-kvm-x86.c4
-rw-r--r--qemu-kvm.c1
-rw-r--r--target-i386/cpu.h1
-rw-r--r--target-ia64/cpu.h2
-rw-r--r--target-ia64/op_helper.c1
-rw-r--r--target-ppc/cpu.h2
7 files changed, 2 insertions, 13 deletions
diff --git a/qemu-kvm-powerpc.c b/qemu-kvm-powerpc.c
index 024b18c94..553c27fd0 100644
--- a/qemu-kvm-powerpc.c
+++ b/qemu-kvm-powerpc.c
@@ -150,8 +150,6 @@ void kvm_arch_post_kvm_run(void *opaque, int vcpu)
{
CPUState *env = qemu_kvm_cpu_env(vcpu);
cpu_single_env = env;
- env->ready_for_interrupt_injection = \
- kvm_is_ready_for_interrupt_injection(kvm_context, vcpu);
}
int kvm_arch_has_work(CPUState *env)
@@ -170,7 +168,7 @@ int kvm_arch_try_push_interrupts(void *opaque)
/* PowerPC Qemu tracks the various core input pins (interrupt, critical
* interrupt, reset, etc) in PPC-specific env->irq_input_state. */
- if (env->ready_for_interrupt_injection &&
+ if (kvm_is_ready_for_interrupt_injection(kvm_context, env->cpu_index) &&
(env->irq_input_state & (1<<PPC40x_INPUT_INT)))
{
/* For now KVM disregards the 'irq' argument. However, in the
diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
index 5e43a448b..5daedd1e3 100644
--- a/qemu-kvm-x86.c
+++ b/qemu-kvm-x86.c
@@ -620,8 +620,6 @@ void kvm_arch_post_kvm_run(void *opaque, int vcpu)
env->eflags = kvm_get_interrupt_flag(kvm_context, vcpu)
? env->eflags | IF_MASK : env->eflags & ~IF_MASK;
- env->ready_for_interrupt_injection
- = kvm_is_ready_for_interrupt_injection(kvm_context, vcpu);
cpu_set_apic_tpr(env, kvm_get_cr8(kvm_context, vcpu));
cpu_set_apic_base(env, kvm_get_apic_base(kvm_context, vcpu));
@@ -640,7 +638,7 @@ int kvm_arch_try_push_interrupts(void *opaque)
CPUState *env = cpu_single_env;
int r, irq;
- if (env->ready_for_interrupt_injection &&
+ if (kvm_is_ready_for_interrupt_injection(kvm_context, env->cpu_index) &&
(env->interrupt_request & CPU_INTERRUPT_HARD) &&
(env->eflags & IF_MASK)) {
env->interrupt_request &= ~CPU_INTERRUPT_HARD;
diff --git a/qemu-kvm.c b/qemu-kvm.c
index 119303e9c..553875be7 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -387,7 +387,6 @@ static int kvm_main_loop_cpu(CPUState *env)
env->halted = 0;
kvm_qemu_init_env(env);
- env->ready_for_interrupt_injection = 1;
#ifdef TARGET_I386
kvm_tpr_vcpu_start(env);
#endif
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index 8efc2f408..0cfe730b2 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -566,7 +566,6 @@ typedef struct CPUX86State {
#endif
uint64_t tsc; /* time stamp counter */
- uint8_t ready_for_interrupt_injection;
uint64_t pat;
/* exception/interrupt handling */
diff --git a/target-ia64/cpu.h b/target-ia64/cpu.h
index 97358eec9..f8e5e8aaf 100644
--- a/target-ia64/cpu.h
+++ b/target-ia64/cpu.h
@@ -51,8 +51,6 @@ typedef struct CPUIA64State {
int user_mode_only;
uint32_t hflags;
- uint8_t ready_for_interrupt_injection;
-
} CPUIA64State;
#define CPUState CPUIA64State
diff --git a/target-ia64/op_helper.c b/target-ia64/op_helper.c
index 4969ef75b..f582023f4 100644
--- a/target-ia64/op_helper.c
+++ b/target-ia64/op_helper.c
@@ -36,7 +36,6 @@ CPUState *cpu_ia64_init(char *cpu_model){
cpu_reset(env);
if (kvm_enabled()) {
kvm_qemu_init_env(env);
- env->ready_for_interrupt_injection = 1;
kvm_init_new_ap(env->cpu_index, env);
}
return env;
diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
index 029d1f3d1..6d9873822 100644
--- a/target-ppc/cpu.h
+++ b/target-ppc/cpu.h
@@ -574,8 +574,6 @@ struct CPUPPCState {
/* temporary general purpose registers */
ppc_gpr_t tgpr[4]; /* Used to speed-up TLB assist handlers */
- uint8_t ready_for_interrupt_injection;
-
/* Floating point execution context */
/* temporary float registers */
float64 ft0;