qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 11/14] ioport: Switch dispatching to memory c


From: Hervé Poussineau
Subject: Re: [Qemu-devel] [PATCH v3 11/14] ioport: Switch dispatching to memory core layer
Date: Sat, 13 Jul 2013 20:11:25 +0200
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Anthony Liguori a écrit :
On Sat, Jul 13, 2013 at 9:38 AM, Paolo Bonzini <address@hidden> wrote:
Il 11/07/2013 14:46, Andreas Färber ha scritto:
sPAPR has its MemoryRegion marked Little Endian:

http://git.qemu.org/?p=qemu.git;a=blobdiff;f=hw/spapr_pci.c;h=a08ed11166595bdc493065beb64d4ce5b7b0dded;hp=c2c3079d21d5be2647faf85a8c608ac995d2ca62;hb=a3cfa18eb075c7ef78358ca1956fe7b01caa1724;hpb=286d52ebfc0d0d53c2a878e454292fea14bad41b

Possibly we can now apply Hervé's patches on top to remove that hack again?
I can post a pull request with Herve's patch, if we agree that it's the
right thing.

http://permalink.gmane.org/gmane.comp.emulators.qemu/221950

Here's what's happening:

1) MMIO request goes to sPAPR PIO area, the vCPU was in BE mode but by
the time the handler is called, the value is in host byte order.

2) sPAPR (incorrectly) byte swaps by marking the region as little
endian (data is now garbage)

3) The portio layer (incorrectly) byte swaps because it is marked as
little endian (data is now good)

4) Dispatch happens to VGA device which (incorrectly) byte swaps
because it is marked as little endian (data is now bad)

(2), (3), and (4) are all wrong.  By removing either (2) or (3) we can
"fix" the regression but that's just because two wrongs make a right
in this situation.

We should remove *all* of the LE markings from ISA devices, remove the
portio mark, and the sPAPR mark.  That's the right fix.

OK for that if that fixes sPAPR.

Hervé



reply via email to

[Prev in Thread] Current Thread [Next in Thread]