[PATCH v3 0/6] Resolve TYPE_PIIX3_XEN_DEVICE

Bernhard Beschow posted 6 patches 1 year, 1 month ago
Failed in applying to current master (apply log)
There is a newer version of this series
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 +----------------------------------
stubs/xen-hw-stub.c           |  2 +-
6 files changed, 37 insertions(+), 66 deletions(-)
[PATCH v3 0/6] Resolve TYPE_PIIX3_XEN_DEVICE
Posted by Bernhard Beschow 1 year, 1 month ago
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`
- `make check-avocado`
- 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,xen-version=0x4000a,kernel-irqchip=split \
    -cdrom manjaro-kde-21.2.6-220416-linux515.iso`
- `qemu-system-x86_64 -M pc -m 2G -cpu host -accel kvm \
    -cdrom manjaro-kde-21.2.6-220416-linux515.iso`

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 (6):
  include/hw/xen/xen: Rename xen_piix3_set_irq() to xen_intx_set_irq()
  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 +----------------------------------
 stubs/xen-hw-stub.c           |  2 +-
 6 files changed, 37 insertions(+), 66 deletions(-)

-- 
2.39.2