Skip to content

Commit 78cafff

Browse files
slpbonzini
authored andcommitted
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 <[email protected]> Signed-off-by: Sergio Lopez <[email protected]> Reviewed-by: Michael S. Tsirkin <[email protected]>
1 parent e5f6aa3 commit 78cafff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hw/intc/apic.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ int apic_accept_pic_intr(DeviceState *dev)
610610

611611
if ((s->apicbase & MSR_IA32_APICBASE_ENABLE) == 0 ||
612612
(lvt0 & APIC_LVT_MASKED) == 0)
613-
return 1;
613+
return isa_pic != NULL;
614614

615615
return 0;
616616
}

0 commit comments

Comments
 (0)