qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] hw/acpi: Set memory regions to native endian as a work aroun


From: BALATON Zoltan
Subject: Re: [PATCH] hw/acpi: Set memory regions to native endian as a work around
Date: Tue, 21 Feb 2023 00:25:45 +0100 (CET)

On Mon, 20 Feb 2023, Michael S. Tsirkin wrote:
On Mon, Feb 20, 2023 at 07:24:59PM +0100, BALATON Zoltan wrote:
On Tue, 22 Feb 2022, Michael S. Tsirkin wrote:
On Wed, Jan 19, 2022 at 04:19:14AM -0500, Michael S. Tsirkin wrote:
On Sat, Nov 13, 2021 at 07:47:20PM +0100, BALATON Zoltan wrote:
On Mon, 8 Nov 2021, BALATON Zoltan wrote:
On Mon, 8 Nov 2021, Paolo Bonzini wrote:
On 11/8/21 15:30, Paolo Bonzini wrote:
On 11/8/21 14:05, BALATON Zoltan wrote:
When using ACPI on big endian machine (such as ppc/pegasos2 which has
a VT8231 south bridge with ACPI) writes to ACPI registers come out
byte swapped. This may be caused by a bug in memory subsystem but
until that is fixed setting the ACPI memory regions to native endian
makes it usable for big endian machines. This fixes ACPI shutdown with
pegasos2 when using the board firmware for now.
This could be reverted when the memory layer is fixed.

What is the path to the swapped writes?  Even just a backtrace
might be enough to understand what's going on, and especially
where the bug is.

Ok, Michael pointed me at 
https://lore.kernel.org/all/20211011080528-mutt-send-email-mst@kernel.org/.

Ping? I haven't seen an alternative fix yet. If you don't have time now this
could be postponed to next version with the native endian work around for
now.

Regards,
BALATON Zoltan

Paolo, ping?

ping

Can this be fixed please or my proposed workaround taken until it will be?
Original patch I've sent is here:
http://patchew.org/QEMU/20211108130934.59B48748F52@zero.eik.bme.hu/

I hope to make pegasos2 more usable in next release so maybe more people
will want to use it soon.

Regards,
BALATON Zoltan

Any chance of fixing it in memory core? No one else seems to care.


I think fundamentally you need to check for the condition
Size < mr->ops->impl.min_access_size in memory_region_dispatch_write
and then make a read, combine the result with
the value and make a write.

I neither know that part nor feel confident enough breaking such low level stuff so I think setting the affected regions NATIVE_ENDIAN for now until somebody takes care of this is safer and not likely to break anyting (or if it does, much less widely and I'm more likely to be able to fix that than your proposed changes). So I'd rather let you do that but I'd like this fixed one way or another at last.

Regards,
BALATON Zoltan

reply via email to

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