Re: [Qemu-devel] [PATCH 24/28] ahci: Add test_pci_spec to ahci-test.

2014-08-01 Thread Stefan Hajnoczi
On Thu, Jul 31, 2014 at 01:42:02PM -0400, John Snow wrote: > > On 07/31/2014 09:19 AM, Stefan Hajnoczi wrote: > >On Mon, Jul 07, 2014 at 02:18:05PM -0400, John Snow wrote: > >>+static void ahci_test_pci_caps(QPCIDevice *ahci, uint16_t header, > >>+ uint8_t offset) > >

Re: [Qemu-devel] [PATCH 24/28] ahci: Add test_pci_spec to ahci-test.

2014-07-31 Thread John Snow
On 07/31/2014 09:19 AM, Stefan Hajnoczi wrote: On Mon, Jul 07, 2014 at 02:18:05PM -0400, John Snow wrote: +#ifdef AHCI_13_STRICT Please drop the #ifdef. #ifdefs mean dead code that is not being compiled or tested. Just decide which case we should take and keep that one. OK. It might be nice

Re: [Qemu-devel] [PATCH 24/28] ahci: Add test_pci_spec to ahci-test.

2014-07-31 Thread Stefan Hajnoczi
On Mon, Jul 07, 2014 at 02:18:05PM -0400, John Snow wrote: > +/*** Macro Utilities ***/ > +#define bitany(data, mask) (((data) & (mask)) != 0) > +#define bitset(data, mask) (((data) & (mask)) == (mask)) > +#define bitclr(data, mask) (((data) & (mask)) == 0) Unused, please remove. > +#ifdef AHCI_1

[Qemu-devel] [PATCH 24/28] ahci: Add test_pci_spec to ahci-test.

2014-07-07 Thread John Snow
Adds a specification adherence test for AHCI where the boot-up values for the PCI configuration space are compared against the AHCI 1.3 specification. This test does not itself attempt to engage the device. Signed-off-by: John Snow --- tests/ahci-test.c | 271 +++