• Load and save MTRR state together with machine state.
    
    Add support for the MTRRcap MSR which is used by the latest Bochs BIOS
    and some operating systems.
    
    Fix a typo in ext2_feature_name.
    
    With this patch, MTRR emulation should be good enough to not trigger any
    sanity checks in well behaved BIOS/kernel code.
    Some corner cases for BIOS/firmware usage remain to be implemented, but
    that can be deferred to another patch.
    Also, MTRR accesses on hardware not supporting MTRRs should cause #GP.
    That can be enforced by another patch as well.
    
    Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6472 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • Current Linux guests oops if the host notifies of a
    config change before a driver has been bound to the
    device.
    
    It's pretty pointless for us to do notify of config
    changes before status is S_DRIVER_OK anyway, so let's
    just not do it.
    
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6471 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • Currently when qemu_paio_read or qemu_paio_write return an error we call
    qemu_aio_release without removing the request from the list.
    I know that in the current implementation qemu_paio_write\read don't return
    any error, but still the behavior is wrong, especially considering
    that the implementation of these two functions is likely to change in is
    the future.
    This patch fixes the problem adding a raw_aio_remove function that
    removes the callback from the queue and also calls qemu_aio_release.
    raw_aio_remove is called by raw_aio_read, raw_aio_write and
    raw_aio_cancel.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6470 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »

  • 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 »