summaryrefslogtreecommitdiffstats
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
...
* | fdc: fix drive property handling.Gerd Hoffmann2010-03-131-5/+15
|/ | | | | | | | | Fix the floppy controller init wrappers to set the drive properties only in case the DriveInfo pointers passed in are non NULL. This allows to set the properties using -global. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* QMP: Introduce WATCHDOG eventLuiz Capitulino2010-03-091-0/+17
| | | | | | | | It's emitted whenever the watchdog device's timer expires. The action taken is provided in the 'data' member. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* kbd leds: usb kbdGerd Hoffmann2010-03-091-0/+8
| | | | | | | Add led status notification support to the usb kbd driver. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* kbd leds: ps/2 kbdGerd Hoffmann2010-03-091-0/+2
| | | | | | | Add led status notification support to the ps/2 kbd driver. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi: Make device scsi-disk reject /dev/sg*Markus Armbruster2010-03-091-0/+5
| | | | | | | | You're supposed to use scsi-generic for that. Which rejects anything but /dev/sg*. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qdev: Catch attempt to attach more than one device to a netdevMarkus Armbruster2010-03-091-0/+7
| | | | | | | | | | | | | | | | | | Guest device and host netdev are peers, i.e. it's a 1:1 relation. However, we fail to enforce that: $ qemu -nodefaults --nographic -netdev user,id=net0 -device e1000,netdev=net0 -device virtio-net-pci,netdev=net0 -monitor stdio QEMU 0.12.50 monitor - type 'help' for more information (qemu) info network Devices not on any VLAN: net0: net=10.0.2.0, restricted=n peer=virtio-net-pci.0 e1000.0: model=e1000,macaddr=52:54:00:12:34:56 peer=net0 virtio-net-pci.0: model=virtio-net-pci,macaddr=52:54:00:12:34:57 peer=net0 It's all downhill from there. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qdev: Improve diagnostics for bad property valuesMarkus Armbruster2010-03-091-23/+34
| | | | | | | | | | | | | | Property "vlan" reports "failed to parse" even when the value parses just fine, but the result doesn't name an existing VLAN. Similarly, properties "drive", "chr" and "netdev" misleadingly report "failed to parse" when the value doesn't name an existing host device. Change PropertyInfo method parse to return an error code, so that qdev_prop_parse() can report the error more accurately. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-pci: Use DEV_NVECTORS_UNSPECIFIED instead of -1 for virtio-serialAmit Shah2010-03-081-3/+5
| | | | | | | | Use the named constant instead of -1. Signed-off-by: Amit Shah <amit.shah@redhat.com> Reported-by: "Michael S. Tsirkin" <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qdev: Add a DEV_NVECTORS_UNSPECIFIED enum for unspecified nr of MSI vectorsAmit Shah2010-03-082-1/+5
| | | | | | | | | net.c used a constant to signify no MSI vectors were specified. Extend that to all qdev devices. Signed-off-by: Amit Shah <amit.shah@redhat.com> Reported-by: "Michael S. Tsirkin" <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* pcnet APROMWE bit location (retry)Chris Kilgour2010-03-081-1/+1
| | | | | | | According to AMD document 21485D pp.141, APROMWE is bit 8 of BCR2. Signed-off-by: Christopher Kilgour <techie@whiterocker.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* adding helper pci functionsIzik Eidus2010-03-081-0/+18
| | | | | | Signed-off-by: Izik Eidus <ieidus@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: Introduce RTC_CHANGE eventLuiz Capitulino2010-03-081-0/+2
| | | | | | | Emitted whenever the RTC time changes. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* block: Emit BLOCK_IO_ERROR before vm_stop() callLuiz Capitulino2010-03-083-3/+3
| | | | | | | | | | | | | | The next commit will move the STOP event into do_vm_stop(), to have the expected event sequence we need to emit the I/O error event before calling vm_stop(). The expected sequence is: { "event": "BLOCK_IO_ERROR" [...] } { "event": "STOP" } Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ppc: don't define bamboo-0.13 as the default machineAurelien Jarno2010-03-081-1/+0
| | | | | | It has been broken by commit 977b6b91cee1132f8c7b12d22f4b273091598e44. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* Update to a hopefully more future proof FSF addressBlue Swirl2010-03-074-9/+5
| | | | | | | | See also 8167ee883931cb20c6264fc19d040ce2dc6ceaaa, 530e7615ce3c01882e582c84dc6304ab98a3d5c5 and fad6cb1a565bb73f83fc0e2654489457b489e436. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* scsi: update comment on the standards revisionChristoph Hellwig2010-03-061-2/+6
| | | | | Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* ppc440_bamboo: Disable new virtio-serial features for 0.12 machine typeAmit Shah2010-03-061-0/+12
| | | | | | | | Disable the MULTIPORT feature and MSI vectors for the 0.12 machine types; those features are added only for 0.13 onwards. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* ppc440_bamboo: Add 0.12 and 0.13 machine types for backward compatAmit Shah2010-03-061-1/+10
| | | | | | | | Add a 0.12 machine type for compatibility with older versions. Mark the default one as 0.13. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* s390-virtio: Fix compile error for virtio-block initAmit Shah2010-03-061-1/+1
| | | | | | | | | | Commit 428c149b0be790b440e1cbee185b152cdb22feec modified the argument that virtio_blk_init takes. Update the s390 bus code that calls this function. Signed-off-by: Amit Shah <amit.shah@redhat.com> CC: Christoph Hellwig <hch@lst.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* hw/serial.c: fix THRE interrupt clearingAurelien Jarno2010-03-061-1/+1
| | | | | | | | | UART_IIR_THRI is not a mask, but a possible value for the IIR ID. Use UART_IIR_ID to extract this value. Broken by commit 71e605f80313a632cc6714cde7bd240042dbdd95. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* hw/serial.c: fix indentationAurelien Jarno2010-03-061-8/+8
| | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* Merge remote branch 'qemu-kvm/uq/master' into pullsAnthony Liguori2010-03-045-19/+4
|\
| * x86: Extend validity of bsp_to_cpuJan Kiszka2010-03-041-1/+2
| | | | | | | | | | | | | | | | | | As we hard-wire the BSP to CPU 0 anyway and cpuid_apic_id equals cpu_index, bsp_to_cpu can also be based on the latter directly. This will help an early user of it: KVM while initializing mp_state. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * KVM: Rework VCPU state writeback APIJan Kiszka2010-03-044-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This grand cleanup drops all reset and vmsave/load related synchronization points in favor of four(!) generic hooks: - cpu_synchronize_all_states in qemu_savevm_state_complete (initial sync from kernel before vmsave) - cpu_synchronize_all_post_init in qemu_loadvm_state (writeback after vmload) - cpu_synchronize_all_post_init in main after machine init - cpu_synchronize_all_post_reset in qemu_system_reset (writeback after system reset) These writeback points + the existing one of VCPU exec after cpu_synchronize_state map on three levels of writeback: - KVM_PUT_RUNTIME_STATE (during runtime, other VCPUs continue to run) - KVM_PUT_RESET_STATE (on synchronous system reset, all VCPUs stopped) - KVM_PUT_FULL_STATE (on init or vmload, all VCPUs stopped as well) This level is passed to the arch-specific VCPU state writing function that will decide which concrete substates need to be written. That way, no writer of load, save or reset functions that interact with in-kernel KVM states will ever have to worry about synchronization again. That also means that a lot of reasons for races, segfaults and deadlocks are eliminated. cpu_synchronize_state remains untouched, just as Anthony suggested. We continue to need it before reading or writing of VCPU states that are also tracked by in-kernel KVM subsystems. Consequently, this patch removes many cpu_synchronize_state calls that are now redundant, just like remaining explicit register syncs. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * Allocate memory below 4GB as one chunkAvi Kivity2010-03-041-9/+2
| | | | | | | | | | | | | | | | | | Instead of allocating a separate chunk for the first 640KB and another for 1MB+, allocate one large chunk. This plays well in terms of alignment and size with large pages. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* | eepro100: Keep includes sortedStefan Weil2010-03-031-1/+1
| | | | | | | | | | | | | | | | | | I always try to keep standard includes sorted and add a comment why they are there (so they can be removed when they are no longer needed). Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | eepro100: Remove C++ commentsStefan Weil2010-03-031-59/+126
| | | | | | | | | | | | | | | | | | | | C++ comments are unwanted, so this is fixed here. * Replace C++ comments by C comments. * Put code which was deactivated by a C++ comment in #if 0...#endif. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | eepro100: Add diagnose commandStefan Weil2010-03-031-0/+5
| | | | | | | | | | | | | | | | | | | | Real hardware would run an internal self-test. The emulation just returns a passed status. Original patch was from Reimar Döffinger, thanks. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | eepro100: New function for reading command blockStefan Weil2010-03-031-14/+28
| | | | | | | | | | | | | | | | | | | | | | Move code which reads the command block to the new function read_cb. The patch also fixes some endianess issues related to the command block and moves declarations of local variables to the beginning of the block. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | eepro100: Use tx.statusStefan Weil2010-03-031-3/+3
| | | | | | | | | | | | | | | | | | There is no need for a local variable "status". Using tx.status makes it clearer which status is addressed. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | eepro100: Prettify code (no functional changes)Stefan Weil2010-03-031-4/+4
| | | | | | | | | | | | | | * Fix indentation. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | eepro100: Fix CU Start commandStefan Weil2010-03-031-6/+6
| | | | | | | | | | | | | | CU Start is allowed when the CU is in the idle or suspended state. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | eepro100: Support RNR interruptStefan Weil2010-03-031-3/+10
| | | | | | | | | | | | | | | | | | | | The RNR interrupt is triggered under these conditions: * the RU is not ready to receive a frame due to missing resources * the RU is ready and a RU abort command was requested Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | eepro100: Replace variable name to fix a compiler warningStefan Weil2010-03-031-6/+6
| | | | | | | | | | | | | | | | When compiling with -Wshadow, gcc gives a warning which is fixed by renaming stat -> status. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | eepro100: Use symbolic names for bits in EEPROM idStefan Weil2010-03-031-1/+16
| | | | | | | | | | | | | | V2 - Use UPPER_CASE for enum values Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | eepro100: Remove old unused codeStefan Weil2010-03-031-18/+0
| | | | | | | | | | | | | | This code is no longer needed. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | eepro100: Use symbolic names and BIT macros in binary operationsStefan Weil2010-03-031-19/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of magic numbers like 0x8000, symbolic names are used for the SCB command and status bits. There are too many configuration bits to use symbolic names there, too. Using the BIT macro is a little help when comparing code and documentation. For the same reason, some other constants were replaced by the BITS macro. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | eepro100: Add device descriptionsStefan Weil2010-03-031-0/+12
| | | | | | | | | | | | | | | | | | Add descriptions for all devices. These descriptions are shown when users call qemu -device ? Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | eepro100: Update copyright noticeStefan Weil2010-03-031-5/+5
| | | | | | | | | | Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | eepro100: Add TODO listStefan Weil2010-03-031-0/+8
| | | | | | | | | | Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | eepro100: Support gpxe boot for all eepro100 devicesStefan Weil2010-03-031-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only two boot ROM files are needed for all devices. * Add these GPXE ROM files using new naming convention (as discussed on qemu-devel). Both files were created with http://rom-o-matic.net/, PCI vendor / device ids as in ROM filenames and option BANNER_TIMEOUT = 0. * Remove old PXE ROM file for i82559er. It was replaced by gpxe-eepro100-80861209.rom. * Update pc-bios/README (and sort entries). Full support still needs additional eepro100 fixes. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | eepro100: Fix PXE bootStefan Weil2010-03-031-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | The phy handling was wrong for PXE, GPXE boot: GPXE's eepro100 driver did not detect a valid link. This is fixed here. V2 - Use UPPER_CASE for enum values Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | eepro100: Add missing SCB register namesStefan Weil2010-03-031-6/+10
| | | | | | | | | | | | | | | | | | Some system control block registers were addressed using their offset value. Use symbolic names now and clean the documentation. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | eepro100: Fix compiler errors from debug messagesStefan Weil2010-03-031-6/+7
|/ | | | | | | | | | When debug output was enabled (by defining DEBUG_EEPRO100), some debug messages resulted in a compiler error. This is fixed here. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* Move ioport.h out of cpu-all.hPaul Brook2010-03-011-0/+1
| | | | | | Only include ioport.h where it is actually needed. Signed-off-by: Paul Brook <paul@codesourcery.com>
* alpha-linux-user: Implement signals.Richard Henderson2010-02-281-78/+3
| | | | | | | | | | Move userland PALcode handling into linux-user main loop so that we can send signals from there. This also makes alpha_palcode.c system-level only, so don't build it for userland. Add defines for GENTRAP PALcall mapping to signals. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* powerpc/e500: adjust fdt and ramdisk loading addrLiu Yu2010-02-271-4/+8
| | | | | | | | | | Since kernel uimage is getting bigger, old fixed loading bases will result in regions overlap. Add pad for fdt and ramdisk, so that they won't overlap with uimage. Signed-off-by: Liu Yu <yu.liu@freescale.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* powerpc: fix compilation with CONFIG_FDT undefinedAurelien Jarno2010-02-272-8/+4
| | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* powerpc/booke: move fdt loading to rom infrastructureLiu Yu2010-02-272-14/+18
| | | | | | | | | | It's convinent to use rom to checking overlap, to reset etc. And uImage and ramdisk loading has already moved to it. Also, after we add fdt to rom, free it. Signed-off-by: Liu Yu <yu.liu@freescale.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-ppc: add synchronize register for booke initLiu Yu2010-02-272-0/+4
| | | | | | | | So that the following registers init could be flushed back to kvm. Signed-off-by: Liu Yu <yu.liu@freescale.com> Acked-by: Hollis Blanchard <hollis@penguinppc.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
OpenPOWER on IntegriCloud