On 25/09/19 10:40, Sergio Lopez wrote: >>> We need the PIT for non-KVM accel (if present with KVM and >>> kernel_irqchip_split = off, it basically becomes a placeholder) >> Why? > > Perhaps I'm missing something. Is some other device supposed to be > acting as a HW timer while running with TCG acceleration? Sure, the LAPIC timer. I wonder if Linux, however, wants to use the PIT in order to calibrate the LAPIC timer if TSC deadline mode is unavailable. >>> and the PIC for both the PIT and the ISA serial port. >> >> Can't the ISA serial port work with the IOAPIC? > > Hm... I'm not sure. I wanted to give it a try, but then noticed that > multiple places in the code (like hw/intc/apic.c:560) do expect to have > an ISA PIC present through the isa_pic global variable. > > I guess we should be able to work around this, but I'm not sure if it's > really worth it. What do you think? You can add a paragraph saying that in the future the list could be reduced further. I think that the direction we want to go is to only leave the IOAPIC around (the ISA devices in this respect are no different from the virtio-mmio devices). But you're right about isa_pic. I wonder if it's as easy as this: diff --git a/hw/intc/apic.c b/hw/intc/apic.c index bce89911dc..5d03e48a19 100644 --- a/hw/intc/apic.c +++ b/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; } Thanks, Paolo
Attachment:
signature.asc
Description: OpenPGP digital signature