KVM: VMX: Move Posted Interrupt ndst computation out of write loop
authorSean Christopherson <seanjc@google.com>
Sat, 9 Oct 2021 02:12:20 +0000 (19:12 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Dec 2021 09:24:57 +0000 (04:24 -0500)
commit724b3962ef808388005b860450bfbef6bade26b3
tree2df60d35620ee8b6100b3e3dce2b7dbac10601e0
parentcfb0e1306a3790eb055ebf7cdb7b0ee8a23e9b6e
KVM: VMX: Move Posted Interrupt ndst computation out of write loop

Hoist the CPU => APIC ID conversion for the Posted Interrupt descriptor
out of the loop to write the descriptor, preemption is disabled so the
CPU won't change, and if the APIC ID changes KVM has bigger problems.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20211009021236.4122790-28-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/posted_intr.c