diff options
author | John Snow <jsnow@redhat.com> | 2015-03-27 15:48:11 -0400 |
---|---|---|
committer | John Snow <jsnow@redhat.com> | 2015-03-27 15:48:11 -0400 |
commit | fc3d8e1138cd0c843d6fd75272633a31be6554ef (patch) | |
tree | 574c1e3c0687d8379ea17dc95aa0316cdab2dc36 /hw/ide/ahci.h | |
parent | a13ab5a35bc0435fcfdacb3e171ceedcc077573d (diff) | |
download | qemu-fc3d8e1138cd0c843d6fd75272633a31be6554ef.tar.gz |
AHCI: Protect cmd register
Many bits in the CMD register are supposed to be strictly read-only.
We should not be deleting them on every write.
As a side-effect: pay explicit attention to when a guest marks off
the FIS Receive or Start bits, and disable the status bits ourselves,
instead of letting them implicitly fall off.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1426283454-15590-3-git-send-email-jsnow@redhat.com
Diffstat (limited to 'hw/ide/ahci.h')
-rw-r--r-- | hw/ide/ahci.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/ide/ahci.h b/hw/ide/ahci.h index 99aa0c967f..501c002c31 100644 --- a/hw/ide/ahci.h +++ b/hw/ide/ahci.h @@ -132,6 +132,8 @@ #define PORT_CMD_ICC_PARTIAL (0x2 << 28) /* Put i/f in partial state */ #define PORT_CMD_ICC_SLUMBER (0x6 << 28) /* Put i/f in slumber state */ +#define PORT_CMD_RO_MASK 0x007dffe0 /* Which CMD bits are read only? */ + /* ap->flags bits */ #define AHCI_FLAG_NO_NCQ (1 << 24) #define AHCI_FLAG_IGN_IRQ_IF_ERR (1 << 25) /* ignore IRQ_IF_ERR */ |