aboutsummaryrefslogtreecommitdiff
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
* defaults: split default_driveGerd Hoffmann2009-12-191-1/+4
| | | | | | | | | Split default_drive into default_{floppy,cdrom,sdcard}. Also add QEMUMachine flags to disable them per machine. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit ac33f8fad14e07fa12b74c3494339ae6882dc22f)
* qdev: Improve uni-north device namesMarkus Armbruster2009-12-191-12/+12
| | | | | | | | Switch to the names suggested by Blue Swirl. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 18dd19a7d9bb90734b5188fd6f53c76bde711e4b)
* Fix loading of ELF multiboot kernelsKevin Wolf2009-12-192-6/+6
| | | | | | | | | | | | | The multiboot implementation assumed that there is only one program header (which contains the entry point) and that the entry point is at the start of the code. This doesn't hold true generally and caused too little data to be loaded. Fix the loading code to pass the whole loaded data to the Multiboot Option ROM. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 092493be3caab1ac77f4223b4c3fb0975d1ed490)
* Revert "pci: interrupt disable bit support"Anthony Liguori2009-12-192-28/+2
| | | | | | | | | This reverts commit 0ea5709a32085f7d14901a09d12bd35f9b267607. Per discussion with Michael Tsirkin, this is too risky for 0.12 Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit d587e0787153f0224a6140c5015609963ceaabfb)
* S390: Bail out without KVMAlexander Graf2009-12-181-0/+7
| | | | | | | | | Currently only the S390 KVM target works. To keep users from accidently not using KVM, let's not even initialize the machine when KVM is not used. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit e249651ca94058547f7ae84694e82bb1ee03bc3c)
* S390: Don't tell guest we're updating config spaceAlexander Graf2009-12-181-1/+1
| | | | | | | | | | | | | | Currently we always set the "config space changed" bit to 1 when triggering any virtio interrupt. While that worked in 2.6.27, newer kernels interpret that value as "only the config space changed and nothing else happened". Since we usually trigger interrupts to tell the guest that something did happen, we just not tell it the config space changed for now until we implement the correct callback for that. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit 86f3dba6518bd5fd106e1cf3f36dafda41ff377b)
* S390: Loop through virtio console devicesAlexander Graf2009-12-181-1/+5
| | | | | | | | | | We used to always create one single virtio console device. This breaks when either zero of multiple virtio console devices are requested, so let's use the same code as on x86. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit a1e4b07f04d8f31e8c0c1bf97385f426d3fcf5e6)
* s390: Fix buggy assignmentStefan Weil2009-12-161-1/+1
| | | | | | | | | | nd->model keeps dynamically allocated model names. So casting of a constant string is wrong here. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit 5a2b3fc5aaae48859e09a8d96f4f92578b060892)
* s390: typo fixMichael S. Tsirkin2009-12-131-1/+1
| | | | | | | | | | s390 code has an obvious typo, which results in: hw/s390-virtio.c: At top level: hw/s390-virtio.c:249: error: request for member ‘no_vga’ in something not a structure or union Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* s390: fix build on 32 bit hostMichael S. Tsirkin2009-12-131-1/+1
| | | | | | | | | | | Building on 32 bit host we get: hw/s390-virtio.c: In function ‘s390_init’: hw/s390-virtio.c:184: error: integer constant is too large for ‘unsigned long’ type 64 bit values must be ULL. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* PCI: Convert pci_device_hot_add() to QObjectLuiz Capitulino2009-12-121-4/+36
| | | | | | | | | | | | | | Return a QDict with information about the just added device. This commit should not change user output. Please, note that this patch does not do error handling conversion. In error conditions the handler still calls monitor_printf(). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 7a344f7ac7bb651d0556a933ed8060d3a9e5d949)
* scsi: fix drive hotplug.Gerd Hoffmann2009-12-121-0/+1
| | | | | | | | | | | | | | This patch fills the DriveInfo->unit after hotplugging a scsi disk. It makes a difference when auto-assigning a scsi id, where unit was left filled with '-1' instead of the actual scsi id. With this patch applied the the drive naming logic in drive_init() works as good as it did in previous releases. Which means it works fine with a single scsi bus. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 11f4d7f483d9ca3a8979abd605cf1468b3e96aa2)
* pci: don't hw_error() when no slot is available.Gerd Hoffmann2009-12-121-2/+9
| | | | | | | | | | | | | Current PCI code will simply hw_error() and thus abort in case no free PCI slot is available or the requested PCI slot is already in use by another device. For the hotplug case this behavior is not acceptable. This patch makes qemu pass up the error properly, so the calling code can decide whenever it wants to exit with an error (on startup) or whenever it wants to continue (hotplug). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 09e3acc6cfabfd85a9dacc04471df5f05019c779)
* pci: don't abort() when trying to hotplug with acpi off.Gerd Hoffmann2009-12-121-1/+16
| | | | | | | | | | | | The PCI bus on x86 requires ACPI for hotplug support, thus disbling ACPI also disables hotplug for the PCI bus. This patch makes qemu check whenever the PCI bus in question can handle hotplug before trying to add devices. This is needed because qdev will abort() on any attempt to hotplug devices into a non-hotpluggable bus. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 53e0d8affe8514b070db2d265af13a534cb8eda4)
* Set default console to virtio on S390xGerd Hoffmann2009-12-122-0/+8
| | | | | | | | | | | | | | | | All "normal" system emulation targets in qemu I'm aware of display output on either VGA or serial output. Our S390x virtio machine doesn't have such kind of legacy hardware. So instead we need to default to a virtio console. Add flags to QEMUMachine to indicate which kind of default devices make sense for the machine in question. Use it for S390x: enable virtcon, disable serial, parallel and vga. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 986c5f78543bdbd696664447ecdd08cf6d935370)
* qdev: also match bus name for global propertiesGerd Hoffmann2009-12-121-1/+2
| | | | | | | | | | i.e. -global PCI.<property>=<value> will set a default property for all PCI devices. Also works for the compat properties used by machine types. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 07a8de3566bd576dc33e55af830d63dcc2287617)
* qdev: make compat stuff more genericGerd Hoffmann2009-12-125-15/+23
| | | | | | | | | | This patch renames the compat properties into global properties and makes them more generic. The compatibility stuff is only one of multiple possible users now. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 458fb6792d834474c6b289738b6bf9601fad87ab)
* qdev: Replace device names containing whitespaceMarkus Armbruster2009-12-1217-58/+52
| | | | | | | | | | | | | Device names with whitespace require quoting in the shell and in the monitor. Some of the offenders are also overly long. Some have a more convenient alias, some don't. The place for verbose device names is DeviceInfo member desc. The name should be short & sweet. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 556cd09885bec3f69ba78228fe4e46dc1dad145b)
* qdev: Separate USB product description from qdev nameMarkus Armbruster2009-12-129-1/+13
| | | | | | | | | | | | | Using the qdev name for the product description makes for inconvenient qdev names. Put the product description in new USBDeviceInfo member product_desc. Make usb_qdev_init() use it. No user or guest visible change, since the value is still the same. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 063846984ce7eb1c1ddce6dda39b662c64a80dc0)
* qdev: Rename USBDevice member devname to product_descMarkus Armbruster2009-12-124-8/+9
| | | | | | | | It's not a device name, it's the USB product description string. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 0fe6d12e0bc752c29a93ac83a274e3650d457069)
* fix rtc-td-hack on host without high-res timersGleb Natapov2009-12-121-0/+17
| | | | | | | | | | | | | | On hosts without high-res timers it is impossible to inject rtc interrupt faster then 1kHz. Windows sometimes configures RTC to generate 1kHz interrupts, so we can't inject missed interrupts when running on such hosts. Always injecting an interrupt on REG_C read is also not an option since Windows wait for REG_C to become zero with interrupt disabled during boot. This patch uses mixed approach: accelerate timer + inject up to 1000 interrupts on REG_C read. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit ba32edab7fdab0e74b54696942b4127d26861cf6)
* virtio: verify features on loadMichael S. Tsirkin2009-12-124-6/+37
| | | | | | | | | | | | | migrating between hosts which have different features might break silently, if the migration destination does not support some features supported by source. Prevent this from happening by comparing acked feature bits with the mask supported by the device. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 6d74ca5aa83b83fb52332f7735c61ecb7a5328c1)
* vmware_vga: add rom file so that it boots.Dave Airlie2009-12-121-0/+2
| | | | | | | | This just adds the rom file to the vmware SVGA chipset so it boots. Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit b3c3f123f785fb861d930080f083507b51f5ce79)
* pci: interrupt disable bit supportMichael S. Tsirkin2009-12-072-2/+28
| | | | | | | | | Interrupt disable bit is mandatory in PCI spec. Implement it to make devices spec compliant. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Isaku Yamahata <yamahata@valinux.co.jp> (cherry picked from commit b6981cb57be5d66b1b7cf9009a122fb3cdd4b96b)
* pci: interrupt status bit implementationMichael S. Tsirkin2009-12-072-1/+26
| | | | | | | | | interrupt status is a mandatory feature in PCI spec, so devices must implement it to be spec compliant. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Isaku Yamahata <yamahata@valinux.co.jp> (cherry picked from commit f9bf77dd1f838b0061172fe41709b221956da2f5)
* pci: prepare irq code for interrupt stateMichael S. Tsirkin2009-12-072-17/+74
| | | | | | | | | | | | | | | | This rearranges code in preparation for interrupt state implementation. Changes: - split up bus walk away from interrupt handling into a subroutine - change irq_state from an array to bitmask - verify that irq_state values are 0 or 1 on load There are no functional changes. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Isaku Yamahata <yamahata@valinux.co.jp> (cherry picked from commit d036bb215e0ac1d1fd467239f1d3b7d904cac90a)
* msix: function mask supportMichael S. Tsirkin2009-12-071-18/+46
| | | | | | | | | Function mask is a mandatory feature in MSIX spec so not implementing it is a spec violation. Implement. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> (cherry picked from commit 5b5cb08683b6715a2aca5314168e68ff0665912b)
* msix: macro rename for function mask supportMichael S. Tsirkin2009-12-071-7/+7
| | | | | | | | | rename ENABLE_OFFSET -> CONTROL_OFFSET, since same byte includes function mask. This is in preparation for function mask support. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> (cherry picked from commit 2760952ba9610921586e7446d858e23308400391)
* Add S390x virtio machine descriptionAlexander Graf2009-12-051-0/+255
| | | | | | | | | | | In order to use the new S390x virtio bus we just introduced, we also need a machine description that sets up the machine according to our PV specification. Let's add that machine description and be happy! Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* Add S390x virtio machine busAlexander Graf2009-12-052-0/+459
| | | | | | | | | | | | | | On S390x we don't want to go through the hassle of emulating real existing hardware, because we don't need to for running Linux. So let's instead implement a machine that is 100% based on VirtIO which we fortunately implement already. This patch implements the bus that is the groundwork for such an S390x virtio machine. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* Add "static" to please SparseBlue Swirl2009-12-049-10/+10
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* scsi: fix incorrect ?: useBlue Swirl2009-12-041-1/+2
| | | | | | Fixes OpenBSD build. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* ide: implement stub for audio control/volume readThadeu Lima de Souza Cascardo2009-12-031-0/+17
| | | | | | | | | This implements the audio control or volume read support as needed by some systems. A Conectiva Parolin system required this to detect an IDE device as CD-ROM, through the CDVOLREAD ioctl. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ide: Use some already defined page macros instead of constantsThadeu Lima de Souza Cascardo2009-12-031-2/+2
| | | | | | | | Some PAGE constants were used instead of the macros we already have defined in internal.h. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* eepro100: Improve debug messagesStefan Weil2009-12-031-3/+3
| | | | | | | | | * buf was too small for longer register names. * Use consistent upper case for nouns in register names. * Use better name for array with e100 register names. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* eepro100: Allocate a larger buffer for regname()David Benjamin2009-12-031-1/+1
| | | | | | | This should avoid truncating the register name when debugging. Signed-off-by: David Benjamin <davidben@mit.edu> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* multiboot: Use signed type for negative error numbersKevin Wolf2009-12-031-0/+1
| | | | | | | | In mb_mod_length a return value is stored that is negative in error case. With an unsigned type the check goes wrong. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Fix compile error when LSI_DEBUG is definedRyan Harper2009-12-031-3/+3
| | | | | | | | | | | | | | | | | | This patch fixes the follow error when LSI_DEBUG is set. CC libhw64/lsi53c895a.o cc1: warnings being treated as errors qemu/hw/lsi53c895a.c: In function 'lsi_io_mapfunc': qemu/hw/lsi53c895a.c:1932: error: format '%08x' expects type 'unsigned int', but argument 2 has type 'pcibus_t' qemu/hw/lsi53c895a.c: In function 'lsi_ram_mapfunc': /qemu/hw/lsi53c895a.c:1947: error: format '%08x' expects type 'unsigned int', but argument 2 has type 'pcibus_t' qemu/hw/lsi53c895a.c: In function 'lsi_mmio_mapfunc': qemu/hw/lsi53c895a.c:1957: error: format '%08x' expects type 'unsigned int', but argument 2 has type 'pcibus_t' make[1]: *** [lsi53c895a.o] Error 1 make: *** [subdir-libhw64] Error 2 Signed-off-by: Ryan Harper <ryanh@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* e1000: Fix warning from code reviewStefan Weil2009-12-031-1/+3
| | | | | | | | | | | | | A code review run by Steve Grubb complained about code in e1000.c: In hw/e1000.c at line 89, vlan is declared to be 4 bytes. At line 382 is an attempt to do a memmove over it with a size of 12. This was fixed by splitting the memmove in two calls and adding a comment to the declaration of vlan and data. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* multiboot: Fix module loading and setting of mmap.Adam Lackorzynski2009-12-031-1/+1
| | | | | | Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* SCSI: Fix Standard INQUIRY dataLaszlo Ast2009-12-031-3/+3
| | | | | | | | | | Vendor identification, product identification and product revision level should be padded with spaces without a terminating NULL character, see SCSI-2 standard, 8.2.5.1 Standard INQUIRY data. Signed-off-by: Laszlo Ast <laszlo.ast@siemens-enterprise.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* targe-ppc: Sync CPU state for KVMAlexander Graf2009-12-032-0/+8
| | | | | | | | | | | Some recent change made PPC guests always start at address 0x0 because env isn't synced to kvm_state on first bootup. I'm not sure if this is the correct bugfix, but at least it makes PPC boot again with KVM enabled. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* qemu: cleanup unused macros in cirrusMichael S. Tsirkin2009-12-031-35/+0
| | | | | | | | | | | Cirrus vga has a copy of many PCI macros, and it doesn't even use them. Clean up. We also don't need to override header type as it is NORMAL by default. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qemu: make cirrus init value pci spec compliantMichael S. Tsirkin2009-12-031-1/+0
| | | | | | | | | | | | | | | | | PCI memory should be disabled at reset, otherwise we might claim transactions at address 0. I/O should also be disabled, although for cirrus it is harmless to enable it as we do not have I/O bar. Note: bios fix needed for this patch to work was already applied: previously bios incorrently assumed that it does not need to enable i/o unless device has i/o bar. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-blk: Implement rerror optionKevin Wolf2009-12-031-5/+8
| | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ide: Implement rerror optionKevin Wolf2009-12-032-17/+38
| | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Rename DriveInfo.onerror to on_write_errorKevin Wolf2009-12-033-3/+4
| | | | | | | | Either rename variables and functions to refer to write errors (which is what they actually do) or introduce a parameter to distinguish reads and writes. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* live migration: Propagate output monitor to callback handlerJan Kiszka2009-12-031-1/+2
| | | | | | | | | In order to allow proper progress reporting to the monitor that initiated the migration, forward the monitor reference through the migration layer down to SaveLiveStateHandler. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* savevm: Port to qdev.vmsd all devices that have qdevJuan Quintela2009-12-0326-37/+60
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qdev: enable vmstate_unregister() supportJuan Quintela2009-12-031-2/+0
| | | | | | | Now vmstate_unregister have the right type Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>