summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2010-04-25sh4: remove dead assignments, spotted by clang analyzerBlue Swirl1-2/+1
Value stored is never read. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-25ppc: add missing 'break', spotted by clang analyzerBlue Swirl1-0/+1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-25ppc: remove dead assignments, spotted by clang analyzerBlue Swirl1-4/+0
Value stored is never read. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-25alpha: remove dead assignments, spotted by clang analyzerBlue Swirl1-2/+0
Value stored is never read. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-25microblaze: remove dead assignments, spotted by clang analyzerBlue Swirl1-2/+1
Value stored is never read. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-25cris: remove dead assignments, spotted by clang analyzerBlue Swirl1-1/+1
Value stored is never read. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-25arm: remove dead assignments, spotted by clang analyzerBlue Swirl12-38/+32
Value stored is never read. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-25x86: remove dead assignments, spotted by clang analyzerBlue Swirl6-16/+16
Value stored is never read. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-25Remove dead assignments in various common files, spotted by clang analyzerBlue Swirl1-3/+1
Value stored is never read. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-25usb: remove dead assignments, spotted by clang analyzerBlue Swirl6-12/+23
Value stored is never read. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-25bt: remove dead assignments, spotted by clang analyzerBlue Swirl2-8/+3
Value stored is never read. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-23Fix harmless if statement with empty body, spotted by clangBlue Swirl1-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>
2010-04-23Remove un-needed codeBruce Rogers1-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>
2010-04-23Replace calls of old bdrv_openKevin Wolf1-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>
2010-04-23Make qemu-config available for toolsKevin Wolf2-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>
2010-04-22bt-sdp: Fix an excessive ; and assignment of the wrong variableAndrzej Zaborowski1-2/+2
Problem-spotted-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Andrew Zaborowski <balrogg@gmail.com>
2010-04-22bt-l2cap: fix if statement with empty body, spotted by clangBlue Swirl1-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>
2010-04-20pci: fix pci_find_bus().Isaku Yamahata1-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>
2010-04-19Check for invalid initrd fileM. Mohan Kumar1-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>
2010-04-18virtio-blk: Fix use after free in error caseKevin Wolf1-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>
2010-04-18error: Use QERR_INVALID_PARAMETER_VALUE instead of QERR_INVALID_PARAMETERMarkus Armbruster1-1/+1
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18error: Drop extra messages after qemu_opts_set() and qemu_opts_parse()Markus Armbruster1-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>
2010-04-18monitor: convert do_device_del() to QObject, QErrorMarkus Armbruster2-5/+5
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18qdev: Convert qdev_unplug() to QErrorMarkus Armbruster1-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>
2010-04-18Fix harmless if statements with empty body, spotted by clangBlue Swirl1-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>
2010-04-18sparc32 use empty_slot for missing RAM v1Artyom Tarasenko1-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>
2010-04-18create empty_slot deviceArtyom Tarasenko2-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>
2010-04-18Fix harmless if statements with empty body, spotted by clangBlue Swirl2-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>
2010-04-13Merge remote branch 'mst/for_anthony' into stagingAnthony Liguori3-340/+213
2010-04-14vhost.c: include <linux/vhost.h> lastMarcelo Tosatti1-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>
2010-04-13vhost-net: disable mergeable buffersMichael S. Tsirkin1-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>
2010-04-13vhost: fix features ackDavid L Stevens1-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>
2010-04-13sh_pci: fix memory and I/O accessAurelien Jarno1-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>
2010-04-13r2d: always enable IDE and flashAurelien Jarno1-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.
2010-04-11hw/r2d: add initrd supportAurelien Jarno1-21/+59
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-11vhost.c: include <linux/vhost.h> lastMarcelo Tosatti1-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>
2010-04-11vhost-net: disable mergeable buffersMichael S. Tsirkin1-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>
2010-04-11vhost: fix features ackDavid L Stevens1-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>
2010-04-11eepro100: convert to new capability APIMichael S. Tsirkin1-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>
2010-04-11pci: add API to add capability at a known offsetMichael S. Tsirkin2-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>
2010-04-11hw/r2d: add flash memoryAurelien Jarno1-0/+13
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-09Implement virtio resetAlexander Graf3-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>
2010-04-09lsi: fix segfault in lsi_command_completeGerd Hoffmann1-1/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-09move targphys.h and hw/poison.h inclusion to cpu-common.hPaolo Bonzini2-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>
2010-04-09move two variable declarations out of vl.cPaolo Bonzini2-0/+2
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-08Debugcon: Fix debugging printfAdam Lackorzynski1-1/+1
Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-08e1000: fix build on Ubuntu with _FORTIFY_SOURCEThomas Monjalon1-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>
2010-04-08smc91c111: allow access to reserved registerLars Munch1-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>
2010-04-08smc91c111: mask register offsetLars Munch1-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>
2010-04-08baum: add destroy hookSamuel Thibault1-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>