1. 09 11月, 2009 7 次提交
    • M
      net: disable receiving if client returns zero · 893379ef
      Mark McLoughlin 提交于
      If a receiver returns zero, that means its queue is full and it will
      notify us when room is available using qemu_flush_queued_packets().
      
      Take note of that and disable that receiver until it flushes its queue.
      
      This is a first step towards allowing can_receive() handlers to return
      true even if no buffer space is available.
      Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      893379ef
    • M
      tap: disable draining queue in one go · be1636b3
      Mark McLoughlin 提交于
      If qemu_send_packet_async() returns zero, it means the packet has been
      queued and the sent callback will be invoked once it has been flushed.
      
      This is only possible where the NIC's receive() handler returns zero
      and promises to notify the networking core that room is available in its
      queue again.
      
      In the case where the receive handler does not have this capability
      (and its queue fills up) it returns -1 and the networking core does not
      queue up the packet. This condition is indicated by a -1 return from
      qemu_send_packet_async().
      
      Currently, tap handles this condition simply by dropping the packet. It
      should do its best to avoid getting into this situation by checking such
      NIC's have room for a packet before copying the packet from the tap
      interface.
      
      tap_send() used to achieve this by only reading a single packet before
      returning to the mainloop. That way, tap_can_send() is called before
      reading each packet.
      
      tap_send() was changed to completely drain the tap interface queue
      without taking into account the situation where the NIC returns an
      error and the packet is not queued. Let's start fixing this by
      reverting to the previous behaviour of reading one packet at a time.
      Reported-by: NScott Tsai <scottt.tw@gmail.com>
      Tested-by: NSven Rudolph <Sven_Rudolph@drewag.de>
      Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      be1636b3
    • M
      Configurable block format whitelist · eb852011
      Markus Armbruster 提交于
      We have code for a quite a few block formats.  While I trust that all
      of these formats are useful at least for some people in some
      circumstances, some of them are of a kind that friends don't let
      friends use in production.
      
      This patch provides an optional block format whitelist, default off.
      If a whitelist is configured with --block-drv-whitelist, QEMU proper
      can use only whitelisted formats.  Other programs, like qemu-img, are
      not affected.
      
      Drivers for formats off the whitelist still participate in format
      probing, to ensure all programs probe exactly the same.  Without that,
      QEMU proper would be prone to treat images with a format off the
      whitelist as raw when the image's format is probed.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      eb852011
    • M
      qdev: Tag isa-fdc, PIIX3 IDE and PIIX4 IDE as no-user · 39a51dfd
      Markus Armbruster 提交于
      These devices are created automatically, and attempting to create
      another one with -device fails with "qemu: hardware error:
      register_ioport_write: invalid opaque".
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      39a51dfd
    • N
      Pass the drive's readonly attribute to the guest OS · c79662f7
      Naphtali Sprei 提交于
      Implemented for virtio-blk and for scsi
      Signed-off-by: NNaphtali Sprei <nsprei@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      c79662f7
    • N
      Added readonly flag to -drive command · 59f2689d
      Naphtali Sprei 提交于
      This is a slightly revised patch for adding readonly flag to the -drive command.
      Even though this patch is "stand-alone", it assumes a previous related patch (in Anthony staging tree), that passes
      the readonly attribute of the drive to the guest OS, applied first.
      
      This enables sharing same image between guests, with readonly access.
      Implementaion mark the drive as read_only and changes the flags when actually opening the file.
      The readonly attribute of a qcow also passed to it's base file.
      For ide that cannot pass the readonly attribute to the guest OS, disallow the readonly flag.
      
      Also, return error code from bdrv_truncate for readonly drive.
      Signed-off-by: NNaphtali Sprei <nsprei@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      59f2689d
    • S
      qcow2: Allow qcow2 disk images with size zero · d191d12d
      Stefan Weil 提交于
      Images with disk size 0 may be used for
      VM snapshots, but not to save normal block data.
      
      It is possible to create such images using
      qemu-img, but opening them later fails.
      
      So even "qemu-img info image.qcow2" is not
      possible for an image created with
      "qemu-img create -f qcow2 image.qcow2 0".
      
      This is fixed here.
      Signed-off-by: NStefan Weil <weil@mail.berlios.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      d191d12d
  2. 08 11月, 2009 1 次提交
  3. 07 11月, 2009 7 次提交
  4. 06 11月, 2009 2 次提交
  5. 05 11月, 2009 1 次提交
  6. 03 11月, 2009 2 次提交
  7. 31 10月, 2009 4 次提交
  8. 30 10月, 2009 16 次提交