diff options
author | Gleb Natapov <gleb@redhat.com> | 2009-04-21 10:45:07 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-06-10 04:48:48 -0400 |
commit | c4282df98ae0993983924c00ed76428a6609d68b (patch) | |
tree | 8f09653f40a996fd0f5070d8e060aa6129eec096 /arch/x86/kvm/svm.c | |
parent | 0a5fff192388d2a74aa9ab5e0d394b745df9f225 (diff) |
KVM: Get rid of arch.interrupt_window_open & arch.nmi_window_open
They are recalculated before each use anyway.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm.c')
-rw-r--r-- | arch/x86/kvm/svm.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index e283a63b2bca..0f53439296b9 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -216,8 +216,6 @@ static void skip_emulated_instruction(struct kvm_vcpu *vcpu) | |||
216 | 216 | ||
217 | kvm_rip_write(vcpu, svm->next_rip); | 217 | kvm_rip_write(vcpu, svm->next_rip); |
218 | svm->vmcb->control.int_state &= ~SVM_INTERRUPT_SHADOW_MASK; | 218 | svm->vmcb->control.int_state &= ~SVM_INTERRUPT_SHADOW_MASK; |
219 | |||
220 | vcpu->arch.interrupt_window_open = (svm->vcpu.arch.hflags & HF_GIF_MASK); | ||
221 | } | 219 | } |
222 | 220 | ||
223 | static int has_svm(void) | 221 | static int has_svm(void) |
@@ -2305,7 +2303,7 @@ static void svm_intr_inject(struct kvm_vcpu *vcpu) | |||
2305 | 2303 | ||
2306 | /* try to inject new event if pending */ | 2304 | /* try to inject new event if pending */ |
2307 | if (kvm_cpu_has_interrupt(vcpu)) { | 2305 | if (kvm_cpu_has_interrupt(vcpu)) { |
2308 | if (vcpu->arch.interrupt_window_open) { | 2306 | if (svm_interrupt_allowed(vcpu)) { |
2309 | kvm_queue_interrupt(vcpu, kvm_cpu_get_interrupt(vcpu)); | 2307 | kvm_queue_interrupt(vcpu, kvm_cpu_get_interrupt(vcpu)); |
2310 | svm_queue_irq(to_svm(vcpu), vcpu->arch.interrupt.nr); | 2308 | svm_queue_irq(to_svm(vcpu), vcpu->arch.interrupt.nr); |
2311 | } | 2309 | } |
@@ -2321,8 +2319,6 @@ static void svm_intr_assist(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
2321 | if (nested_svm_intr(svm)) | 2319 | if (nested_svm_intr(svm)) |
2322 | goto out; | 2320 | goto out; |
2323 | 2321 | ||
2324 | svm->vcpu.arch.interrupt_window_open = svm_interrupt_allowed(vcpu); | ||
2325 | |||
2326 | svm_intr_inject(vcpu); | 2322 | svm_intr_inject(vcpu); |
2327 | 2323 | ||
2328 | if (kvm_cpu_has_interrupt(vcpu) || req_int_win) | 2324 | if (kvm_cpu_has_interrupt(vcpu) || req_int_win) |