aboutsummaryrefslogtreecommitdiff
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
* lsi: fix segfault in lsi_command_completeGerd Hoffmann2010-04-181-1/+1
| | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit 6ac08101f9de84be1fb7b45f87caed8ba8f3eb5a)
* lsi: pass lsi_request to lsi_reselectGerd Hoffmann2010-04-181-16/+7
| | | | | | | | | | All callers of lsi_reselect have a lsi_request struct at hand anyway. So just pass it directly instead of having lsi_reselect search for it using the tag. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit aa4d32c4742e62e09786bd1067a5b98239867e93)
* lsi: move dma_len+dma_buf into lsi_requestGerd Hoffmann2010-04-181-22/+23
| | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit b96a0da06bd782ef290445479a6d4d0de00c2c23)
* lsi: move current_dev into lsi_requestGerd Hoffmann2010-04-181-11/+12
| | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit daa70311e0f7b37cd0ea3c4de0d163ccf1a36abe)
* lsi: have lsi_request for the whole life time of the request.Gerd Hoffmann2010-04-181-21/+32
| | | | | | | | | | | | | Right now lsi_request is allocated when a request is queued and released when a request is unqueued. With this patch applied the lsi_request is kept for the whole lifetime of the scsi request. Rationale: We can use it for per-request data then. The patch does that already for the request tag. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit af12ac9880eacdd79d49a11d5672df7170afb38f)
* lsi: use QTAILQ for lsi_queueGerd Hoffmann2010-04-181-40/+28
| | | | | | | | | Replace the funky array logic for queued commands with standard qemu list functions. Also rename lsi_queue to lsi_request. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 042ec49dc52e54153942a089a46ae584152998fb)
* sh_pci: fix memory and I/O accessAurelien Jarno2010-04-141-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> (cherry-picked from commit 5ba9e9522cf572715ca1966b292f64fb78342e22)
* scsi-disk: fix buffer overflowGerd Hoffmann2010-04-091-1/+3
| | | | | | | | | | | | In case s->version is shorter than 4 bytes we overflow the memcpy src buffer. Fix it by clearing the target buffer, then copy only the amount of bytes we actually have. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from 314b1811c15f4e982e4667d9b845aee4b5a63d91) Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* sh7750: handle MMUCR TI bitAurelien Jarno2010-04-091-2/+5
| | | | | | | | When the MMUCR TI bit is set, all the UTLB and ITLB entries should be flushed. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit e781d1285fc3b81d689ba25360c6c272116387fa)
* UHCI spurious interrut fixPaul Brook2010-04-061-3/+4
| | | | | | Only raise an interrupt if the TD has actually completed. Signed-off-by: Paul Brook <paul@codesourcery.com>
* workaround for cmd646 bmdma register access while no dma is activeIgor V. Kovalenko2010-03-193-5/+4
| | | | | | | | | | | | | | | | | | | | | This is a workaround only, and is a partial revert of a few changes to BMDMAState which removed pci_dev field on the way. - cmd646 pci_from_bm() expects bm->unit value to correspond with bm data being passed to callback as opaque pointer. This breaks when write to dma control register of second channel happens when no dma operation is in progress, so bm->unit is zero for second channel, and pci_from_bm() returns garbage pointer. Crash happens shortly after that while dereferencing that pointer. v0->v1: cleaned up dead code from pci_from_bm. Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com> (cherry picked from commit 90228ee395b71cdd64e6bc844e3d553eb9ef643f)
* spelling typo (compatibilty) in hw/fw_cfg.cVagrant Cascadian2010-03-141-1/+1
| | | | | | | | here's a trivial patch to fix the spelling of "compatibility": Signed-off-by: Vagrant Cascadian <vagrant@freegeek.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com> (cherry picked from commit 66c80e75752e87a9479577fda1446a7623884f01)
* 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> (cherry picked from commit 995bf0ca57e52f4991d7f90c7eb2bbf7bc3f3c44)
* ide save/restore pio/atapi cmd transfer fields and io bufferMarcelo Tosatti2010-02-232-2/+62
| | | | | | | | | | | Save/restore information necessary to continue in progress PIO/ATAPI CMD transfers. This includes the IO buffer. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit ed487bb1d69040b9dac64a4fc076d8dd82b131d6)
* virtio-net: fix network stall under loadTom Lendacky2010-02-231-1/+9
| | | | | | | | | | Fix a race condition where qemu finds that there are not enough virtio ring buffers available and the guest make more buffers available before qemu can enable notifications. Signed-off-by: Tom Lendacky <toml@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 06b1297017415ae6a07a0e97ad7d8e90b2d95823)
* segfault due to buffer overrun in usb-serialDavid S. Ahern2010-02-231-6/+22
| | | | | | | | | | | | | This fixes a segfault due to buffer overrun in the usb-serial device. The memcpy was incrementing the start location by recv_used yet, the computation of first_size (how much to write at the end of the buffer before wrapping to the front) was not accounting for it. This causes the next element after the receive buffer (recv_ptr) to get overwritten with random data. Signed-off-by: David Ahern <daahern@cisco.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 4ab4183d766f10f9fc35cd9ef4acee39f241986f)
* virtio-blk: Fix error cases which ignored rerror/werrorKevin Wolf2010-01-291-2/+2
| | | | | | | | | If an I/O request fails right away instead of getting an error only in the callback, we still need to consider rerror/werror. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 6c510fbf601fd8c6891b2f1d7165ceb82308a16f)
* virtio-blk: Fix restart after read errorKevin Wolf2010-01-291-2/+9
| | | | | | | | | | Current code assumes that only write requests are ever going to be restarted. This is wrong since rerror=stop exists. Instead of directly starting writes, use the same request processing as used for new requests. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit f1b5286803ee66f73034f1f5e0e1cf14f4415f94)
* virtio_blk: Factor virtio_blk_handle_request outKevin Wolf2010-01-291-32/+46
| | | | | | | | | We need a function that handles a single request. Create one by splitting out code from virtio_blk_handle_output. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit bc6694d43a68baa864dba7742354a379a3347f33)
* cirrus: Properly re-register cirrus_linear_io_addr on vram unmapJan Kiszka2010-01-291-2/+4
| | | | | | | | | | | | | This fixes CONFIG_FB_CIRRUS for Linux guests and probably much more: When switching away from linearly mapped vram, we also have to restore the I/O handlers for the LFB. This regression was once introduced by commit 2bec46dc97. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 4516e45f82b7ee0cedce875477e785989a719b67)
* win32: pair qemu_memalign() with qemu_vfree()Herve Poussineau2010-01-261-1/+1
| | | | | | | | | | | Win32 suffers from a very big memory leak when dealing with SCSI devices. Each read/write request allocates memory with qemu_memalign (ie VirtualAlloc) but frees it with qemu_free (ie free). Pair all qemu_memalign() calls with qemu_vfree() to prevent such leaks. Signed-off-by: Herve Poussineau <hpoussin@reactos.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit f8a83245d9ec685bc6aa6173d6765fe03e20688f)
* Musicpal: Fix descriptor walk in eth_sendJan Kiszka2010-01-261-4/+3
| | | | | | | | | | | | | | Commit 930c86820e introduced a regression to eth_send: eth_tx_desc_put manipulates the host's tx descriptor copy before writing it back, but two lines down the descriptor is evaluated again, leaving us with an invalid next address if host and guest endianness differ. So this was the actual issue commit 2e87c5b937 tried to paper over. Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: malc <av1474@comtv.ru> (cherry picked from commit 07b064e9de65a26a4cb36dfb37c7506ef17407fd) Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Musicpal: Fix wm8750 I2C addressJan Kiszka2010-01-261-1/+1
| | | | | | | | | | | | Commit b3a219883e uncovered that we attached the Wolfson with an I2C address shifted left by one. Fixing this makes sound work again for the Musicpal. Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: malc <av1474@comtv.ru> (cherry picked from commit 642582296479eabded45f262acbfea5121d2fbf8) Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* reduce number of reinjects on ACKGleb Natapov2010-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows 7 BSODs under load with HAL_RTC_IRQF_WILL_NOT_CLEAR error. It happens here: hal!HalpRtcUnmaskClock: 8281b93a 8bff mov edi,edi 8281b93c 56 push esi 8281b93d 33f6 xor esi,esi 8281b93f 6a0c push 0Ch 8281b941 e8b2ffffff call hal!CMOS_READ (8281b8f8) 8281b946 84c0 test al,al 8281b948 7920 jns hal!HalpRtcUnmaskClock+0x30 (8281b96a) 8281b94a 6a0a push 0Ah 8281b94c 46 inc esi 8281b94d e854c8ffff call hal!KeStallExecutionProcessor (828181a6) 8281b952 83fe64 cmp esi,64h 8281b955 72e8 jb hal!HalpRtcUnmaskClock+0x5 (8281b93f) 8281b957 6a00 push 0 8281b959 6a00 push 0 8281b95b 6a00 push 0 8281b95d 680a010000 push 10Ah 8281b962 6a5c push 5Ch 8281b964 ff1500c38082 call dword ptr [hal!_imp__KeBugCheckEx (8280c300)] 8281b96a 5e pop esi 8281b96b c3 ret So it loops for 100(64h) times reading register C before BSOD. Lets reduce number of immediate reinjection well under this limit. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit dd17765b5f77ca02b4aeaf9e42de8dd7513a0611)
* pc: add driver version compat propertiesGerd Hoffmann2010-01-191-0/+16
| | | | | | | | | | | This patch adds compat property entries for ide-disk.ver and scsi-disk.ver to pc-0.10 and pc-0.11. With this patch applied the scsi and ide disks report "0.10" and "0.11" as version when you start qemu with "-M pc-0.10" or "-M pc-0.11". Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 374ef70452452fb729c45dcf1a73a1bd1396cfda)
* scsi: device version propertyGerd Hoffmann2010-01-191-1/+4
| | | | | | | | | | | | | | | | | | This patch adds a new property named 'ver' to scsi-disk which allows to specify the version which the virtual disk/cdrom should report to the guest. By default this is the qemu version (i.e. 0.12). usage: -drive if=none,id=disk,file=... -device lsi -device scsi-disk,drive=disk,bus=scsi.0,unit=0,ver=42 You can also switch the version for all scsi drives using: -global scsi-disk.ver=42 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 383b4d9b79e3a71b1d5cadd34989b1c0e2a05832)
* ide: device version propertyGerd Hoffmann2010-01-193-9/+17
| | | | | | | | | | | | | | | | | This patch adds a new property named 'ver' to ide-drive which allows to specify the version which the virtual disk/cdrom should report to the guest. By default this is the qemu version (i.e. 0.12). usage: -drive if=none,id=disk,file=... -device ide-drive,bus=ide.0,unit=0,drive=disk,ver=42 You can also switch the version for all ide drives using: -global ide-drive.ver=42 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 47c063403065793ad6e1d2fdde27d69a00880752)
* Fix QEMU_WARN_UNUSED_RESULTKevin Wolf2010-01-192-3/+3
| | | | | | | | | | | | | Since commit 747bbdf7 QEMU_WARN_UNUSED_RESULT is never defined as it is conditional on a define from config-host.h which is included only later. Include that file earlier to get the warnings back. Reactivating it unfortunately leads to some warnings about unused qdev_init results. These calls are changed to qdev_init_nofail to avoid build failures. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit beb6f0de7aa19ce62fdd21a876b8c171ac7fde2e)
* pc: add rombar to compat properties for pc-0.10 and pc-0.11Gerd Hoffmann2010-01-121-0/+8
| | | | | | | | | So '-M pc-0.10' and '-M pc-0.11' will use the fw_cfg rom load method by default. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 20a86364c9e421c4f9ce457251fa8df031cd5078)
* pci: allow loading roms via fw_cfg.Gerd Hoffmann2010-01-122-0/+16
| | | | | | | | | | | This patch adds a pci bus property 'rombar' which specifies whenever the pci rom should be loaded via pci rom bar (default) or via fw_cfg. The later can be used for compatibility with older qemu versions where no pci rom bar is present. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 88169ddf82853ca892ce7bee279579c8a0ac03e5)
* roms: rework rom loading via fwGerd Hoffmann2010-01-123-13/+7
| | | | | | | | | | | | | | This patch changes the way rom loading via fw_cfg is handled. Instead of having pc_init1() call a function which passed all roms to the firmware config we simply pass a pointer to fw_cfg to the rom loader. Advantage: loading roms via firmware works also for devices which are initialized after pc_init1(), i.e. everyting added via -device. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 8832cb805dcb65009b979cd8e17d75ac4b03c7e4)
* fw_cfg: rom loader tweaks.Gerd Hoffmann2010-01-121-7/+11
| | | | | | | | | | | Changes: - make dir argument mandatory, we allways have one anyway (vgaroms or genroms). - check for duplicates, skip loading if found. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit de9352bcaed2452af1d2b06b829748676c691794)
* roms: minor fixes and cleanups.Gerd Hoffmann2010-01-122-17/+26
| | | | | | | | | | | Changes: - Drop extra file argument from rom_add_file(). - Drop fw_dir check in do_info_roms, we allways have a dir name. - code style fixes. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit bdb5ee3064d5ae786b0bcb6cf6ff4e3554a72990)
* pc: add machine type for 0.12Gerd Hoffmann2010-01-121-1/+17
| | | | | | | | | | | Add a new machine type for qemu 0.12. Also fixup the 0.11 machine type: msi for virtio-blk-pci was enabled after the 0.11 release, so turn it off in the 0.11 machine type. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 2cae6f5e34d85fe44ec2329a7fbc22dc8cfb079f)
* loader: more ignores for rom intended to be loaded by the biosAurelien Jarno2010-01-121-0/+6
| | | | | | | | Similarly to what has been done in e405a2ba91b68817cae2a428de55fe9616a4cf37, ignore rom intended to be loaded by the bios in find_rom() and rom_copy(). Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit f21a59c224a6fdf7b30c3fe551fd93043e537f6c)
* virtio-pci: thinko fixMichael S. Tsirkin2010-01-121-1/+1
| | | | | | | | | | | | | Since patch ed757e140c0ada220f213036e4497315d24ca8bct, virtio will sometimes clear all status registers on bus master disable, which loses information such as VIRTIO_CONFIG_S_FAILED bit. This is a result of a patch being misapplied: code uses ! instead of ~ for bit operations as in Yan's original patch. This obviously does not make sense. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 49e75cf38848e6da70c0e9ddb4d994e9d71a9625)
* vmware_vga: Check cursor dimensions passed from guest to avoid buffer overflowRoland Dreier2010-01-111-0/+7
| | | | | | | | | | | Check that the cursor dimensions passed from the guest for the DEFINE_CURSOR command don't overflow the available space in the cursor.image[] or cursor.mask[] arrays before copying data from the guest into those arrays. Signed-off-by: Roland Dreier <rolandd@cisco.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit f2d928d44ebc918750c94f3605c1417f1f653ec9)
* Don't load options roms intended to be loaded by the bios in qemuAvi Kivity2009-12-241-1/+7
| | | | | | | | | The first such option rom will load at address 0, which isn't very nice, and the second will report a conflict and abort, which is horrible. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit e405a2ba91b68817cae2a428de55fe9616a4cf37)
* fdc/sparc32: don't hang on detection under OBPArtyom Tarasenko2009-12-201-0/+6
| | | | | | | | | | | Stepping through the SS-5's OBP initialization routines it looks like reading fdc main status register should clear the fd interrupt. The patch doesn't fix problems with fdc on sparc platform, it only fixes fdc detection. Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* scsi-disk: Inquiry with allocation length of CDB < 36 (v4)Artyom Tarasenko2009-12-201-6/+15
| | | | | | | | | | | | | According to the SCSI-2 specification, http://ldkelley.com/SCSI2/SCSI2/SCSI2/SCSI2-08.html#8.2.5 , "if the allocation length of the command descriptor block (CDB) is too small to transfer all of the parameters, the additional length shall not be adjusted to reflect the truncation." The 36 mandatory bytes of response are written to outbuf, and then only the length requested in CDB is transferred. Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Multiboot support: Fix rom_copyKevin Wolf2009-12-191-2/+5
| | | | | | | | | | ROMs need to be loaded if they are anywhere in the requested area, not only at the very beginning. This fixes Multiboot with ELF kernels that have more than one program header. Signed-off-by: Kevin Wolf <mail@kevin-wolf.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit 935effc2bbd2c441b755a8d280811a9763fdb98c)
* roms: allow roms to be loaded at address 0Aurelien Jarno2009-12-191-8/+0
| | | | | | | | | It was possible to load roms at address 0, but commit 632cf034b401cdd01dae253a8b577fe518e37654 started to forbid that, which broke at least ARM versatile. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit f9e69bd9cfe2247b1fb5dc56d3a28baf36ce8384)
* e1000: Don't muck with PCI commmand registerAnthony Liguori2009-12-191-1/+0
| | | | | | | | | | Otherwise, the driver does not work in Linux after the INT_DISABLE changes in PCI. Michael Tsirkin had a patch to do this, I'm not sure what happened to it. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 17a7a5c59c4d72dd1d5666f348b010be6b10163c)
* roms: remove option rom packing logicGerd Hoffmann2009-12-192-61/+50
| | | | | | | | | | | | | Now that we load the option roms via fw_cfg, we can stop copying them to the 0xc000 -> 0xe000. The patch does just that. Also the rom loader gets simplified as all remaining users of the rom loader load the bits at a fixed address so the packing and aligning logic can go away. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 632cf034b401cdd01dae253a8b577fe518e37654)
* roms: use new fw_cfg file xfer support.Gerd Hoffmann2009-12-193-5/+27
| | | | | | | | | roms: use fw_cfg for vgabios and option rom loading, additionally to deploying them the traditional way (copy to 0xc0000 -> 0xe0000 range). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 379526a40e855b0da3c5718063a7d992aa5a79a1)
* fw_cfg: add API for file transfer.Gerd Hoffmann2009-12-192-2/+62
| | | | | | | | | | | | | | | | This patch adds a file transfer interface to fw_cfg. Intended to be used for passing non-pci option roms and vgabios to seabios. Namespace is modeled after the existing cbfs filesystem support in seabios. Reading the new FW_CFG_FILE_DIR entry returns a file list. Fields there are in network byte order (aka bigendian). aliguori: fix fw_cfg.h for multiboot.bin, add proper fw_cfg.h declarations, quiet fprintf() in fw_cfg.c Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit abe147e0ce41c07e789f6627bcb01c905d1f9bbf)
* fw_cfg: make calls typesafeGerd Hoffmann2009-12-192-21/+21
| | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit c2b5bda43a1c87147fadc78d5590b1465b850816)
* pci romfiles: add property, add default to PCIDeviceInfoGerd Hoffmann2009-12-196-32/+29
| | | | | | | | | | | This patch adds a romfile property to the pci bus. It allows to specify a romfile to load into the rom bar of the pci device. The default value comes from a new field in PCIDeviceInfo. The property allows to change the file and also to disable the rom loading using an empty string. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 8c52c8f320b27684ec3b1a649925b75af376b1f7)
* Support PCI based option rom loadingAnthony Liguori2009-12-196-4/+44
| | | | | | | | | | | | | | | | | | Currently, we preload option roms into the option rom space in memory. This prevents DDIM from functioning correctly which severely limits the number of roms we can support. This patch introduces a pci_add_option_rom() which registers the PCI_ROM_ADDRESS bar which points to our option rom. It also converts over the cirrus vga adapter, the rtl8139, virtio, and the e1000 to use this new mechanism. The result is that PXE boot functions even with three unique types of cards. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit c2039bd0ffce8807e0eaac55254fde790825fa92)
* Fix backcompat for hotplug of SCSI controllersDaniel P. Berrange2009-12-191-5/+1
| | | | | | | | | | | | | | | | | | | | | SCSI controllers have no trouble existing without any attached disks. This could be achieved with the (legacy) monitor syntax pci_add pci_addr=auto storage if=scsi This is now denied with scsi requires a backing file/device. failed to add if=scsi There is no need for this denial and it breaks compatability with existing QEMU usage, so remove the check for presence of a drive. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit ec7efac4a967c650ae1cd8cebe28e7c69cbe3864)