1. 22 12月, 2015 4 次提交
  2. 17 12月, 2015 1 次提交
    • E
      qapi: Don't let implicit enum MAX member collide · 7fb1cf16
      Eric Blake 提交于
      Now that we guarantee the user doesn't have any enum values
      beginning with a single underscore, we can use that for our
      own purposes.  Renaming ENUM_MAX to ENUM__MAX makes it obvious
      that the sentinel is generated.
      
      This patch was mostly generated by applying a temporary patch:
      
      |diff --git a/scripts/qapi.py b/scripts/qapi.py
      |index e6d014b..b862ec9 100644
      |--- a/scripts/qapi.py
      |+++ b/scripts/qapi.py
      |@@ -1570,6 +1570,7 @@ const char *const %(c_name)s_lookup[] = {
      |     max_index = c_enum_const(name, 'MAX', prefix)
      |     ret += mcgen('''
      |     [%(max_index)s] = NULL,
      |+// %(max_index)s
      | };
      | ''',
      |                max_index=max_index)
      
      then running:
      
      $ cat qapi-{types,event}.c tests/test-qapi-types.c |
          sed -n 's,^// \(.*\)MAX,s|\1MAX|\1_MAX|g,p' > list
      $ git grep -l _MAX | xargs sed -i -f list
      
      The only things not generated are the changes in scripts/qapi.py.
      
      Rejecting enum members named 'MAX' is now useless, and will be dropped
      in the next patch.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1447836791-369-23-git-send-email-eblake@redhat.com>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      [Rebased to current master, commit message tweaked]
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      7fb1cf16
  3. 25 11月, 2015 1 次提交
  4. 04 11月, 2015 1 次提交
    • E
      pc: Set hw_version on all machine classes · de796d93
      Eduardo Habkost 提交于
      In 2012, QEMU had a bug where it exposed QEMU version information to the
      guest, meaning a QEMU upgrade would expose different hardware to the
      guest OS even if the same machine-type is being used.
      
      The bug was fixed by commit 93bfef4c, on
      all machines up to pc-1.0. But we kept introducing the same bug on all
      newer machines since then. That means we are breaking guest ABI every
      time QEMU was upgraded.
      
      Fix this by setting the hw_version on all PC machines, making sure the
      hardware won't change when upgrading QEMU.
      
      Note that QEMU_VERSION was "1.0" in QEMU 1.0, but starting on QEMU
      1.1.0, it started following the "x.y.0" pattern. We have to follow it,
      to make sure we use the right QEMU_VERSION string from each QEMU
      release.
      
      The 2.5 machine classes could have hw_version unset, because the default
      value for qemu_get_version() is QEMU_VERSION. But I decided to set it
      explicitly to QEMU_VERSION so we don't forget to update it to "2.5.0"
      after we release 2.5.0 and create a 2.6 machine class.
      Reported-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <1446233769-7892-2-git-send-email-ehabkost@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      de796d93
  5. 29 10月, 2015 1 次提交
  6. 22 10月, 2015 1 次提交
  7. 03 10月, 2015 2 次提交
  8. 02 10月, 2015 1 次提交
  9. 01 10月, 2015 1 次提交
  10. 24 9月, 2015 2 次提交
  11. 10 9月, 2015 2 次提交
  12. 07 9月, 2015 1 次提交
  13. 13 8月, 2015 10 次提交
  14. 08 7月, 2015 1 次提交
  15. 07 7月, 2015 4 次提交
  16. 06 7月, 2015 1 次提交
  17. 19 6月, 2015 1 次提交
  18. 12 6月, 2015 1 次提交
  19. 03 6月, 2015 1 次提交
  20. 01 6月, 2015 3 次提交
    • L
      i386: drop FDC in pc-q35-2.4+ if neither it nor floppy drives are wanted · ea96bc62
      Laszlo Ersek 提交于
      It is Very annoying to carry forward an outdatEd coNtroller with a mOdern
      Machine type.
      
      Hence, let us not instantiate the FDC when all of the following apply:
      - the machine type is pc-q35-2.4 or later,
      - "-device isa-fdc" is not passed on the command line (nor in the config
        file),
      - no "-drive if=floppy,..." is requested.
      
      Cc: Markus Armbruster <armbru@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: John Snow <jsnow@redhat.com>
      Cc: "Gabriel L. Somlo" <gsomlo@gmail.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Kevin Wolf <kwolf@redhat.com>
      Cc: qemu-block@nongnu.org
      Suggested-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Acked-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      ea96bc62
    • L
      i386/pc_q35: don't insist on board FDC if there's no default floppy · 6cd2234c
      Laszlo Ersek 提交于
      The "no_floppy = 1" machine class setting causes "default_floppy" in
      main() to become zero. Consequently, default_drive() will not call
      drive_add() and drive_new() for IF_FLOPPY, index=0, meaning that no
      default floppy drive will be created for the virtual machine. In that
      case, board code should also not insist on the creation of the
      board-default FDC.
      
      The board-default FDC will still be created if the user requests a floppy
      drive with "-drive if=floppy".
      
      Additionally, separate FDCs can be specified manually with "-device
      isa-fdc". They allow the
      
        -device isa-fdc,driveA=...
      
      syntax that is more flexible than the one required by the board-default
      FDC:
      
        -global isa-fdc.driveA=...
      
      This patch doesn't change the behavior observably, as all Q35 machine
      types have "no_floppy = 0".
      
      Cc: Markus Armbruster <armbru@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: John Snow <jsnow@redhat.com>
      Cc: "Gabriel L. Somlo" <gsomlo@gmail.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Kevin Wolf <kwolf@redhat.com>
      Cc: qemu-block@nongnu.org
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      6cd2234c
    • L
      i386/pc: pc_basic_device_init(): delegate FDC creation request · fd53c87c
      Laszlo Ersek 提交于
      This patch introduces no observable change, but it allows the callers of
      pc_basic_device_init(), ie. pc_init1() and pc_q35_init(), to request (or
      not request) the creation of the FDC explicitly.
      
      At the moment both callers pass constant create_fdctrl=true (hence no
      observable change).
      
      Assuming a board passes create_fdctrl=false, "floppy" will be NULL on
      output, and (beyond the FDC not being created) that NULL will be passed on
      to pc_cmos_init(). Luckily, pc_cmos_init() already handles that case.
      
      Cc: Markus Armbruster <armbru@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: John Snow <jsnow@redhat.com>
      Cc: "Gabriel L. Somlo" <gsomlo@gmail.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Kevin Wolf <kwolf@redhat.com>
      Cc: qemu-block@nongnu.org
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      fd53c87c