summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix in file qemu-sockets.cvibi2009-05-081-30/+32
| | | | | | | | | 1) Changed usage of malloc,free,strdup to qemu_malloc,qemu_free,qemu_strdup 2) Some coding style fixes (based on CODING_STYLE document) 3) Free struct addrinfo *res after failure of listen Signed-off-by: vibi <vibi_sreenivasan@cms.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: Replace VGA_COMMON with a structureAvi Kivity2009-05-085-472/+472
| | | | | | | | | | | | | | All VGA devices share a common field subset; currently they do so by a macro which defines the common fields inline their state structures, relying on the the common state being placed at offset 0 in the structure. This makes refactoring the code difficult and requires a lot of error prone casts. Replace the macro by a new VGACommonState structure, and the casts by regular field access and container_of() for upcasts. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Improve block range checksKevin Wolf2009-05-081-1/+6
| | | | | | | | | This patch makes the range checks for block requests more strict: It fixes a potential integer overflow and checks for negative offsets. Also, it adds the check for compressed writes. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Remove noisy printf when KVM masks CPU featuresAnthony Liguori2009-05-081-1/+0
| | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* fix asynchronous ioctlsChristoph Hellwig2009-05-081-1/+10
| | | | | | | | posix_aio_read expect aio requests to return the number of bytes requests to be successfull, so we need to fake this up for ioctls. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* kvm: Trim cpu features not supported by kvmAvi Kivity2009-05-081-0/+30
| | | | | | | | Remove cpu features that are not supported by kvm from the cpuid features reported to the guest. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Fix x86 feature modifications for features that set multiple bitsAvi Kivity2009-05-081-5/+8
| | | | | | | | | | | | QEMU allows adding or removing cpu features by using the syntax '-cpu +feature' or '-cpu -feature'. Some cpuid features cause more than one bit to be set or cleared; but QEMU stops after just one bit has been modified, causing the feature bits to be inconsistent. Fix by allowing all feature bits corresponding to a given name to be set. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Make x86 cpuid feature names available in file scopeAvi Kivity2009-05-081-27/+28
| | | | | | | To be used later. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* kvm: Add support for querying supported cpu featuresAvi Kivity2009-05-082-0/+83
| | | | | | | | kvm does not support all cpu features; add support for dunamically querying the supported feature set. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Introduce kvm_check_extension to check if KVM extensions are supportedAnthony Liguori2009-05-082-17/+24
| | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* e1000: Do not reinit pci config space to 0Amit Shah2009-05-081-1/+0
| | | | | | | | | | | pci_register_device already mallocs the pci config space buffer filled with zeroes. Doing this again breaks some default config space writes like setting the subsystem vendor id and subsystem device id. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* AIO deletion race fixAlexander Graf2009-05-081-1/+2
| | | | | | | | | | | | | | | | | | | | | When deleting an fd event there is a chance the object doesn't get deleted, but only ->deleted set positive and deleted somewhere later. Now, if we create a handler for the fd again before the actual deletion occurs, we end up writing data into an object that has ->deleted set, which is obviously wrong. I see two ways to fix this: 1. Don't return ->deleted objects in the search 2. Unset ->deleted in the search This patch implements 1. which feels safer to do. It fixes AIO issues I've seen with curl, as libcurl unsets fd event listeners pretty frequently. Signed-off-by: Alexander Graf <alex@csgraf.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* reset state for load_linuxGlauber Costa2009-05-081-0/+7
| | | | | | | | | | | | | | The linux loader is just an option rom like any other, just with some special requirements. Right now, our option rom resetting mechanism is not being applied to it. As a result, users using -kernel will not be able to successfully reboot their machines This patch fixes it by saving all the data we generated in the load_linux() function, to be used later by the option rom resetting mechanism. Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* register reset handler for option_romsGlauber Costa2009-05-081-0/+25
| | | | | | | | | | | | Currently, boot options are not preserved across a system reset. option roms can modify themselves, or can for instance restore the real int 0x19 vector after they tried to boot from it. To properly do that, we need a reset handler registered to deal with option roms. This patch is based on current version on qemu-kvm.git Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Fix cluster freeing in qcow2Gleb Natapov2009-05-081-1/+8
| | | | | | | | | Need to drop QCOW_OFLAG_COPIED from a cluster pointer before freeing it. Add an explanation how thing meant to work. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Enable power button even generation.Anthony Liguori2009-05-083-0/+21
| | | | | Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Drop CONFIG_GDBSTUBJan Kiszka2009-05-084-36/+7
| | | | | | | | This is no user-flippable switch, and no arch makes use of disabling gdbstub support. So it's pointless to keep the related #ifdefs and configure hunks around - and risking breakages like 711c410fdd again. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
* Remove superfluous #includes.Paul Brook2009-05-082-2/+0
| | | | Signed-off-by: Paul Brook <paul@codesourcery.com>
* Use target_phys_addr_t, not target_ulong.Paul Brook2009-05-081-12/+13
| | | | Signed-off-by: Paul Brook <paul@codesourcery.com>
* Replace cpu_abort with hw_errorPaul Brook2009-05-0847-262/+180
| | | | Signed-off-by: Paul Brook <paul@codesourcery.com>
* Fix disassembler memory accessesBlue Swirl2009-05-071-4/+1
| | | | | | | | | | | | Sparc disassembler wants to check previous addresses for some stuff and this may actually cause faults to be generated to the guest if the address is close to page start, because of the function used for the memory access. Fix by changing ldub_code to cpu_memory_rw_debug, which doesn't trigger exceptions. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Suppress make directory messages.Paul Brook2009-05-071-1/+2
| | | | | | | We already print a directory prefix in non-verbose mode, so there's no point printing a messages when recursive make enters/leaves a directory. Signed-off-by: Paul Brook <paul@codesourcery.com>
* Fix PL110 framebuffer byteswapping in 32bpp mode.Paul Brook2009-05-061-1/+1
| | | | Signed-off-by: Paul Brook <paul@codesourcery.com>
* ETRAX: Simplify serport control logic.Edgar E. Iglesias2009-05-051-83/+44
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* ETRAX: Drop _t for the serial type.Edgar E. Iglesias2009-05-051-7/+7
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* ETRAX: Use NULL for subwidth serport reg accesses.Edgar E. Iglesias2009-05-051-18/+2
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* ETRAX: Drop the _t for the internal PIC type.Edgar E. Iglesias2009-05-051-8/+8
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* ETRAX: Simplify the interrupt controller model.Edgar E. Iglesias2009-05-051-57/+24
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* ETRAX: Simplify interrupt signaling.Edgar E. Iglesias2009-05-053-20/+7
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* Fix compiler warnings in nwfpe code.Paul Brook2009-05-045-86/+47
| | | | Signed-off-by: Paul Brook <paul@codesourcery.com>
* target-mips: proper sign extension for 'SUBU rd, zero, rt'Aurelien Jarno2009-05-041-0/+1
| | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-mips: fix comments about SUB/DSUBAurelien Jarno2009-05-041-2/+2
| | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* qemu-options.hx: fix description of cache=none suboptionAurelien Jarno2009-05-041-1/+1
| | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* Suppress type mismatch warnings in VDE code.Paul Brook2009-05-031-3/+3
| | | | Signed-off-by: Paul Brook <paul@codesourcery.com>
* minor fix of pci_register_bus()Isaku Yamahata2009-05-031-0/+1
| | | | | | keep first_bus linked list correct. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* use PCI_HEADER_TYPE.Isaku Yamahata2009-05-0321-32/+37
| | | | | | use symbolic value instead of 0x0e and related value. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* Fix typos in comments in exec.cStuart Brady2009-05-031-8/+8
| | | | | | | | | | | | | | | | | | | This patch fixes several typos in comments in exec.c: longet -> longer recommanded -> recommended ajustments -> adjustments inconsistancies -> inconsistencies phsical -> physical positionned -> positioned succesfully -> successfully regon_offset -> region_offset and also: start_region -> start_addr Signed-off-by: Stuart Brady <stuart.brady@gmail.com>
* Optimize cmp x, 0 caseBlue Swirl2009-05-031-14/+19
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* ReindentBlue Swirl2009-05-031-319/+312
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Handle NULL bdrv.Paul Brook2009-05-031-4/+10
| | | | Signed-off-by: Paul Brook <paul@codesourcery.com>
* Improve instruction name comments for easier searchingBlue Swirl2009-05-021-44/+44
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Clarify: dmmuregs[1] is not a typoBlue Swirl2009-05-021-0/+1
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Optimize operations with immediate parametersBlue Swirl2009-05-021-52/+200
|
* Fix Sparc64 sign extension problemsBlue Swirl2009-05-021-32/+36
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Fix hw/acpi.c build w/ DEBUG enabledAlex Williamson2009-05-011-6/+6
| | | | | | | | Trivial build warning/fixes when the local DEBUG define is enabled. Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Make sure not to fall through on error in loadvmAnthony Liguori2009-05-011-0/+1
| | | | | | This is from the KVM tree Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Pci nic: pci_register_device can failChris Wright2009-05-015-0/+17
| | | | | | | | | | | The pci_register_device() call in PCI nic initialization routines can fail. Handle this failure and propagate a meaningful error message to the user instead of generating a SEGV. Cc: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Fix serial option with -driveAnthony Liguori2009-05-011-1/+1
| | | | | | This is from the KVM tree. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Build fix for !CONFIG_GDBSTUB caseXiantao Zhang2009-05-011-0/+2
| | | | | | | | Once CONFIG_GDBSTUB not configured, compile will generate error. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* suport device driver initialization modelGlauber Costa2009-05-011-2/+1
| | | | | | | | | | | | | According to PnP specification, Appendix B, Option ROMs that support DDIM (device driver initialization model) should have their memory space writeable. KVM deviates from us here, by removing the IO_MEM_ROM flag, to allow for PCI option ROMs (they require DDIM). However, there's absolutely no reason we can't do the same. Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud