* [Qemu-devel] [PATCH] ioport: remove LITTLE_ENDIAN mark for portio
@ 2013-07-12 20:30 Anthony Liguori
2013-07-12 20:34 ` Alexander Graf
2013-07-18 19:36 ` Anthony Liguori
0 siblings, 2 replies; 3+ messages in thread
From: Anthony Liguori @ 2013-07-12 20:30 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, Hervé Poussineau, Alex Graf
Setting it to LE forces a byte swap when host != guest endian but
this makes no sense at all.
Herve made the suggestion upon observing that word writes/reads
were broken into byte writes/reads in such a way as to assume
devices are interpret registers as LE.
However, even if this were a problem, marking the region as LE is
not useful because what's essentially happening here is that LE is
open coded. So by marking it LE in MemoryRegionOps, we're doing a
superflous swap.
Now, the portio code is suspicious to begin with. The dispatch
layer really has no purpose in splitting I/O requests in the first
place...
Cc: Hervé Poussineau <hpoussin@reactos.org>
Cc: Alex Graf <agraf@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
ioport.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/ioport.c b/ioport.c
index 79b7f1a..89b17d6 100644
--- a/ioport.c
+++ b/ioport.c
@@ -183,7 +183,6 @@ static void portio_write(void *opaque, hwaddr addr, uint64_t data,
static const MemoryRegionOps portio_ops = {
.read = portio_read,
.write = portio_write,
- .endianness = DEVICE_LITTLE_ENDIAN,
.valid.unaligned = true,
.impl.unaligned = true,
};
--
1.8.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] ioport: remove LITTLE_ENDIAN mark for portio
2013-07-12 20:30 [Qemu-devel] [PATCH] ioport: remove LITTLE_ENDIAN mark for portio Anthony Liguori
@ 2013-07-12 20:34 ` Alexander Graf
2013-07-18 19:36 ` Anthony Liguori
1 sibling, 0 replies; 3+ messages in thread
From: Alexander Graf @ 2013-07-12 20:34 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Hervé Poussineau, qemu-devel
On 12.07.2013, at 22:30, Anthony Liguori wrote:
> Setting it to LE forces a byte swap when host != guest endian but
> this makes no sense at all.
>
> Herve made the suggestion upon observing that word writes/reads
> were broken into byte writes/reads in such a way as to assume
> devices are interpret registers as LE.
>
> However, even if this were a problem, marking the region as LE is
> not useful because what's essentially happening here is that LE is
> open coded. So by marking it LE in MemoryRegionOps, we're doing a
> superflous swap.
>
> Now, the portio code is suspicious to begin with. The dispatch
> layer really has no purpose in splitting I/O requests in the first
> place...
>
> Cc: Hervé Poussineau <hpoussin@reactos.org>
> Cc: Alex Graf <agraf@suse.de>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Acked-by: Alexander Graf <agraf@suse.de>
Let's take a look at the PReP breakage with a test case after we fixed everyone else again.
Alex
> ---
> ioport.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/ioport.c b/ioport.c
> index 79b7f1a..89b17d6 100644
> --- a/ioport.c
> +++ b/ioport.c
> @@ -183,7 +183,6 @@ static void portio_write(void *opaque, hwaddr addr, uint64_t data,
> static const MemoryRegionOps portio_ops = {
> .read = portio_read,
> .write = portio_write,
> - .endianness = DEVICE_LITTLE_ENDIAN,
> .valid.unaligned = true,
> .impl.unaligned = true,
> };
> --
> 1.8.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] ioport: remove LITTLE_ENDIAN mark for portio
2013-07-12 20:30 [Qemu-devel] [PATCH] ioport: remove LITTLE_ENDIAN mark for portio Anthony Liguori
2013-07-12 20:34 ` Alexander Graf
@ 2013-07-18 19:36 ` Anthony Liguori
1 sibling, 0 replies; 3+ messages in thread
From: Anthony Liguori @ 2013-07-18 19:36 UTC (permalink / raw)
To: Anthony Liguori, qemu-devel; +Cc: None, Alex Graf
Applied. Thanks.
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-18 19:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-12 20:30 [Qemu-devel] [PATCH] ioport: remove LITTLE_ENDIAN mark for portio Anthony Liguori
2013-07-12 20:34 ` Alexander Graf
2013-07-18 19:36 ` Anthony Liguori
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).