summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2013-07-23i440fx-pcihost: Use QOM realize for i440fx-pcihostHu Tao1-12/+17
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23i440fx: Use type-safe cast instead of direct access of parent devHu Tao1-9/+16
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> [AF: Converted remaining accesses and renamed to parent_obj] Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23ohci: Use QOM realize for OHCIHu Tao1-8/+6
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23ohci: QOM'ify some moreHu Tao1-14/+25
Introduce type constant and avoid DO_UPCAST(). Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> [AF: Avoid remaining OHCIPCIState::pci_dev uses, rename parent fields] Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23xen/xen_platform: QOM parent field cleanupAndreas Färber1-8/+13
Replace direct uses of PCIXenPlatformState::pci_dev field with QOM casts and rename it to parent_obj. Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23xen/xen_platform: QOM casting sweepPeter Crosthwaite1-5/+9
Define and use standard QOM cast macro. Remove usages of DO_UPCAST() and direct -> style upcasting. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> [AF: Dropped opaque casts] Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23misc/ivshmem: QOM parent field cleanupAndreas Färber1-15/+22
Replace direct uses of IVShmemState::dev with QOM casts and rename it to parent_obj. Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23misc/ivshmem: QOM Upcast SweepPeter Crosthwaite1-9/+13
Define and use standard QOM cast macro. Remove usages of DO_UPCAST() and direct -> style upcasting. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> [AF: Simplified casts and converted two more DO_UPCAST()s] Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23display/vmware_vga: QOM parent field cleanupAndreas Färber1-10/+13
Replace direct uses of pci_vmsvga_state_s::card with QOM casts and rename it to parent_obj. Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23display/vmware_vga: QOM casting sweepPeter Crosthwaite1-5/+8
Define and use standard QOM cast macro. Remove usages of DO_UPCAST() and direct -> style casting. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> [AF: Renamed to TYPE_VMWARE_VGA and VMWARE_VGA()] Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23misc/pci-testdev: QOM parent field cleanupAndreas Färber1-4/+7
Replace direct uses of PCITestDevState::dev with QOM casts and rename it to parent_obj. Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23misc/pci-testdev: QOM Upcast SweepPeter Crosthwaite1-4/+9
Define and use standard QOM cast macro. Remove usages of DO_UPCAST() and direct -> style upcasting. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> [AF: Replaced another DO_UPCAST()] Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23acpi/piix4: QOM parent field cleanupAndreas Färber1-12/+20
Replace direct uses of PIIX4PMState::dev with QOM casts and rename it to parent_obj. Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23acpi/piix4: QOM Upcast SweepPeter Crosthwaite1-14/+17
Define and use standard QOM cast macro. Remove usages of DO_UPCAST() and direct -> style upcasting. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23ide/ich: QOM parent field cleanupAndreas Färber3-17/+21
Replace direct uses of AHCIPCIState::card with QOM casts and rename it to parent_obj. Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23ide/ich: QOM Upcast SweepPeter Crosthwaite2-5/+10
Define and use standard QOM cast macro. Remove usages of DO_UPCAST() and direct -> style upcasting. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> [AF: Renamed to TYPE_ICH9_AHCI and used typedef in pci_ich9_reset()] Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23scsi/esp-pci: QOM parent field cleanupAndreas Färber1-6/+9
Replace direct uses of PCIESPState::dev with QOM casts and rename it to parent_obj. Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23scsi/esp-pci: QOM Upcast SweepPeter Crosthwaite1-5/+9
Define and use standard QOM cast macro. Remove usages of DO_UPCAST() and direct -> style upcasting. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23scsi/megasas: QOM parent field cleanupAndreas Färber1-20/+26
Replace direct uses of MegasasState::dev with QOM casts and rename it to parent_obj. Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23scsi/megasas: QOM Upcast SweepPeter Crosthwaite1-5/+10
Define and use standard QOM cast macro. Remove usages of DO_UPCAST() and direct -> style upcasting. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23scsi/lsi53c895a: QOM parent field cleanupAndreas Färber1-19/+27
Replace direct uses of LSIState::dev with QOM casts and rename it to parent_obj. Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23scsi/lsi53c895a: QOM Upcast SweepPeter Crosthwaite1-10/+16
Define and use standard QOM cast macro. Remove usages of DO_UPCAST() and direct -> style upcasting. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23usb/hcd-xhci: QOM parent field cleanupAndreas Färber1-35/+48
Replace direct uses of XHCIState::pci_dev with QOM casts and rename it to parent_obj. Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23usb/hcd-xhci: QOM Upcast SweepPeter Crosthwaite1-7/+14
Define and use standard QOM cast macro. Remove usages of DO_UPCAST() and direct -> style upcasting. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> [AF: Dropped usb_xhci_init() DeviceState argument and renamed variable] Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23net/pcnet-pci: QOM Upcast SweepPeter Crosthwaite1-7/+14
Define and use standard QOM cast macro. Remove usages of DO_UPCAST() and direct -> style upcasting. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> [AF: Renamed parent field, renamed from PC_NET to PCNET] Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23net/rtl8139: QOM parent field cleanupAndreas Färber1-39/+49
Replace direct uses of RTL8139State::dev with QOM casts and rename it to parent_obj. Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23net/rtl8139: QOM Upcast SweepPeter Crosthwaite1-8/+18
Define and use standard QOM cast macro. Remove usages of DO_UPCAST() and direct -> style upcasting. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23net/e1000: QOM parent field cleanupAndreas Färber1-13/+22
Replace direct uses of E1000State::dev field with QOM casts and rename it to parent_obj. Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23net/e1000: QOM Upcast SweepPeter Crosthwaite1-6/+12
Define and use standard QOM cast macro. Remove usages of DO_UPCAST() and direct -> style upcasting. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23hw: Avoid use of QOM type name macros in VMStateDescriptionsPeter Maydell6-7/+7
The name field in a VMStateDescription is part of the migration state versioning, so changing it will break migration. It's therefore a bad idea to use a QOM typename macro to initialize it, because in general we're free to rename QOM types as part of code refactoring and cleanup. For the handful of devices that were doing this by mistake, replace the QOM typenames with the corresponding literal strings. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> [AF: Use TYPE_PVSCSI for TypeInfo instead] Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-22Merge remote-tracking branch 'pmaydell/tags/pull-arm-devs-20130722' into stagingAnthony Liguori6-68/+654
arm-devs queue # gpg: Signature made Mon 22 Jul 2013 06:38:52 AM CDT using RSA key ID 14360CDE # gpg: Can't check signature: public key not found # By Peter Maydell (8) and Soren Brinkmann (2) # Via Peter Maydell * pmaydell/tags/pull-arm-devs-20130722: hw/arm: Use 'load_ramdisk()' for loading ramdisks w/ U-Boot header hw/loader: Support ramdisk with u-boot header vexpress: Add virtio-mmio transports vexpress: Make VEDBoardInfo extend arm_boot_info arm/boot: Allow boards to modify the FDT blob virtio: Implement MMIO based virtio transport virtio: Support transports which can specify the vring alignment virtio: Add support for guest setting of queue size arm/boot: Use qemu_devtree_setprop_sized_cells() device_tree: Add qemu_devtree_setprop_sized_cells() utility functions Message-id: 1374493427-3254-1-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-22Merge remote-tracking branch 'mjt/trivial-patches' into stagingAnthony Liguori1-4/+8
# By Michael Tokarev (2) and others # Via Michael Tokarev * mjt/trivial-patches: doc: monitor multiplexing rewording block/m25p80: Update Micron entries Fix command example in qemu.sasl slirp: remove mbuf(m_hdr,m_dat) indirection linux-user: declare sys_futex to have 6 arguments Message-id: 1374225073-12959-1-git-send-email-mjt@msgid.tls.msk.ru Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-22Merge remote-tracking branch 'stefanha/block' into stagingAnthony Liguori2-4/+6
# By Peter Lieven (5) and others # Via Stefan Hajnoczi * stefanha/block: block/raw: add .bdrv_get_info block: fix bdrv_read_unthrottled() cpus: Let vm_stop[_force_state]() always flush block devices block-migration: efficiently encode zero blocks block/raw: add bdrv_co_write_zeroes block: add bdrv_write_zeroes() block: fix vvfat error path for enable_write_target QEMUBH: make AioContext's bh re-entrant dataplane: sync virtio.c and vring.c virtqueue state gluster: Add discard support for GlusterFS block driver. gluster: Use pkg-config to configure GlusterFS block driver Message-id: 1374223132-29107-1-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-22Merge remote-tracking branch 'rth/axp-next' into stagingAnthony Liguori1-1/+1
# By Richard Henderson # Via Richard Henderson * rth/axp-next: pc-bios: Update palcode-clipper target-alpha: Move alarm to vm_clock Message-id: 1374161033-11449-1-git-send-email-rth@twiddle.net Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-22Merge remote-tracking branch 'stefanha/tracing' into stagingAnthony Liguori2-2/+2
# By Markus Armbruster # Via Stefan Hajnoczi * stefanha/tracing: trace-events: Fix up source file comments trace-events: Drop unused events milkymist-minimac2: Fix minimac2_read/_write tracepoints slavio_misc: Fix slavio_led_mem_readw/_writew tracepoints cleanup-trace-events.pl: New Message-id: 1374119369-26496-1-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-22hw/arm: Use 'load_ramdisk()' for loading ramdisks w/ U-Boot headerSoren Brinkmann1-4/+10
The load_ramdisk function is used to load ramdisk featuring a U-Boot header. Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1373323202-17083-3-git-send-email-soren.brinkmann@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-07-22hw/loader: Support ramdisk with u-boot headerSoren Brinkmann1-25/+59
Introduce 'load_ramdisk()' which can load "normal" ramdisks and ramdisks with a u-boot header. To enable this and leverage synergies 'load_uimage()' is refactored to accomodate this additional use case. Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1373323202-17083-2-git-send-email-soren.brinkmann@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-07-19vexpress: Add virtio-mmio transportsPeter Maydell1-0/+99
Add some virtio-mmio transports to the vexpress board model, together with a modify_dtb hook which adds them to the device tree so that the kernel will probe for them. We put them in a reserved area of the address map. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1373977512-28932-9-git-send-email-peter.maydell@linaro.org
2013-07-19vexpress: Make VEDBoardInfo extend arm_boot_infoPeter Maydell1-16/+15
Make the VEDBoardInfo struct extend arm_boot_info; this will allow us to get at the VEDBoardInfo information inside callbacks from arm/boot code. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1373977512-28932-8-git-send-email-peter.maydell@linaro.org
2013-07-19arm/boot: Allow boards to modify the FDT blobPeter Maydell1-0/+5
Add a callback hook in arm_boot_info to allow board models to modify the device tree blob if they need to. (The major expected use case is to add virtio-mmio nodes for virtio-mmio transports that exist in QEMU but not in the hardware.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1373977512-28932-7-git-send-email-peter.maydell@linaro.org
2013-07-19virtio: Implement MMIO based virtio transportPeter Maydell2-0/+422
Add support for the generic MMIO based virtio transport. This patch includes some fixes for bugs spotted by Ying-Shiuan Pan <yspan@itri.org.tw>. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Message-id: 1373977512-28932-6-git-send-email-peter.maydell@linaro.org [Fred changes: updated to new virtio-bus mechanisms] Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> [PMM changes: * fixed trivial makefile conflict * removed unused int_enable * host_features doesn't need migrating * reset guest accessible state in the reset function * minor style fixes like extra blank lines * RAZ/WI if there's no backend * made transport size 0x200, in line with kvmtool * set has_variable_vring_alignment ]
2013-07-19virtio: Support transports which can specify the vring alignmentPeter Maydell1-3/+29
Support virtio transports which can specify the vring alignment (ie where the guest communicates this to the host) by providing a new virtio_queue_set_align() function. (The default alignment remains as before.) Transports which wish to make use of this must set the has_variable_vring_alignment field in their VirtioBusClass struct to true; they can then change the alignment via virtio_queue_set_align(). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1373977512-28932-5-git-send-email-peter.maydell@linaro.org
2013-07-19virtio: Add support for guest setting of queue sizePeter Maydell1-0/+8
The MMIO virtio transport spec allows the guest to tell the host how large the queue size is. Add virtio_queue_set_num() function which implements this in the QEMU common virtio support code. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1373977512-28932-4-git-send-email-peter.maydell@linaro.org
2013-07-19arm/boot: Use qemu_devtree_setprop_sized_cells()Peter Maydell1-21/+8
Replace the opencoded assembly of the reg property array for the /memory node with a call to qemu_devtree_setprop_sized_cells(). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: 1373977512-28932-3-git-send-email-peter.maydell@linaro.org
2013-07-19block/m25p80: Update Micron entriesEd Maste1-4/+8
- Split 32Mb and 256Mb parts into a11 and a13 variants. - Add the 4K sector flag to the 128Mb parts. (These entries were taken from the Linux kernel list, which is missing the flag.) - Fill out the table of sizes with entries for 64Mb parts. Prodded by Peter Crosthwaite. Signed-off-by: Ed Maste <emaste@freebsd.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-07-19dataplane: sync virtio.c and vring.c virtqueue stateStefan Hajnoczi2-4/+6
Load the virtio.c state into vring.c when we start dataplane mode and vice versa when stopping dataplane mode. This patch makes it possible to start and stop dataplane any time while the guest is running. This will eventually allow us to go back to QEMU main loop for bdrv_drain_all() and live migration. In the meantime, this patch makes the dataplane lifecycle more robust but should make no visible difference. It may be useful in the virtio-net dataplane effort. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-18target-alpha: Move alarm to vm_clockRichard Henderson1-1/+1
Basing the alarm off the rtc_clock was silly. It leads to horrible spinning in the guest after being suspended and resumed, as it tries to catch up with lost ticks. This requires adding an accessor for reading the vm_clock too. Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-07-18Merge remote-tracking branch 'awilliam/tags/vfio-for-qemu-1.6' into stagingAnthony Liguori1-336/+446
vfio: enhanced VGA quirks + AER error containment # gpg: Signature made Wed 17 Jul 2013 05:39:38 PM CDT using RSA key ID 3BB08B22 # gpg: Can't check signature: public key not found # By Alex Williamson (1) and Vijay Mohan Pandarathil (1) # Via Alex Williamson * awilliam/tags/vfio-for-qemu-1.6: vfio: QEMU-AER: Qemu changes to support AER for VFIO-PCI devices vfio-pci: VGA quirk update Message-id: 20130717224939.4763.87264.stgit@bling.home Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18Merge remote-tracking branch 'mst/tags/for_anthony' into stagingAnthony Liguori5-9/+135
pci,net,pc enhancements This includes some fixes and enhancements that accumulated in my tree: pci fixes by dkoch, virtio-net enhancements by akong and mst, and a fix for xen pc by mst. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Wed 17 Jul 2013 04:44:45 AM CDT using RSA key ID D28D5469 # gpg: Can't check signature: public key not found # By Don Koch (2) and others # Via Michael S. Tsirkin * mst/tags/for_anthony: pc: don't access fw cfg if NULL virtio-net: add feature bit for any header s/g net: add support of mac-programming over macvtap in QEMU side pci: fix BRDIGE typo pci-bridge: update mappings for migration/restore Message-id: 1374054430-21966-1-git-send-email-mst@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18milkymist-minimac2: Fix minimac2_read/_write tracepointsMarkus Armbruster1-1/+1
Broken in milkymist-minimac.c from the start (commit 0742454), faithfully moved to milkymist-minimac2.c (commit 57aa265). Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>