qtest/ahci: finalize AHCIQState consolidation

Move barsize, ahci_fingerprint and capabilities registers into
the AHCIQState object, removing global ahci-related state
from the ahci-test.c file.

More churn, less globals.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1421698563-6977-10-git-send-email-jsnow@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
John Snow 2015-01-19 15:15:57 -05:00 committed by Stefan Hajnoczi
parent 6100ddb0f9
commit 8d5eeceddc
2 changed files with 42 additions and 47 deletions

View file

@ -249,6 +249,10 @@ typedef struct AHCIQState {
QOSState *parent;
QPCIDevice *dev;
void *hba_base;
uint64_t barsize;
uint32_t fingerprint;
uint32_t cap;
uint32_t cap2;
} AHCIQState;
/**
@ -340,11 +344,6 @@ typedef struct PRD {
uint32_t dbc; /* Data Byte Count (0-indexed) & Interrupt Flag (bit 2^31) */
} PRD;
typedef struct HBACap {
uint32_t cap;
uint32_t cap2;
} HBACap;
/*** Macro Utilities ***/
#define BITANY(data, mask) (((data) & (mask)) != 0)
#define BITSET(data, mask) (((data) & (mask)) == (mask))