[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 32/32] ahci: Add test_identify case to ahci-t
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v3 32/32] ahci: Add test_identify case to ahci-test. |
Date: |
Thu, 14 Aug 2014 17:52:05 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Wed, Aug 13, 2014 at 05:56:15PM -0400, John Snow wrote:
> + /* Copy the existing Command #0 structure from the CLB into local memory,
> + * and build a new command #0. */
> + memread(clb, &cmd, sizeof(cmd));
> + cmd.b1 = 5; /* reg_h2d_fis is 5 double-words long */
> + cmd.b2 = 0x04; /* clear PxTFD.STS.BSY when done */
> + cmd.prdtl = 1; /* One PRD table entry. */
What about endianness? This will be copied into guest memory, we should
use cpu_to_X() to ensure the correct endianness.
> + cmd.prdbc = 0;
> + cmd.ctba = table;
> + cmd.ctbau = 0;
> +
> + /* Construct our PRD, noting that DBC is 0-indexed. */
> + prd.dba = data_ptr;
Endianness
> + reg = px_rreg(i, AHCI_PX_TFD);
> + g_assert_cmphex((reg & AHCI_PX_TFD_ERR), ==, pio->error);
> + g_assert_cmphex((reg & AHCI_PX_TFD_STS), ==, pio->status);
> + /* PIO FIS contains a "bytes read" field, it should match up. */
> + g_assert_cmphex(pio->res4, ==, cmd.prdbc);
Endianness
pgpEKZ9CWkqUq.pgp
Description: PGP signature
- [Qemu-devel] [PATCH v3 00/32] AHCI test suite framework v3, John Snow, 2014/08/13
- [Qemu-devel] [PATCH v3 25/32] ahci: Adding basic functionality qtest., John Snow, 2014/08/13
- [Qemu-devel] [PATCH v3 32/32] ahci: Add test_identify case to ahci-test., John Snow, 2014/08/13
- Re: [Qemu-devel] [PATCH v3 32/32] ahci: Add test_identify case to ahci-test.,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH v3 31/32] ahci: Add test_hba_enable to ahci-test., John Snow, 2014/08/13
- [Qemu-devel] [PATCH v3 26/32] ahci: MSI capability should be at 0x80, not 0x50., John Snow, 2014/08/13
- [Qemu-devel] [PATCH v3 30/32] ahci: Add test_hba_spec to ahci-test., John Snow, 2014/08/13
- [Qemu-devel] [PATCH v3 27/32] ahci: Add test_pci_spec to ahci-test., John Snow, 2014/08/13