Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

HVM-770 ioapic should return zero reads for bogus pins

  • Loading branch information...
commit 2bbad6a788414fb3455828e020007809c00b5a74 1 parent c52ff98
@rmustacc rmustacc authored
Showing with 11 additions and 3 deletions.
  1. +5 −3 kvm_ioapic.c
  2. +6 −0 kvm_x86.c
View
8 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;
View
6 kvm_x86.c
@@ -1170,6 +1170,12 @@ kvm_set_msr_common(struct kvm_vcpu *vcpu, uint32_t msr, uint64_t data)
vcpu->kvm->arch.wall_clock = data;
kvm_write_wall_clock(vcpu->kvm, data);
break;
+
+ /*
+ * If in the future we go to update this code, we must go sync
+ * back up with the Linux for this MSR to address several important
+ * bugs.
+ */
case MSR_KVM_SYSTEM_TIME: {
#ifdef XXX
if (vcpu->arch.time_page) {
Please sign in to comment.
Something went wrong with that request. Please try again.