[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 28/33] hw/isa/piix3: Merge hw/isa/piix4.c
From: |
Bernhard Beschow |
Subject: |
Re: [PATCH v6 28/33] hw/isa/piix3: Merge hw/isa/piix4.c |
Date: |
Thu, 12 Jan 2023 18:21:57 +0000 |
Am 12. Januar 2023 16:36:30 UTC schrieb "Philippe Mathieu-Daudé"
<philmd@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 <shentey@gmail.com>
>> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
>> Message-Id: <20221022150508.26830-37-shentey@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
[PATCH v6 26/33] hw/isa/piix4: Reuse struct PIIXState from PIIX3, Bernhard Beschow, 2023/01/09
[PATCH v6 29/33] hw/isa/piix: Harmonize names of reset control memory regions, Bernhard Beschow, 2023/01/09
[PATCH v6 31/33] hw/isa/piix: Rename functions to be shared for interrupt triggering, Bernhard Beschow, 2023/01/09
[PATCH v6 30/33] hw/isa/piix: Reuse PIIX3 base class' realize method in PIIX4, Bernhard Beschow, 2023/01/09
Re: [PATCH v6 00/33] Consolidate PIIX south bridges, Philippe Mathieu-Daudé, 2023/01/13