summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2010-02-09sh7750: handle MMUCR TI bitAurelien Jarno1-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>
2010-02-08Merge remote branch 'qemu-kvm/uq/master' into staging-tmpAnthony Liguori1-0/+3
2010-02-08SH4/R2D: fix poweroffAurelien Jarno1-4/+5
The write the the PA_POWOFF register is currently ignored. Fix that by calling qemu_system_shutdown_request() when a poweroff is requested. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-07dec: actually implement PCI bridgingBlue Swirl2-0/+28
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-07esp: use CamelCaseFunc for function typesBlue Swirl2-7/+7
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-07fw_cfg: don't use reserved _ prefixBlue Swirl2-3/+3
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-07fdc: don't use reserved _ prefixBlue Swirl1-6/+6
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-07fdc: don't use reserved _t suffixBlue Swirl4-192/+190
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-07escc: don't use reserved _t suffixBlue Swirl1-4/+4
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-07m48t59: don't use reserved _t suffixBlue Swirl5-55/+52
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-07Do not use dprintfmalc4-91/+91
dprintf is already claimed by POSIX[1], and on at least one system is implemented as a macro [1] http://www.opengroup.org/onlinepubs/9699919799/functions/dprintf.html Signed-off-by: malc <av1474@comtv.ru>
2010-02-06mips/malta: fix typoAurelien Jarno1-1/+1
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
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-05Refactor DEC 21154 PCI bridgeBlue Swirl3-106/+84
It's currently not used by PPC machines. Refactor so that also Sparc64 machines can use it. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-03KVM: Make vmport KVM-compatibleJan Kiszka1-0/+3
The vmport "device" accesses the VCPU registers, so it requires proper cpu_synchronize_state. Add it to vmport_ioport_read, which also synchronizes vmport_ioport_write. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2010-02-03qdev: Add rudimentary help for property valueMarkus Armbruster1-1/+1
This provides the same information as reverted commit 2ba6edf0. Not much, just better than nothing. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-03qdev: Add help for device propertiesMarkus Armbruster1-1/+14
Option "-device DRIVER,?" and monitor command "device_add DRIVER,?" print the supported properties instead of creating a device. The former also terminates the program. This is commit 2ba6edf0 (just reverted) done right. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-03Revert "qdev: Add help for device properties"Markus Armbruster1-13/+2
This reverts commit 2ba6edf0dd740166632df80caa85992b20791a68. The commit has two issues: * When it runs from the monitor, e.g. "device_add e1000,?", it prints to stderr instead of the monitor. * Help looks to callers just like failed device creation. This makes main() exit unsuccessfully on "-device e1000,?". We need to do this differently. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-03Revert "qdev: Add help for property value"Markus Armbruster1-7/+2
This reverts commit 922910ce42d15bdb7c2347436b1b5798b5401de4. The commit has four issues: * When it runs from the monitor, e.g. "device_add e1000,mac=?", it prints to stderr instead of the monitor. * Help looks to callers just like failed device creation. This makes main() exit unsuccessfully on "-device e1000,mac=?". * It has an undocumented side effect on -global: "-global e1000.mac=?" prints help, but only when we actually add an e1000 device. * It does not work for properties that accept the value "?". We need to do this differently. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-03qdev: Fix exit code for -device ?Markus Armbruster2-9/+20
Help was shoehorned into device creation, qdev_device_add(). Since help doesn't create a device, it returns NULL, which looks to callers just like failed device creation. Monitor handler do_device_add() doesn't care, but main() exits unsuccessfully. Move help out of device creation, into new qdev_device_help(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-30sparc64: implement basic IOMMU/interrupt handlingBlue Swirl1-22/+142
Also add reset control. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-29Sparc64: byte swap IO port accessBlue Swirl1-4/+4
This requires an updated OpenBIOS image. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-29virtio-blk: Fix error cases which ignored rerror/werrorKevin Wolf1-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>
2010-01-29virtio-blk: Fix restart after read errorKevin Wolf1-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>
2010-01-29virtio_blk: Factor virtio_blk_handle_request outKevin Wolf1-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>
2010-01-29cirrus: Properly re-register cirrus_linear_io_addr on vram unmapJan Kiszka1-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>
2010-01-29virtio-serial-bus: Fix bus initialisation and allow for bus identificationAmit Shah1-2/+1
This commit enables one to use multiple virtio-serial devices and to assign ports to arbitrary devices like this: -device virtio-serial,id=foo -device virtio-serial,id=bar \ -device virtserialport,bus=foo.0,name=foo \ -device virtserialport,bus=bar.0,name=bar Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-27sparc64: reimplement tick timers v4Igor V. Kovalenko1-33/+173
sparc64 timer has tick counter which can be set and read, and tick compare value used as deadline to fire timer interrupt. The timer is not used as periodic timer, instead deadline is set each time new timer interrupt is needed. v3 -> v4: - coding style v2 -> v3: - added missing timer debug output macro - CPUTimer struct and typedef moved to cpu.h - change CPU_SAVE_VERSION to 6, older save formats not supported v1 -> v2: - new conversion helpers cpu_to_timer_ticks and timer_to_cpu_ticks - save offset from clock source to implement cpu_tick_set_count - renamed struct sun4u_timer to CPUTimer - load and save cpu timers v0 -> v1: - coding style Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-27pflash: Buffer block writesEdgar E. Iglesias1-3/+9
Buffer block writes to avoid flushing every word access onto backing storage device. This significantly speeds up flash emulation for flashes connected through an 8 or 16-bit bus combined with backing storage (-pflash). Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2010-01-26virtio: Add memory statistics reporting to the balloon driverAdam Litke2-4/+138
When using ballooning to manage overcommitted memory on a host, a system for guests to communicate their memory usage to the host can provide information that will minimize the impact of ballooning on the guests. The current method employs a daemon running in each guest that communicates memory statistics to a host daemon at a specified time interval. The host daemon aggregates this information and inflates and/or deflates balloons according to the level of host memory pressure. This approach is effective but overly complex since a daemon must be installed inside each guest and coordinated to communicate with the host. A simpler approach is to collect memory statistics in the virtio balloon driver and communicate them directly to the hypervisor. Signed-off-by: Adam Litke <agl@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-26win32: pair qemu_memalign() with qemu_vfree()Herve Poussineau1-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>
2010-01-26PCI: fix bridge configurationBlue Swirl4-0/+4
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-26virtio-console: Rename virtio-serial.c back to virtio-console.cAmit Shah1-0/+0
This file was renamed to ease the reviews of the recent changes that went in. Now that the changes are done, rename the file back to its original name. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-26ide save/restore current transfer fieldsMarcelo Tosatti1-2/+6
If migration takes place between write of the bmdma address register and write of the command register (to initiate DMA), the destination will not properly start the DMA op, hanging the guest: ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen ata1.00: cmd c8/00:16:41:00:00/00:00:00:00:00/e0 tag 0 dma 11264 in res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout) ata1.00: status: { DRDY } Fix by sending current transfer information in the migration data. We need to update ide version to 4 for this to work. As we don't have subsectios, we need to chain the update increase until vmstate_ide_pci (quintela) Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Juan Quintela <quintela@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-26PCI: Convert pci_info() to QObjectLuiz Capitulino2-75/+299
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-26qdev: Add help for property valueStefan Weil1-2/+7
When called with property value "?", a help text will be printed (instead of an error message). This is useful for command lines like qemu -device e1000,mac=? and is already standard for other command line options. A better help text could be provided by extending the Property structure with a desc field. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-26qdev: Add help for device propertiesStefan Weil1-2/+13
When called with property "?", a list of supported properties will be printed (instead of an error message). This is useful for command lines like qemu -device e1000,? and was already standard for other options like model=? Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-26check pipe() return valueJuan Quintela1-4/+9
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-24Sparc64: fix initrdBlue Swirl1-3/+5
Fix HdrS offsets for Sparc64. The initrd address must be offset by KERNBASE. Use rom_ptr mechanism to actually write to the kernel image. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-24pflash: Dont open memarea for full IO if already done.Edgar E. Iglesias1-2/+4
When wcycle is non zero the area is already opened for readable IO. Avoiding the re-registration of the memarea significantly speeds up the flash emulation. In particular for flashes connected through 8 or 16-bit buses. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2010-01-24pflash: Reduce writebuf len for 8-bit flashes.Edgar E. Iglesias1-1/+5
Flashes connected through an 8 bit bus cannot handle write buffers larger than 256 bytes. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2010-01-24pflash: Remove dead code, no functional changes.Edgar E. Iglesias1-7/+0
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2010-01-24microblaze: The petalogix s3adsp board uses intel flashesEdgar E. Iglesias1-3/+2
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2010-01-24Sparc32: fix free-run timerBlue Swirl1-1/+2
According to Sun4M System Architecture Manual chapter 5.3.2, a limit of 0 will not generate interrupts. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-24Musicpal: Fix descriptor walk in eth_sendJan Kiszka1-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>
2010-01-23Musicpal: Fix wm8750 I2C addressJan Kiszka1-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>
2010-01-22Sparc64: fix PCI probe problemsBlue Swirl1-12/+7
Byte swap PCI config values. Remove old bogus PCI config mechanism so that device 0:0.0 can be probed. This requires OpenBIOS r667. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-20reduce number of reinjects on ACKGleb Natapov1-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>