Am 12. Januar 2023 16:36:30 UTC schrieb "Philippe Mathieu-Daudé"
<phi...@linaro.org>:
>On 9/1/23 18:23, Bernhard Beschow wrote:
>> Now that the PIIX3 and PIIX4 device models are sufficiently consolidated,
>> their implementations can be merged into one file for further
>> consolidation.
>>
>> Signed-off-by: Bernhard Beschow <shen...@gmail.com>
>> Reviewed-by: Michael S. Tsirkin <m...@redhat.com>
>> Message-Id: <20221022150508.26830-37-shen...@gmail.com>
>> ---
>> hw/isa/{piix3.c => piix.c} | 158 ++++++++++++++++++++
>> hw/isa/piix4.c | 285 -------------------------------------
>> MAINTAINERS | 6 +-
>> hw/i386/Kconfig | 2 +-
>> hw/isa/Kconfig | 12 +-
>> hw/isa/meson.build | 3 +-
>> hw/mips/Kconfig | 2 +-
>> 7 files changed, 165 insertions(+), 303 deletions(-)
>> rename hw/isa/{piix3.c => piix.c} (75%)
>> delete mode 100644 hw/isa/piix4.c
>
>
>> @@ -489,11 +534,124 @@ static const TypeInfo piix3_xen_info = {
>> .class_init = piix3_xen_class_init,
>> };
>> +static void piix4_realize(PCIDevice *dev, Error **errp)
>> +{
>
>> + /* initialize pit */
>> + i8254_pit_init(isa_bus, 0x40, 0, NULL);
>Pre-existing, why there is no equivalent PIT creation in the
>PIIX3 variant? Due to in-kernel PIT in KVM?
Correct, that's one reason. The other reason is for interrupt wiring in case an
HPET is present (see our discussion about the intercept_irq for the rtc).
I would like to create and wire up the PIT in PIIX3 as well. Since we'd have to
take KVM into account here we may need a similar solution as for I8259. This is
another open question for PIIX4 to become a drop-in replacement for PIIX3. Any
ideas?
Best regards,
Bernhard