Re: [Qemu-devel] [PATCH 26/28] ahci: Add test_hba_spec to ahci-test.

2014-08-04 Thread Stefan Hajnoczi
On Fri, Aug 01, 2014 at 07:27:57PM -0400, John Snow wrote: > > On 07/31/2014 10:01 AM, Stefan Hajnoczi wrote: > >On Mon, Jul 07, 2014 at 02:18:07PM -0400, John Snow wrote: > >>+/*** IO macros for the AHCI memory registers. ***/ > >>+#define void_incr(vptr, OFST) ((void *)((char *)(vptr) + (OFST)))

Re: [Qemu-devel] [PATCH 26/28] ahci: Add test_hba_spec to ahci-test.

2014-08-01 Thread John Snow
On 07/31/2014 10:01 AM, Stefan Hajnoczi wrote: On Mon, Jul 07, 2014 at 02:18:07PM -0400, John Snow wrote: +/*** IO macros for the AHCI memory registers. ***/ +#define void_incr(vptr, OFST) ((void *)((char *)(vptr) + (OFST))) I'm pretty sure QEMU takes advantage of GCC's void pointer arithmetic

Re: [Qemu-devel] [PATCH 26/28] ahci: Add test_hba_spec to ahci-test.

2014-07-31 Thread John Snow
On 07/31/2014 10:01 AM, Stefan Hajnoczi wrote: On Mon, Jul 07, 2014 at 02:18:07PM -0400, John Snow wrote: +if (bitset(cap, AHCI_CAP_SAM)) { +g_test_message("Supports AHCI-Only Mode: GHC_AE is Read-Only."); +assert_bit_set(reg, AHCI_GHC_AE); +} else { +g_test_mess

Re: [Qemu-devel] [PATCH 26/28] ahci: Add test_hba_spec to ahci-test.

2014-07-31 Thread Stefan Hajnoczi
On Mon, Jul 07, 2014 at 02:18:07PM -0400, John Snow wrote: > +/*** IO macros for the AHCI memory registers. ***/ > +#define void_incr(vptr, OFST) ((void *)((char *)(vptr) + (OFST))) I'm pretty sure QEMU takes advantage of GCC's void pointer arithmetic extension: https://gcc.gnu.org/onlinedocs/gcc-

[Qemu-devel] [PATCH 26/28] ahci: Add test_hba_spec to ahci-test.

2014-07-07 Thread John Snow
Add a test routine that checks the boot-up values of the HBA configuration memory space against the AHCI 1.3 specification and Intel ICH9 data sheet (for Q35 machines) for adherence and sane values. The HBA is not yet engaged or put into the idle state. Signed-off-by: John Snow --- tests/ahci-t