• The VNC protocol contains quite some constants, some of which are
    currently hardcoded in the vnc.c code. This is not exactly pretty.
    
    Let's move all those constants out to vnc.h, so they are clearly
    separated. While at it, I also included other defines that will be
    used later in this patch series.
    
    Signed-off-by: Alexander Graf <agraf@suse.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6493 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse File »




  • Paul Brook pointed out that the number of sectors reported
    by the SCSI read capacity commands needs to be divided by
    s->cluster_size, because bdrv_get_geometry reports the number
    of 512 byte sectors, while emulated CDROMs report 2048 byte
    sectors back to the guest.
    
    This has no consequences for emulated hard disks, which use
    a cluster size of 1.
    
    aliguori: fixed typo
    
    Signed-off-by: Rik van Riel <riel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6469 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • Implement SCSI READ(16), WRITE(16) and SAI READ CAPACITY(16) commands,
    so SCSI disks larger than 2TB can work with guests that support these
    newer SCSI commands.
    
    The cast to (uint64_t) is needed because otherwise gcc will use a
    signed int, which gets sign extended into uint64_t lba, resulting
    in bad block numbers for READ 10 and READ 16 with block numbers
    larger than 2^31.
    
    Signed-off-by: Rik van Riel <riel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6468 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • Sector numbers can overflow on a virtual scsi disk of over 1TB
    in size.  Qemu's bdrv_read expects an int64_t, so fix the overflow
    by going to that data type.
    
    On large disks, we clip the capacity to 2TB instead of returning
    "capacity modulo 2TB".
    
    Turn sector_count into an unsigned to prevent a signed/unsigned
    overflow with SCSI transfers larger than 2TB.  We're unlikely to
    ever hit this bug, but fixing it is just one line.
    
    Signed-off-by: Rik van Riel <riel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6467 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • make {linux,bsd}-user qemu_realloc handle ptr == NULL correctly.
    spotted by malc.
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6466 c046a42c-6fe2-441c-8c8c-71466251a162
    malc authored
     
    Browse Code »