On Fri, Mar 13, 2015 at 05:50:52PM -0400, John Snow wrote: > Currently, the AHCI device tries to re-map guest memory every time > the low or high address registers are written to, whether or not the > AHCI device is currently active. If the other register has stale > information in it, this may lead to runtime failures. > > Reconfigure the AHCI device to ignore writes to these registers while > the device is active, and otherwise postpone the dma memory map until > the device becomes active. > > If the mappings should for whatever reason fail, do not activate the > bits that tell the user the device has been started successfully. > > v2: > - ahci_map_[clb|fis]_address now returns true on success > - PORT_CMD_LIST_ON and PORT_CMD_FIS_ON only turn on if the map succeeds > - Fix compiler warning due to changing context. > > John Snow (2): > AHCI: Do not (re)map FB/CLB buffers while not running > AHCI: Protect cmd register > > hw/ide/ahci.c | 76 > +++++++++++++++++++++++++++++++++++++++++++++-------------- > hw/ide/ahci.h | 2 ++ > 2 files changed, 60 insertions(+), 18 deletions(-) > > -- > 1.9.3 >
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
pgpOSR3qQ8GIt.pgp
Description: PGP signature