Browse Source

hw/intc/apic: reject pic ints if isa_pic == NULL

In apic_accept_pic_intr(), reject PIC interruptions if a i8259 PIC has
not been instantiated (isa_pic == NULL).

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sergio Lopez <slp@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Sergio Lopez 5 năm trước cách đây
mục cha
commit
78cafff810
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      hw/intc/apic.c

+ 1 - 1
hw/intc/apic.c

@@ -610,7 +610,7 @@ int apic_accept_pic_intr(DeviceState *dev)
 
     if ((s->apicbase & MSR_IA32_APICBASE_ENABLE) == 0 ||
         (lvt0 & APIC_LVT_MASKED) == 0)
-        return 1;
+        return isa_pic != NULL;
 
     return 0;
 }