summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2013-04-04change element type from "char" to "unsigned char" in ACPI table dataLaszlo Ersek2-9/+10
The data is binary, not textual. Also, acpi_table_add() abuses the "char *f" pointer -- which normally points to file names to load -- to poke into the table. Introduce "char unsigned *table_start" for that purpose. Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1363821803-3380-3-git-send-email-lersek@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-04ipoctal232: Convert to use chardev properties directlyHans de Goede1-29/+14
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Alberto Garcia <agarcia@igalia.com> Message-id: 1364412581-3672-4-git-send-email-hdegoede@redhat.com Cc: Alberto Garcia <agarcia@igalia.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-04qemu-char: Call fe_claim / fe_release when not using qdev chr propertiesHans de Goede7-6/+24
chardev-frontends need to explictly check, increase and decrement the avail_connections "property" of the chardev when they are not using a qdev-chardev-property for the chardev. This fixes things like: qemu-kvm -chardev stdio,id=foo -device isa-serial,chardev=foo \ -mon chardev=foo Working, where they should fail. Most of the changes here are due to old hardware emulation code which is using serial_hds directly rather then a qdev-chardev-property. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Message-id: 1364412581-3672-3-git-send-email-hdegoede@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-04qemu-char: Add qemu_chr_fe_claim / _release helper functionsHans de Goede1-3/+2
Add qemu_chr_fe_claim / _release helper functions for properly dealing with avail_connections. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Message-id: 1364412581-3672-2-git-send-email-hdegoede@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-04xilinx_axienet: pump events as appropriatePeter Crosthwaite1-0/+2
When the conditions blocking receiving are cleared, check for buffered rx packets. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-03acpi: initialize s4_val used in s4 shutdownBruce Rogers5-5/+6
While investigating why a 32 bit Windows 2003 guest wasn't able to successfully perform a shutdown /h, it was discovered that commit afafe4bbe0cf7d3318e1ac7b40925561f86a6bd4 inadvertently dropped the initialization of the s4_val used to handle s4 shutdown. Initialize the value as before. Signed-off-by: Bruce Rogers <brogers@suse.com> Message-id: 1364928100-487-1-git-send-email-brogers@suse.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-02VMXNET3: initialize rx_ridx to eliminate compile warningWenchao Xia1-1/+1
Gcc report "hw/vmxnet3.c:972: error: ‘rx_ridx’ may be used uninitialized in this function", so fix it. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Message-id: 1364264646-27542-1-git-send-email-xiawenc@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-02qdev: only send deleted event if device was realizedAnthony Liguori1-9/+14
Reported-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1364402174-16580-1-git-send-email-aliguori@us.ibm.com
2013-04-01vfio: cleanup includesAlex Williamson1-5/+5
Starting to get messy, put the back in alphabetical order. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-04-01vfio: Add bootindex supportAlex Williamson1-0/+5
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-04-01vfio-pci: Move devices to D0 on resetAlex Williamson1-0/+23
Guests may leave devices in a low power state at reboot, but we expect devices to be woken up for the next boot. Make this happen. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-04-01vfio-pci: Add extra debuggingAlex Williamson1-10/+30
Often when debugging it's useful to be able to disable bypass paths so no interactions with the device are missed. Add some extra debug options to do this. Also add device info on read/write BAR accesses, which is useful when debugging more than one assigned device. A couple DPRINTFs also had redundant "vfio:" prefixes. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-04-01qemu vfio-pci: Graphics device quirksAlex Williamson1-2/+718
Graphics cards have a number of different backdoors. Some of these are alternative ways to get PCI BAR addresses, some of them are complete mirrors of PCI config space available through MMIO and I/O port access. These quirks cover a number of ATI Radeon and Nvidia devices. On the ATI/AMD side, this should enable HD5450 and HD7850 and hopefully a host of devices around those generations. For Nvidia, my card selection is much more dated. A 8400gs works well with both the Window shipped driver and the Nvidia downloaded driver. A 7300le works as well, with the caveat that generating the Window experience index with the Nvidia driver causes the card to reset several times before generating a BSOD. An NVS 290 card seems to run well with the shipped Windows driver, but generates a BSOD with the Nvidia driver. All of the Nvidia devices work with the Linux Nvidia proprietary driver and nouveau, the HD5450 works with either radeon or fglrx, HD7850 works with vesa and fglrx (not supported by radeon). Extremely limited 3D testing. Device reset is also an issue with graphics. It's unfortunately very common that the devices offer no means to reset the card or doesn't seem effective. Nvidia devices are pretty good about being able to get the device to a working state through the VGA BIOS init, Radeon devices less so, and often require a host reboot. Work remains to be done here. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-04-01qemu vfio-pci: Add support for VGA MMIO and I/O port accessAlex Williamson1-0/+169
Most VGA cards need some kind of quirk to fully operate since they hide backdoors to get to other registers outside of PCI config space within the registers, but this provides the base infrastructure. If we could identity map PCI resources for assigned devices we would need a lot fewer quirks. To enable this, use a kernel side vfio-pci driver that incorporates VGA support (v3.9), and use the -vga none option and add the x-vga=on option for the vfio-pci device. The "x-" denotes this as an experimental feature. You may also need to use a cached copy of the VGA BIOS for your device, passing it to vfio-pci using the romfile= option. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-04-01vfio-pci: Add PCIe capability mangling based on bus typeAlex Williamson1-1/+128
Windows seems to pay particular interest to the PCIe header type of devices and will fail to load drivers if we attach Endpoint devices or Legacy Endpoint devices to the Root Complex. We can use pci_bus_is_express and pci_bus_is_root to determine the bus type and mangle the type appropriately: * Legacy PCI * No change, capability is unmodified for compatibility. * PCI Express * Integrated Root Complex Endpoint -> Endpoint * PCI Express Root Complex * Endpoint -> Integrated Root Complex Endpoint * Legacy Endpoint -> none, capability hidden We also take this opportunity to explicitly limit supported devices to Endpoints, Legacy Endpoints, and Root Complex Integrated Endpoints. We don't currently have support for other types and users often cause themselves problems by assigning them. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-04-01vfio-pci: Generalize PCI config manglingAlex Williamson1-38/+42
Kernel-side vfio virtualizes all of config space, but some parts are unique to Qemu. For instance we may or may not expose the ROM BAR, Qemu manages MSI/MSIX, and Qemu manages the multi-function bit so that single function devices can appear as multi-function and vica versa. Generalize this into a bitmap of Qemu emulated bits. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-04-01Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori3-56/+56
# By Dunrong Huang (1) and others # Via Stefan Hajnoczi * stefanha/trivial-patches: hw/tcx: Remove unused 'addr' field and the property that sets it hw/i386/pc: format load_linux function configure: show debug-info option in --help output
2013-04-01sysbus: Remove sysbus_add_memory and sysbus_del_memoryPeter Maydell2-23/+0
Remove the sysbus_add_memory and sysbus_del_memory functions. These are trivial wrappers for mapping a memory region into the system memory space, and have no users now. Sysbus devices should never map their own memory regions anyway; the correct API for mapping an mmio region is for the creator of the device to use sysbus_mmio_map. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Message-id: 1363358063-23973-6-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-01hw/milkymist-softusb: set buffer in softusb_read_{dmem, pmem} error pathPeter Maydell1-0/+2
Make sure we set the buffer to something in the softusb_read_{dmem,pmem} error paths, since the caller will use the buffer unconditionally. (Newer gcc is smart enough to spot this and complain about 'may be used uninitialized'.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1364496184-11994-1-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-01milkymist-softusb: Don't map RAM memory regions in the device itselfPeter Maydell2-12/+13
Don't map the pmem and dmem RAM memory regions in the milkymist-softusb device itself. Instead just expose them as sysbus mmio regions which the device creator can map appropriately. This allows us to drop the pmem_base and dmem_base properties. Instead of going via cpu_physical_memory_read/_write when the device wants to access the RAMs, we just keep a host pointer to the memory and use that. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael Walle <michael@walle.cc> Message-id: 1363358063-23973-5-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-01milkymist-minimac2: Just expose buffers as a sysbus mmio regionPeter Maydell2-5/+2
Just expose the register buffers memory as a standard sysbus mmio region which the creator of the device can map, rather than providing a qdev property which the creator has to set to the base address and then doing the mapping in the device's own init function. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael Walle <michael@walle.cc> Message-id: 1363358063-23973-4-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-01musicpal: qdevify musicpal-miscPeter Maydell1-5/+23
Make musicpal-misc into its own (trivial) qdev device, so we can get rid of the abuse of sysbus_add_memory(). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Message-id: 1363358063-23973-3-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-01sysbus: make SysBusDeviceClass::init optionalPeter Maydell1-0/+3
Make the SysBusDeviceClass::init optional, for devices which genuinely don't need to do anything here. In particular, simple devices which can do all their initialization in their instance_init method don't need either a DeviceClass::realize or SysBusDeviceClass::init method. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: 1363358063-23973-2-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-28piix_pci: Fix C99 commentsDavid Woodhouse1-4/+6
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Tested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-id: 1361580039-4459-4-git-send-email-dwmw2@infradead.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-28piix_pci: Use DEVICE() and ISA_BUS()David Woodhouse1-3/+2
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Tested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-id: 1361580039-4459-3-git-send-email-dwmw2@infradead.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-28piix_pci: Clean up i440FX object handlingDavid Woodhouse1-5/+10
Define and use I440FX_PCI_DEVICE() instead of using DO_UPCAST(). Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Tested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-id: 1361580039-4459-2-git-send-email-dwmw2@infradead.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-28virtio-balloon: cleanup: remove qdev field.KONRAD Frederic2-2/+0
The qdev field is no longer needed, just drop it. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1364377755-15508-7-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-28virtio-balloon: cleanup: QOM casts.KONRAD Frederic2-24/+21
As the virtio-balloon-pci is switched to the new API, we can use QOM casts. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1364377755-15508-6-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-28virtio-balloon: cleanup: init and exit function.KONRAD Frederic1-60/+13
This remove old init and exit function as they are no longer needed. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1364377755-15508-5-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-28virtio-balloon-ccw: switch to the new API.KONRAD Frederic2-11/+25
Here the virtio-balloon-ccw is modified for the new API. The device virtio-balloon-ccw extends virtio-ccw-device as before. It creates and connects a virtio-balloon during the init. The properties are not modified. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1364377755-15508-4-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-28virtio-balloon-pci: switch to the new API.KONRAD Frederic2-56/+69
Here the virtio-balloon-pci is modified for the new API. The device virtio-balloon-pci extends virtio-pci. It creates and connects a virtio-balloon during the init. The properties are not changed. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1364377755-15508-3-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-28virtio-balloon: add the virtio-balloon device.KONRAD Frederic2-6/+93
Create virtio-balloon which extends virtio-device, so it can be connected on virtio-bus. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1364377755-15508-2-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-28hw/tcx: Remove unused 'addr' field and the property that sets itPeter Maydell2-3/+0
Remove the 'addr' field from TCXState (since it is completely unused), also the qdev property which sets it. This seems to be a relic from many years past; devices don't need to know where they are mapped. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-03-28hw/i386/pc: format load_linux functionliguang1-53/+56
Signed-off-by: liguang <lig.fnst@cn.fujitsu.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-03-27virtio-serial: propagate guest_connected to the port on post_loadAlon Levy1-0/+5
When migrating a host with with a spice agent running the mouse becomes non operational after the migration due to the agent state being inconsistent between the guest and the client. After migration the spicevmc backend on the destination has never been notified of the (non 0) guest_connected state. Virtio-serial holds this state information and migrates it, this patch properly propagates this information to virtio-console and through that to interested chardev backends. rhbz #725965 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Message-id: 1364292483-16564-11-git-send-email-hdegoede@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-27virtio-serial: Consolidate guest_open/guest_close into set_guest_connectedHans de Goede3-32/+12
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Message-id: 1364292483-16564-10-git-send-email-hdegoede@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-27qemu-char: Move incrementing of avail_connections to qdev-properties-systemHans de Goede1-2/+4
The decrement of avail_connections is done in qdev-properties-system move the increment there too for proper balancing of the calls. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Message-id: 1364292483-16564-8-git-send-email-hdegoede@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-27qemu-char: Cleanup: consolidate fe_open/fe_close into fe_set_openHans de Goede1-2/+2
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Message-id: 1364292483-16564-6-git-send-email-hdegoede@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-27qemu-char: Automatically do fe_open / fe_close on qemu_chr_add_handlersHans de Goede2-2/+1
Most frontends can't really determine if the guest actually has the frontend side open. So lets automatically generate fe_open / fe_close as soon as a frontend becomes ready (as signalled by calling qemu_chr_add_handlers) / becomes non ready (as signalled by setting all handlers to NULL). And allow frontends which can actually determine if the guest is listening to opt-out of this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Message-id: 1364292483-16564-5-git-send-email-hdegoede@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-27qemu-char: Rename opened to be_openHans de Goede2-2/+2
Rename the opened variable to be_open to reflect that it contains the opened state of the backend. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Message-id: 1364292483-16564-2-git-send-email-hdegoede@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-26Merge remote-tracking branch 'mst/tags/for_anthony' into stagingAnthony Liguori32-126/+319
virtio,pci,qom Work by Alex to support VGA assignment, pci and virtio fixes by Stefan, Jason and myself, and a new qmp event for hotplug support by myself. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Tue 26 Mar 2013 02:02:24 PM CDT using RSA key ID D28D5469 # gpg: Can't check signature: public key not found # By Alex Williamson (13) and others # Via Michael S. Tsirkin * mst/tags/for_anthony: (23 commits) pcie: Add endpoint capability initialization wrapper roms: switch oldnoconfig to olddefconfig pcie: Mangle types to match topology pci: Create and use API to determine root buses pci: Create pci_bus_is_express helper pci: Q35, Root Ports, and Switches create PCI Express buses pci: Allow PCI bus creation interfaces to specify the type of bus pci: Move PCI and PCIE type defines pci: Create and register a new PCI Express TypeInfo exec: assert that RAMBlock size is non-zero pci: refuse empty ROM files pci_bridge: Remove duplicate IRQ swizzle function pci_bridge: Use a default map_irq function pci: Fix INTx routing notifier recursion pci_bridge: drop formatting from source pci_bridge: factor out common code pci: Teach PCI Bridges about VGA routing pci: Add PCI VGA helpers virtio-pci: guest notifier mask without non-irqfd virtio-net: remove layout assumptions for mq ctrl ...
2013-03-26pcie: Add endpoint capability initialization wrapperAlex Williamson3-14/+18
Fix the awkward API of mangling the caller specified PCIe type and just provide an interface to initialize an endpoint device. This will pick either a regular endpoint or integrated endpoint based on the bus and return pcie_cap_init to doing exactly what is asked. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-03-26pcie: Mangle types to match topologyAlex Williamson1-0/+13
Windows will fail to start drivers for devices with an Endpoint type PCIe capability attached to a Root Complex (code 10 - Device cannot start). The proper type for such a device is Root Complex Integrated Endpoint. Devices don't care which they are, so do this conversion automatically. This allows the Windows driver to load for nec-usb-xhci when attached to pcie.0 of a q35 machine. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-03-26pci: Create and use API to determine root busesAlex Williamson2-4/+10
Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-03-26pci: Create pci_bus_is_express helperAlex Williamson2-0/+6
For testing the bus type. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-03-26pci: Q35, Root Ports, and Switches create PCI Express busesAlex Williamson4-4/+4
Convert q35, ioh3420, xio3130_upstream, and xio3130_downstream to use the new TYPE_PCIE_BUS. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-03-26pci: Allow PCI bus creation interfaces to specify the type of busAlex Williamson24-35/+40
No change to any types. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-03-26pci: Move PCI and PCIE type definesAlex Williamson2-4/+5
Move these so that we can reference them from a more common header instead of including pci_bus.h everywhere. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-03-26pci: Create and register a new PCI Express TypeInfoAlex Williamson2-0/+7
This will allow us to differentiate Express and Legacy buses. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-03-26pci: refuse empty ROM filesStefan Hajnoczi1-1/+6
A zero size ROM file is invalid and should produce a warning. Attempting to use a zero size file ends up hitting an assertion qemu_ram_set_idstr() because RAMBlocks with duplicate addresses are allocated - due to zero size the allocator doesn't increment the next available RAMBlock offset. Also convert __FUNCTION__ to __func__ while we're touching this code. There are no other __FUNCTION__ instances in pci.c anymore. Reported-by: Milos Ivanovic <milosivanovic@orcon.net.nz> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>