summaryrefslogtreecommitdiffstats
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* pci: vmstate_register() already assign consecutive numbers starting at 0Juan Quintela2009-12-031-3/+1
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: Add support for multiplying size for a constantJuan Quintela2009-12-031-0/+13
| | | | | | | | When the size that we want to transmit is in another field, but in an unit different that bytes Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: remove usused VMSTATE_STRUCT_ARRAY_SIZE_UINT8Juan Quintela2009-12-031-10/+0
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: Introduce UINT16_TEST supportJuan Quintela2009-12-031-0/+3
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: Introduce VMSTATE_STRUCT_POINTER_TESTJuan Quintela2009-12-031-6/+10
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: Introduce VMSTATE_STRUCT_TESTJuan Quintela2009-12-031-7/+11
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: Add support for VBUFFERSJuan Quintela2009-12-031-0/+20
| | | | | | | | | | Support for buffer that are pointed by a pointer (i.e. not embedded) where the size that we want to use is a field in the state. We also need a new place to store where to start in the middle of the buffer, as now it is a pointer, not the offset of the 1st field. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: Fix info field of VMSTATE_MACADDRJan Kiszka2009-12-031-1/+1
| | | | | | Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* lsi53c895a: Implement IRQ on reselectionLaszlo Ast2009-12-031-3/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The critical part of this change is how to deal with simultaneaous generation of interrupts. The only (normal) case when this happens in the emulation is near simultaneous reselection + selection. If selection comes first, there is no problem, since the target attempting reselection loses the arbitration (in the emulation it only means that the reselect function will not be started). In the worst case the host adapter is reselected, but the device driver already started a selection, so we jump to the alternative address to handle the situation. The SCRIPTS code can trigger another interrupt to notify the driver that the new task has to be postponed. I suppose that on real hardware there is enough time after the reselection interrupt to set the SIP bit before the next interrupt comes, so it would result in 2 stacked interrupts (a SCSI and a DMA one). However, in the emulation there is no interrupt stacking, so there is a good chance that the 2 interrupts will get to the interrupt handler at the same time. Nevertheless, it should not make a big difference in interrupt handling, since in both cases both interrupts have to be fetched first, and after that the new task (that failed during the selection phase) has to be prepared/reset for a later restart, and the reconnected device has to be serviced. The changes do not modify the host adapter's behavior if this interrupt is not enabled. See also LSI53C895A technical manual, SCID and SIEN0. 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>
* lsi53c895a: Use alternative address when already reselectedLaszlo Ast2009-12-031-2/+3
| | | | | | | | See SCRIPTS, 3.2.17 SELECT. 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>
* lsi53c895a: Fix SDID in SELECT ID commandLaszlo Ast2009-12-031-1/+1
| | | | | | | | See SCRIPTS Programming Guide, 3.2.17 SELECT. 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>
* lsi53c895a: Fix message code of DISCONNECTLaszlo Ast2009-12-031-1/+1
| | | | | | | | See SCSI-2, 6.5 Message system description/message codes. 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>
* lsi53c895a: Add support for LSI53C700 Family Compatibility bitLaszlo Ast2009-12-031-0/+4
| | | | | | 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>
* lsi53c895a: Whitespace and typo fixesLaszlo Ast2009-12-031-5/+5
| | | | | | 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>
* scsi: add read/write 16 commands.Gerd Hoffmann2009-12-033-2/+15
| | | | | | | | | | Add READ_16 + friends to scsi-defs.h, scsi_command_name() and the request parsing helper functions. Use them in scsi-disk.c too. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi-disk: restruct emulation: VERIFYGerd Hoffmann2009-12-031-3/+3
| | | | | | | | Move VERIFY emulation from scsi_send_command() to scsi_disk_emulate_command(). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi-disk: restruct emulation: REPORT_LUNSGerd Hoffmann2009-12-033-8/+10
| | | | | | | | | | Move REPORT_LUNS emulation from scsi_send_command() to scsi_disk_emulate_command(). Also add REPORT_LUNS to scsi-defs.h and scsi_command_name(). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi-disk: restruct emulation: SERVICE_ACTION_INGerd Hoffmann2009-12-033-35/+34
| | | | | | | | | | Move SERVICE_ACTION_IN emulation from scsi_send_command() to scsi_disk_emulate_command(). Also add SERVICE_ACTION_IN to scsi-defs.h and scsi_command_name(). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi-disk: restruct emulation: GET_CONFIGURATIONGerd Hoffmann2009-12-033-8/+10
| | | | | | | | | | Move GET_CONFIGURATION emulation from scsi_send_command() to scsi_disk_emulate_command(). Also add GET_CONFIGURATION to scsi-defs.h and scsi_command_name(). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi-disk: restruct emulation: READ_TOCGerd Hoffmann2009-12-031-38/+42
| | | | | | | | | Move READ_TOC emulation from scsi_send_command() to scsi_disk_emulate_command(). Add scsi_disk_emulate_read_toc() function which holds the longisch READ_TOC emulation code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi-disk: restruct emulation: SYNCHRONIZE_CACHEGerd Hoffmann2009-12-031-4/+4
| | | | | | | | Move SYNCHRONIZE_CACHE emulation from scsi_send_command() to scsi_disk_emulate_command(). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi-disk: restruct emulation: READ_CAPACITYGerd Hoffmann2009-12-031-28/+27
| | | | | | | | Move READ_CAPACITY emulation from scsi_send_command() to scsi_disk_emulate_command(). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi-disk: restruct emulation: ALLOW_MEDIUM_REMOVALGerd Hoffmann2009-12-031-4/+4
| | | | | | | | Move ALLOW_MEDIUM_REMOVAL emulation from scsi_send_command() to scsi_disk_emulate_command(). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi-disk: restruct emulation: START_STOPGerd Hoffmann2009-12-031-7/+7
| | | | | | | | Move START_STOP emulation from scsi_send_command() to scsi_disk_emulate_command(). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi-disk: restruct emulation: MODE_SENSEGerd Hoffmann2009-12-031-152/+183
| | | | | | | | | | | Move MODE_SENSE emulation from scsi_send_command() to scsi_disk_emulate_command(). Create two helper functions: mode_sense_page() which writes the actual mode pages and scsi_disk_emulate_mode_sense() which holds the longish MODE_SENSE emulation code, calling into mode_sense_page() as needed. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi-disk: restruct emulation: RESERVE+RELEASEGerd Hoffmann2009-12-031-20/+20
| | | | | | | | Move RESERVE+RELEASE emulation from scsi_send_command() to scsi_disk_emulate_command(). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi-disk: restruct emulation: INQUIRYGerd Hoffmann2009-12-031-162/+143
| | | | | | | | | | | Move INQUIRY emulation from scsi_send_command() to scsi_disk_emulate_command(). Also split the longish INQUITY emulation code into the new scsi_disk_emulate_inquiry() function. Serial number handling is slightly changed, we don't copy it any more but look it up directly in DriveInfo which we have at hand anyway. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi-disk: restruct emulation: REQUEST_SENSEGerd Hoffmann2009-12-031-19/+19
| | | | | | | | Move REQUEST_SENSE emulation from scsi_send_command() to scsi_disk_emulate_command(). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud