Skip to content

Commit

Permalink
[PATCH] KVM: Simplify test for interrupt window
Browse files Browse the repository at this point in the history
No need to test for rflags.if as both VT and SVM specs assure us that on exit
caused from interrupt window opening, 'if' is set.

Signed-off-by: Dor Laor <dor.laor@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Dor Laor authored and Linus Torvalds committed Jan 6, 2007
1 parent 68a99f6 commit 022a930
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions drivers/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1206,8 +1206,7 @@ static int interrupt_window_interception(struct kvm_vcpu *vcpu,
* possible
*/
if (kvm_run->request_interrupt_window &&
!vcpu->irq_summary &&
(vcpu->svm->vmcb->save.rflags & X86_EFLAGS_IF)) {
!vcpu->irq_summary) {
++kvm_stat.irq_window_exits;
kvm_run->exit_reason = KVM_EXIT_IRQ_WINDOW_OPEN;
return 0;
Expand Down
3 changes: 1 addition & 2 deletions drivers/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1604,8 +1604,7 @@ static int handle_interrupt_window(struct kvm_vcpu *vcpu,
* possible
*/
if (kvm_run->request_interrupt_window &&
!vcpu->irq_summary &&
(vmcs_readl(GUEST_RFLAGS) & X86_EFLAGS_IF)) {
!vcpu->irq_summary) {
kvm_run->exit_reason = KVM_EXIT_IRQ_WINDOW_OPEN;
++kvm_stat.irq_window_exits;
return 0;
Expand Down

0 comments on commit 022a930

Please sign in to comment.