• Hi all,
    this patch implements zooming capabilities for the sdl interface.
    A new sdl_zoom_blit function is added that is able to scale and blit a
    portion of a surface into another.
    This way we can enable SDL_RESIZABLE and have a real_screen surface with
    a different size than the guest surface and let sdl_zoom_blit take care
    of the problem.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Stefano Stabellini authored
     
    Browse Code »
  • Updated to use C99 comments.
    
    Signed-off-by: Filip Navara <filip.navara@gmail.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Filip Navara authored
     
    Browse Code »

  • [brought forward to current qemu-kvm.git]
    
    This patch implements the missing qemu logic to
    interpret a '-drive .. serial=XYZ ..' flag for
    a virtio_blk device.
    
    The serial number string is contained in a
    skeletal IDENTIFY DEVICE data structure and
    this structure is made available to the guest
    virtio_blk driver via pci i/o region 0.
    
    Signed-off-by: john cooper <john.cooper@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    john cooper authored
     
    Browse Code »
  • Signed-off-by: Filip Navara <filip.navara@gmail.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Filip Navara authored
     
    Browse Code »
  • Avi pointed out that it's not entirely safe to rely on madvise zeroing out
    memory.  So let's do it explicitly before calling madvise.
    
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Anthony Liguori authored
     
    Browse Code »
  • Add commands to exercise asynchronous reads/writes and to flush all
    outstanding aio commands.  Commands to exercise aio cancellations will
    follow in a separate patch.
    
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Christoph Hellwig authored
     
    Browse Code »
  • excerciser -> exerciser
    
    Signed-off-by: Stefan Weil <weil@mail.berlios.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Stefan Weil authored
     
    Browse Code »
  • The dump output was not nicely formatted for bytes
    larger than 0x7f, because signed values expanded to
    sizeof(int) bytes. So for example 0xab did not print
    as "ab", but as "ffffffab".
    
    I also cleaned the function prototype, which avoids
    new type casts and allows to remove an existing
    type cast.
    
    Signed-off-by: Stefan Weil <weil@mail.berlios.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Stefan Weil authored
     
    Browse Code »
  • Add an option to specify the number of MSI-X vectors for PCI NIC cards. This
    can also be used to disable MSI-X, for compatibility with old qemu. This
    option currently only affects virtio cards.
    
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Michael S. Tsirkin authored
     
    Browse Code »
  • Request up to 3 vectors in virtio-net. Actual bindings might supply
    less.
    
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Michael S. Tsirkin authored
     
    Browse Code »
  • Add pci_get/set_byte to keep *_word and *_long access functions company.
    They are unused for now.
    
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Michael S. Tsirkin authored
     
    Browse Code »
  • Implement bindings for virtio save/load. Use them in virtio pci.
    
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Michael S. Tsirkin authored
     
    Browse Code »
  • This enables actual support for MSI-X in virtio PCI.
    First user will be virtio-net.
    
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Michael S. Tsirkin authored
     
    Browse Code »
  • Extend virtio to support many interrupt vectors, and rearrange code in
    preparation for multi-vector support (mostly move reset out to bindings,
    because we will have to reset the vectors in transport-specific code).
    Actual bindings in pci, and use in net, to follow.
    Load and save are not connected to bindings yet, so they are left
    stubbed out for now.
    
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Michael S. Tsirkin authored
     
    Browse Code »
  • Implement MSI support in APIC. Note that MSI and MMIO APIC registers
    are at the same memory location, but actually not on the global bus: MSI
    is on PCI bus, APIC is connected directly to the CPU. We map them on the
    global bus at the same address which happens to work because MSI
    registers are reserved in APIC MMIO and vice versa.
    
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Michael S. Tsirkin authored
     
    Browse Code »
  • Add functions implementing MSI-X support. First user will be virtio-pci.
    Note that platform must set a flag to declare MSI supported: this
    is a safety measure to avoid breaking platforms which should support
    MSI-X but currently lack this in the interrupt controller emulation.
    For PC this will be set by APIC.
    
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Michael S. Tsirkin authored
     
    Browse Code »
  • Add "cmask" table of constant register masks: if a bit is not writeable
    and is set in cmask table, this bit is checked on load.  An attempt to
    load an image that would change such a register causes load to fail.
    Use this table to make sure that load does not modify registers that
    guest can not change (directly or indirectly).
    
    Note: we can't just assume that read-only registers never change,
    because the guest could change a register indirectly.
    
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Michael S. Tsirkin authored
     
    Browse Code »
  • Add routines to manage PCI capability list. First user will be MSI-X.
    
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Michael S. Tsirkin authored
     
    Browse Code »
  • Add inline routines for convenient access to pci devices
    with correct (little) endianness. Will be used by MSI-X support.
    
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Michael S. Tsirkin authored
     
    Browse Code »
  • Change much of hw/pci to use symbolic constants and a table-driven
    design: add a mask table with writable bits set and readonly bits unset.
    Detect change by comparing original and new registers.
    
    This makes it easy to support capabilities where read-only/writeable
    bit layout differs between devices, depending on capabilities present.
    
    As a result, writing a single byte in BAR registers now works as
    it should. Writing to upper limit registers in the bridge
    also works as it should. Code is also shorter.
    
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Michael S. Tsirkin authored
     
    Browse Code »


  • Maximum alignment for Win32 is 16, so don't try
    to set it to 32. Otherwise the compiler complains:
    
    exec.c:102: warning: alignment of 'code_gen_prologue'
    is greater than maximum object file alignment.  Using 16
    
    Signed-off-by: Stefan Weil <weil@mail.berlios.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Stefan Weil authored
     
    Browse Code »
  • Signed-off-by: Stefan Weil <weil@mail.berlios.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Stefan Weil authored
     
    Browse Code »
  • `sdl-config --cflags` defines main = SDL_main
    on some platforms. One of these platforms is
    Windows with mingw32.
    
    For those platforms, the solution already developed
    for __APPLE__ is now applied.
    
    A compiler warning (missing return value) is fixed, too.
    
    Maybe __APPLE__ no longer needs a separate check.
    
    Signed-off-by: Stefan Weil <weil@mail.berlios.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Stefan Weil authored
     
    Browse Code »
  • Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Mark McLoughlin authored
     
    Browse Code »
  • virtio-net needs this - for the same purpose that it currently uses the
    return value from qemu_sendv_packet().
    
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Mark McLoughlin authored
     
    Browse Code »
  • 2.6.30 adds a new TUNSETSNDBUF ioctl() which allows a send buffer limit
    for the tap device to be specified. When this limit is reached, a tap
    write() will return EAGAIN and poll() will indicate the fd isn't
    writable.
    
    This allows people to tune their setups so as to avoid e.g. UDP packet
    loss when the sending application in the guest out-runs the NIC in the
    host.
    
    There is no obviously sensible default setting - a suitable value
    depends mostly on the capabilities of the physical NIC through which the
    packets are being sent.
    
    Also, note that when using a bridge with netfilter enabled, we currently
    never get EAGAIN because netfilter causes the packet to be immediately
    orphaned. Set /proc/sys/net/bridge/bridge nf-call-iptables to zero to
    disable this behaviour.
    
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Mark McLoughlin authored
     
    Browse Code »
  • net_tap_fd_init() already returns TAPState, so this is a sensible
    cleanup in its own right.
    
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Mark McLoughlin authored
     
    Browse Code »
  • If a write() on tapfd returns EAGAIN, return zero so that the packet
    gets queued (in the case of async send) and enable polling tapfd for
    writing.
    
    When tapfd becomes writable, disable write polling and flush any queued
    packets.
    
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Mark McLoughlin authored
     
    Browse Code »
  • Add a helper to enable/disable the read polling on tapfd.
    
    We need this, because we want to start write polling on the tapfd too
    and enable/disable both types of polling independently.
    
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Mark McLoughlin authored
     
    Browse Code »
  • If tap has any packets queued at host_net_remove time, it needs to purge
    them in order to prevent a sent callback being invoked for it.
    
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Mark McLoughlin authored
     
    Browse Code »
  • If net client sends packets asynchronously, it needs to purge its queued
    packets in cleanup() so as to prevent sent callbacks being invoked with
    a freed client.
    
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Mark McLoughlin authored
     
    Browse Code »
  • Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Anthony Liguori authored
     
    Browse Code »
  • APIC reset handler already resets cpu, no need to reset it twice.
    Also register cpu_reset handler directly to make it impossible to
    add additional code to main_cpu_reset() by mistake.
    
    Signed-off-by: Gleb Natapov <gleb@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Gleb Natapov authored
     
    Browse Code »
  • Make drive_init() accept addr=, put the value into struct DriveInfo.
    Use it in all the places that create virtio-blk-pci devices:
    pc_init1(), bamboo_init(), mpc8544ds_init().
    
    Don't support addr= in third argument of monitor command pci_add and
    second argument of drive_add, because that clashes with their first
    arguments.  Admittedly unelegant.
    
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Markus Armbruster authored
     
    Browse Code »
  • Simply pass the PCI address through qemu_pci_hot_add_nic() to
    pci_nic_init() and through qemu_pci_hot_add_storage() to pci_create().
    
    Before, pci_device_hot_add() passed along the PCI bus to use, and
    ignored any user-specified slot.
    
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Markus Armbruster authored
     
    Browse Code »