summaryrefslogtreecommitdiffstats
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
* Fix harmless if statement with empty body, spotted by clangBlue Swirl2010-04-231-1/+2
| | | | | | | | | This clang error is harmless but worth fixing: CC libhw32/rc4030.o /src/qemu/hw/rc4030.c:244:66: error: if statement has empty body [-Wempty-body] DPRINTF("read 0x%02x at " TARGET_FMT_plx "\n", val, addr); Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Remove un-needed codeBruce Rogers2010-04-231-1/+0
| | | | | | | | The bdrv_set_geometry_hint call below is not needed - it's just setting what was just read. Signed-off-by: Bruce Rogers <brogers@novell.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* Replace calls of old bdrv_openKevin Wolf2010-04-231-1/+1
| | | | | | | | | What is known today as bdrv_open2 becomes the new bdrv_open. All remaining callers of the old function are converted to the new one. In some places they even know the right format, so they should have used bdrv_open2 from the beginning. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* Make qemu-config available for toolsKevin Wolf2010-04-232-2/+18
| | | | | | | | To be able to use config files for blkdebug, we need to make these functions available in the tools. This involves moving two functions that can only be built in the context of the emulator. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* bt-sdp: Fix an excessive ; and assignment of the wrong variableAndrzej Zaborowski2010-04-221-2/+2
| | | | | Problem-spotted-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Andrew Zaborowski <balrogg@gmail.com>
* bt-l2cap: fix if statement with empty body, spotted by clangBlue Swirl2010-04-221-3/+3
| | | | | | | | | | | | | Fix clang error: CC bt-l2cap.o /src/qemu/hw/bt-l2cap.c:1000:41: error: if statement has empty body [-Wempty-body] /* TODO: Signal an error? */; This means that l2cap_sframe_in() may now get called. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Andrew Zaborowski <balrogg@gmail.com>
* pci: fix pci_find_bus().Isaku Yamahata2010-04-201-9/+16
| | | | | | | | | | | When looking down child bus, it should look parent bridge's bus number, not child bus's. Optimized tail recursion and style fix. Cc: Blue Swirl <blauwirbel@gmail.com> Cc: "Michael S. Tsirkin" <mst@redhat.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Check for invalid initrd fileM. Mohan Kumar2010-04-191-0/+6
| | | | | | | | | When qemu is invoked with an invalid initrd file, it crashes. Following patch prints a error message and exits if an invalid initrd is specified. Includes changes suggested by JV. Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* virtio-blk: Fix use after free in error caseKevin Wolf2010-04-181-3/+3
| | | | | | | | virtio_blk_req_complete frees the request, so we can't access it any more when calling bdrv_mon_event. Use the pointer that was copied earlier. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* error: Use QERR_INVALID_PARAMETER_VALUE instead of QERR_INVALID_PARAMETERMarkus Armbruster2010-04-181-1/+1
| | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* error: Drop extra messages after qemu_opts_set() and qemu_opts_parse()Markus Armbruster2010-04-181-2/+0
| | | | | | | | Both functions report errors nicely enough now, no need for additional messages. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* monitor: convert do_device_del() to QObject, QErrorMarkus Armbruster2010-04-182-5/+5
| | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qdev: Convert qdev_unplug() to QErrorMarkus Armbruster2010-04-181-2/+1
| | | | | | | | Note: our device unplug methods don't need conversion work, because they can't currently fail. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* Fix harmless if statements with empty body, spotted by clangBlue Swirl2010-04-181-4/+6
| | | | | | | | | | | | | | These clang errors are harmless but worth fixing: CC ppc-softmmu/usb-ohci.o /src/qemu/hw/usb-ohci.c:1104:59: error: if statement has empty body [-Wempty-body] ohci->ctrl_head, ohci->ctrl_cur); /src/qemu/hw/usb-ohci.c:1371:57: error: if statement has empty body [-Wempty-body] DPRINTF("usb-ohci: port %d: SUSPEND\n", portnum); CC sparc64-softmmu/translate.o /src/qemu/target-sparc/translate.c:3173:37: error: if statement has empty body [-Wempty-body] ; // XXX Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* sparc32 use empty_slot for missing RAM v1Artyom Tarasenko2010-04-181-0/+5
| | | | | | | | | | | use empty_slot device for the RAM which is not installed Models without ECC don't trap when missing ram is accessed. v0->v1 compile only once and fix indentation Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* create empty_slot deviceArtyom Tarasenko2010-04-182-0/+94
| | | | | | | The empty_slot device emulates known to a bus but not connected devices. Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Fix harmless if statements with empty body, spotted by clangBlue Swirl2010-04-182-2/+5
| | | | | | | | | | | | These clang errors are harmless but worth fixing: CC libhw64/fdc.o /src/qemu/hw/fdc.c:998:74: error: if statement has empty body [-Wempty-body] FLOPPY_DPRINTF("Floppy digital input register: 0x%02x\n", retval); CC libhw64/cuda.o /src/qemu/hw/cuda.c:320:66: error: if statement has empty body [-Wempty-body] CUDA_DPRINTF("read: reg=0x%x val=%02x\n", (int)addr, val); Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Merge remote branch 'mst/for_anthony' into stagingAnthony Liguori2010-04-133-340/+213
|\
| * vhost.c: include <linux/vhost.h> lastMarcelo Tosatti2010-04-111-1/+1
| | | | | | | | | | | | | | | | So the userspace headers define KERNEL_STRICT_NAMES and there's no conflict on type definition for older kernels. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * vhost-net: disable mergeable buffersMichael S. Tsirkin2010-04-111-0/+1
| | | | | | | | | | | | | | | | vhost in current kernels doesn't support mergeable buffers. Disable this feature if vhost is enabled, until such support is implemented. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * vhost: fix features ackDavid L Stevens2010-04-111-0/+8
| | | | | | | | | | | | | | | | | | | | vhost driver in qemu didn't ack features, and this happens to work because we don't really require any features. However, it's better not to rely on this. This patch passes features to vhost as guest acks them. Signed-off-by: David L Stevens <dlstevens@us.ibm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * eepro100: convert to new capability APIMichael S. Tsirkin2010-04-111-13/+9
| | | | | | | | | | | | | | | | Using new pci_add_capability_at_offset makes eepro100 code cleaner. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Stefan Weil <weil@mail.berlios.de>
| * pci: add API to add capability at a known offsetMichael S. Tsirkin2010-04-112-4/+15
| | | | | | | | | | | | | | | | Unlike virtio, device emulations need to add pci capabilities at known offsets to match real hardware. Make this possible by adding an appropriate API. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * eepro100: fix PCI interrupt pin configuration regressionStefan Weil2010-04-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 15e89f5916c9e82347cbd1fd416db3e348bab426 removed this setting, but it is still needed. Without this patch, e100 device drivers using interrupts don't work with qemu. See other nic emulations which also set the PCI interrupt pin. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * eepro100: fix mapping of flash memoryStefan Weil2010-04-071-5/+5
| | | | | | | | | | Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * eepro100: Set power management capability using pci_reserve_capabilityStefan Weil2010-04-071-21/+18
| | | | | | | | | | | | | | | | | | pci_add_capability automatically updates PCI status and PCI capability pointer, so use it. Use pci_reserve_capability to make the new capability appear at the correct offset. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * eepro100: Set configuration bit for standard TCBStefan Weil2010-04-061-0/+3
| | | | | | | | | | | | | | | | For some devices, this bit is always set. For the others, it is set by default. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * eepro100: Add new device variant i82801Stefan Weil2010-04-061-0/+15
| | | | | | | | | | | | | | This ethernet device is used in Toshiba Tecra 8200 notebooks. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * eepro100: Simplified device instantiationStefan Weil2010-04-061-280/+167
| | | | | | | | | | | | | | | | | | By using a private device info structure (as suggested by Gerd Hoffmann), handling of the different device variants becomes much easier. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * eepro100: Simplify status handlingStefan Weil2010-04-061-4/+4
| | | | | | | | | | | | | | Includes a minor STATUS_NOT_OK -> 0 tweak. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * eepro100: Don't allow writing SCBStatusStefan Weil2010-04-061-44/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | SCBStatus is readonly, but most drivers which were derived from the old Linux eepro100.c do a word write to this address when they want to acknowledge interrupts. So we have to mask these writes here. The patch also removes old unused code for status read / write. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | vhost.c: include <linux/vhost.h> lastMarcelo Tosatti2010-04-141-1/+1
| | | | | | | | | | | | | | | | | | So the userspace headers define KERNEL_STRICT_NAMES and there's no conflict on type definition for older kernels. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | vhost-net: disable mergeable buffersMichael S. Tsirkin2010-04-131-0/+1
| | | | | | | | | | | | | | | | | | vhost in current kernels doesn't support mergeable buffers. Disable this feature if vhost is enabled, until such support is implemented. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | vhost: fix features ackDavid L Stevens2010-04-131-0/+8
| | | | | | | | | | | | | | | | | | | | | | vhost driver in qemu didn't ack features, and this happens to work because we don't really require any features. However, it's better not to rely on this. This patch passes features to vhost as guest acks them. Signed-off-by: David L Stevens <dlstevens@us.ibm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | sh_pci: fix memory and I/O accessAurelien Jarno2010-04-131-96/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 8da3ff180974732fc4272cb4433fef85c1822961 ("MMIO callback interface changes"), the addresses passed to the I/O functions are an offset to the start of the area. As a consequence, there is no need to correct the address using the value of IOBR. This make possible the use of the default MMIO functions. Moreover the addresses are now remaped when the value if IOBR change. The memory area corresponds to the devices behing the PCI bus, it should not be mapped by the PCI controller. Remove the corresponding code. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | r2d: always enable IDE and flashAurelien Jarno2010-04-131-10/+8
| | | | | | | | | | | | IDE and flash are part of the R2D board, and can't be removed. Emulate them even if there is no hard-drive plugged to the IDE or if the flash content is empty.
* | hw/r2d: add initrd supportAurelien Jarno2010-04-111-21/+59
| | | | | | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | hw/r2d: add flash memoryAurelien Jarno2010-04-111-0/+13
| | | | | | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | Implement virtio resetAlexander Graf2010-04-093-6/+7
| | | | | | | | | | | | | | | | | | The guest may issue a RESET command for virtio. So far we didn't bother to implement it, but with my new bootloader we actually need it for Linux to get back to a safe state. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | lsi: fix segfault in lsi_command_completeGerd Hoffmann2010-04-091-1/+1
| | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | move targphys.h and hw/poison.h inclusion to cpu-common.hPaolo Bonzini2010-04-092-52/+0
| | | | | | | | | | | | | | | | With more files from outside the hw/ directory being placed into libhw, avoid the need to include hw/hw.h for the sake of targ_phys_addr_t. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | move two variable declarations out of vl.cPaolo Bonzini2010-04-092-0/+2
| | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | Debugcon: Fix debugging printfAdam Lackorzynski2010-04-081-1/+1
| | | | | | | | | | Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | e1000: fix build on Ubuntu with _FORTIFY_SOURCEThomas Monjalon2010-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | There was a pointer cast warning on Ubuntu since _FORTIFY_SOURCE has been reenabled. _FORTIFY_SOURCE had been disabled by 4a24470497360d8b77568b83008d0e9d6eb0787d and reenabled by 849583050d5f6f782718be8cb50688978973fbea. Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | smc91c111: allow access to reserved registerLars Munch2010-04-081-0/+4
| | | | | | | | | | | | | | | | Some drivers seems to access the reserved register in bank 0 so allow and ignore these accesses. Signed-off-by: Lars Munch <lars@segv.dk> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | smc91c111: mask register offsetLars Munch2010-04-081-0/+2
| | | | | | | | | | | | | | | | | | this fixes the smc91c111 emulation which has been broken for gumstix and mainstone and maybe others since the "MMIO callback interface changes" 8da3ff180974732fc4272cb4433fef85c1822961 was commited. Signed-off-by: Lars Munch <lars@segv.dk> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | baum: add destroy hookSamuel Thibault2010-04-081-0/+13
| | | | | | | | | | | | | | | | Add a destroy hook for the baum character device, to properly close the BrlAPI connection. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | update bochs vbe interfaceGerd Hoffmann2010-04-082-3/+7
|/ | | | | | | | | | The bochs vbe interface got a new register a while back, which specifies the linear framebuffer size in 64k units. This patch adds support for the new register to qemu. With this patch applied vgabios 0.6c works with qemu. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* OHCI qdev conversionPaul Brook2010-04-055-47/+47
| | | | | | Convert remaining OHCI devices to QDEV interface. Signed-off-by: Paul Brook <paul@codesourcery.com>
* ARMv7-M reset fixesPaul Brook2010-04-051-14/+8
| | | | | | | | | | Move ARMv7-M PC/SP initialization to the CPU reset routine. Add a board reset routine to call this. Also load values directly from ROM as images have not been copied yet. Avoid clearing the NVIC pointer on cpu reset. Signed-off-by: Paul Brook <paul@codesourcery.com>
OpenPOWER on IntegriCloud