summaryrefslogtreecommitdiff
path: root/hw/pci.c
AgeCommit message (Collapse)AuthorFilesLines
2010-07-13Merge commit 'b7fdb3ab0e22a9a8debcb928497b248f06778845' into upstream-mergeMarcelo Tosatti1-11/+80
* commit 'b7fdb3ab0e22a9a8debcb928497b248f06778845': (23 commits) qemu-options: add documentation for stdio signal=on|off Update OpenBIOS images target-ppc: add vexptefp instruction softfloat: add float32_exp2() Update SeaBIOS pci/multi function bit: fix vt82c686.c. target-sh4: Add support for ldc & stc with sgr target-sh4: Split the LDST macro into 2 sub-macros pci: fix bridge update virtio-net: correct packet length math pci hotplug: make pci hotplug return value to caller vmware_vga: fix reset value for command register rtl8139: address TODOs pci hotplug: make pci_device_hot_remove() static pcnet: address TODOs pci: fix pci_device_reset AppleSMC device emulation Documentation: Fix spelling bugs Makefile: Not every shell support {} Makefile: add fsdev/*.{o,d} to clean ... Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-13Merge commit '498238687fd3a2bf3efb32694732f88ceac72e99' into upstream-mergeMarcelo Tosatti1-11/+40
* commit '498238687fd3a2bf3efb32694732f88ceac72e99': (28 commits) pci: introduce multifunction property. qdev: implement qdev_prop_set_bit(). pci: remove PCIDeviceInfo::header_type pci: don't overwrite multi functio bit in pci header type. pci: insert assert that auto-assigned-address function is single function device. pci: use PCI_DEVFN() where appropriate. target-mips: add loongson 2E & 2F integer instructions Fix warning about uninitialized variable sheepdog: fix compile error on systems without TCP_CORK ramblocks: No more being lazy about duplicate names pci: Free the space allocated for the option rom on removal block: add sheepdog driver for distributed storage support ide: Reject invalid CHS geometry ide: Reject readonly drives unless CD-ROM ide: Make ide_init_drive() return success ide: Replace IDEState members is_cdrom, is_cf by drive_kind ide: Improve error messages scsi: Error locations for -drive if=scsi device initialization error: New qemu_opts_loc_restore() scsi: Reject unimplemented error actions ... Conflicts: hw/pci.c Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-13Merge commit '1724f04985367b15751f11f4a9558f8736b2ab59' into upstream-mergeMarcelo Tosatti1-1/+6
* commit '1724f04985367b15751f11f4a9558f8736b2ab59': qemu_ram_alloc: Add DeviceState and name parameters virtio-net: Incorporate a DeviceState pointer and let savevm track instances eepro100: Add a dev field to eeprom new/free functions savevm: Make use of DeviceState Conflicts: cpu-common.h exec.c Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-13Merge commit '0be71e324f774a77243f1a1487f468232d69542b' into upstream-mergeMarcelo Tosatti1-1/+15
* commit '0be71e324f774a77243f1a1487f468232d69542b': savevm: Add DeviceState param pci: Implement BusInfo.get_dev_path() qdev: Add a get_dev_path() function to BusInfo pc: Allocate all ram in a single qemu_ram_alloc() Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-07-11pci: fix bridge updateMichael S. Tsirkin1-1/+3
bridge config write should trigger updates on the secondary bus. never on the primary bus. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-07-11pci hotplug: make pci hotplug return value to callerIsaku Yamahata1-4/+9
make pci hotplug callback return value to caller. And when returning error, allocated resources are freed. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-07-11pci: fix pci_device_resetIsaku Yamahata1-4/+13
Clear interrupt disable bit on reset, according to PCI spec. Fix pci_device_reset() with 64bit BAR. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-07-11pci: set PCI multi-function bit appropriately.Isaku Yamahata1-0/+52
Set PCI multi-function bit according to multifunction property. PCI address, devfn ,is exported to users as addr property, so users can populate pci function(PCIDevice in qemu) at arbitrary devfn. It means each function(PCIDevice) don't know whether pci device (PCIDevice[8]) is multi function or not. So this patch allows user to set multifunction bit via property and checks whether multifunction bit is set correctly. Cc: Juan Quintela <quintela@redhat.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-07-11pci_bridge: make pci bridge aware of pci multi function bit.Isaku Yamahata1-2/+3
make pci bridge aware of pci multi function property and let pci generic code to set the bit. Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-07-11pci: introduce multifunction property.Isaku Yamahata1-3/+19
introduce multifunction property. Also introduce new convenient device creation function which will be used later. For bisectability this patch doesn't do anything, but sets the property resulting in no functional changes. Actual changes will be introduced by later patch. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-07-11pci: remove PCIDeviceInfo::header_typeIsaku Yamahata1-7/+8
replace PCIDeviceInfo::header_type with is_bridge as suggested by Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-07-11pci: insert assert that auto-assigned-address function is single function ↵Isaku Yamahata1-1/+2
device. Auto-assigned-address pci function (passing devfn = -1) is always single function. This patch adds assert() to guarantee that auto-assigned-address function is always single function device at function = 0. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-07-06qemu_ram_alloc: Add DeviceState and name parametersAlex Williamson1-1/+6
These will be used to generate unique id strings for ramblocks. The name field is required, the device pointer is optional as most callers don't have a device. When there's no device or the device isn't a child of a bus implementing BusInfo.get_dev_path, the name should be unique for the platform. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-06savevm: Add DeviceState paramAlex Williamson1-1/+1
When available, we'd like to be able to access the DeviceState when registering a savevm. For buses with a get_dev_path() function, this will allow us to create more unique savevm id strings. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-06pci: Free the space allocated for the option rom on removalAlex Williamson1-0/+11
Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-06pci: Implement BusInfo.get_dev_path()Alex Williamson1-0/+14
This works great for PCI since a <segment>:<bus>:<dev>.<fn> uniquely describes a global address. No need to traverse up the qdev tree. PCI segment support is a placeholder for compatibility once we support multiple segments. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-21Merge commit 'fd42deeb4cb42f90084046e3ebdb4383953195e3' into upstream-mergeAvi Kivity1-5/+3
* commit 'fd42deeb4cb42f90084046e3ebdb4383953195e3': Add exit notifiers. acpi_piix4: save gpe and pci hotplug slot status qemu-option: Reject anti-social IDs qdev: Revert the hack to let -net nic and pci_add set qdev ID Clarify error message when a PCI slot is already in use (v2) virtio-blk: simplify multiwrite calling conventions virtio-blk: stop tracking old_bs un-register kbd driver in case of USB kbd unplug. make qemu_thread_create block all signals migration-tcp: call migrate_fd_error() instead of close() and free(). migration: use qemu_free() instead of free(). etrax-ser: Support the uart rx fifo. Conflicts: vl.c Signed-off-by: Avi Kivity <avi@redhat.com>
2010-06-14qdev: Revert the hack to let -net nic and pci_add set qdev IDMarkus Armbruster1-2/+0
Setting the ID in pci_nic_init() is a blatant violation of the DeviceState abstraction. Which even carries a comment advising against this: /* This structure should not be accessed directly. We declare it here so that it can be embedded in individual device state structures. */ What's worse, it bypasses the code ensuring unique qdev IDs: "-device virtio-net-pci,id=foo -net nic,id=foo -net nic,name=foo" happily creates three qdevs with ID "foo". That's because qdev relies on qemu_opts_create() to ensure unique IDs, but -net nic uses a different QemuOptsList, which means id is in a different namespace. And its name is not checked for uniqueness at all. -net nic and pci_add are legacy. Use -device and device_add if you want a NIC with a qdev ID. This reverts what's still left of commit eb54b6dc "qdev: add id= support for pci nics." Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-14Clarify error message when a PCI slot is already in use (v2)Daniel P. Berrange1-3/+3
When mistakenly configuring two devices in the same PCI slot, QEMU gives a not entirely obvious message about a 'devfn' being in use: $ qemu -device rtl8139 -device virtio-balloon-pci,bus=pci.0,addr=0x3 qemu-kvm: -device virtio-balloon-pci,bus=pci.0,addr=0x3: PCI: devfn 24 not available for virtio-balloon-pci, in use by rtl8139 The user does not configure 'devfn' numbers, they use slot+function. Thus the error messages should be reported back to the user with that same terminology rather than the internal QEMU terminology. This patch makes it report: $ qemu -device rtl8139 -device virtio-balloon-pci,bus=pci.0,addr=0x3 qemu: -device virtio-balloon-pci,bus=pci.0,addr=0x3.7: PCI: slot 3 function 0 not available for virtio-balloon-pci, in use by rtl8139 Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-04Merge commit '358c360feb346dff8f911e2d1dbcdd6319393f1d' into upstream-mergeMarcelo Tosatti1-69/+26
* commit '358c360feb346dff8f911e2d1dbcdd6319393f1d': (64 commits) migration: respect exit status with exec: tcg-i386: fix a typo tcg-i386: declare tcg_out_tlb_load() inline tcg-i386: Remove some ifdefs in qemu_ld/st. tcg-i386: Split out tlb load function. tcg-i386: Swap order of TLB hit and miss paths. tcg-i386: Split out TLB Hit path from qemu_ld/st. tcg-i386: Tidy data16 prefixes. sparc64: fix umul and smul insns sparc64: fix udiv and sdiv insns sparc64: improve ldf and stf insns sparc64: use symbolic name for MMU index v1 sparc64: fix ldxfsr insn sparc64: fix 32bit load sign extension sparc64: fix missing address masking v1 sparc64: fix tag access register on mmu traps vnc: add missing target for vnc-encodings-*.o vnc: tight: don't forget the third color vnc: tight: don't forget last pixel in tight_encode_indexed_rect Monitor: Drop QMP documentation from code ... Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-06-01Monitor: Drop QMP documentation from codeLuiz Capitulino1-61/+0
Previous commit added QMP documentation to the qemu-monitor.hx file, it's is a copy of this information. While it's good to keep it near code, maintaining two copies of the same information is too hard and has little benefit as we don't expect client writers to consult the code to find how to use a QMP command. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-05-31pci-hotplug: make them aware of pci domain.Isaku Yamahata1-1/+21
add helper function which converts root bus to pci domain. make them aware of pci domain. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-05-31pci: clean up of pci_set_default_subsystem_id().Isaku Yamahata1-7/+5
Use pci accessor function. don't return value because it always return 0 and the caller doesn't check the return value. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-05-26Merge commit 'c69ea0dff27ccc6663f8ecb4a70f762f4559672c' into upstream-mergeAvi Kivity1-7/+13
* commit 'c69ea0dff27ccc6663f8ecb4a70f762f4559672c': (27 commits) Compile acpi_piix4, apm and pm_smbus only once block: Remove special case for vvfat Fix docs for block stats monitor command use qemu_free() instead of free() block/vdi: Fix image opening and creation for odd disk sizes dmg: use qemu block API dmg: use pread dmg: fix reading of uncompressed chunks block/vpc: Fix conversion from size to disk geometry parallels: use qemu block API parallels: use pread block/vdi: Allow disk images of size 0 block: Fix bdrv_commit block: Fix protocol detection for Windows devices block: Avoid unchecked casts for AIOCBs bochs: use qemu block API bochs: use pread ide: Fix ide_dma_cancel cloop: use qemu block API cloop: use pread ... Conflicts: Makefile.objs Makefile.target acpi and acpi_piix4 moved back to Makefile.target due to cpu hotplug. Signed-off-by: Avi Kivity <avi@redhat.com>
2010-05-17Merge remote branch 'mst/for_anthony' into stagingAnthony Liguori1-7/+13
2010-05-16Merge commit '87c30546ef34f9eb6740d884c8b73e2cdd259e35' into upstream-mergeAvi Kivity1-3/+5
* commit '87c30546ef34f9eb6740d884c8b73e2cdd259e35': pci hotplug: add argument to pci hot plug callback. acpi_piix4: qdevfy. Conflicts: hw/acpi_piix4.c Signed-off-by: Avi Kivity <avi@redhat.com>
2010-05-15pci hotplug: add argument to pci hot plug callback.Isaku Yamahata1-3/+5
Add argument, DeviceState*, to pci hot plug callback. The argument will be used later to remove global variable. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-12pci: irq_state vmstate breakageMichael S. Tsirkin1-2/+2
Code for saving irq_state got vm_state macros wrong, passing in the wrong parameter. As a result, we both saved a wrong value and restored it to a wrong offset. This leads to device and bus irq counts getting out of sync, which in turn leads to interrupts getting lost or never cleared, such as https://bugzilla.redhat.com/show_bug.cgi?id=588133 Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com>
2010-05-12pci: cleanly backout of pci_qdev_init()Alex Williamson1-5/+11
If the init function of a device fails, as might happen with device assignment, we never undo the work done by do_pci_register_device(). This not only causes a bit of a memory leak, but also leaves a bogus pointer in the bus devices array that can cause a segfault or garbage data from 'info pci'. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-05-01Merge commit '0e8d2b5575938b8876a3c4bb66ee13c5d306fb6d' into upstream-mergeMarcelo Tosatti1-9/+16
* commit '0e8d2b5575938b8876a3c4bb66ee13c5d306fb6d': (61 commits) Monitor: Return before exiting with 'quit' QMP: Check "arguments" member's type QError: Improve QERR_QMP_BAD_INPUT_OBJECT desc QMP: Use QERR_QMP_BAD_INPUT_OBJECT_MEMBER QError: New QERR_QMP_BAD_INPUT_OBJECT_MEMBER sh4: remove dead assignments, spotted by clang analyzer ppc: add missing 'break', spotted by clang analyzer ppc: remove dead assignments, spotted by clang analyzer alpha: add missing 'break', spotted by clang analyzer alpha: remove dead assignments, spotted by clang analyzer microblaze: remove dead assignments, spotted by clang analyzer m68k: remove dead assignments, spotted by clang analyzer cris: remove dead assignments, spotted by clang analyzer arm: remove dead assignments, spotted by clang analyzer x86: remove dead assignments, spotted by clang analyzer Remove dead assignments in various common files, spotted by clang analyzer usb: remove dead assignments, spotted by clang analyzer bt: remove dead assignments, spotted by clang analyzer linux-user: Fix Sparc64 syscall returns. Fix dead initialization, spotted by clang analyzer ... Conflicts: sysemu.h Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-05-01Merge commit '98c8573eb37bf5d7bb0c07225985a78537c73101' into upstream-mergeMarcelo Tosatti1-4/+13
* commit '98c8573eb37bf5d7bb0c07225985a78537c73101': (75 commits) provide a stub version of kvm-all.c if !CONFIG_KVM tcg/arm: don't try to load constants using pc tcg/arm: optimize register allocation order tcg/arm: fix argument alignment in qemu_st64 tcg/arm: remove useless register tests in qemu_ld/st tcg/arm: bswap arguments in qemu_ld/st if needed tcg/arm: use ext* ops in qemu_ld tcg/arm: remove conditional argument for qemu_ld/st tcg/arm: add bswap ops tcg/arm: add ext16u op tcg/arm: add rotation ops tcg/arm: use the blx instruction when possible tcg/arm: sxtb and sxth are available starting with ARMv6 tcg/arm: add variables to define the allowed instructions set tcg/arm: align 64-bit arguments in function calls tcg/arm: replace integer values by registers enum tcg/arm: remove store signed functions tcg/arm: explicitely list clobbered/reserved regs tcg/arm: remove SAVE_LR code Check for invalid initrd file ... Conflicts: Makefile.target kvm-all.c kvm.h vl.c Signed-off-by: Marcelo Tosatti <mtosatti@redhat.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-11pci: add API to add capability at a known offsetMichael S. Tsirkin1-4/+13
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-05Merge commit '1ecda02b24a13f501e747b8442934829d82698ae' into upstream-mergeMarcelo Tosatti1-7/+7
* commit '1ecda02b24a13f501e747b8442934829d82698ae': error: Replace qemu_error() by error_report() error: Don't abuse qemu_error() for non-error in scsi_hot_add() error: Don't abuse qemu_error() for non-error in qbus_find() error: Don't abuse qemu_error() for non-error in qdev_device_help() error: New error_printf() and error_vprintf() Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-03-16error: Replace qemu_error() by error_report()Markus Armbruster1-7/+7
error_report() terminates the message with a newline. Strip it it from its arguments. This fixes a few error messages lacking a newline: net_handle_fd_param()'s "No file descriptor named %s found", and tap_open()'s "vnet_hdr=1 requested, but no kernel support for IFF_VNET_HDR available" (all three versions). There's one place that passes arguments without newlines intentionally: load_vmstate(). Fix it up.
2010-02-17Merge commit 'bc798c77e54f73b637e02bdc02bd799660adb7b7' into upstream-mergeMarcelo Tosatti1-4/+4
* commit 'bc798c77e54f73b637e02bdc02bd799660adb7b7': (22 commits) Remove conditional rom loading support Fix incorrect exception_index use pci: fix info pci with host bridge. ide: add topology support scsi: add topology support virtio-blk: add topology support block: add topology qdev properties virtio-blk: revert serial number support Increase VNC_MAX_WIDTH qemu-img: use the heap instead of the huge stack array for win32 don't dereference NULL after failed strdup QMP: Don't leak on connection close QError: Don't abort on multiple faults Monitor: remove unneeded checks qjson: Improve debugging virtio-net: fix network stall under load json: fix PRId64 on Win32 fix inet_parse typo iothread: fix vcpu stop with smp tcg QMP: spec: Capability negotiation updates ... Conflicts: hw/pc.c Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-02-17Merge commit 'd0f2c4c60263e29a87681433e696844401514194' into upstream-mergeMarcelo Tosatti1-12/+18
* commit 'd0f2c4c60263e29a87681433e696844401514194': (47 commits) Do not use dprintf arm host: fix compiler warning tcg-i386: Implement setcond. tcg-i386: Implement small forward branches. Add -static earlier to LDFLAGS for compile_prog() Fix missing symbols in .rel/.rela.plt sections configure: remove debugging code introduced in aa527b65d8187b97d73f889b6cae7b6ac6f82d32 configure: fix compilation on hosts without -fstack-protector-all Update MAINTAINERS target-mips: don't call cpu_loop_exit() from helper.c target-arm: refactor cp15.c13 register access linux-user: remove signal handler before calling abort() fix locking error with current_tb linux-user: adapt uname machine to emulated CPU target-ppc: change DCR helpers to target_long arguments tcg-x86_64: implement setcond tcg: add tcg_invert_cond tcg: generic support for conditional set tcg: document double-word support opcodes. usb-linux: increase buffer for USB control requests ... Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-02-13pci: fix info pci with host bridge.Isaku Yamahata1-3/+3
This patch fixes 525e05147d5a3bdc08caa422d108c1ef71b584b5. pci host bridge doesn't have header type of bridge. The check should be by header type, instead of pci class device. 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-02-08pci: fix pci_find_bus()Isaku Yamahata1-1/+1
typo in c021f8e65f5009a5ab5711d9d5326fcab553ef1c. comparison 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: Michael S. Tsirkin <mst@redhat.com>
2010-02-06PCI: show also host bridge data in "info pci" outputBlue Swirl1-1/+1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-06PCI: fix multiple bridge problemsBlue Swirl1-11/+17
When several PCI bridges were in use, monitor command "info pci" would enter into infinite loop. Buses behind the bridge were not discoverable because secondary and subordinate bus numbers were not used properly. Other buses were not found because bus search terminated on first miss. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-01enable PCI multiple-segments for pass-through deviceZhai, Edwin1-6/+34
Enable optional parameter (default 0) - PCI segment (or domain) besides BDF, when assigning PCI device to guest. Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> Acked-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-01-31Merge commit '625a5befc2e3200b396594f002218d235e375da5' into upstream-mergeMarcelo Tosatti1-3/+21
* commit '625a5befc2e3200b396594f002218d235e375da5': virtio: Add memory statistics reporting to the balloon driver New API for asynchronous monitor commands block: avoid creating too large iovecs in multiwrite_merge vnc_refresh: calling vnc_update_client might free vs block/raw-posix: Abort on pread beyond end of non-growable file win32: pair qemu_memalign() with qemu_vfree() win32/sdl: Fix toggle full screen Tell users about out-of-memory errors PCI: fix bridge configuration fix savevm command without id or tag qcow2: rename two QCowAIOCB members block: kill BDRV_O_CREAT block: clean up bdrv_open2 structure a bit virtio-console: Automatically use virtio-serial-bus for the older -virtioconsole invocation virtio-console: Rename virtio-serial.c back to virtio-console.c Fix generation of config-host.h ide save/restore current transfer fields PCI: do_pci_info(): PCI bridge devices support Conflicts: hw/virtio-balloon.c Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-01-31Merge commit '163c8a59f6f9c370b74a81856194757e3773b358' into upstream-mergeMarcelo Tosatti1-74/+296
* commit '163c8a59f6f9c370b74a81856194757e3773b358': (24 commits) PCI: Convert pci_info() to QObject QDict: Introduce qdict_get_qdict() QList: Introduce QLIST_FOREACH_ENTRY() Read-only device changed to opens it's file for read-only. Ask for read-write permissions when opening files No need anymoe for bdrv_set_read_only Documentation: Add missing texi description for command line options Documentation: Improve command line help for -device option qdev: Add help for property value qdev: Add help for device properties mmap_frag() users only check for -1 error Check availavility of -fstack-protector-all Enable _FORTIFY_SOURCE=2 check pipe() return value linux-user/mmap.c: fix warnings with _FORTIFY_SOURCE monitor.c: fix warnings with _FORTIFY_SOURCE vl.c: fix warning with _FORTIFY_SOURCE usb-linux.c: fix warning with _FORTIFY_SOURCE net/slirp.c: fix warning with _FORTIFY_SOURCE block/qcow2.c: fix warnings with _FORTIFY_SOURCE ... Conflicts: hw/pci.c hw/pci.h Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-01-26PCI: fix bridge configurationBlue Swirl1-0/+1
PCI bridges' qdev info structures must indicate bridge header type, otherwise critical bridge registers (esp. PCI_PRIMARY_BUS, PCI_SECONDARY_BUS, PCI_SUBORDINATE_BUS) will not be writable. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-26PCI: Convert pci_info() to QObjectLuiz Capitulino1-74/+296
The returned QObject is a QList of all buses. Each bus is represented by a QDict, which has a key with a QList of all PCI devices attached to it. Each device is represented by a QDict. As has happended to other complex conversions, it's hard to split this commit as part of it are new functions which are called by each other. IMPORTANT: support for printing PCI bridge attached devices is NOT part of this commit, it's going to be added by the next commit, as it's untested. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-26PCI: do_pci_info(): PCI bridge devices supportLuiz Capitulino1-3/+20
This commit completes the do_pci_info() conversion to QObject by adding support to PCI bridge devices. This is done by recursively adding devices in the "pci_bridge" key. IMPORTANT: This code is being added separately because I could NOT test it properly. According to Michael Tsirkin, it depends on ultrasparc and it would take time to do the proper setup. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-21Merge commit '88169ddf82853ca892ce7bee279579c8a0ac03e5' into upstream-mergeMarcelo Tosatti1-0/+15
* commit '88169ddf82853ca892ce7bee279579c8a0ac03e5': pci: allow loading roms via fw_cfg. Conflicts: hw/pci.h Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-01-11pci: allow loading roms via fw_cfg.Gerd Hoffmann1-0/+15
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>
2010-01-07Merge commit '19e65b47f60c68d7e8c96aa0a36223c5a0d3422b' into upstream-mergeMarcelo Tosatti1-5/+8
* commit '19e65b47f60c68d7e8c96aa0a36223c5a0d3422b': Add missing newline at the end of options list Update Sparc64 OpenBIOS image to r649. Sparc64: move APB PCI memory base to correct location PCI: Fix bus address conversion sparc: make command line available also via firmware configuration device tcg: Add tcg_unsigned_cond. block/bochs: improve format checking block.c: fix warning with _FORTIFY_SOURCE block/bochs.c: fix warning with _FORTIFY_SOURCE savevm.c: fix warning with _FORTIFY_SOURCE slirp/misc.c: fix warning with _FORTIFY_SOURCE hw/pc.c: fix warnings with _FORTIFY_SOURCE path.c fix warning with _FORTIFY_SOURCE PCI: partially revert 2e01c8cf4b076b05013c87723e3fc710b50a0a7a Conflicts: qemu-options.hx Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>