)]}'
{
  "commit": "b242e0e0e2969c044a318e56f7988bbd84de1f63",
  "tree": "6f3baf890240a4d7af35dce62eed2d2fca1834b5",
  "parents": [
    "fba0a593b2809ecdda68650952cf3d3332ac1990"
  ],
  "author": {
    "name": "Paolo Bonzini",
    "email": "pbonzini@redhat.com",
    "time": "Sat Jul 04 00:24:51 2015 +0200"
  },
  "committer": {
    "name": "Paolo Bonzini",
    "email": "pbonzini@redhat.com",
    "time": "Mon Jul 06 14:59:11 2015 +0200"
  },
  "message": "exec: skip MMIO regions correctly in cpu_physical_memory_write_rom_internal\n\nLoading the BIOS in the mac99 machine is interesting, because there is a\nPROM in the middle of the BIOS region (from 16K to 32K).  Before memory\nregion accesses were clamped, when QEMU was asked to load a BIOS from\n0xfff00000 to 0xffffffff it would put even those 16K from the BIOS file\ninto the region.  This is weird because those 16K were not actually\nvisible between 0xfff04000 and 0xfff07fff.  However, it worked.\n\nAfter clamping was added, this also worked.  In this case, the\ncpu_physical_memory_write_rom_internal function split the write in\nthree parts: the first 16K were copied, the PROM area (second 16K) were\nignored, then the rest was copied.\n\nProblems then started with commit 965eb2f (exec: do not clamp accesses\nto MMIO regions, 2015-06-17).  Clamping accesses is not done for MMIO\nregions because they can overlap wildly, and MMIO registers can be\nexpected to perform full-width accesses based only on their address\n(with no respect for adjacent registers that could decode to completely\ndifferent MemoryRegions).  However, this lack of clamping also applied\nto the PROM area!  cpu_physical_memory_write_rom_internal thus failed\nto copy the third range above, i.e. only copied the first 16K of the BIOS.\n\nIn effect, address_space_translate is expecting _something else_ to do\nthe clamping for MMIO regions if the incoming length is large.  This\n\"something else\" is memory_access_size in the case of address_space_rw,\nso use the same logic in cpu_physical_memory_write_rom_internal.\n\nReported-by: Alexander Graf \u003cagraf@redhat.com\u003e\nReviewed-by: Laurent Vivier \u003clvivier@redhat.com\u003e\nTested-by: Laurent Vivier \u003clvivier@redhat.com\u003e\nFixes: 965eb2f\nSigned-off-by: Paolo Bonzini \u003cpbonzini@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3457f7e82873c3c5312c3833c8ac03e1453478bb",
      "old_mode": 33188,
      "old_path": "exec.c",
      "new_id": "251dc79e10280145021a981890e4195a87393715",
      "new_mode": 33188,
      "new_path": "exec.c"
    }
  ]
}
