)]}'
{
  "commit": "61de36761b565a4138d8ad7ec75489ab28fe84b6",
  "tree": "070b68753f783cc4ae5e3c933d8c630a3c9c1331",
  "parents": [
    "5736245c80bb277f3de7f37d9482c906743612ad"
  ],
  "author": {
    "name": "Alexander Graf",
    "email": "agraf@suse.de",
    "time": "Thu Feb 06 16:08:15 2014 +0100"
  },
  "committer": {
    "name": "Alexander Graf",
    "email": "agraf@suse.de",
    "time": "Wed Mar 05 03:06:47 2014 +0100"
  },
  "message": "qdev: Keep global allocation counter per bus\n\nWhen we have 2 separate qdev devices that both create a qbus of the\nsame type without specifying a bus name or device name, we end up\nwith two buses of the same name, such as ide.0 on the Mac machines:\n\n  dev: macio-ide, id \"\"\n    bus: ide.0\n      type IDE\n  dev: macio-ide, id \"\"\n    bus: ide.0\n      type IDE\n\nIf we now spawn a device that connects to a ide.0 the last created\nbus gets the device, with the first created bus inaccessible to the\ncommand line.\n\nAfter some discussion on IRC we concluded that the best quick fix way\nforward for this is to make automated bus-class type based allocation\ncount a global counter. That\u0027s what this patch implements. With this\nwe instead get\n\n  dev: macio-ide, id \"\"\n    bus: ide.1\n      type IDE\n  dev: macio-ide, id \"\"\n    bus: ide.0\n      type IDE\n\non the example mentioned above.\n\nThis also means that if you did -device ...,bus\u003dide.0 you got a device\non the first bus (the last created one) before this patch and get that\ndevice on the second one (the first created one) now.  Breaks\nmigration unless you change bus\u003dide.0 to bus\u003dide.1 on the destination.\n\nThis is intended and makes the bus enumeration work as expected.\n\nAs per review request follows a list of otherwise affected boards and\nthe reasoning for the conclusion that they are ok:\n\n   target      machine         bus id              times\n   ------      -------         ------              -----\n\n   aarch64     n800            i2c-bus.0           2\n   aarch64     n810            i2c-bus.0           2\n   arm         n800            i2c-bus.0           2\n   arm         n810            i2c-bus.0           2\n\n-\u003e Devices are only created explicitly on one of the two buses, using\n   s-\u003empu-\u003ei2c[0], so no change to the guest.\n\n   aarch64     vexpress-a15    virtio-mmio-bus.0   4\n   aarch64     vexpress-a9     virtio-mmio-bus.0   4\n   aarch64     virt            virtio-mmio-bus.0   32\n   arm         vexpress-a15    virtio-mmio-bus.0   4\n   arm         vexpress-a9     virtio-mmio-bus.0   4\n   arm         virt            virtio-mmio-bus.0   32\n\n-\u003e Makes -device bus\u003d work for all virtio-mmio buses.  Breaks\n   migration.  Workaround for migration from old to new: specify\n   virtio-mmio-bus.4 or .32 respectively rather than .0 on the\n   destination.\n\n   aarch64     xilinx-zynq-a9  usb-bus.0           2\n   arm         xilinx-zynq-a9  usb-bus.0           2\n   mips64el    fulong2e        usb-bus.0           2\n\n-\u003e Normal USB operation not affected. Migration driver needs command\n   line to use the other bus.\n\n   i386        isapc           ide.0               2\n   x86_64      isapc           ide.0               2\n   mips        mips            ide.0               2\n   mips64      mips            ide.0               2\n   mips64el    mips            ide.0               2\n   mipsel      mips            ide.0               2\n   ppc         g3beige         ide.0               2\n   ppc         mac99           ide.0               2\n   ppc         prep            ide.0               2\n   ppc64       g3beige         ide.0               2\n   ppc64       mac99           ide.0               2\n   ppc64       prep            ide.0               2\n\n-\u003e Makes -device bus\u003d work for all IDE buses.  Breaks migration.\n   Workaround for migration from old to new: specify ide.1 rather than\n   ide.0 on the destination.\n\nSigned-off-by: Alexander Graf \u003cagraf@suse.de\u003e\nSigned-off-by: Markus Armbruster \u003carmbru@redhat.com\u003e\nReviewed-by: Andreas Faerber \u003cafaerber@suse.de\u003e\nSigned-off-by: Alexander Graf \u003cagraf@suse.de\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c0b857fbd4715169f0b7ed59d08edb1829a11edb",
      "old_mode": 33188,
      "old_path": "hw/core/qdev.c",
      "new_id": "380976a0665d7b10e377a1e5d887da17836408d5",
      "new_mode": 33188,
      "new_path": "hw/core/qdev.c"
    },
    {
      "type": "modify",
      "old_id": "d5dc1ef3365921c8e6af2e1338781f58d72f3f6c",
      "old_mode": 33188,
      "old_path": "hw/i386/pc_piix.c",
      "new_id": "ae1699d6dbf50c050b9e9d90c38789a790e9ef00",
      "new_mode": 33188,
      "new_path": "hw/i386/pc_piix.c"
    },
    {
      "type": "modify",
      "old_id": "276b336c095f3b7597e13cd90ac56bcb6c3c4b9a",
      "old_mode": 33188,
      "old_path": "include/hw/qdev-core.h",
      "new_id": "1ed0691716d37a591812c587ae2a2f213818b322",
      "new_mode": 33188,
      "new_path": "include/hw/qdev-core.h"
    }
  ]
}
