1. 15 1月, 2016 1 次提交
  2. 13 1月, 2016 1 次提交
    • M
      isa: Clean up error handling around isa_bus_new() · d10e5432
      Markus Armbruster 提交于
      We can have at most one ISA bus.  If you try to create another one,
      isa_bus_new() complains to stderr and returns null.
      
      isa_bus_new() is called in two contexts, machine's init() and device's
      realize() methods.  Since complaining to stderr is not proper in the
      latter context, convert isa_bus_new() to Error.
      
      Machine's init():
      
      * mips_jazz_init(), called from the init() methods of machines
        "magnum" and "pica"
      
      * mips_r4k_init(), the init() method of machine "mips"
      
      * pc_init1() called from the init() methods of non-q35 PC machines
      
      * typhoon_init(), called from clipper_init(), the init() method of
        machine "clipper"
      
      These callers always create the first ISA bus, hence isa_bus_new()
      can't fail.  Simply pass &error_abort.
      
      Device's realize():
      
      * i82378_realize(), of PCI device "i82378"
      
      * ich9_lpc_realize(), of PCI device "ICH9-LPC"
      
      * pci_ebus_realize(), of PCI device "ebus"
      
      * piix3_realize(), of PCI device "pci-piix3", abstract parent of
        "PIIX3" and "PIIX3-xen"
      
      * piix4_realize(), of PCI device "PIIX4"
      
      * vt82c686b_realize(), of PCI device "VT82C686B"
      
      Propagate the error.  Note that these devices are typically created
      only by machine init() methods with qdev_init_nofail() or similar.  If
      we screwed up and created an ISA bus before that call, we now give up
      right away.  Before, we'd hobble on, and typically die in
      isa_bus_irqs().  Similar if someone finds a way to hot-plug one of
      these critters.
      
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: "Hervé Poussineau" <hpoussin@reactos.org>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Signed-off-by: NMarkus Armbruster <armbru@pond.sub.org>
      Reviewed-by: NMarcel Apfelbaum <marcel@redhat.com>
      Reviewed-by: NHervé Poussineau <hpoussin@reactos.org>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Message-Id: <1450370121-5768-11-git-send-email-armbru@redhat.com>
      d10e5432
  3. 23 12月, 2015 2 次提交
  4. 22 12月, 2015 6 次提交
  5. 18 12月, 2015 2 次提交
  6. 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
  7. 25 11月, 2015 1 次提交
  8. 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
  9. 29 10月, 2015 1 次提交
  10. 22 10月, 2015 1 次提交
  11. 19 10月, 2015 1 次提交
  12. 03 10月, 2015 2 次提交
  13. 02 10月, 2015 1 次提交
  14. 01 10月, 2015 1 次提交
  15. 24 9月, 2015 2 次提交
  16. 10 9月, 2015 4 次提交
  17. 08 9月, 2015 2 次提交
  18. 07 9月, 2015 1 次提交
  19. 13 8月, 2015 9 次提交