* [Qemu-devel] [RFC] Proposal for hw/ split
@ 2013-03-11 11:17 Paolo Bonzini
2013-03-11 11:31 ` Peter Maydell
` (3 more replies)
0 siblings, 4 replies; 12+ messages in thread
From: Paolo Bonzini @ 2013-03-11 11:17 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Crosthwaite, peter.maydell, agraf, afaerber
The general ideas are (earlier rules override the later, and exceptions
are of course possible):
- Board files go in hw/ARCH/ (already done).
- Files go in hw/ARCH/ if they reference that arch's CPUState (already done)
- Files already in a subdirectory are not moved (examples: some PPC/S390
files, USB devices).
- Files go in hw/ARCH/ if they used to be in hw/ARCH/Makefile.objs and
they define multiple devices (example: hw/arm/tc6393xb.c)
- Directories are created by "subsystem" (e.g. hw/pci) and "device type"
(hw/audio), with the "device type" taking priority.
Here is the list of .c files in hw/ and the corresponding destination.
Maintainers that wish to have more files in hw/ARCH are welcome to take
a look at the list of hw/misc devices and suggest changes.
As a general rule, composite devices ought to be split into multiple
devices with a small stub in hw/ARCH to build up the result. For
example, hw/display/sm501.c could be split into hw/display/sm501_crt.c
and the rest moved into hw/sh4/r2d.c.
== hw/acpi ==
hw/acpi.c hw/acpi/core.c
hw/acpi_ich9.c hw/acpi/ich9.c
hw/acpi_piix4.c hw/acpi/piix4.c
== hw/audio ==
hw/ac97.c hw/audio/ac97.c
hw/adlib.c hw/audio/adlib.c
hw/cs4231a.c hw/audio/cs4231a.c
hw/cs4231.c hw/audio/cs4231.c
hw/es1370.c hw/audio/es1370.c
hw/fmopl.c hw/audio/fmopl.c
hw/gus.c hw/audio/gus.c
hw/gusemu_hal.c hw/audio/gusemu_hal.c
hw/gusemu_mixer.c hw/audio/gusemu_mixer.c
hw/hda-audio.c hw/audio/hda-codec.c
hw/intel-hda.c hw/audio/intel-hda.c
hw/lm4549.c hw/audio/lm4549.c
hw/marvell_88w8618_audio.c hw/audio/marvell_88w8618.c
hw/milkymist-ac97.c hw/audio/milkymist-ac97.c
hw/pcspk.c hw/audio/pcspk.c
hw/pl041.c hw/audio/pl041.c
hw/sb16.c hw/audio/sb16.c
hw/wm8750.c hw/audio/wm8750.c
== hw/block ==
hw/block-common.c hw/block/block.c
hw/cdrom.c hw/block/cdrom.c
hw/dataplane/Makefile.objs hw/block/dataplane/Makefile.objs
hw/dataplane/hostmem.c hw/block/dataplane/hostmem.c
hw/dataplane/ioq.c hw/block/dataplane/ioq.c
hw/dataplane/virtio-blk.c hw/block/dataplane/virtio-blk.c
hw/dataplane/vring.c hw/block/dataplane/vring.c
hw/ecc.c hw/block/ecc.c
hw/fdc.c hw/block/fdc.c
hw/hd-geometry.c hw/block/hd-geometry.c
hw/m25p80.c hw/block/m25p80.c
hw/nand.c hw/block/nand.c
hw/onenand.c hw/block/onenand.c
hw/pc_sysfw.c hw/block/pc_sysfw.c
hw/pflash_cfi01.c hw/block/pflash_cfi01.c
hw/pflash_cfi02.c hw/block/pflash_cfi02.c
hw/tc58128.c hw/block/tc58128.c
hw/virtio-blk.c hw/block/virtio-blk.c
hw/xen_disk.c hw/block/xen_disk.c
== hw/bt ==
hw/bt-hci-csr.c hw/bt/hci-csr.c
hw/bt-hci.c hw/bt/hci.c
hw/bt-hid.c hw/bt/hid.c
hw/bt-l2cap.c hw/bt/l2cap.c
hw/bt-sdp.c hw/bt/sdp.c
hw/bt.c hw/bt/core.c
== hw/char ==
hw/cadence_uart.c hw/char/cadence_uart.c
hw/debugcon.c hw/char/debugcon.c
hw/escc.c hw/char/escc.c
hw/etraxfs_ser.c hw/char/etraxfs_ser.c
hw/exynos4210_uart.c hw/char/exynos4210_uart.c
hw/grlib_apbuart.c hw/char/grlib_apbuart.c
hw/imx_serial.c hw/char/imx_serial.c
hw/ipack.c hw/char/ipack.c
hw/ipoctal232.c hw/char/ipoctal232.c
hw/lm32_juart.c hw/char/lm32_juart.c
hw/lm32_uart.c hw/char/lm32_uart.c
hw/mcf_uart.c hw/char/mcf_uart.c
hw/milkymist-uart.c hw/char/milkymist-uart.c
hw/omap_uart.c hw/char/omap_uart.c
hw/parallel.c hw/char/parallel.c
hw/pl011.c hw/char/pl011.c
hw/s390x/sclpconsole.c hw/char/sclpconsole.c
hw/serial-isa.c hw/char/serial-isa.c
hw/serial-pci.c hw/char/serial-pci.c
hw/serial.c hw/char/serial.c
hw/sh_serial.c hw/char/sh_serial.c
hw/spapr_vty.c hw/char/spapr_vty.c
hw/tpci200.c hw/char/tpci200.c
hw/virtio-console.c hw/char/virtio-console.c
hw/virtio-serial-bus.c hw/char/virtio-serial-bus.c
hw/xen_console.c hw/char/xen_console.c
hw/xilinx_uartlite.c hw/char/xilinx_uartlite.c
== hw/core ==
hw/empty_slot.c hw/core/empty_slot.c
hw/irq.c hw/core/irq.c
hw/loader.c hw/core/loader.c
hw/null-machine.c hw/core/null-machine.c
hw/ptimer.c hw/core/ptimer.c
hw/qdev-addr.c hw/core/qdev-addr.c
hw/qdev-properties-system.c hw/core/qdev-properties-system.c
hw/qdev-properties.c hw/core/qdev-properties.c
hw/qdev.c hw/core/qdev.c
hw/stream.c hw/core/stream.c
hw/sysbus.c hw/core/sysbus.c
== hw/display ==
hw/ads7846.c hw/display/ads7846.c
hw/blizzard.c hw/display/blizzard.c
hw/cirrus_vga.c hw/display/cirrus_vga.c
hw/exynos4210_fimd.c hw/display/exynos4210_fimd.c
hw/framebuffer.c hw/display/framebuffer.c
hw/g364fb.c hw/display/g364fb.c
hw/jazz_led.c hw/display/jazz_led.c
hw/milkymist-tmu2.c hw/display/milkymist-tmu2.c
hw/milkymist-vgafb.c hw/display/milkymist-vgafb.c
hw/omap_dss.c hw/display/omap_dss.c
hw/omap_lcdc.c hw/display/omap_lcdc.c
hw/pl110.c hw/display/pl110.c
hw/pxa2xx_lcd.c hw/display/pxa2xx_lcd.c
hw/qxl-logger.c hw/display/qxl-logger.c
hw/qxl-render.c hw/display/qxl-render.c
hw/qxl.c hw/display/qxl.c
hw/sm501.c hw/display/sm501.c
hw/ssd0303.c hw/display/ssd0303.c
hw/ssd0323.c hw/display/ssd0323.c
hw/tcx.c hw/display/tcx.c
hw/vga-isa-mm.c hw/display/vga-isa-mm.c
hw/vga-isa.c hw/display/vga-isa.c
hw/vga-pci.c hw/display/vga-pci.c
hw/vga.c hw/display/vga.c
hw/vmware_vga.c hw/display/vmware_vga.c
hw/xenfb.c hw/display/xenfb.c
== hw/dma ==
hw/dma.c hw/dma/i8257.c
hw/etraxfs_dma.c hw/dma/etraxfs_dma.c
hw/omap_dma.c hw/dma/omap_dma.c
hw/pl080.c hw/dma/pl080.c
hw/puv3_dma.c hw/dma/puv3_dma.c
hw/pxa2xx_dma.c hw/dma/pxa2xx_dma.c
hw/rc4030.c hw/dma/rc4030.c
hw/soc_dma.c hw/dma/soc_dma.c
hw/sparc32_dma.c hw/dma/sparc32_dma.c
hw/sun4m_iommu.c hw/dma/sun4m_iommu.c
== hw/gpio ==
hw/max7310.c hw/gpio/max7310.c
hw/omap_gpio.c hw/gpio/omap_gpio.c
hw/pl061.c hw/gpio/pl061.c
hw/puv3_gpio.c hw/gpio/puv3_gpio.c
hw/zaurus.c hw/gpio/zaurus.c
== hw/i2c ==
hw/bitbang_i2c.c hw/i2c/bitbang_i2c.c
hw/exynos4210_i2c.c hw/i2c/exynos4210_i2c.c
hw/i2c.c hw/i2c/core.c
hw/omap_i2c.c hw/i2c/omap_i2c.c
hw/pm_smbus.c hw/i2c/pm_smbus.c
hw/smbus.c hw/i2c/smbus.c
hw/smbus_eeprom.c hw/i2c/smbus_eeprom.c
hw/smbus_ich9.c hw/i2c/smbus_ich9.c
hw/versatile_i2c.c hw/i2c/versatile_i2c.c
== hw/input ==
hw/adb.c hw/input/adb.c
hw/hid.c hw/input/hid.c
hw/lm832x.c hw/input/lm832x.c
hw/milkymist-softusb.c hw/input/milkymist-softusb.c
hw/pckbd.c hw/input/pckbd.c
hw/pl050.c hw/input/pl050.c
hw/ps2.c hw/input/ps2.c
hw/pxa2xx_keypad.c hw/input/pxa2xx_keypad.c
hw/stellaris_input.c hw/input/stellaris_input.c
hw/tsc2005.c hw/input/tsc2005.c
hw/tsc210x.c hw/input/tsc210x.c
hw/vmmouse.c hw/input/vmmouse.c
== hw/intc ==
hw/apic.c hw/intc/apic.c
hw/apic_common.c hw/intc/apic_common.c
hw/arm_gic.c hw/intc/arm_gic.c
hw/arm_gic_common.c hw/intc/arm_gic_common.c
hw/armv7m_nvic.c hw/intc/armv7m_nvic.c
hw/etraxfs_pic.c hw/intc/etraxfs_pic.c
hw/exynos4210_combiner.c hw/intc/exynos4210_combiner.c
hw/exynos4210_gic.c hw/intc/exynos4210_gic.c
hw/grlib_irqmp.c hw/intc/grlib_irqmp.c
hw/heathrow_pic.c hw/intc/heathrow_pic.c
hw/i8259.c hw/intc/i8259.c
hw/i8259_common.c hw/intc/i8259_common.c
hw/imx_avic.c hw/intc/imx_avic.c
hw/ioapic.c hw/intc/ioapic.c
hw/ioapic_common.c hw/intc/ioapic_common.c
hw/lm32_pic.c hw/intc/lm32_pic.c
hw/omap_intc.c hw/intc/omap_intc.c
hw/openpic.c hw/intc/openpic.c
hw/pl190.c hw/intc/pl190.c
hw/puv3_intc.c hw/intc/puv3_intc.c
hw/realview_gic.c hw/intc/realview_gic.c
hw/sbi.c hw/intc/sbi.c
hw/sh_intc.c hw/intc/sh_intc.c
hw/slavio_intctl.c hw/intc/slavio_intctl.c
hw/sun4c_intctl.c hw/intc/sun4c_intctl.c
hw/xilinx_intc.c hw/intc/xilinx_intc.c
== hw/isa ==
hw/apm.c hw/isa/apm.c
hw/applesmc.c hw/isa/applesmc.c
hw/debugexit.c hw/isa/debugexit.c
hw/i82374.c hw/isa/i82374.c
hw/i82378.c hw/isa/i82378.c
hw/isa-bus.c hw/isa/isa-bus.c
hw/isa_mmio.c hw/isa/isa_mmio.c
hw/lpc_ich9.c hw/isa/lpc_ich9.c
hw/pc-testdev.c hw/isa/pc-testdev.c
hw/pc87312.c hw/isa/pc87312.c
hw/piix4.c hw/isa/piix4.c
hw/sga.c hw/isa/sga.c
hw/vmport.c hw/isa/vmport.c
hw/vt82c686.c hw/isa/vt82c686.c
== hw/misc ==
hw/a9scu.c hw/misc/a9scu.c
hw/arm_l2x0.c hw/misc/arm_l2x0.c
hw/arm_sysctl.c hw/misc/arm_sysctl.c
hw/cbus.c hw/misc/cbus.c
hw/cuda.c hw/misc/macio/cuda.c
hw/eccmemctl.c hw/misc/eccmemctl.c
hw/exynos4210_pmu.c hw/misc/exynos4210_pmu.c
hw/imx_ccm.c hw/misc/imx_ccm.c
hw/lm32_sys.c hw/misc/lm32_sys.c
hw/mac_dbdma.c hw/misc/macio/mac_dbdma.c
hw/macio.c hw/misc/macio/macio.c
hw/max111x.c hw/misc/max111x.c
hw/milkymist-hpdmc.c hw/misc/milkymist-hpdmc.c
hw/milkymist-pfpu.c hw/misc/milkymist-pfpu.c
hw/mst_fpga.c hw/misc/mst_fpga.c
hw/omap_clk.c hw/misc/omap_clk.c
hw/omap_gpmc.c hw/misc/omap_gpmc.c
hw/omap_l4.c hw/misc/omap_l4.c
hw/omap_sdrc.c hw/misc/omap_sdrc.c
hw/omap_tap.c hw/misc/omap_tap.c
hw/puv3_pm.c hw/misc/puv3_pm.c
hw/pxa2xx_pcmcia.c hw/misc/pxa2xx_pcmcia.c
hw/slavio_misc.c hw/misc/slavio_misc.c
hw/tmp105.c hw/misc/tmp105.c
hw/zynq_slcr.c hw/misc/zynq_slcr.c
== hw/net ==
hw/cadence_gem.c hw/net/cadence_gem.c
hw/dp8393x.c hw/net/dp8393x.c
hw/e1000.c hw/net/e1000.c
hw/eepro100.c hw/net/eepro100.c
hw/etraxfs_eth.c hw/net/etraxfs_eth.c
hw/lan9118.c hw/net/lan9118.c
hw/lance.c hw/net/lance.c
hw/mcf_fec.c hw/net/mcf_fec.c
hw/milkymist-minimac2.c hw/net/milkymist-minimac2.c
hw/mipsnet.c hw/net/mipsnet.c
hw/ne2000-isa.c hw/net/ne2000-isa.c
hw/ne2000.c hw/net/ne2000.c
hw/opencores_eth.c hw/net/opencores_eth.c
hw/pcnet-pci.c hw/net/pcnet-pci.c
hw/pcnet.c hw/net/pcnet.c
hw/rtl8139.c hw/net/rtl8139.c
hw/smc91c111.c hw/net/smc91c111.c
hw/spapr_llan.c hw/net/spapr_llan.c
hw/stellaris_enet.c hw/net/stellaris_enet.c
hw/vhost_net.c hw/net/vhost_net.c
hw/virtio-net.c hw/net/virtio-net.c
hw/xen_nic.c hw/net/xen_nic.c
hw/xgmac.c hw/net/xgmac.c
hw/xilinx_axidma.c hw/net/xilinx_axidma.c
hw/xilinx_axienet.c hw/net/xilinx_axienet.c
hw/xilinx_ethlite.c hw/net/xilinx_ethlite.c
== hw/nvram ==
hw/ds1225y.c hw/nvram/ds1225y.c
hw/eeprom93xx.c hw/nvram/eeprom93xx.c
hw/fw_cfg.c hw/nvram/fw_cfg.c
hw/mac_nvram.c hw/nvram/mac_nvram.c
hw/spapr_nvram.c hw/nvram/spapr_nvram.c
== hw/pci ==
hw/alpha_typhoon.c hw/pci/host-typhoon.c
hw/apb_pci.c hw/pci/host-apb.c
hw/bonito.c hw/pci/host-bonito.c
hw/dec_pci.c hw/pci/host-dec.c
hw/grackle_pci.c hw/pci/host-grackle.c
hw/gt64xxx.c hw/pci/host-gt64xxx.c
hw/i82801b11.c hw/pci/i82801b11.c
hw/ioh3420.c hw/pci/ioh3420.c
hw/ivshmem.c hw/pci/ivshmem.c
hw/pam.c hw/pci/pam.c
hw/pci_bridge_dev.c hw/pci/pci_bridge_dev.c
hw/piix_pci.c hw/pci/host-piix.c
hw/ppc4xx_pci.c hw/pci/host-ppc4xx.c
hw/ppce500_pci.c hw/pci/host-ppce500.c
hw/prep_pci.c hw/pci/host-prep.c
hw/q35.c hw/pci/host-q35.c
hw/sh_pci.c hw/pci/host-sh.c
hw/spapr_pci.c hw/pci/host-spapr.c
hw/unin_pci.c hw/pci/host-uninorth.c
hw/versatile_pci.c hw/pci/host-versatile.c
hw/vfio_pci.c hw/pci/vfio.c
hw/xio3130_downstream.c hw/pci/xio3130_downstream.c
hw/xio3130_upstream.c hw/pci/xio3130_upstream.c
== hw/scsi ==
hw/esp-pci.c hw/scsi/esp-pci.c
hw/esp.c hw/scsi/esp.c
hw/lsi53c895a.c hw/scsi/lsi53c895a.c
hw/megasas.c hw/scsi/megasas.c
hw/scsi-bus.c hw/scsi/scsi-bus.c
hw/scsi-disk.c hw/scsi/scsi-disk.c
hw/scsi-generic.c hw/scsi/scsi-generic.c
hw/spapr_vscsi.c hw/scsi/spapr_vscsi.c
hw/virtio-scsi.c hw/scsi/virtio-scsi.c
== hw/sd ==
hw/milkymist-memcard.c hw/sd/milkymist-memcard.c
hw/omap_mmc.c hw/sd/omap_mmc.c
hw/pl181.c hw/sd/pl181.c
hw/pxa2xx_mmci.c hw/sd/pxa2xx_mmci.c
hw/sd.c hw/sd/sd.c
hw/sdhci.c hw/sd/sdhci.c
hw/ssi-sd.c hw/sd/ssi-sd.c
== hw/ssi ==
hw/omap_spi.c hw/ssi/omap_spi.c
hw/pl022.c hw/ssi/pl022.c
hw/ssi.c hw/ssi/ssi.c
hw/xilinx_spi.c hw/ssi/xilinx_spi.c
hw/xilinx_spips.c hw/ssi/xilinx_spips.c
== hw/timer ==
hw/arm_mptimer.c hw/timer/arm_mptimer.c
hw/arm_timer.c hw/timer/arm_timer.c
hw/cadence_ttc.c hw/timer/cadence_ttc.c
hw/ds1338.c hw/timer/ds1338.c
hw/etraxfs_timer.c hw/timer/etraxfs_timer.c
hw/exynos4210_mct.c hw/timer/exynos4210_mct.c
hw/exynos4210_pwm.c hw/timer/exynos4210_pwm.c
hw/exynos4210_rtc.c hw/timer/exynos4210_rtc.c
hw/grlib_gptimer.c hw/timer/grlib_gptimer.c
hw/hpet.c hw/timer/hpet.c
hw/i8254.c hw/timer/i8254.c
hw/i8254_common.c hw/timer/i8254_common.c
hw/imx_timer.c hw/timer/imx_timer.c
hw/lm32_timer.c hw/timer/lm32_timer.c
hw/m48t59.c hw/timer/m48t59.c
hw/mc146818rtc.c hw/timer/mc146818rtc.c
hw/milkymist-sysctl.c hw/timer/milkymist-sysctl.c
hw/omap_gptimer.c hw/timer/omap_gptimer.c
hw/omap_synctimer.c hw/timer/omap_synctimer.c
hw/pl031.c hw/timer/pl031.c
hw/puv3_ost.c hw/timer/puv3_ost.c
hw/pxa2xx_timer.c hw/timer/pxa2xx_timer.c
hw/sh_timer.c hw/timer/sh_timer.c
hw/slavio_timer.c hw/timer/slavio_timer.c
hw/tusb6010.c hw/timer/tusb6010.c
hw/twl92230.c hw/timer/twl92230.c
hw/xilinx_timer.c hw/timer/xilinx_timer.c
== hw/usb ==
hw/ccid-card-emulated.c hw/usb/ccid-card-emulated.c
hw/ccid-card-passthru.c hw/usb/ccid-card-passthru.c
== hw/virtio ==
hw/vhost.c hw/virtio/vhost.c
hw/virtio-balloon.c hw/virtio/virtio-balloon.c
hw/virtio-bus.c hw/virtio/virtio-bus.c
hw/virtio-pci.c hw/virtio/virtio-pci.c
hw/virtio-rng.c hw/virtio/virtio-rng.c
hw/virtio.c hw/virtio/virtio.c
== hw/watchdog ==
hw/watchdog.c hw/watchdog/watchdog.c
hw/wdt_i6300esb.c hw/watchdog/wdt_i6300esb.c
hw/wdt_ib700.c hw/watchdog/wdt_ib700.c
And a few "outliers":
== hw/arm ==
hw/a15mpcore.c hw/arm/a15mpcore.c
hw/a9mpcore.c hw/arm/a9mpcore.c
hw/arm11mpcore.c hw/arm/arm11mpcore.c
hw/kvm/arm_gic.c hw/arm/kvm/arm_gic.c
hw/strongarm.c hw/arm/strongarm.c
hw/tc6393xb.c hw/arm/tc6393xb.c
== hw/i386/kvm ==
hw/kvm/apic.c hw/i386/kvm/apic.c
hw/kvm/clock.c hw/i386/kvm/clock.c
hw/kvm/i8254.c hw/i386/kvm/i8254.c
hw/kvm/i8259.c hw/i386/kvm/i8259.c
hw/kvm/ioapic.c hw/i386/kvm/ioapic.c
hw/kvm/pci-assign.c hw/i386/kvm/pci-assign.c
== hw/xen ==
hw/xen-host-pci-device.c hw/xen/xen-host-pci-device.c
hw/xen_apic.c hw/xen/xen_apic.c
hw/xen_backend.c hw/xen/xen_backend.c
hw/xen_devconfig.c hw/xen/xen_devconfig.c
hw/xen_platform.c hw/xen/xen_platform.c
hw/xen_pt.c hw/xen/xen_pt.c
hw/xen_pt_config_init.c hw/xen/xen_pt_config_init.c
hw/xen_pt_msi.c hw/xen/xen_pt_msi.c
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [RFC] Proposal for hw/ split
2013-03-11 11:17 [Qemu-devel] [RFC] Proposal for hw/ split Paolo Bonzini
@ 2013-03-11 11:31 ` Peter Maydell
2013-03-11 11:54 ` Paolo Bonzini
2013-03-11 11:52 ` Edgar E. Iglesias
` (2 subsequent siblings)
3 siblings, 1 reply; 12+ messages in thread
From: Peter Maydell @ 2013-03-11 11:31 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Peter Crosthwaite, qemu-devel, afaerber, agraf
On 11 March 2013 11:17, Paolo Bonzini <pbonzini@redhat.com> wrote:
> - Files go in hw/ARCH/ if they used to be in hw/ARCH/Makefile.objs and
> they define multiple devices (example: hw/arm/tc6393xb.c)
Why are multiple devices in one file a bad thing (or at least, a
thing that should determine where a file lives)? Should piix_pci.c
move to hw/i386 because it happens to define four devices?
Basically I disagree that trying to move more things into hw/$ARCH
serves any useful purpose. The split-by-subsystem stuff looks good.
> == hw/arm ==
> hw/a15mpcore.c hw/arm/a15mpcore.c
One device.
> hw/a9mpcore.c hw/arm/a9mpcore.c
One device.
> hw/arm11mpcore.c hw/arm/arm11mpcore.c
Two devices but I can split them if you insist.
> hw/kvm/arm_gic.c hw/arm/kvm/arm_gic.c
If we're going to move kvm specific devices out of hw/kvm I'd
rather they just went in hw/. It's an implementation detail that
a device's back end is KVM specific, so kvm_arm_gic.c should go
alongside arm_gic.c.
> hw/strongarm.c hw/arm/strongarm.c
We could split the individual devices out into files, which would
leave sa1110_init() itself (which kind of wants to be a SoC
container eventually I guess).
> hw/tc6393xb.c hw/arm/tc6393xb.c
This is only a single device. (It happens to be a not-converted-to-qdev
device.)
-- PMM
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [RFC] Proposal for hw/ split
2013-03-11 11:17 [Qemu-devel] [RFC] Proposal for hw/ split Paolo Bonzini
2013-03-11 11:31 ` Peter Maydell
@ 2013-03-11 11:52 ` Edgar E. Iglesias
2013-03-11 13:37 ` Stefan Hajnoczi
2013-03-12 6:48 ` Richard Henderson
3 siblings, 0 replies; 12+ messages in thread
From: Edgar E. Iglesias @ 2013-03-11 11:52 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Peter Crosthwaite, peter.maydell, qemu-devel, afaerber, agraf
On Mon, Mar 11, 2013 at 12:17:20PM +0100, Paolo Bonzini wrote:
> The general ideas are (earlier rules override the later, and exceptions
> are of course possible):
>
> - Board files go in hw/ARCH/ (already done).
>
> - Files go in hw/ARCH/ if they reference that arch's CPUState (already done)
>
> - Files already in a subdirectory are not moved (examples: some PPC/S390
> files, USB devices).
>
> - Files go in hw/ARCH/ if they used to be in hw/ARCH/Makefile.objs and
> they define multiple devices (example: hw/arm/tc6393xb.c)
>
> - Directories are created by "subsystem" (e.g. hw/pci) and "device type"
> (hw/audio), with the "device type" taking priority.
>
> Here is the list of .c files in hw/ and the corresponding destination.
>
> Maintainers that wish to have more files in hw/ARCH are welcome to take
> a look at the list of hw/misc devices and suggest changes.
>
> As a general rule, composite devices ought to be split into multiple
> devices with a small stub in hw/ARCH to build up the result. For
> example, hw/display/sm501.c could be split into hw/display/sm501_crt.c
> and the rest moved into hw/sh4/r2d.c.
>
> == hw/acpi ==
> hw/acpi.c hw/acpi/core.c
> hw/acpi_ich9.c hw/acpi/ich9.c
> hw/acpi_piix4.c hw/acpi/piix4.c
>
> == hw/audio ==
> hw/ac97.c hw/audio/ac97.c
> hw/adlib.c hw/audio/adlib.c
> hw/cs4231a.c hw/audio/cs4231a.c
> hw/cs4231.c hw/audio/cs4231.c
> hw/es1370.c hw/audio/es1370.c
> hw/fmopl.c hw/audio/fmopl.c
> hw/gus.c hw/audio/gus.c
> hw/gusemu_hal.c hw/audio/gusemu_hal.c
> hw/gusemu_mixer.c hw/audio/gusemu_mixer.c
> hw/hda-audio.c hw/audio/hda-codec.c
> hw/intel-hda.c hw/audio/intel-hda.c
> hw/lm4549.c hw/audio/lm4549.c
> hw/marvell_88w8618_audio.c hw/audio/marvell_88w8618.c
> hw/milkymist-ac97.c hw/audio/milkymist-ac97.c
> hw/pcspk.c hw/audio/pcspk.c
> hw/pl041.c hw/audio/pl041.c
> hw/sb16.c hw/audio/sb16.c
> hw/wm8750.c hw/audio/wm8750.c
>
> == hw/block ==
> hw/block-common.c hw/block/block.c
> hw/cdrom.c hw/block/cdrom.c
> hw/dataplane/Makefile.objs hw/block/dataplane/Makefile.objs
> hw/dataplane/hostmem.c hw/block/dataplane/hostmem.c
> hw/dataplane/ioq.c hw/block/dataplane/ioq.c
> hw/dataplane/virtio-blk.c hw/block/dataplane/virtio-blk.c
> hw/dataplane/vring.c hw/block/dataplane/vring.c
> hw/ecc.c hw/block/ecc.c
> hw/fdc.c hw/block/fdc.c
> hw/hd-geometry.c hw/block/hd-geometry.c
> hw/m25p80.c hw/block/m25p80.c
> hw/nand.c hw/block/nand.c
> hw/onenand.c hw/block/onenand.c
> hw/pc_sysfw.c hw/block/pc_sysfw.c
> hw/pflash_cfi01.c hw/block/pflash_cfi01.c
> hw/pflash_cfi02.c hw/block/pflash_cfi02.c
> hw/tc58128.c hw/block/tc58128.c
> hw/virtio-blk.c hw/block/virtio-blk.c
> hw/xen_disk.c hw/block/xen_disk.c
>
> == hw/bt ==
> hw/bt-hci-csr.c hw/bt/hci-csr.c
> hw/bt-hci.c hw/bt/hci.c
> hw/bt-hid.c hw/bt/hid.c
> hw/bt-l2cap.c hw/bt/l2cap.c
> hw/bt-sdp.c hw/bt/sdp.c
> hw/bt.c hw/bt/core.c
>
> == hw/char ==
> hw/cadence_uart.c hw/char/cadence_uart.c
> hw/debugcon.c hw/char/debugcon.c
> hw/escc.c hw/char/escc.c
> hw/etraxfs_ser.c hw/char/etraxfs_ser.c
> hw/exynos4210_uart.c hw/char/exynos4210_uart.c
> hw/grlib_apbuart.c hw/char/grlib_apbuart.c
> hw/imx_serial.c hw/char/imx_serial.c
> hw/ipack.c hw/char/ipack.c
> hw/ipoctal232.c hw/char/ipoctal232.c
> hw/lm32_juart.c hw/char/lm32_juart.c
> hw/lm32_uart.c hw/char/lm32_uart.c
> hw/mcf_uart.c hw/char/mcf_uart.c
> hw/milkymist-uart.c hw/char/milkymist-uart.c
> hw/omap_uart.c hw/char/omap_uart.c
> hw/parallel.c hw/char/parallel.c
> hw/pl011.c hw/char/pl011.c
> hw/s390x/sclpconsole.c hw/char/sclpconsole.c
> hw/serial-isa.c hw/char/serial-isa.c
> hw/serial-pci.c hw/char/serial-pci.c
> hw/serial.c hw/char/serial.c
> hw/sh_serial.c hw/char/sh_serial.c
> hw/spapr_vty.c hw/char/spapr_vty.c
> hw/tpci200.c hw/char/tpci200.c
> hw/virtio-console.c hw/char/virtio-console.c
> hw/virtio-serial-bus.c hw/char/virtio-serial-bus.c
> hw/xen_console.c hw/char/xen_console.c
> hw/xilinx_uartlite.c hw/char/xilinx_uartlite.c
>
> == hw/core ==
> hw/empty_slot.c hw/core/empty_slot.c
> hw/irq.c hw/core/irq.c
> hw/loader.c hw/core/loader.c
> hw/null-machine.c hw/core/null-machine.c
> hw/ptimer.c hw/core/ptimer.c
> hw/qdev-addr.c hw/core/qdev-addr.c
> hw/qdev-properties-system.c hw/core/qdev-properties-system.c
> hw/qdev-properties.c hw/core/qdev-properties.c
> hw/qdev.c hw/core/qdev.c
> hw/stream.c hw/core/stream.c
> hw/sysbus.c hw/core/sysbus.c
>
> == hw/display ==
> hw/ads7846.c hw/display/ads7846.c
> hw/blizzard.c hw/display/blizzard.c
> hw/cirrus_vga.c hw/display/cirrus_vga.c
> hw/exynos4210_fimd.c hw/display/exynos4210_fimd.c
> hw/framebuffer.c hw/display/framebuffer.c
> hw/g364fb.c hw/display/g364fb.c
> hw/jazz_led.c hw/display/jazz_led.c
> hw/milkymist-tmu2.c hw/display/milkymist-tmu2.c
> hw/milkymist-vgafb.c hw/display/milkymist-vgafb.c
> hw/omap_dss.c hw/display/omap_dss.c
> hw/omap_lcdc.c hw/display/omap_lcdc.c
> hw/pl110.c hw/display/pl110.c
> hw/pxa2xx_lcd.c hw/display/pxa2xx_lcd.c
> hw/qxl-logger.c hw/display/qxl-logger.c
> hw/qxl-render.c hw/display/qxl-render.c
> hw/qxl.c hw/display/qxl.c
> hw/sm501.c hw/display/sm501.c
> hw/ssd0303.c hw/display/ssd0303.c
> hw/ssd0323.c hw/display/ssd0323.c
> hw/tcx.c hw/display/tcx.c
> hw/vga-isa-mm.c hw/display/vga-isa-mm.c
> hw/vga-isa.c hw/display/vga-isa.c
> hw/vga-pci.c hw/display/vga-pci.c
> hw/vga.c hw/display/vga.c
> hw/vmware_vga.c hw/display/vmware_vga.c
> hw/xenfb.c hw/display/xenfb.c
>
> == hw/dma ==
> hw/dma.c hw/dma/i8257.c
> hw/etraxfs_dma.c hw/dma/etraxfs_dma.c
> hw/omap_dma.c hw/dma/omap_dma.c
> hw/pl080.c hw/dma/pl080.c
> hw/puv3_dma.c hw/dma/puv3_dma.c
> hw/pxa2xx_dma.c hw/dma/pxa2xx_dma.c
> hw/rc4030.c hw/dma/rc4030.c
> hw/soc_dma.c hw/dma/soc_dma.c
> hw/sparc32_dma.c hw/dma/sparc32_dma.c
> hw/sun4m_iommu.c hw/dma/sun4m_iommu.c
>
> == hw/gpio ==
> hw/max7310.c hw/gpio/max7310.c
> hw/omap_gpio.c hw/gpio/omap_gpio.c
> hw/pl061.c hw/gpio/pl061.c
> hw/puv3_gpio.c hw/gpio/puv3_gpio.c
> hw/zaurus.c hw/gpio/zaurus.c
>
> == hw/i2c ==
> hw/bitbang_i2c.c hw/i2c/bitbang_i2c.c
> hw/exynos4210_i2c.c hw/i2c/exynos4210_i2c.c
> hw/i2c.c hw/i2c/core.c
> hw/omap_i2c.c hw/i2c/omap_i2c.c
> hw/pm_smbus.c hw/i2c/pm_smbus.c
> hw/smbus.c hw/i2c/smbus.c
> hw/smbus_eeprom.c hw/i2c/smbus_eeprom.c
> hw/smbus_ich9.c hw/i2c/smbus_ich9.c
> hw/versatile_i2c.c hw/i2c/versatile_i2c.c
>
> == hw/input ==
> hw/adb.c hw/input/adb.c
> hw/hid.c hw/input/hid.c
> hw/lm832x.c hw/input/lm832x.c
> hw/milkymist-softusb.c hw/input/milkymist-softusb.c
> hw/pckbd.c hw/input/pckbd.c
> hw/pl050.c hw/input/pl050.c
> hw/ps2.c hw/input/ps2.c
> hw/pxa2xx_keypad.c hw/input/pxa2xx_keypad.c
> hw/stellaris_input.c hw/input/stellaris_input.c
> hw/tsc2005.c hw/input/tsc2005.c
> hw/tsc210x.c hw/input/tsc210x.c
> hw/vmmouse.c hw/input/vmmouse.c
>
> == hw/intc ==
> hw/apic.c hw/intc/apic.c
> hw/apic_common.c hw/intc/apic_common.c
> hw/arm_gic.c hw/intc/arm_gic.c
> hw/arm_gic_common.c hw/intc/arm_gic_common.c
> hw/armv7m_nvic.c hw/intc/armv7m_nvic.c
> hw/etraxfs_pic.c hw/intc/etraxfs_pic.c
> hw/exynos4210_combiner.c hw/intc/exynos4210_combiner.c
> hw/exynos4210_gic.c hw/intc/exynos4210_gic.c
> hw/grlib_irqmp.c hw/intc/grlib_irqmp.c
> hw/heathrow_pic.c hw/intc/heathrow_pic.c
> hw/i8259.c hw/intc/i8259.c
> hw/i8259_common.c hw/intc/i8259_common.c
> hw/imx_avic.c hw/intc/imx_avic.c
> hw/ioapic.c hw/intc/ioapic.c
> hw/ioapic_common.c hw/intc/ioapic_common.c
> hw/lm32_pic.c hw/intc/lm32_pic.c
> hw/omap_intc.c hw/intc/omap_intc.c
> hw/openpic.c hw/intc/openpic.c
> hw/pl190.c hw/intc/pl190.c
> hw/puv3_intc.c hw/intc/puv3_intc.c
> hw/realview_gic.c hw/intc/realview_gic.c
> hw/sbi.c hw/intc/sbi.c
> hw/sh_intc.c hw/intc/sh_intc.c
> hw/slavio_intctl.c hw/intc/slavio_intctl.c
> hw/sun4c_intctl.c hw/intc/sun4c_intctl.c
> hw/xilinx_intc.c hw/intc/xilinx_intc.c
>
> == hw/isa ==
> hw/apm.c hw/isa/apm.c
> hw/applesmc.c hw/isa/applesmc.c
> hw/debugexit.c hw/isa/debugexit.c
> hw/i82374.c hw/isa/i82374.c
> hw/i82378.c hw/isa/i82378.c
> hw/isa-bus.c hw/isa/isa-bus.c
> hw/isa_mmio.c hw/isa/isa_mmio.c
> hw/lpc_ich9.c hw/isa/lpc_ich9.c
> hw/pc-testdev.c hw/isa/pc-testdev.c
> hw/pc87312.c hw/isa/pc87312.c
> hw/piix4.c hw/isa/piix4.c
> hw/sga.c hw/isa/sga.c
> hw/vmport.c hw/isa/vmport.c
> hw/vt82c686.c hw/isa/vt82c686.c
>
> == hw/misc ==
> hw/a9scu.c hw/misc/a9scu.c
> hw/arm_l2x0.c hw/misc/arm_l2x0.c
> hw/arm_sysctl.c hw/misc/arm_sysctl.c
> hw/cbus.c hw/misc/cbus.c
> hw/cuda.c hw/misc/macio/cuda.c
> hw/eccmemctl.c hw/misc/eccmemctl.c
> hw/exynos4210_pmu.c hw/misc/exynos4210_pmu.c
> hw/imx_ccm.c hw/misc/imx_ccm.c
> hw/lm32_sys.c hw/misc/lm32_sys.c
> hw/mac_dbdma.c hw/misc/macio/mac_dbdma.c
> hw/macio.c hw/misc/macio/macio.c
> hw/max111x.c hw/misc/max111x.c
> hw/milkymist-hpdmc.c hw/misc/milkymist-hpdmc.c
> hw/milkymist-pfpu.c hw/misc/milkymist-pfpu.c
> hw/mst_fpga.c hw/misc/mst_fpga.c
> hw/omap_clk.c hw/misc/omap_clk.c
> hw/omap_gpmc.c hw/misc/omap_gpmc.c
> hw/omap_l4.c hw/misc/omap_l4.c
> hw/omap_sdrc.c hw/misc/omap_sdrc.c
> hw/omap_tap.c hw/misc/omap_tap.c
> hw/puv3_pm.c hw/misc/puv3_pm.c
> hw/pxa2xx_pcmcia.c hw/misc/pxa2xx_pcmcia.c
> hw/slavio_misc.c hw/misc/slavio_misc.c
> hw/tmp105.c hw/misc/tmp105.c
> hw/zynq_slcr.c hw/misc/zynq_slcr.c
>
> == hw/net ==
> hw/cadence_gem.c hw/net/cadence_gem.c
> hw/dp8393x.c hw/net/dp8393x.c
> hw/e1000.c hw/net/e1000.c
> hw/eepro100.c hw/net/eepro100.c
> hw/etraxfs_eth.c hw/net/etraxfs_eth.c
> hw/lan9118.c hw/net/lan9118.c
> hw/lance.c hw/net/lance.c
> hw/mcf_fec.c hw/net/mcf_fec.c
> hw/milkymist-minimac2.c hw/net/milkymist-minimac2.c
> hw/mipsnet.c hw/net/mipsnet.c
> hw/ne2000-isa.c hw/net/ne2000-isa.c
> hw/ne2000.c hw/net/ne2000.c
> hw/opencores_eth.c hw/net/opencores_eth.c
> hw/pcnet-pci.c hw/net/pcnet-pci.c
> hw/pcnet.c hw/net/pcnet.c
> hw/rtl8139.c hw/net/rtl8139.c
> hw/smc91c111.c hw/net/smc91c111.c
> hw/spapr_llan.c hw/net/spapr_llan.c
> hw/stellaris_enet.c hw/net/stellaris_enet.c
> hw/vhost_net.c hw/net/vhost_net.c
> hw/virtio-net.c hw/net/virtio-net.c
> hw/xen_nic.c hw/net/xen_nic.c
> hw/xgmac.c hw/net/xgmac.c
> hw/xilinx_axidma.c hw/net/xilinx_axidma.c
Hi Paulo,
hw/xilinx_axidma.c is a generic DMA unit, should probably
go under hw/dma.
Best regards,
Edgar
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [RFC] Proposal for hw/ split
2013-03-11 11:31 ` Peter Maydell
@ 2013-03-11 11:54 ` Paolo Bonzini
2013-03-11 12:39 ` Peter Maydell
0 siblings, 1 reply; 12+ messages in thread
From: Paolo Bonzini @ 2013-03-11 11:54 UTC (permalink / raw)
To: Peter Maydell; +Cc: Peter Crosthwaite, qemu-devel, afaerber, agraf
Il 11/03/2013 12:31, Peter Maydell ha scritto:
> On 11 March 2013 11:17, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> - Files go in hw/ARCH/ if they used to be in hw/ARCH/Makefile.objs and
>> they define multiple devices (example: hw/arm/tc6393xb.c)
>
> Why are multiple devices in one file a bad thing (or at least, a
> thing that should determine where a file lives)? Should piix_pci.c
> move to hw/i386 because it happens to define four devices?
Two of the devices are different parts of the same device. Basically
the part that is only on SysBus vs. the part that is visible on the PCI bus.
The other two should indeed be moved to hw/isa/piix3.c (on my todo list).
> Basically I disagree that trying to move more things into hw/$ARCH
> serves any useful purpose. The split-by-subsystem stuff looks good.
>
>> == hw/arm ==
>> hw/a15mpcore.c hw/arm/a15mpcore.c
>
> One device.
>
>> hw/a9mpcore.c hw/arm/a9mpcore.c
>
> One device.
>
>> hw/arm11mpcore.c hw/arm/arm11mpcore.c
>
> Two devices but I can split them if you insist.
These are little more than SoC containers, aren't they?
>> hw/kvm/arm_gic.c hw/arm/kvm/arm_gic.c
>
> If we're going to move kvm specific devices out of hw/kvm I'd
> rather they just went in hw/. It's an implementation detail that
> a device's back end is KVM specific, so kvm_arm_gic.c should go
> alongside arm_gic.c.
I moved them to hw/ARCH because they really depend on the host kernel.
Even the very same device might have a different interface on a
different kernel. But I can certainly move these to hw/SUBSYSTEM/kvm.
(I think you said you disagree, but the next step for me would be to
move hw/ARCH to target-ARCH/hw).
>> hw/strongarm.c hw/arm/strongarm.c
>
> We could split the individual devices out into files, which would
> leave sa1110_init() itself (which kind of wants to be a SoC
> container eventually I guess).
>
>> hw/tc6393xb.c hw/arm/tc6393xb.c
>
> This is only a single device. (It happens to be a not-converted-to-qdev
> device.)
Right, I'll move it to hw/display.
Paolo
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [RFC] Proposal for hw/ split
2013-03-11 11:54 ` Paolo Bonzini
@ 2013-03-11 12:39 ` Peter Maydell
2013-03-11 12:44 ` Paolo Bonzini
2013-03-11 13:19 ` Markus Armbruster
0 siblings, 2 replies; 12+ messages in thread
From: Peter Maydell @ 2013-03-11 12:39 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Peter Crosthwaite, qemu-devel, afaerber, agraf
On 11 March 2013 11:54, Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il 11/03/2013 12:31, Peter Maydell ha scritto:
>> On 11 March 2013 11:17, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>> hw/arm11mpcore.c hw/arm/arm11mpcore.c
>>
>> Two devices but I can split them if you insist.
>
> These are little more than SoC containers, aren't they?
They're container devices, yes. But why should container devices
go under hw/$ARCH ?
>>> hw/kvm/arm_gic.c hw/arm/kvm/arm_gic.c
>>
>> If we're going to move kvm specific devices out of hw/kvm I'd
>> rather they just went in hw/. It's an implementation detail that
>> a device's back end is KVM specific, so kvm_arm_gic.c should go
>> alongside arm_gic.c.
>
> I moved them to hw/ARCH because they really depend on the host kernel.
That's backwards. To the extent hw/ARCH is anything, it's stuff
specific to guest ARCH, not host ARCH.
I guess fundamentally my point here is I don't really see why
you're trying to move stuff into hw/ARCH at all. Better to find
a classification scheme that doesn't try to distinguish based
on guest architecture IMHO.
> Even the very same device might have a different interface on a
> different kernel. But I can certainly move these to hw/SUBSYSTEM/kvm.
>
> (I think you said you disagree, but the next step for me would be to
> move hw/ARCH to target-ARCH/hw).
Yeah. If nothing else, for practical reasons: Anthony will take
pullreqs for hw/ but not for target-ARCH. Also target-ARCH already
has a nice clean definition of what code goes in it: it's the
code related to emulation of the ARCH CPU. Putting device code
into it would just break that definition for no particularly
obvious reason I can see (whilst also breaking the definition
that devices live under hw/).
-- PMM
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [RFC] Proposal for hw/ split
2013-03-11 12:39 ` Peter Maydell
@ 2013-03-11 12:44 ` Paolo Bonzini
2013-03-11 13:08 ` Peter Maydell
2013-03-11 13:19 ` Markus Armbruster
1 sibling, 1 reply; 12+ messages in thread
From: Paolo Bonzini @ 2013-03-11 12:44 UTC (permalink / raw)
To: Peter Maydell; +Cc: Peter Crosthwaite, qemu-devel, afaerber, agraf
Il 11/03/2013 13:39, Peter Maydell ha scritto:
> On 11 March 2013 11:54, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> Il 11/03/2013 12:31, Peter Maydell ha scritto:
>>> On 11 March 2013 11:17, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>>> hw/arm11mpcore.c hw/arm/arm11mpcore.c
>>>
>>> Two devices but I can split them if you insist.
>>
>> These are little more than SoC containers, aren't they?
>
> They're container devices, yes. But why should container devices
> go under hw/$ARCH ?
Because they don't really implement any logic, ideally a board should be
a little more than a bunch of container devices. And boards go under
hw/$ARCH.
>>>> hw/kvm/arm_gic.c hw/arm/kvm/arm_gic.c
>>>
>>> If we're going to move kvm specific devices out of hw/kvm I'd
>>> rather they just went in hw/. It's an implementation detail that
>>> a device's back end is KVM specific, so kvm_arm_gic.c should go
>>> alongside arm_gic.c.
>>
>> I moved them to hw/ARCH because they really depend on the host kernel.
>
> That's backwards. To the extent hw/ARCH is anything, it's stuff
> specific to guest ARCH, not host ARCH.
For KVM guest == host, so you cannot reuse them for any other
architectures. But if there's disagreement, leaving them in hw/kvm/ is
the best thing to do.
Paolo
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [RFC] Proposal for hw/ split
2013-03-11 12:44 ` Paolo Bonzini
@ 2013-03-11 13:08 ` Peter Maydell
2013-03-11 13:12 ` Paolo Bonzini
0 siblings, 1 reply; 12+ messages in thread
From: Peter Maydell @ 2013-03-11 13:08 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Peter Crosthwaite, qemu-devel, afaerber, agraf
On 11 March 2013 12:44, Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il 11/03/2013 13:39, Peter Maydell ha scritto:
>> On 11 March 2013 11:54, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>> These are little more than SoC containers, aren't they?
>>
>> They're container devices, yes. But why should container devices
>> go under hw/$ARCH ?
>
> Because they don't really implement any logic, ideally a board should be
> a little more than a bunch of container devices.
This is an argument for putting boards in the same place as
container devices (which I would agree with), not for putting
container devices in the same place we currently put boards
(which I would disagree with).
-- PMM
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [RFC] Proposal for hw/ split
2013-03-11 13:08 ` Peter Maydell
@ 2013-03-11 13:12 ` Paolo Bonzini
0 siblings, 0 replies; 12+ messages in thread
From: Paolo Bonzini @ 2013-03-11 13:12 UTC (permalink / raw)
To: Peter Maydell; +Cc: Peter Crosthwaite, qemu-devel, afaerber, agraf
Il 11/03/2013 14:08, Peter Maydell ha scritto:
>>>> >>> These are little more than SoC containers, aren't they?
>>> >>
>>> >> They're container devices, yes. But why should container devices
>>> >> go under hw/$ARCH ?
>> >
>> > Because they don't really implement any logic, ideally a board should be
>> > a little more than a bunch of container devices.
> This is an argument for putting boards in the same place as
> container devices (which I would agree with), not for putting
> container devices in the same place we currently put boards
> (which I would disagree with).
True. Still, hw/ARCH is a pretty decent place for boards (and in fact
it was part of "part 1" because it was more or less agreed-upon).
Paolo
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [RFC] Proposal for hw/ split
2013-03-11 12:39 ` Peter Maydell
2013-03-11 12:44 ` Paolo Bonzini
@ 2013-03-11 13:19 ` Markus Armbruster
1 sibling, 0 replies; 12+ messages in thread
From: Markus Armbruster @ 2013-03-11 13:19 UTC (permalink / raw)
To: Peter Maydell
Cc: Peter Crosthwaite, Paolo Bonzini, agraf, qemu-devel, afaerber
Peter Maydell <peter.maydell@linaro.org> writes:
> On 11 March 2013 11:54, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> Il 11/03/2013 12:31, Peter Maydell ha scritto:
>>> On 11 March 2013 11:17, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>>> hw/arm11mpcore.c hw/arm/arm11mpcore.c
>>>
>>> Two devices but I can split them if you insist.
>>
>> These are little more than SoC containers, aren't they?
>
> They're container devices, yes. But why should container devices
> go under hw/$ARCH ?
>
>>>> hw/kvm/arm_gic.c hw/arm/kvm/arm_gic.c
>>>
>>> If we're going to move kvm specific devices out of hw/kvm I'd
>>> rather they just went in hw/. It's an implementation detail that
>>> a device's back end is KVM specific, so kvm_arm_gic.c should go
>>> alongside arm_gic.c.
>>
>> I moved them to hw/ARCH because they really depend on the host kernel.
>
> That's backwards. To the extent hw/ARCH is anything, it's stuff
> specific to guest ARCH, not host ARCH.
>
> I guess fundamentally my point here is I don't really see why
> you're trying to move stuff into hw/ARCH at all. Better to find
> a classification scheme that doesn't try to distinguish based
> on guest architecture IMHO.
>
>> Even the very same device might have a different interface on a
>> different kernel. But I can certainly move these to hw/SUBSYSTEM/kvm.
>>
>> (I think you said you disagree, but the next step for me would be to
>> move hw/ARCH to target-ARCH/hw).
>
> Yeah. If nothing else, for practical reasons: Anthony will take
> pullreqs for hw/ but not for target-ARCH. Also target-ARCH already
> has a nice clean definition of what code goes in it: it's the
> code related to emulation of the ARCH CPU. Putting device code
> into it would just break that definition for no particularly
> obvious reason I can see (whilst also breaking the definition
> that devices live under hw/).
Good point. I really, really like separating device models from TCG as
clearly as possible.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [RFC] Proposal for hw/ split
2013-03-11 11:17 [Qemu-devel] [RFC] Proposal for hw/ split Paolo Bonzini
2013-03-11 11:31 ` Peter Maydell
2013-03-11 11:52 ` Edgar E. Iglesias
@ 2013-03-11 13:37 ` Stefan Hajnoczi
2013-03-12 6:48 ` Richard Henderson
3 siblings, 0 replies; 12+ messages in thread
From: Stefan Hajnoczi @ 2013-03-11 13:37 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Peter Crosthwaite, peter.maydell, qemu-devel, afaerber, agraf
On Mon, Mar 11, 2013 at 12:17:20PM +0100, Paolo Bonzini wrote:
> hw/dataplane/Makefile.objs hw/block/dataplane/Makefile.objs
> hw/dataplane/hostmem.c hw/block/dataplane/hostmem.c
> hw/dataplane/ioq.c hw/block/dataplane/ioq.c
> hw/dataplane/virtio-blk.c hw/block/dataplane/virtio-blk.c
> hw/dataplane/vring.c hw/block/dataplane/vring.c
Fine by me.
Stefan
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [RFC] Proposal for hw/ split
2013-03-11 11:17 [Qemu-devel] [RFC] Proposal for hw/ split Paolo Bonzini
` (2 preceding siblings ...)
2013-03-11 13:37 ` Stefan Hajnoczi
@ 2013-03-12 6:48 ` Richard Henderson
2013-03-12 7:33 ` Paolo Bonzini
3 siblings, 1 reply; 12+ messages in thread
From: Richard Henderson @ 2013-03-12 6:48 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Peter Crosthwaite, peter.maydell, qemu-devel, afaerber, agraf
On 2013-03-11 04:17, Paolo Bonzini wrote:
> == hw/pci ==
> hw/alpha_typhoon.c hw/pci/host-typhoon.c
Why wouldn't this go into hw/alpha/, really?
r~
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [RFC] Proposal for hw/ split
2013-03-12 6:48 ` Richard Henderson
@ 2013-03-12 7:33 ` Paolo Bonzini
0 siblings, 0 replies; 12+ messages in thread
From: Paolo Bonzini @ 2013-03-12 7:33 UTC (permalink / raw)
To: Richard Henderson
Cc: Peter Crosthwaite, peter.maydell, agraf, qemu-devel, afaerber
Il 12/03/2013 07:48, Richard Henderson ha scritto:
> On 2013-03-11 04:17, Paolo Bonzini wrote:
>> == hw/pci ==
>> hw/alpha_typhoon.c hw/pci/host-typhoon.c
>
> Why wouldn't this go into hw/alpha/, really?
Sure. I think the Alpha-specific interrupt delivery parts should be
separated into hw/alpha, like hw/cris/pic_cpu.c, and passed to the
device via GPIO pins. And after doing some parts could go in hw/pci and
others could go in hw/intc. The emulation is quite shallow, so I
couldn't really find a place for it.
Peter said he wants few or no devices in hw/arm/, so I proceeded in that
direction, but cases like this are when I'm totally okay with giving
maintainers all the leeway they want. I'll move this one back to hw/alpha/.
Paolo
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2013-03-12 7:34 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-11 11:17 [Qemu-devel] [RFC] Proposal for hw/ split Paolo Bonzini
2013-03-11 11:31 ` Peter Maydell
2013-03-11 11:54 ` Paolo Bonzini
2013-03-11 12:39 ` Peter Maydell
2013-03-11 12:44 ` Paolo Bonzini
2013-03-11 13:08 ` Peter Maydell
2013-03-11 13:12 ` Paolo Bonzini
2013-03-11 13:19 ` Markus Armbruster
2013-03-11 11:52 ` Edgar E. Iglesias
2013-03-11 13:37 ` Stefan Hajnoczi
2013-03-12 6:48 ` Richard Henderson
2013-03-12 7:33 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).