summaryrefslogtreecommitdiffstats
path: root/virt/lib/irqbypass.c
diff options
context:
space:
mode:
authorChristoffer Dall <christoffer.dall@linaro.org>2017-11-25 20:25:00 +0100
committerMarc Zyngier <marc.zyngier@arm.com>2018-03-19 10:53:09 +0000
commit7a364bd5db1cfba50f3bde115db0dadc31b0169b (patch)
treeb2c92bb1338fc3a43dadaafb360a16224ff018b3 /virt/lib/irqbypass.c
parent250be9d61cf8898b1eea140fa31fe7713c49e989 (diff)
downloadtalos-obmc-linux-7a364bd5db1cfba50f3bde115db0dadc31b0169b.tar.gz
talos-obmc-linux-7a364bd5db1cfba50f3bde115db0dadc31b0169b.zip
KVM: arm/arm64: Avoid vcpu_load for other vcpu ioctls than KVM_RUN
Calling vcpu_load() registers preempt notifiers for this vcpu and calls kvm_arch_vcpu_load(). The latter will soon be doing a lot of heavy lifting on arm/arm64 and will try to do things such as enabling the virtual timer and setting us up to handle interrupts from the timer hardware. Loading state onto hardware registers and enabling hardware to signal interrupts can be problematic when we're not actually about to run the VCPU, because it makes it difficult to establish the right context when handling interrupts from the timer, and it makes the register access code difficult to reason about. Luckily, now when we call vcpu_load in each ioctl implementation, we can simply remove the call from the non-KVM_RUN vcpu ioctls, and our kvm_arch_vcpu_load() is only used for loading vcpu content to the physical CPU when we're actually going to run the vcpu. Reviewed-by: Julien Grall <julien.grall@arm.com> Reviewed-by: Marc Zyngier <marc.zyngier@arm.com> Reviewed-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'virt/lib/irqbypass.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud