qtest/ahci: add migrate dma test

Write to one guest, migrate, and then read from the other.
adjust ahci_io to clear any buffers it creates, so that we
can use ahci_io safely on both guests knowing we are using
empty buffers and not accidentally re-using data.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 1430417242-11859-7-git-send-email-jsnow@redhat.com
This commit is contained in:
John Snow 2015-05-22 14:13:43 -04:00
parent 278128ab06
commit 88e21f9485
2 changed files with 46 additions and 0 deletions

View file

@ -650,6 +650,7 @@ void ahci_io(AHCIQState *ahci, uint8_t port, uint8_t ide_cmd,
g_assert(props);
ptr = ahci_alloc(ahci, bufsize);
g_assert(ptr);
qmemset(ptr, 0x00, bufsize);
if (props->write) {
memwrite(ptr, buffer, bufsize);