qemu-rust
[Top][All Lists]
Advanced

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

Re: [PATCH 10/10] rust: bindings for MemoryRegionOps


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 10/10] rust: bindings for MemoryRegionOps
Date: Mon, 10 Feb 2025 11:38:22 +0100
User-agent: Mozilla Thunderbird

On 6/2/25 11:19, Paolo Bonzini wrote:
On 2/6/25 11:02, Philippe Mathieu-Daudé wrote:
Could we always make .valid_sizes() explicit?

Yes (for example build() could even fail to compile if you don't have
impl_sizes/valid_sizes set), but why do you want that? I'm not even
sure that all cases of .valid.max_access_size=4 are correct...

Exactly for that :) Not have implicit default values, so correct
values are reviewed when models are added.

But I wouldn't bet that those that we have in C are reviewed and correct...  They are incorrect if the hardware accepts 8-byte writes, either discarding the top 4 bytes (then impl must both be 8) or writing to both registers (then impl must be 4).

Are you saying in general or for the pl011 model?

What I'm asking is to have all rust models explicit the min/max sizes,
regardless of whether the C implementations are correct or not. For
rust models, we won't rely on default and will have to check the
valid range in the specs.



reply via email to

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