summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/hyperv.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 03:21:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 03:21:30 +0000
commita72bbcd13c515079b13dfcc3f57e933f28235f48 (patch)
treefd02a5f7642fbfb3141c285aa63a8f397fe41d76 /arch/x86/kvm/hyperv.c
parentAdding upstream version 4.19.249. (diff)
downloadlinux-a72bbcd13c515079b13dfcc3f57e933f28235f48.tar.xz
linux-a72bbcd13c515079b13dfcc3f57e933f28235f48.zip
Adding upstream version 4.19.260.upstream/4.19.260
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'arch/x86/kvm/hyperv.c')
-rw-r--r--arch/x86/kvm/hyperv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
index ca5a6c3f8..2047edb5f 100644
--- a/arch/x86/kvm/hyperv.c
+++ b/arch/x86/kvm/hyperv.c
@@ -341,6 +341,9 @@ static int synic_set_irq(struct kvm_vcpu_hv_synic *synic, u32 sint)
struct kvm_lapic_irq irq;
int ret, vector;
+ if (KVM_BUG_ON(!lapic_in_kernel(vcpu), vcpu->kvm))
+ return -EINVAL;
+
if (sint >= ARRAY_SIZE(synic->sint))
return -EINVAL;