qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: Avi Kivity <avi@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	qemu-devel@nongnu.org,
	Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/6] qtest: add test framework
Date: Mon, 16 Jan 2012 11:20:16 -0600	[thread overview]
Message-ID: <4F145C50.6040607@us.ibm.com> (raw)
In-Reply-To: <4F1459A4.2030502@redhat.com>

On 01/16/2012 11:08 AM, Avi Kivity wrote:
> On 01/16/2012 06:59 PM, Stefan Hajnoczi wrote:
>>> +        }
>>> +        qtest_send_prefix(chr);
>>> +        qtest_send(chr, "OK 0x%04x\n", value);
>>
>> Endianness is a little weird here.  memory.c will byteswap if target
>> and device endianness differ.
>>
>> Imagine the case where we're on an x86 host, running a ppc guest,
>> reading from PCI configuration space (little-endian).  Since ppc
>> (target endian) is big-endian and the device is little-endian the
>> value read/written will be byteswapped.  However, our qtest runs on
>> the host and therefore we don't want that automatic swap (or we need
>> to neutralize it by performing another byteswap on top).
>>
>
> Good catch.  This is another example of how an access depends not only
> on the destination, but also on the source.  Here the source is not the
> cpu; it's qtest.

target-ppc never calls cpu_out.  It's prep_pci.c that calls it based on an MMIO 
operation and that's where the endianess conversion happens.

You wouldn't use outw() in a qtest harness when talking to a PCI device over PPC.

What we really want is to be able to send I/O directly to MemoryRegions but 
that's a bit different than what qtest is.

Regards,

Anthony Liguori

>

  reply	other threads:[~2012-01-16 20:57 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-13 18:32 [Qemu-devel] [PATCH 1/6] qtest: add test framework Anthony Liguori
2012-01-13 18:32 ` [Qemu-devel] [PATCH 2/6] qtest: add support for -M pc Anthony Liguori
2012-01-13 18:32 ` [Qemu-devel] [PATCH 3/6] qtest: add C version of test infrastructure Anthony Liguori
2012-01-17 11:33   ` Stefan Hajnoczi
2012-01-17 13:33     ` Paolo Bonzini
2012-01-17 13:39       ` Stefan Hajnoczi
2012-01-17 16:09   ` Paolo Bonzini
2012-01-18 16:00   ` Kevin Wolf
2012-01-18 16:02     ` Paolo Bonzini
2012-01-18 16:08     ` Anthony Liguori
2012-01-13 18:32 ` [Qemu-devel] [PATCH 4/6] make: add check targets based on gtester Anthony Liguori
2012-01-16 17:16   ` Paolo Bonzini
2012-01-16 18:14     ` Anthony Liguori
2012-01-17 10:42       ` Paolo Bonzini
2012-01-17 14:04   ` Paolo Bonzini
2012-01-17 14:22     ` Anthony Liguori
2012-01-13 18:32 ` [Qemu-devel] [PATCH 5/6] rtc: split out macros into a header file and use in test case Anthony Liguori
2012-01-13 18:32 ` [Qemu-devel] [PATCH 6/6] qtest: add rtc-test test-case Anthony Liguori
2012-01-16 16:59 ` [Qemu-devel] [PATCH 1/6] qtest: add test framework Stefan Hajnoczi
2012-01-16 17:08   ` Avi Kivity
2012-01-16 17:20     ` Anthony Liguori [this message]
2012-01-16 17:08   ` Anthony Liguori
2012-01-17 11:13     ` Stefan Hajnoczi
2012-01-18  9:05       ` Stefan Hajnoczi
  -- strict thread matches above, loose matches on Subject: below --
2012-01-17 17:22 Michael Walle

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=4F145C50.6040607@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=stefanha@linux.vnet.ibm.com \
    /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).