mbox series

[v4,0/7] Resolve TYPE_PIIX3_XEN_DEVICE

Message ID 20230403074124.3925-1-shentey@gmail.com (mailing list archive)
Headers show
Series Resolve TYPE_PIIX3_XEN_DEVICE | expand

Message

Bernhard Beschow April 3, 2023, 7:41 a.m. UTC
There is currently a dedicated PIIX3 device model for use under Xen. By reusing
existing PCI API during initialization this device model can be eliminated and
the plain PIIX3 device model can be used instead.

Resolving TYPE_PIIX3_XEN_DEVICE results in less code while also making Xen
agnostic towards the precise south bridge being used in the PC machine. The
latter might become particularily interesting once PIIX4 becomes usable in the
PC machine, avoiding the "Frankenstein" use of PIIX4_ACPI in PIIX3.

Testing done:
- `make check`
- Run `xl create` with the following config:
    name = "Manjaro"
    type = 'hvm'
    memory = 1536
    apic = 1
    usb = 1
    disk = [ "file:manjaro-kde-21.2.6-220416-linux515.iso,hdc:cdrom,r" ]
    device_model_override = "/usr/bin/qemu-system-x86_64"
    vga = "stdvga"
    sdl = 1
- `qemu-system-x86_64 -M pc -m 2G -cpu host -accel kvm \
    -cdrom manjaro-kde-21.2.6-220416-linux515.iso`

v4:
- Add patch fixing latent memory leak in pci_bus_irqs() (Anthony)

v3:
- Rebase onto master

v2:
- xen_piix3_set_irq() is already generic. Just rename it. (Chuck)

Tested-by: Chuck Zmudzinski <brchuckz@aol.com>

Bernhard Beschow (7):
  include/hw/xen/xen: Rename xen_piix3_set_irq() to xen_intx_set_irq()
  hw/pci/pci.c: Don't leak PCIBus::irq_count[] in pci_bus_irqs()
  hw/isa/piix3: Reuse piix3_realize() in piix3_xen_realize()
  hw/isa/piix3: Wire up Xen PCI IRQ handling outside of PIIX3
  hw/isa/piix3: Avoid Xen-specific variant of piix3_write_config()
  hw/isa/piix3: Resolve redundant k->config_write assignments
  hw/isa/piix3: Resolve redundant TYPE_PIIX3_XEN_DEVICE

 include/hw/southbridge/piix.h |  1 -
 include/hw/xen/xen.h          |  2 +-
 hw/i386/pc_piix.c             | 36 +++++++++++++++++++--
 hw/i386/xen/xen-hvm.c         |  2 +-
 hw/isa/piix3.c                | 60 +----------------------------------
 hw/pci/pci.c                  |  2 ++
 stubs/xen-hw-stub.c           |  2 +-
 7 files changed, 39 insertions(+), 66 deletions(-)

Comments

Michael S. Tsirkin April 21, 2023, 7:38 a.m. UTC | #1
On Mon, Apr 03, 2023 at 09:41:17AM +0200, Bernhard Beschow wrote:
> There is currently a dedicated PIIX3 device model for use under Xen. By reusing
> existing PCI API during initialization this device model can be eliminated and
> the plain PIIX3 device model can be used instead.
> 
> Resolving TYPE_PIIX3_XEN_DEVICE results in less code while also making Xen
> agnostic towards the precise south bridge being used in the PC machine. The
> latter might become particularily interesting once PIIX4 becomes usable in the
> PC machine, avoiding the "Frankenstein" use of PIIX4_ACPI in PIIX3.

xen stuff so I assume that tree?

> Testing done:
> - `make check`
> - Run `xl create` with the following config:
>     name = "Manjaro"
>     type = 'hvm'
>     memory = 1536
>     apic = 1
>     usb = 1
>     disk = [ "file:manjaro-kde-21.2.6-220416-linux515.iso,hdc:cdrom,r" ]
>     device_model_override = "/usr/bin/qemu-system-x86_64"
>     vga = "stdvga"
>     sdl = 1
> - `qemu-system-x86_64 -M pc -m 2G -cpu host -accel kvm \
>     -cdrom manjaro-kde-21.2.6-220416-linux515.iso`
> 
> v4:
> - Add patch fixing latent memory leak in pci_bus_irqs() (Anthony)
> 
> v3:
> - Rebase onto master
> 
> v2:
> - xen_piix3_set_irq() is already generic. Just rename it. (Chuck)
> 
> Tested-by: Chuck Zmudzinski <brchuckz@aol.com>
> 
> Bernhard Beschow (7):
>   include/hw/xen/xen: Rename xen_piix3_set_irq() to xen_intx_set_irq()
>   hw/pci/pci.c: Don't leak PCIBus::irq_count[] in pci_bus_irqs()
>   hw/isa/piix3: Reuse piix3_realize() in piix3_xen_realize()
>   hw/isa/piix3: Wire up Xen PCI IRQ handling outside of PIIX3
>   hw/isa/piix3: Avoid Xen-specific variant of piix3_write_config()
>   hw/isa/piix3: Resolve redundant k->config_write assignments
>   hw/isa/piix3: Resolve redundant TYPE_PIIX3_XEN_DEVICE
> 
>  include/hw/southbridge/piix.h |  1 -
>  include/hw/xen/xen.h          |  2 +-
>  hw/i386/pc_piix.c             | 36 +++++++++++++++++++--
>  hw/i386/xen/xen-hvm.c         |  2 +-
>  hw/isa/piix3.c                | 60 +----------------------------------
>  hw/pci/pci.c                  |  2 ++
>  stubs/xen-hw-stub.c           |  2 +-
>  7 files changed, 39 insertions(+), 66 deletions(-)
> 
> -- 
> 2.40.0
>
Bernhard Beschow April 21, 2023, 4:35 p.m. UTC | #2
Am 21. April 2023 07:38:10 UTC schrieb "Michael S. Tsirkin" <mst@redhat.com>:
>On Mon, Apr 03, 2023 at 09:41:17AM +0200, Bernhard Beschow wrote:
>> There is currently a dedicated PIIX3 device model for use under Xen. By reusing
>> existing PCI API during initialization this device model can be eliminated and
>> the plain PIIX3 device model can be used instead.
>> 
>> Resolving TYPE_PIIX3_XEN_DEVICE results in less code while also making Xen
>> agnostic towards the precise south bridge being used in the PC machine. The
>> latter might become particularily interesting once PIIX4 becomes usable in the
>> PC machine, avoiding the "Frankenstein" use of PIIX4_ACPI in PIIX3.
>
>xen stuff so I assume that tree?

Anthony?

This series is now fully reviewed. Once it lands in master I'd rebase the PIIX consolidation series onto it which is still under discussion.

Best regards,
Bernhard

>
>> Testing done:
>> - `make check`
>> - Run `xl create` with the following config:
>>     name = "Manjaro"
>>     type = 'hvm'
>>     memory = 1536
>>     apic = 1
>>     usb = 1
>>     disk = [ "file:manjaro-kde-21.2.6-220416-linux515.iso,hdc:cdrom,r" ]
>>     device_model_override = "/usr/bin/qemu-system-x86_64"
>>     vga = "stdvga"
>>     sdl = 1
>> - `qemu-system-x86_64 -M pc -m 2G -cpu host -accel kvm \
>>     -cdrom manjaro-kde-21.2.6-220416-linux515.iso`
>> 
>> v4:
>> - Add patch fixing latent memory leak in pci_bus_irqs() (Anthony)
>> 
>> v3:
>> - Rebase onto master
>> 
>> v2:
>> - xen_piix3_set_irq() is already generic. Just rename it. (Chuck)
>> 
>> Tested-by: Chuck Zmudzinski <brchuckz@aol.com>
>> 
>> Bernhard Beschow (7):
>>   include/hw/xen/xen: Rename xen_piix3_set_irq() to xen_intx_set_irq()
>>   hw/pci/pci.c: Don't leak PCIBus::irq_count[] in pci_bus_irqs()
>>   hw/isa/piix3: Reuse piix3_realize() in piix3_xen_realize()
>>   hw/isa/piix3: Wire up Xen PCI IRQ handling outside of PIIX3
>>   hw/isa/piix3: Avoid Xen-specific variant of piix3_write_config()
>>   hw/isa/piix3: Resolve redundant k->config_write assignments
>>   hw/isa/piix3: Resolve redundant TYPE_PIIX3_XEN_DEVICE
>> 
>>  include/hw/southbridge/piix.h |  1 -
>>  include/hw/xen/xen.h          |  2 +-
>>  hw/i386/pc_piix.c             | 36 +++++++++++++++++++--
>>  hw/i386/xen/xen-hvm.c         |  2 +-
>>  hw/isa/piix3.c                | 60 +----------------------------------
>>  hw/pci/pci.c                  |  2 ++
>>  stubs/xen-hw-stub.c           |  2 +-
>>  7 files changed, 39 insertions(+), 66 deletions(-)
>> 
>> -- 
>> 2.40.0
>> 
>
Bernhard Beschow May 13, 2023, 11:44 a.m. UTC | #3
Am 21. April 2023 07:38:10 UTC schrieb "Michael S. Tsirkin" <mst@redhat.com>:
>On Mon, Apr 03, 2023 at 09:41:17AM +0200, Bernhard Beschow wrote:
>> There is currently a dedicated PIIX3 device model for use under Xen. By reusing
>> existing PCI API during initialization this device model can be eliminated and
>> the plain PIIX3 device model can be used instead.
>> 
>> Resolving TYPE_PIIX3_XEN_DEVICE results in less code while also making Xen
>> agnostic towards the precise south bridge being used in the PC machine. The
>> latter might become particularily interesting once PIIX4 becomes usable in the
>> PC machine, avoiding the "Frankenstein" use of PIIX4_ACPI in PIIX3.
>
>xen stuff so I assume that tree?

Ping

>
>> Testing done:
>> - `make check`
>> - Run `xl create` with the following config:
>>     name = "Manjaro"
>>     type = 'hvm'
>>     memory = 1536
>>     apic = 1
>>     usb = 1
>>     disk = [ "file:manjaro-kde-21.2.6-220416-linux515.iso,hdc:cdrom,r" ]
>>     device_model_override = "/usr/bin/qemu-system-x86_64"
>>     vga = "stdvga"
>>     sdl = 1
>> - `qemu-system-x86_64 -M pc -m 2G -cpu host -accel kvm \
>>     -cdrom manjaro-kde-21.2.6-220416-linux515.iso`
>> 
>> v4:
>> - Add patch fixing latent memory leak in pci_bus_irqs() (Anthony)
>> 
>> v3:
>> - Rebase onto master
>> 
>> v2:
>> - xen_piix3_set_irq() is already generic. Just rename it. (Chuck)
>> 
>> Tested-by: Chuck Zmudzinski <brchuckz@aol.com>
>> 
>> Bernhard Beschow (7):
>>   include/hw/xen/xen: Rename xen_piix3_set_irq() to xen_intx_set_irq()
>>   hw/pci/pci.c: Don't leak PCIBus::irq_count[] in pci_bus_irqs()
>>   hw/isa/piix3: Reuse piix3_realize() in piix3_xen_realize()
>>   hw/isa/piix3: Wire up Xen PCI IRQ handling outside of PIIX3
>>   hw/isa/piix3: Avoid Xen-specific variant of piix3_write_config()
>>   hw/isa/piix3: Resolve redundant k->config_write assignments
>>   hw/isa/piix3: Resolve redundant TYPE_PIIX3_XEN_DEVICE
>> 
>>  include/hw/southbridge/piix.h |  1 -
>>  include/hw/xen/xen.h          |  2 +-
>>  hw/i386/pc_piix.c             | 36 +++++++++++++++++++--
>>  hw/i386/xen/xen-hvm.c         |  2 +-
>>  hw/isa/piix3.c                | 60 +----------------------------------
>>  hw/pci/pci.c                  |  2 ++
>>  stubs/xen-hw-stub.c           |  2 +-
>>  7 files changed, 39 insertions(+), 66 deletions(-)
>> 
>> -- 
>> 2.40.0
>> 
>
Stefano Stabellini May 15, 2023, 8:52 p.m. UTC | #4
On Sat, 13 May 2023, Bernhard Beschow wrote:
> Am 21. April 2023 07:38:10 UTC schrieb "Michael S. Tsirkin" <mst@redhat.com>:
> >On Mon, Apr 03, 2023 at 09:41:17AM +0200, Bernhard Beschow wrote:
> >> There is currently a dedicated PIIX3 device model for use under Xen. By reusing
> >> existing PCI API during initialization this device model can be eliminated and
> >> the plain PIIX3 device model can be used instead.
> >> 
> >> Resolving TYPE_PIIX3_XEN_DEVICE results in less code while also making Xen
> >> agnostic towards the precise south bridge being used in the PC machine. The
> >> latter might become particularily interesting once PIIX4 becomes usable in the
> >> PC machine, avoiding the "Frankenstein" use of PIIX4_ACPI in PIIX3.
> >
> >xen stuff so I assume that tree?
> 
> Ping

I am OK either way. Michael, what do you prefer?

Normally I would suggest for you to pick up the patches. But as it
happens I'll have to likely send another pull request in a week or two
and I can add these patches to it.

Let me know your preference and I am happy to follow it.


> >
> >> Testing done:
> >> - `make check`
> >> - Run `xl create` with the following config:
> >>     name = "Manjaro"
> >>     type = 'hvm'
> >>     memory = 1536
> >>     apic = 1
> >>     usb = 1
> >>     disk = [ "file:manjaro-kde-21.2.6-220416-linux515.iso,hdc:cdrom,r" ]
> >>     device_model_override = "/usr/bin/qemu-system-x86_64"
> >>     vga = "stdvga"
> >>     sdl = 1
> >> - `qemu-system-x86_64 -M pc -m 2G -cpu host -accel kvm \
> >>     -cdrom manjaro-kde-21.2.6-220416-linux515.iso`
> >> 
> >> v4:
> >> - Add patch fixing latent memory leak in pci_bus_irqs() (Anthony)
> >> 
> >> v3:
> >> - Rebase onto master
> >> 
> >> v2:
> >> - xen_piix3_set_irq() is already generic. Just rename it. (Chuck)
> >> 
> >> Tested-by: Chuck Zmudzinski <brchuckz@aol.com>
> >> 
> >> Bernhard Beschow (7):
> >>   include/hw/xen/xen: Rename xen_piix3_set_irq() to xen_intx_set_irq()
> >>   hw/pci/pci.c: Don't leak PCIBus::irq_count[] in pci_bus_irqs()
> >>   hw/isa/piix3: Reuse piix3_realize() in piix3_xen_realize()
> >>   hw/isa/piix3: Wire up Xen PCI IRQ handling outside of PIIX3
> >>   hw/isa/piix3: Avoid Xen-specific variant of piix3_write_config()
> >>   hw/isa/piix3: Resolve redundant k->config_write assignments
> >>   hw/isa/piix3: Resolve redundant TYPE_PIIX3_XEN_DEVICE
> >> 
> >>  include/hw/southbridge/piix.h |  1 -
> >>  include/hw/xen/xen.h          |  2 +-
> >>  hw/i386/pc_piix.c             | 36 +++++++++++++++++++--
> >>  hw/i386/xen/xen-hvm.c         |  2 +-
> >>  hw/isa/piix3.c                | 60 +----------------------------------
> >>  hw/pci/pci.c                  |  2 ++
> >>  stubs/xen-hw-stub.c           |  2 +-
> >>  7 files changed, 39 insertions(+), 66 deletions(-)
> >> 
> >> -- 
> >> 2.40.0
> >> 
> >
>
Bernhard Beschow May 22, 2023, 3:42 p.m. UTC | #5
Am 15. Mai 2023 20:52:40 UTC schrieb Stefano Stabellini <sstabellini@kernel.org>:
>On Sat, 13 May 2023, Bernhard Beschow wrote:
>> Am 21. April 2023 07:38:10 UTC schrieb "Michael S. Tsirkin" <mst@redhat.com>:
>> >On Mon, Apr 03, 2023 at 09:41:17AM +0200, Bernhard Beschow wrote:
>> >> There is currently a dedicated PIIX3 device model for use under Xen. By reusing
>> >> existing PCI API during initialization this device model can be eliminated and
>> >> the plain PIIX3 device model can be used instead.
>> >> 
>> >> Resolving TYPE_PIIX3_XEN_DEVICE results in less code while also making Xen
>> >> agnostic towards the precise south bridge being used in the PC machine. The
>> >> latter might become particularily interesting once PIIX4 becomes usable in the
>> >> PC machine, avoiding the "Frankenstein" use of PIIX4_ACPI in PIIX3.
>> >
>> >xen stuff so I assume that tree?
>> 
>> Ping
>
>I am OK either way. Michael, what do you prefer?
>
>Normally I would suggest for you to pick up the patches. But as it
>happens I'll have to likely send another pull request in a week or two
>and I can add these patches to it.
>
>Let me know your preference and I am happy to follow it.

Hi Stefano,

Michael's PR was merged last week. How about including this series into your PR then?

Best regards,
Bernhard

>
>
>> >
>> >> Testing done:
>> >> - `make check`
>> >> - Run `xl create` with the following config:
>> >>     name = "Manjaro"
>> >>     type = 'hvm'
>> >>     memory = 1536
>> >>     apic = 1
>> >>     usb = 1
>> >>     disk = [ "file:manjaro-kde-21.2.6-220416-linux515.iso,hdc:cdrom,r" ]
>> >>     device_model_override = "/usr/bin/qemu-system-x86_64"
>> >>     vga = "stdvga"
>> >>     sdl = 1
>> >> - `qemu-system-x86_64 -M pc -m 2G -cpu host -accel kvm \
>> >>     -cdrom manjaro-kde-21.2.6-220416-linux515.iso`
>> >> 
>> >> v4:
>> >> - Add patch fixing latent memory leak in pci_bus_irqs() (Anthony)
>> >> 
>> >> v3:
>> >> - Rebase onto master
>> >> 
>> >> v2:
>> >> - xen_piix3_set_irq() is already generic. Just rename it. (Chuck)
>> >> 
>> >> Tested-by: Chuck Zmudzinski <brchuckz@aol.com>
>> >> 
>> >> Bernhard Beschow (7):
>> >>   include/hw/xen/xen: Rename xen_piix3_set_irq() to xen_intx_set_irq()
>> >>   hw/pci/pci.c: Don't leak PCIBus::irq_count[] in pci_bus_irqs()
>> >>   hw/isa/piix3: Reuse piix3_realize() in piix3_xen_realize()
>> >>   hw/isa/piix3: Wire up Xen PCI IRQ handling outside of PIIX3
>> >>   hw/isa/piix3: Avoid Xen-specific variant of piix3_write_config()
>> >>   hw/isa/piix3: Resolve redundant k->config_write assignments
>> >>   hw/isa/piix3: Resolve redundant TYPE_PIIX3_XEN_DEVICE
>> >> 
>> >>  include/hw/southbridge/piix.h |  1 -
>> >>  include/hw/xen/xen.h          |  2 +-
>> >>  hw/i386/pc_piix.c             | 36 +++++++++++++++++++--
>> >>  hw/i386/xen/xen-hvm.c         |  2 +-
>> >>  hw/isa/piix3.c                | 60 +----------------------------------
>> >>  hw/pci/pci.c                  |  2 ++
>> >>  stubs/xen-hw-stub.c           |  2 +-
>> >>  7 files changed, 39 insertions(+), 66 deletions(-)
>> >> 
>> >> -- 
>> >> 2.40.0
>> >> 
>> >
>>
Bernhard Beschow June 5, 2023, 7:01 a.m. UTC | #6
Am 22. Mai 2023 15:42:03 UTC schrieb Bernhard Beschow <shentey@gmail.com>:
>
>
>Am 15. Mai 2023 20:52:40 UTC schrieb Stefano Stabellini <sstabellini@kernel.org>:
>>On Sat, 13 May 2023, Bernhard Beschow wrote:
>>> Am 21. April 2023 07:38:10 UTC schrieb "Michael S. Tsirkin" <mst@redhat.com>:
>>> >On Mon, Apr 03, 2023 at 09:41:17AM +0200, Bernhard Beschow wrote:
>>> >> There is currently a dedicated PIIX3 device model for use under Xen. By reusing
>>> >> existing PCI API during initialization this device model can be eliminated and
>>> >> the plain PIIX3 device model can be used instead.
>>> >> 
>>> >> Resolving TYPE_PIIX3_XEN_DEVICE results in less code while also making Xen
>>> >> agnostic towards the precise south bridge being used in the PC machine. The
>>> >> latter might become particularily interesting once PIIX4 becomes usable in the
>>> >> PC machine, avoiding the "Frankenstein" use of PIIX4_ACPI in PIIX3.
>>> >
>>> >xen stuff so I assume that tree?
>>> 
>>> Ping
>>
>>I am OK either way. Michael, what do you prefer?
>>
>>Normally I would suggest for you to pick up the patches. But as it
>>happens I'll have to likely send another pull request in a week or two
>>and I can add these patches to it.
>>
>>Let me know your preference and I am happy to follow it.
>
>Hi Stefano,
>
>Michael's PR was merged last week. How about including this series into your PR then?

Ping

>
>Best regards,
>Bernhard
>
>>
>>
>>> >
>>> >> Testing done:
>>> >> - `make check`
>>> >> - Run `xl create` with the following config:
>>> >>     name = "Manjaro"
>>> >>     type = 'hvm'
>>> >>     memory = 1536
>>> >>     apic = 1
>>> >>     usb = 1
>>> >>     disk = [ "file:manjaro-kde-21.2.6-220416-linux515.iso,hdc:cdrom,r" ]
>>> >>     device_model_override = "/usr/bin/qemu-system-x86_64"
>>> >>     vga = "stdvga"
>>> >>     sdl = 1
>>> >> - `qemu-system-x86_64 -M pc -m 2G -cpu host -accel kvm \
>>> >>     -cdrom manjaro-kde-21.2.6-220416-linux515.iso`
>>> >> 
>>> >> v4:
>>> >> - Add patch fixing latent memory leak in pci_bus_irqs() (Anthony)
>>> >> 
>>> >> v3:
>>> >> - Rebase onto master
>>> >> 
>>> >> v2:
>>> >> - xen_piix3_set_irq() is already generic. Just rename it. (Chuck)
>>> >> 
>>> >> Tested-by: Chuck Zmudzinski <brchuckz@aol.com>
>>> >> 
>>> >> Bernhard Beschow (7):
>>> >>   include/hw/xen/xen: Rename xen_piix3_set_irq() to xen_intx_set_irq()
>>> >>   hw/pci/pci.c: Don't leak PCIBus::irq_count[] in pci_bus_irqs()
>>> >>   hw/isa/piix3: Reuse piix3_realize() in piix3_xen_realize()
>>> >>   hw/isa/piix3: Wire up Xen PCI IRQ handling outside of PIIX3
>>> >>   hw/isa/piix3: Avoid Xen-specific variant of piix3_write_config()
>>> >>   hw/isa/piix3: Resolve redundant k->config_write assignments
>>> >>   hw/isa/piix3: Resolve redundant TYPE_PIIX3_XEN_DEVICE
>>> >> 
>>> >>  include/hw/southbridge/piix.h |  1 -
>>> >>  include/hw/xen/xen.h          |  2 +-
>>> >>  hw/i386/pc_piix.c             | 36 +++++++++++++++++++--
>>> >>  hw/i386/xen/xen-hvm.c         |  2 +-
>>> >>  hw/isa/piix3.c                | 60 +----------------------------------
>>> >>  hw/pci/pci.c                  |  2 ++
>>> >>  stubs/xen-hw-stub.c           |  2 +-
>>> >>  7 files changed, 39 insertions(+), 66 deletions(-)
>>> >> 
>>> >> -- 
>>> >> 2.40.0
>>> >> 
>>> >
>>>
Stefano Stabellini June 8, 2023, 10:43 p.m. UTC | #7
On Mon, 5 Jun 2023, Bernhard Beschow wrote:
> Am 22. Mai 2023 15:42:03 UTC schrieb Bernhard Beschow <shentey@gmail.com>:
> >
> >
> >Am 15. Mai 2023 20:52:40 UTC schrieb Stefano Stabellini <sstabellini@kernel.org>:
> >>On Sat, 13 May 2023, Bernhard Beschow wrote:
> >>> Am 21. April 2023 07:38:10 UTC schrieb "Michael S. Tsirkin" <mst@redhat.com>:
> >>> >On Mon, Apr 03, 2023 at 09:41:17AM +0200, Bernhard Beschow wrote:
> >>> >> There is currently a dedicated PIIX3 device model for use under Xen. By reusing
> >>> >> existing PCI API during initialization this device model can be eliminated and
> >>> >> the plain PIIX3 device model can be used instead.
> >>> >> 
> >>> >> Resolving TYPE_PIIX3_XEN_DEVICE results in less code while also making Xen
> >>> >> agnostic towards the precise south bridge being used in the PC machine. The
> >>> >> latter might become particularily interesting once PIIX4 becomes usable in the
> >>> >> PC machine, avoiding the "Frankenstein" use of PIIX4_ACPI in PIIX3.
> >>> >
> >>> >xen stuff so I assume that tree?
> >>> 
> >>> Ping
> >>
> >>I am OK either way. Michael, what do you prefer?
> >>
> >>Normally I would suggest for you to pick up the patches. But as it
> >>happens I'll have to likely send another pull request in a week or two
> >>and I can add these patches to it.
> >>
> >>Let me know your preference and I am happy to follow it.
> >
> >Hi Stefano,
> >
> >Michael's PR was merged last week. How about including this series into your PR then?
> 
> Ping

Sorry for the late reply, it looks like patch #3 breaks the build:

[1888/4025] Compiling C object libcommon.fa.p/hw_isa_piix3.c.o
FAILED: libcommon.fa.p/hw_isa_piix3.c.o 
cc -m64 -mcx16 -Ilibcommon.fa.p -Iui -I../ui -I/usr/include/capstone -I/usr/include/pixman-1 -I/usr/include/libpng16 -I/usr/include/spice-server -I/usr/include/spice-1 -I/usr/include/p11-kit-1 -I/usr/include/libusb-1.0 -I/usr/include/SDL2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/slirp -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/fribidi -I/usr/include/uuid -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/at-spi-2.0 -I/usr/include/vte-2.91 -I/usr/include/virgl -I/usr/include/cacard -I/usr/include/nss -I/usr/include/nspr -I/usr/include/PCSC -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURC
 E=2 -Wundef -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wmissing-format-attribute -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -isystem /builds/Vikram.garhwal/qemu-ioreq/linux-headers -isystem linux-headers -iquote . -iquote /builds/Vikram.garhwal/qemu-ioreq -iquote /builds/Vikram.garhwal/qemu-ioreq/include -iquote /builds/Vikram.garhwal/qemu-ioreq/host/include/x86_64 -iquote /builds/Vikram.garhwal/qemu-ioreq/host/include/generic -iquote /builds/Vikram.garhwal/qemu-ioreq/tcg/i386 -pthread -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fno-common -fwrapv -fPIE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DNCURSES_WIDECHAR=1 -D_REENTRANT -Wno-undef -DSTRUCT_IOVEC_DEFINED -MD -MQ libcommon.fa.p/hw
 _isa_piix3.c.o -MF libcommon.fa.p/hw_isa_piix3.c.o.d -o libcommon.fa.p/hw_isa_piix3.c.o -c ../hw/isa/piix3.c
../hw/isa/piix3.c:265:13: error: ‘pci_piix3_realize’ defined but not used [-Werror=unused-function]
  265 | static void pci_piix3_realize(PCIDevice *dev, Error **errp)
      |             ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Stefano Stabellini June 9, 2023, 12:23 a.m. UTC | #8
On Thu, 8 Jun 2023, Stefano Stabellini wrote:
> On Mon, 5 Jun 2023, Bernhard Beschow wrote:
> > Am 22. Mai 2023 15:42:03 UTC schrieb Bernhard Beschow <shentey@gmail.com>:
> > >
> > >
> > >Am 15. Mai 2023 20:52:40 UTC schrieb Stefano Stabellini <sstabellini@kernel.org>:
> > >>On Sat, 13 May 2023, Bernhard Beschow wrote:
> > >>> Am 21. April 2023 07:38:10 UTC schrieb "Michael S. Tsirkin" <mst@redhat.com>:
> > >>> >On Mon, Apr 03, 2023 at 09:41:17AM +0200, Bernhard Beschow wrote:
> > >>> >> There is currently a dedicated PIIX3 device model for use under Xen. By reusing
> > >>> >> existing PCI API during initialization this device model can be eliminated and
> > >>> >> the plain PIIX3 device model can be used instead.
> > >>> >> 
> > >>> >> Resolving TYPE_PIIX3_XEN_DEVICE results in less code while also making Xen
> > >>> >> agnostic towards the precise south bridge being used in the PC machine. The
> > >>> >> latter might become particularily interesting once PIIX4 becomes usable in the
> > >>> >> PC machine, avoiding the "Frankenstein" use of PIIX4_ACPI in PIIX3.
> > >>> >
> > >>> >xen stuff so I assume that tree?
> > >>> 
> > >>> Ping
> > >>
> > >>I am OK either way. Michael, what do you prefer?
> > >>
> > >>Normally I would suggest for you to pick up the patches. But as it
> > >>happens I'll have to likely send another pull request in a week or two
> > >>and I can add these patches to it.
> > >>
> > >>Let me know your preference and I am happy to follow it.
> > >
> > >Hi Stefano,
> > >
> > >Michael's PR was merged last week. How about including this series into your PR then?
> > 
> > Ping
> 
> Sorry for the late reply, it looks like patch #3 breaks the build:

I noticed now that this patch series got committed (the right version
without the build failure), thanks Anthony for sending the pull request!
Anthony PERARD June 9, 2023, 10:46 a.m. UTC | #9
On Thu, Jun 08, 2023 at 03:43:32PM -0700, Stefano Stabellini wrote:
> On Mon, 5 Jun 2023, Bernhard Beschow wrote:
> > Am 22. Mai 2023 15:42:03 UTC schrieb Bernhard Beschow <shentey@gmail.com>:
> > >
> > >
> > >Am 15. Mai 2023 20:52:40 UTC schrieb Stefano Stabellini <sstabellini@kernel.org>:
> > >>On Sat, 13 May 2023, Bernhard Beschow wrote:
> > >>> Am 21. April 2023 07:38:10 UTC schrieb "Michael S. Tsirkin" <mst@redhat.com>:
> > >>> >On Mon, Apr 03, 2023 at 09:41:17AM +0200, Bernhard Beschow wrote:
> > >>> >> There is currently a dedicated PIIX3 device model for use under Xen. By reusing
> > >>> >> existing PCI API during initialization this device model can be eliminated and
> > >>> >> the plain PIIX3 device model can be used instead.
> > >>> >> 
> > >>> >> Resolving TYPE_PIIX3_XEN_DEVICE results in less code while also making Xen
> > >>> >> agnostic towards the precise south bridge being used in the PC machine. The
> > >>> >> latter might become particularily interesting once PIIX4 becomes usable in the
> > >>> >> PC machine, avoiding the "Frankenstein" use of PIIX4_ACPI in PIIX3.
> > >>> >
> > >>> >xen stuff so I assume that tree?
> > >>> 
> > >>> Ping
> > >>
> > >>I am OK either way. Michael, what do you prefer?
> > >>
> > >>Normally I would suggest for you to pick up the patches. But as it
> > >>happens I'll have to likely send another pull request in a week or two
> > >>and I can add these patches to it.
> > >>
> > >>Let me know your preference and I am happy to follow it.
> > >
> > >Hi Stefano,
> > >
> > >Michael's PR was merged last week. How about including this series into your PR then?
> > 
> > Ping
> 
> Sorry for the late reply, it looks like patch #3 breaks the build:

Hi Stefano,

Sorry I forgot to reply to these mails. I've sent a pull request for
this earlier this week (along with other patches I had to send), so the
series should be applied now.

I guess the build issue is due to trying to apply the same patch again.

Cheers,