From ae029620173239f3643925299790ecc5e1d72db1 Mon Sep 17 00:00:00 2001 From: John Snow Date: Thu, 5 Feb 2015 12:41:27 -0500 Subject: libqos/ahci: add ahci_io ahci_io is a wrapper around ahci_guest_io that takes a pointer to host memory instead, and will create a guest memory buffer and copy the data to/from as needed and as appropriate for a read/write command, such that after a read, the guest data will be in a host buffer, and for a write, the data will be transmitted to guest memory prior to the block operation. Now that we have all the syntactic sugar functions in place for AHCI, we can convert the identify test to be very, very short. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini Message-id: 1423158090-25580-17-git-send-email-jsnow@redhat.com Signed-off-by: Stefan Hajnoczi --- tests/libqos/ahci.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/libqos/ahci.h') diff --git a/tests/libqos/ahci.h b/tests/libqos/ahci.h index 1206c7abab..9133033f1c 100644 --- a/tests/libqos/ahci.h +++ b/tests/libqos/ahci.h @@ -523,6 +523,8 @@ unsigned ahci_pick_cmd(AHCIQState *ahci, uint8_t port); unsigned size_to_prdtl(unsigned bytes, unsigned bytes_per_prd); void ahci_guest_io(AHCIQState *ahci, uint8_t port, uint8_t ide_cmd, uint64_t gbuffer, size_t size); +void ahci_io(AHCIQState *ahci, uint8_t port, uint8_t ide_cmd, + void *buffer, size_t bufsize); /* Command Lifecycle */ AHCICommand *ahci_command_create(uint8_t command_name); -- cgit v1.2.1