• 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>
    vibi authored
     
    Browse Code »
  • 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>
    Avi Kivity authored
     
    Browse Code »
  • 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>
    Kevin Wolf authored
     
    Browse Code »
  • Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Anthony Liguori authored
     
    Browse Code »
  • 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>
    Christoph Hellwig authored
     
    Browse Code »
  • 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>
    Avi Kivity authored
     
    Browse Code »
  • 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>
    Avi Kivity authored
     
    Browse Code »
  • To be used later.
    
    Signed-off-by: Avi Kivity <avi@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Avi Kivity authored
     
    Browse Code »
  • 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>
    Avi Kivity authored
     
    Browse Code »
  • Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Anthony Liguori authored
     
    Browse Code »
  • 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>
    Amit Shah authored
     
    Browse Code »
  • 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>
    Alexander Graf authored
     
    Browse Code »
  • 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>
    Glauber Costa authored
     
    Browse Code »
  • 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>
    Glauber Costa authored
     
    Browse Code »