From 5bf99aa1cf67a210dd441ae4edf1e26df05360d5 Mon Sep 17 00:00:00 2001 From: John Snow Date: Thu, 5 Feb 2015 12:41:17 -0500 Subject: libqos/ahci: Add ahci_port_check_interrupts helper A helper that compares a given port's current interrupts and checks them against a supplied list of expected interrupt bits, and throws an error if they do not match. The helper then resets the requested interrupts on this port, and asserts that the interrupt register is now empty. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini Message-id: 1423158090-25580-7-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 af62a8a..a2ffa70 100644 --- a/tests/libqos/ahci.h +++ b/tests/libqos/ahci.h @@ -434,6 +434,8 @@ void ahci_hba_enable(AHCIQState *ahci); unsigned ahci_port_select(AHCIQState *ahci); void ahci_port_clear(AHCIQState *ahci, uint8_t port); void ahci_port_check_error(AHCIQState *ahci, uint8_t port); +void ahci_port_check_interrupts(AHCIQState *ahci, uint8_t port, + uint32_t intr_mask); void ahci_get_command_header(AHCIQState *ahci, uint8_t port, uint8_t slot, AHCICommandHeader *cmd); void ahci_set_command_header(AHCIQState *ahci, uint8_t port, -- cgit v1.1