qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2] hw/misc/bcm2835_thermal: Fix access size handling in bcm2


From: Peter Maydell
Subject: Re: [PATCH v2] hw/misc/bcm2835_thermal: Fix access size handling in bcm2835_thermal_ops
Date: Tue, 2 Jul 2024 17:10:17 +0100

On Tue, 2 Jul 2024 at 16:50, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> Personally I consider accepting access of
>
>    .valid.min_access_size > .impl.min_access_size
>
> as a bug in the memory core layer, whether being
> unaligned or not.

Mmm. You could make an argument for
  .valid: min_access_size = 4, unaligned = true
  .impl.min_access_size = 1, unaligned = false

meaning "accesses must be 32 bits, and if the guest
makes an unaligned 32 bit access then you can
synthesize it with 4 byte reads/writes", I guess.
But whether we (a) get that right (b) use it anywhere
(c) use it anywhere intentionally is not something
I'd be very confident in asserting :-)

I definitely think that our "synthesize accesses
where valid and impl mismatch" code could use a
going-over, so we either get it right or assert if
the MemoryRegionOps ask for something we don't handle.
Maybe someday...

thanks
-- PMM



reply via email to

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