diff options
author | Robert Mustacchi <rm@joyent.com> | 2013-02-26 11:38:35 -0800 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2013-03-21 05:58:12 +0000 |
commit | 2bbad6a788414fb3455828e020007809c00b5a74 (patch) | |
tree | 35a9b75cede621384c7fec9624714b2a14c46a4f /kvm_ioapic.c | |
parent | c52ff98aa3b4152a3ebb96b6522df37773ace229 (diff) | |
download | illumos-kvm-20130919.tar.gz |
HVM-770 ioapic should return zero reads for bogus pinsHEAD20130919201309052013082220130725201307112013062720130515201304182013040420130321master
Diffstat (limited to 'kvm_ioapic.c')
-rw-r--r-- | kvm_ioapic.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/kvm_ioapic.c b/kvm_ioapic.c index 37dbded..89d3008 100644 --- a/kvm_ioapic.c +++ b/kvm_ioapic.c @@ -67,9 +67,11 @@ ioapic_read_indirect(struct kvm_ioapic *ioapic, uint32_t redir_index = (ioapic->ioregsel - 0x10) >> 1; uint64_t redir_content; - ASSERT(redir_index < IOAPIC_NUM_PINS); - - redir_content = ioapic->redirtbl[redir_index].bits; + if (redir_index < IOAPIC_NUM_PINS) { + redir_content = ioapic->redirtbl[redir_index].bits; + } else { + redir_content = ~0ULL; + } result = (ioapic->ioregsel & 0x1) ? (redir_content >> 32) & 0xffffffff : redir_content & 0xffffffff; |