aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/kvm_host.h
diff options
context:
space:
mode:
authorAndrew Jones <drjones@redhat.com>2017-06-04 14:43:59 +0200
committerChristoffer Dall <cdall@linaro.org>2017-06-04 16:53:56 +0200
commit325f9c649c8a4e447e4d3babacc7a60b75012d5d (patch)
tree193beeeb76fd967f942f97e02c358af571c3144b /arch/arm/include/asm/kvm_host.h
parentKVM: arm/arm64: change exit request to sleep request (diff)
downloadlinux-dev-325f9c649c8a4e447e4d3babacc7a60b75012d5d.tar.xz
linux-dev-325f9c649c8a4e447e4d3babacc7a60b75012d5d.zip
KVM: arm/arm64: use vcpu requests for irq injection
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: Andrew Jones <drjones@redhat.com> Reviewed-by: Christoffer Dall <cdall@linaro.org> Signed-off-by: Christoffer Dall <cdall@linaro.org>
Diffstat (limited to 'arch/arm/include/asm/kvm_host.h')
-rw-r--r--arch/arm/include/asm/kvm_host.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h
index fdd644c01c89..00ad56ee6455 100644
--- a/arch/arm/include/asm/kvm_host.h
+++ b/arch/arm/include/asm/kvm_host.h
@@ -46,6 +46,7 @@
#define KVM_REQ_SLEEP \
KVM_ARCH_REQ_FLAGS(0, KVM_REQUEST_WAIT | KVM_REQUEST_NO_WAKEUP)
+#define KVM_REQ_IRQ_PENDING KVM_ARCH_REQ(1)
u32 *kvm_vcpu_reg(struct kvm_vcpu *vcpu, u8 reg_num, u32 mode);
int __attribute_const__ kvm_target_cpu(void);