summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Mooney <pmooney@pfmooney.com>2020-11-20 20:15:52 +0000
committerPatrick Mooney <pmooney@oxide.computer>2020-12-11 02:34:54 +0000
commitfe17aa88307d9cacf6677bbbe955585b11920199 (patch)
tree65ec8b0e0b4089e4705bfac34c8a71cacb29bac4
parent15174c59605d00b59ea3aae8ba85744a42aa1e96 (diff)
downloadillumos-joyent-fe17aa88307d9cacf6677bbbe955585b11920199.tar.gz
13325 bhyve misinterprets MSI redir hint
Reviewed by: Robert Mustacchi <rm@fingolfin.org> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/uts/i86pc/io/vmm/vmm_lapic.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/usr/src/uts/i86pc/io/vmm/vmm_lapic.c b/usr/src/uts/i86pc/io/vmm/vmm_lapic.c
index f28a2f1ffd..a5118c15af 100644
--- a/usr/src/uts/i86pc/io/vmm/vmm_lapic.c
+++ b/usr/src/uts/i86pc/io/vmm/vmm_lapic.c
@@ -38,6 +38,7 @@
* http://www.illumos.org/license/CDDL.
*
* Copyright 2014 Pluribus Networks Inc.
+ * Copyright 2020 Oxide Computer Company
*/
#include <sys/cdefs.h>
@@ -127,19 +128,18 @@ lapic_intr_msi(struct vm *vm, uint64_t addr, uint64_t msg)
}
/*
- * Extract the x86-specific fields from the MSI addr/msg
- * params according to the Intel Arch spec, Vol3 Ch 10.
+ * Extract the x86-specific fields from the MSI addr/msg params
+ * according to the Intel Arch spec, Vol3 Ch 10.
*
- * The PCI specification does not support level triggered
- * MSI/MSI-X so ignore trigger level in 'msg'.
+ * The PCI specification does not support level triggered MSI/MSI-X so
+ * ignore trigger level in 'msg'.
*
- * The 'dest' is interpreted as a logical APIC ID if both
- * the Redirection Hint and Destination Mode are '1' and
- * physical otherwise.
+ * Certain kinds of interrupt broadcasts (physical or logical-clustered
+ * for destination 0xff) are prohibited when the redirection hint bit is
+ * set for a given message. Those edge cases are ignored for now.
*/
dest = (addr >> 12) & 0xff;
- phys = ((addr & (MSI_X86_ADDR_RH | MSI_X86_ADDR_LOG)) !=
- (MSI_X86_ADDR_RH | MSI_X86_ADDR_LOG));
+ phys = (addr & MSI_X86_ADDR_LOG) == 0;
delmode = msg & APIC_DELMODE_MASK;
vec = msg & 0xff;