From: Stefan Hajnoczi <stefanha@redhat.com>
To: John Snow <jsnow@redhat.com>
Cc: mst@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com
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 [thread overview]
Message-ID: <20140814165205.GH24132@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1407966975-3723-9-git-send-email-jsnow@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 993 bytes --]
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
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
prev parent reply other threads:[~2014-08-14 16:52 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-13 21:56 [Qemu-devel] [PATCH v3 00/32] AHCI test suite framework v3 John Snow
2014-08-13 21:56 ` [Qemu-devel] [PATCH v3 25/32] ahci: Adding basic functionality qtest John Snow
2014-08-14 15:34 ` Stefan Hajnoczi
2014-08-13 21:56 ` [Qemu-devel] [PATCH v3 26/32] ahci: MSI capability should be at 0x80, not 0x50 John Snow
2014-08-14 7:15 ` Michael S. Tsirkin
2014-08-14 7:19 ` Michael S. Tsirkin
2014-08-13 21:56 ` [Qemu-devel] [PATCH v3 27/32] ahci: Add test_pci_spec to ahci-test John Snow
2014-08-14 7:18 ` Michael S. Tsirkin
2014-08-14 16:03 ` Stefan Hajnoczi
2014-08-13 21:56 ` [Qemu-devel] [PATCH v3 28/32] ahci: add test_pci_enable " John Snow
2014-08-14 16:05 ` Stefan Hajnoczi
2014-08-13 21:56 ` [Qemu-devel] [PATCH v3 29/32] ahci: properly shadow the TFD register John Snow
2014-08-14 16:09 ` Stefan Hajnoczi
2014-08-14 16:13 ` John Snow
2014-08-14 17:09 ` Stefan Hajnoczi
2014-08-13 21:56 ` [Qemu-devel] [PATCH v3 30/32] ahci: Add test_hba_spec to ahci-test John Snow
2014-08-14 16:25 ` Stefan Hajnoczi
2014-08-13 21:56 ` [Qemu-devel] [PATCH v3 31/32] ahci: Add test_hba_enable " John Snow
2014-08-14 16:46 ` Stefan Hajnoczi
2014-08-13 21:56 ` [Qemu-devel] [PATCH v3 32/32] ahci: Add test_identify case " John Snow
2014-08-14 16:52 ` Stefan Hajnoczi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140814165205.GH24132@stefanha-thinkpad.redhat.com \
--to=stefanha@redhat.com \
--cc=armbru@redhat.com \
--cc=jsnow@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).