diff options
author | Wei Yang <richardw.yang@linux.intel.com> | 2019-03-31 19:17:21 -0700 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-06-18 11:43:46 +0200 |
commit | 7d2296bfa52cc9b63063935dd21ca5fa0d790754 (patch) | |
tree | fe56b16dd514ffc03eb23fdb64596d3807d17064 /arch/x86/kvm/lapic.c | |
parent | kvm: x86: add host poll control msrs (diff) | |
download | linux-dev-7d2296bfa52cc9b63063935dd21ca5fa0d790754.tar.xz linux-dev-7d2296bfa52cc9b63063935dd21ca5fa0d790754.zip |
kvm: x86: check kvm_apic_sw_enabled() is enough
On delivering irq to apic, we iterate on vcpu and do the check like
this:
kvm_apic_present(vcpu)
kvm_lapic_enabled(vpu)
kvm_apic_present(vcpu) && kvm_apic_sw_enabled(vcpu->arch.apic)
Since we have already checked kvm_apic_present(), it is reasonable to
replace kvm_lapic_enabled() with kvm_apic_sw_enabled().
Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/lapic.c')
0 files changed, 0 insertions, 0 deletions