From 52515766f1e18b596a6dc31421ca14a63114c9eb Mon Sep 17 00:00:00 2001 From: John Snow <jsnow@redhat.com> Date: Thu, 5 Feb 2015 12:41:21 -0500 Subject: qtest/ahci: add ahci_write_fis Similar to ahci_set_command_header, add a helper that takes an in-memory representation of a command FIS and writes it to guest memory, handling endianness as-needed. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 1423158090-25580-11-git-send-email-jsnow@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> --- tests/libqos/ahci.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/libqos/ahci.h') diff --git a/tests/libqos/ahci.h b/tests/libqos/ahci.h index 0837bf5032..83a62acf44 100644 --- a/tests/libqos/ahci.h +++ b/tests/libqos/ahci.h @@ -393,7 +393,7 @@ typedef struct RegH2DFIS { uint8_t icc; uint8_t control; /* DW4 */ - uint32_t aux; + uint8_t aux[4]; } __attribute__((__packed__)) RegH2DFIS; /** @@ -515,6 +515,7 @@ void ahci_get_command_header(AHCIQState *ahci, uint8_t port, void ahci_set_command_header(AHCIQState *ahci, uint8_t port, uint8_t slot, AHCICommandHeader *cmd); void ahci_destroy_command(AHCIQState *ahci, uint8_t port, uint8_t slot); +void ahci_write_fis(AHCIQState *ahci, RegH2DFIS *fis, uint64_t addr); unsigned ahci_pick_cmd(AHCIQState *ahci, uint8_t port); #endif -- cgit v1.2.3