diff options
author | tychon <tychon@FreeBSD.org> | 2014-03-11 22:12:12 +0000 |
---|---|---|
committer | tychon <tychon@FreeBSD.org> | 2014-03-11 22:12:12 +0000 |
commit | 9affb68b8d815abae590347a1e4f17cde16d8e75 (patch) | |
tree | 29fb92859fc09159120f132a82600640e421cee5 | |
parent | b434f4f57d699f5fc9c91ae8627acaaf60124b89 (diff) | |
download | FreeBSD-src-9affb68b8d815abae590347a1e4f17cde16d8e75.zip FreeBSD-src-9affb68b8d815abae590347a1e4f17cde16d8e75.tar.gz |
Don't try to return a vector to a caller that only cares if a vector
is pending or not.
Approved by: neel (co-mentor)
-rw-r--r-- | sys/amd64/vmm/io/vlapic.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/amd64/vmm/io/vlapic.c b/sys/amd64/vmm/io/vlapic.c index 69219b4..bd8a630 100644 --- a/sys/amd64/vmm/io/vlapic.c +++ b/sys/amd64/vmm/io/vlapic.c @@ -1053,8 +1053,12 @@ vlapic_pending_intr(struct vlapic *vlapic, int *vecptr) int idx, i, bitpos, vector; uint32_t *irrptr, val; - if (vlapic->extint_pending) - return (vatpic_pending_intr(vlapic->vm, vecptr)); + if (vlapic->extint_pending) { + if (vecptr == NULL) + return (1); + else + return (vatpic_pending_intr(vlapic->vm, vecptr)); + } if (vlapic->ops.pending_intr) return ((*vlapic->ops.pending_intr)(vlapic, vecptr)); |