• 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 File »
  • 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 Dir »
  • Make net_client_init() accept addr=, put the value into struct
    NICinfo.  Use it in pci_nic_init(), and remove arguments bus and
    devfn.
    
    Don't support addr= in third argument of monitor command pci_add,
    because that clashes with its first argument.  Admittedly unelegant.
    
    Machines "malta" and "r2d" have a default NIC with a well-known PCI
    address.  Deal with that the same way as the NIC model: make
    pci_nic_init() take an optional default to be used when the user
    doesn't specify one.
    
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Markus Armbruster authored
     
    Browse Code »
  • Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Markus Armbruster authored
     
    Browse Code »
  • use NULL instead of 0 for pci_register_device() argument
    for consistency. Any other caller uses NULL.
    
    Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Isaku Yamahata authored
     
    Browse Code »