• Andrew Jones's avatar
    KVM: arm/arm64: use vcpu requests for irq injection · 325f9c64
    Andrew Jones authored
    Don't use request-less VCPU kicks when injecting IRQs, as a VCPU
    kick meant to trigger the interrupt injection could be sent while
    the VCPU is outside guest mode, which means no IPI is sent, and
    after it has called kvm_vgic_flush_hwstate(), meaning it won't see
    the updated GIC state until its next exit some time later for some
    other reason.  The receiving VCPU only needs to check this request
    in VCPU RUN to handle it.  By checking it, if it's pending, a
    memory barrier will be issued that ensures all state is visible.
    See "Ensuring Requests Are Seen" of
    Documentation/virtual/kvm/vcpu-requests.rst
    Signed-off-by: default avatarAndrew Jones <drjones@redhat.com>
    Reviewed-by: default avatarChristoffer Dall <cdall@linaro.org>
    Signed-off-by: default avatarChristoffer Dall <cdall@linaro.org>
    325f9c64
kvm_host.h 9.11 KB