]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - arch/x86/kvm/x86.c
KVM: x86: return all bits from get_interrupt_shadow
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 20 May 2014 12:29:47 +0000 (14:29 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 11 Jul 2014 07:13:56 +0000 (09:13 +0200)
commit37ccdcbe0757196ec98c0dcf9754bec8423807a5
tree65f2e77a9d060b89ae83e5a1cd73a3f116ec9ce5
parent98eb2f8b145cee711984d42eff5d6f19b6b1df69
KVM: x86: return all bits from get_interrupt_shadow

For the next patch we will need to know the full state of the
interrupt shadow; we will then set KVM_REQ_EVENT when one bit
is cleared.

However, right now get_interrupt_shadow only returns the one
corresponding to the emulated instruction, or an unconditional
0 if the emulated instruction does not have an interrupt shadow.
This is confusing and does not allow us to check for cleared
bits as mentioned above.

Clean the callback up, and modify toggle_interruptibility to
match the comment above the call.  As a small result, the
call to set_interrupt_shadow will be skipped in the common
case where int_shadow == 0 && mask == 0.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm.c
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c