aboutsummaryrefslogtreecommitdiff
path: root/tests/ahci-test.c
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2014-08-21 13:44:36 -0400
committerStefan Hajnoczi <stefanha@redhat.com>2014-09-22 11:39:41 +0100
commitfac7aa7fc2ebc26803b0a7b44b010f47ce3e1dd8 (patch)
treeef5728c6913edc08f7af22b6797b4de1c3b7f160 /tests/ahci-test.c
parent96d6d3bad978a4085b9560e30316c98cb6e0489c (diff)
ahci: properly shadow the TFD register
In a real AHCI device, several S/ATA registers are mirrored or shadowed within the AHCI register set. These registers are not updated synchronously for each read access, but are instead updated after a Device-to-Host Register FIS packet is received. The D2H FIS contains the values from these registers on the device. In QEMU, by reaching directly into the device to grab these bits before they are "sent," we may introduce race conditions where unexpected values are present "before they are sent" which could cause issues for some guests, particularly if an attempt is made to read the PxTFD register prior to enabling the port, where incorrect values will be read. This patch also addresses the boot-time values for the PxTFD and PxSIG registers to bring them in line with the AHCI 1.3 specification. Lastly, several fields (PxTFD, PxSIG and PxSACT) are read-only, and any attempts to write to them should be ignored. Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 1408643079-30675-6-git-send-email-jsnow@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/ahci-test.c')
0 files changed, 0 insertions, 0 deletions