1. 29 4月, 2012 1 次提交
  2. 29 2月, 2012 10 次提交
  3. 15 2月, 2012 1 次提交
  4. 04 2月, 2012 1 次提交
    • A
      qdev: register all types natively through QEMU Object Model · 39bffca2
      Anthony Liguori 提交于
      This was done in a mostly automated fashion.  I did it in three steps and then
      rebased it into a single step which avoids repeatedly touching every file in
      the tree.
      
      The first step was a sed-based addition of the parent type to the subclass
      registration functions.
      
      The second step was another sed-based removal of subclass registration functions
      while also adding virtual functions from the base class into a class_init
      function as appropriate.
      
      Finally, a python script was used to convert the DeviceInfo structures and
      qdev_register_subclass functions to TypeInfo structures, class_init functions,
      and type_register_static calls.
      
      We are almost fully converted to QOM after this commit.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      39bffca2
  5. 28 1月, 2012 2 次提交
  6. 06 12月, 2011 1 次提交
  7. 28 11月, 2011 1 次提交
  8. 25 11月, 2011 1 次提交
  9. 21 10月, 2011 2 次提交
    • K
      pc: Fix floppy drives with if=none · 34d4260e
      Kevin Wolf 提交于
      Commit 63ffb564 broke floppy devices specified on the command line like
      -drive file=...,if=none,id=floppy -global isa-fdc.driveA=floppy because it
      relies on drive_get() which works only with -fda/-drive if=floppy.
      
      This patch resembles what we're already doing for IDE, i.e. remember the floppy
      device that was created and use that to extract the BlockDriverStates where
      needed.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      34d4260e
    • K
      fdc: Fix floppy port I/O · a18e67f5
      Kevin Wolf 提交于
      The floppy device was broken by commit 212ec7ba (fdc: Convert to
      isa_register_portio_list). While the old interface provided the port number
      relative to the floppy drive's io_base, the new one provides the real port
      number, so we need to apply a bitmask now to get the register number.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      a18e67f5
  10. 11 10月, 2011 1 次提交
  11. 25 9月, 2011 1 次提交
  12. 12 9月, 2011 3 次提交
  13. 06 9月, 2011 2 次提交
    • M
      fdc: Make media change detection more robust · 18d90055
      Markus Armbruster 提交于
      fdctrl_change_cb() gets called on a virtual media change via monitor.
      It would be nice if host device block drivers called it on physical
      media change, but they don't.
      
      bdrv_media_changed() lets you poll for media change, but it returns
      "don't know" except with block driver "host_floppy".
      
      FDrive member media_changed gets set on device initialization and by
      fdctrl_change_cb(), and cleared by fdctrl_media_changed().  Thus, it's
      set on first entry to fdctrl_media_changed() since device
      initialization or virtual media change.
      
      fdctrl_media_changed() ignores media_changed unless
      bdrv_media_changed() returns "don't know".  If we change media via
      monitor (setting media_changed), and the new media's block driver
      returns 0, we lose.  Fortunately, "host_floppy" always returns 1 on
      first call.  Brittle.  Clean it up not to rely on it.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      18d90055
    • M
      block: Leave tracking media change to device models · 8e49ca46
      Markus Armbruster 提交于
      hw/fdc.c is the only one that cares.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      8e49ca46
  14. 22 8月, 2011 1 次提交
    • B
      fdc: avoid structure holes spotted by pahole · 242cca4f
      Blue Swirl 提交于
      Edited report from pahole on amd64 host:
      struct FDCtrl {
      	uint8_t                    version;              /*     0     1 */
      
      	/* XXX 7 bytes hole, try to pack */
      
      	qemu_irq                   irq;                  /*     8     8 */
      	int                        dma_chann;            /*    16     4 */
      
      	/* XXX 4 bytes hole, try to pack */
      ...
      	uint8_t                    status2;              /*    42     1 */
      
      	/* XXX 5 bytes hole, try to pack */
      
      	uint8_t *                  fifo;                 /*    48     8 */
      ...
      	uint8_t                    pwrd;                 /*    76     1 */
      
      	/* XXX 3 bytes hole, try to pack */
      
      	int                        sun4m;                /*    80     4 */
      	uint8_t                    num_floppies;         /*    84     1 */
      
      	/* XXX 3 bytes hole, try to pack */
      
      	FDrive                     drives[2];            /*    88    64 */
      	/* --- cacheline 2 boundary (128 bytes) was 24 bytes ago --- */
      	int                        reset_sensei;         /*   152     4 */
      
      	/* size: 160, cachelines: 3 */
      	/* sum members: 134, holes: 5, sum holes: 22 */
      	/* padding: 4 */
      	/* last cacheline: 32 bytes */
      };	/* definitions: 1 */
      
      Fix by rearranging the structure to avoid padding.
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      242cca4f
  15. 07 4月, 2011 1 次提交
  16. 21 3月, 2011 1 次提交
    • P
      change all other clock references to use nanosecond resolution accessors · 74475455
      Paolo Bonzini 提交于
      This was done with:
      
          sed -i 's/qemu_get_clock\>/qemu_get_clock_ns/' \
              $(git grep -l 'qemu_get_clock\>' )
          sed -i 's/qemu_new_timer\>/qemu_new_timer_ns/' \
              $(git grep -l 'qemu_new_timer\>' )
      
      after checking that get_clock and new_timer never occur twice
      on the same line.  There were no missed occurrences; however, even
      if there had been, they would have been caught by the compiler.
      
      There was exactly one false positive in qemu_run_timers:
      
           -    current_time = qemu_get_clock (clock);
           +    current_time = qemu_get_clock_ns (clock);
      
      which is of course not in this patch.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      74475455
  17. 20 2月, 2011 3 次提交
  18. 12 12月, 2010 3 次提交
  19. 11 12月, 2010 1 次提交
    • A
      Add endianness as io mem parameter · 2507c12a
      Alexander Graf 提交于
      As stated before, devices can be little, big or native endian. The
      target endianness is not of their concern, so we need to push things
      down a level.
      
      This patch adds a parameter to cpu_register_io_memory that allows a
      device to choose its endianness. For now, all devices simply choose
      native endian, because that's the same behavior as before.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      2507c12a
  20. 24 8月, 2010 1 次提交
    • B
      Rearrange block headers · 2446333c
      Blue Swirl 提交于
      Changing block.h or blockdev.h resulted in recompiling most objects.
      
      Move DriveInfo typedef and BlockInterfaceType enum definitions
      to qemu-common.h and rearrange blockdev.h use to decrease churn.
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      2446333c
  21. 06 7月, 2010 1 次提交
    • M
      fdc: Reject unimplemented error actions · b47b3525
      Markus Armbruster 提交于
      drive_init() doesn't permit them for if=floppy, but that's worthless:
      we get them via if=none and -global.
      
      This can make device initialization fail.  Since all callers of
      fdctrl_init_isa() ignore its value, change it to die instead of
      returning failure.  Without this, some callers would ignore the
      failure, and others would crash.
      
      Wart: unlike drive_init(), we don't reject the default action when
      it's explicitly specified.  That's because we can't distinguish "no
      rerror option" from "rerror=report", or "no werror" from
      "rerror=enospc".  Left for another day.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      b47b3525
  22. 02 7月, 2010 1 次提交
    • M
      block: Fix virtual media change for if=none · 7d0d6950
      Markus Armbruster 提交于
      BlockDriverState member removable controls whether virtual media
      change (monitor commands change, eject) is allowed.  It is set when
      the "type hint" is BDRV_TYPE_CDROM or BDRV_TYPE_FLOPPY.
      
      The type hint is only set by drive_init().  It sets BDRV_TYPE_FLOPPY
      for if=floppy.  It sets BDRV_TYPE_CDROM for media=cdrom and if=ide,
      scsi, xen, or none.
      
      if=ide and if=scsi work, because the type hint makes it a CD-ROM.
      if=xen likewise, I think.
      
      For the same reason, if=none works when it's used by ide-drive or
      scsi-disk.  For other guest devices, there are problems:
      
      * fdc: you can't change virtual media
      
          $ qemu [...] -drive if=none,id=foo,... -global isa-fdc.driveA=foo
          QEMU 0.12.50 monitor - type 'help' for more information
          (qemu) eject foo
          Device 'foo' is not removable
      
        unless you add media=cdrom, but that makes it readonly.
      
      * virtio: if you add media=cdrom, you can change virtual media.  If
        you eject, the guest gets I/O errors.  If you change, the guest sees
        the drive's contents suddenly change.
      
      * scsi-generic: if you add media=cdrom, you can change virtual media.
        I didn't test what that does to the guest or the physical device,
        but it can't be pretty.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      7d0d6950