summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-02-23Fix ColdFire fdmoved address decoding.pbrook1-4/+4
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6641 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-23Darwin: Check for x86_64 only on i386malc1-3/+3
The sysctl variable if we're 64-bit capable only exists on i386. So we should only check it if we're on i386. This suppresses a warning on PowerPC spotted by Andreas Faerber. Signed-off-by: Alexander Graf <alex@csgraf.de> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6640 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-23Fix unassigned region offsets.pbrook1-2/+7
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6639 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-22CRIS: Fix remaining build warnings.edgar_igl6-6/+8
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6638 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-21Turn MMU off on resetblueswir11-1/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6637 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-21Turn MMUs and caches off on resetblueswir11-0/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6636 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-21Reload ptimers on resetblueswir11-3/+3
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6635 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-21Properly handle pthread_cond_timedwait timing outmalc1-1/+1
pthread_cond_timedwait is allowed to both consume the signal and return with the value indicating the timeout, hence predicate should always be (re)checked before taking an action git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6634 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-21Cosmeticsmalc1-11/+13
Avoid repeated creation/initalization/destruction of attr and calls to getpid git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6633 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-21Avoid thundering herd problemmalc1-4/+4
Broadcast was used so that the I/O threads would wakeup, reset their ts values and all but one go to sleep, in other words an optimization to prevent threads from exiting in presence of continuing I/O activity. Spurious wakeups make the looping around cond_timedwait with ever reinitialized ts potentially unsafe and as such ts in no longer reinitilized inside the loop, hence switch to signal is warranted and this benefits of this particlaur optimization are lost. (It's worth noting that timed variants of pthread calls use realtime clock by default, and therefore can hang "forever" should the host time be changed. Unfortunatelly not all host systems QEMU runs on support CLOCK_MONOTONIC and/or pthread_condattr_setclock with this value) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6632 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-21Avoid infinite loop around timed condition variablemalc1-6/+7
This can happen due to spurious wakeups git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6631 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-21Error checkingmalc1-24/+72
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6630 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-19Fix branch debuggingblueswir11-1/+3
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6629 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-18Fix cpu_physical_memory_rw() for 64-bit I/O accessesaurel321-12/+14
KVM uses cpu_physical_memory_rw() to access the I/O devices. When a read or write with a length of 8-byte is requested, it is split into 2 4-byte accesses. This has been broken in revision 5849. After this revision, only the first 4 bytes are actually read/write to the device, as the target address is changed, so on the next iteration of the loop the next 4 bytes are actually read/written elsewhere (in the RAM for the graphic card). This patch fixes screen corruption (and most probably data corruption) with FreeBSD/amd64. Bug #2556746 in KVM bugzilla. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6628 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-18Avoid running audio ctl's when vm is not runningmalc2-2/+10
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6627 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-16virtio: Remove malloc failure checks (Jan Kiszka)aliguori1-4/+0
No need to check for failing qemu_malloc anymore. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6626 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-16Generate PCI hotplug interrupt only if corespondent EN bit is set. (Gleb ↵aliguori1-4/+4
Natapov) Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6625 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-16Fix GPE registers read/write handling. (Gleb Natapov)aliguori1-12/+31
For STS register bit are cleared by writing 1 into it. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6624 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-16specify vmchannel as a net option (Gleb Natapov)aliguori2-0/+44
Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6623 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-16Fix hardware accelerated video to video copy on Cirrus VGA (Brian Kress)aliguori1-4/+4
cirrus_do_copy() in hw/cirrus_vga.c seems to make some incorrect assumptions about video memory layout. It tries to convert addresses to coordinates assuming that one row of data is (width * depth) bytes long. The correct way seems to be to use the pitch fields in the CirrusVGAState structure instead. Without this patch, I get lots of screen corruption when I try to drag a window under X as it's passing the wrong coordinates to the display surface for the copy. With this patch I can drag a window with no screen corruption. Signed-off-by: Brian Kress <kressb@moose.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6622 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-16Support multiple VNC clients (Brian Kress)aliguori2-135/+172
Change structure associated with a display from VncState to a new structure VncDisplay. Remove client specific fields from VncDisplay. Remove display specific fields from VncState. Maintain a linked list of VncStates per VncDisplay structure, update as necessary. When updates/resizes/copies come in from the hardware, dispatch to all clients. Signed-off-by: Brian Kress <kressb@moose.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6621 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-15Unbreak SDL on Mac OS Xmalc1-0/+7
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6620 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-13Allow disassembling last addresses of the address spaceblueswir11-2/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6619 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-12Fix Sparc64 VGA memory size bug exposed by r6604blueswir11-1/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6618 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11KVM: cpuid function 2: store all values (Amit Shah)aliguori1-0/+1
Incrementing the array index was missed in the previous series which causes us to not store all the values. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6617 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11monitor: Don't change VNC server when disabled (Jan Kiszka)aliguori1-0/+4
[ As requested, broken out of the monitor rework series. ] Avoid a segfault when the user issues 'change vnc' without having vnc enabled on startup. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6616 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11Fix qemu_realloc() (Kevin Wolf)aliguori1-1/+4
For qemu_realloc with size == 0 a result of NULL is perfectly fine Signed-off-by: Kevin Wolf <kwolf@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6615 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11TCG: remove obsolete old_op_count profiler fieldblueswir12-3/+0
Since we don't generate any "old op" anymore, the old_op_count is unneeded. Signed-off-by: Laurent Desnogues <laurent.desnogues@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6614 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11Add missing r24..r26 to callee save registersmalc1-0/+5
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6613 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11Add missing r24..r26 to calle save registersmalc1-0/+5
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6612 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11Use qemu_ram_allocblueswir11-5/+9
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6611 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: PCI device, disk and host network hot-add / hot-remove (Marcelo Tosatti)aliguori11-0/+403
Add monitor command to hot-add PCI devices (nic and storage). Syntax is: pci_add pci_addr=[[<domain>:]<bus>:]<slot> nic|storage params It returns the domain, bus and slot for the newly added device on success. It is possible to attach a disk to a device after PCI initialization via the drive_add command. If so, a manual scan of the SCSI bus on the guest is necessary. Save QEMUMachine necessary for drive_init. Add monitor command to hot-remove devices, remove device data on _EJ0 notification. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6610 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11Parse full PCI device addresses (Markus Armbruster)aliguori2-0/+80
This code parses full PCI device addresses. It then rejects domains other than zero, because these are not supported in QEMU. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6609 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: pci hotplug GPE support (Marcelo Tosatti)aliguori2-0/+95
Enable the corresponding bit on the PCIST region and trigger the SCI and handle the _EJ0 notifications. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6608 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: initialize hot add system / acpi gpe (Marcelo Tosatti)aliguori3-0/+73
ACPI GPE support, used by PCI (and CPU) hotplug. From: Glauber Costa <gcosta@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6607 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: zero ioport_opaque on isa_unassign_ioport (Marcelo Tosatti)aliguori1-0/+2
If the io port is unassigned, the previous private pointer is meaningless. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6606 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: LSI SCSI and e1000 unregister callbacks (Marcelo Tosatti)aliguori2-0/+24
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6605 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: warn if PCI region is not power of two (Marcelo Tosatti)aliguori1-0/+7
Otherwise the PCI size for such regions can be calculated erroneously. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6604 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: add pci_unregister_device (Marcelo Tosatti)aliguori2-5/+45
Unregister the pci device, unassign its IO and memory regions, and free associated data. Add a callback so drivers can free device state. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6603 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: add qemu_free_irqs (Marcelo Tosatti)aliguori2-0/+7
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6602 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: add cpu_unregister_io_memory and make io mem table index dynamic ↵aliguori2-5/+35
(Marcelo Tosatti) So drivers can clear their mem io table entries on exit back to unassigned state. Also make the io mem index allocation dynamic. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6601 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: add net_client_uninit / qemu_find_vlan_client (Marcelo Tosatti)aliguori2-0/+23
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6600 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: net/drive add/remove tweaks (Marcelo Tosatti)aliguori3-8/+11
Export net/drive add/remove functions for device hotplug usage. Return the table index on add. Return failure instead of exiting if limit has been reached on drive_add. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6599 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: move drives_opt for external use (Marcelo Tosatti)aliguori2-6/+11
Device hotplug will use that structure from a separate file. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6598 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: record devfn on block driver instance (Marcelo Tosatti)aliguori4-0/+10
Record PCIDev on the BlockDriverState structure to locate for release on hot-removal. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6597 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: drive removal support (Marcelo Tosatti)aliguori2-0/+24
To be used by hot-remove. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6596 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: dynamic nic info index allocation (Marcelo Tosatti)aliguori2-3/+16
Dynamically allocate nic info index, so to reuse indexes when devices are removed. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6595 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: dynamic drive/drive_opt index allocation (Marcelo Tosatti)aliguori2-11/+44
Dynamically allocate drive options and drive table index, to reuse indexes when devices are removed. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6594 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: return PCIDevice on net device init and record devfn (Marcelo Tosatti)aliguori10-28/+44
Change the PCI network drivers init functions to return the PCIDev, to inform which slot has been hot-plugged. Also record PCIDevice structure on NICInfo to locate for release on hot-removal. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6593 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: add pci helper functions (Marcelo Tosatti)aliguori2-0/+26
Add pci_find_bus/pci_find_device to be used by PCI hotplug. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6592 c046a42c-6fe2-441c-8c8c-71466251a162