All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] MemoryRegionOps' {min,max}_access_size fields
@ 2015-03-27 16:21 Jan Beulich
  2015-03-30  9:49 ` Paolo Bonzini
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2015-03-27 16:21 UTC (permalink / raw)
  To: qemu-devel

Hello,

I'm trying to understand what the idea behind these is. For one,
without .valid.accepts set I can't see the two respective .valid
fields take effect at all. Yet all examples I looked at don't set
.valid.accepts. What's the deal here?

And then the way access_with_adjusted_size() works, it looks to
me as if with .impl.min_access_size set to greater than 1
unaligned accesses could still reach the actual read or write
handler, as only the access size would get bumped, but no
adjustment be made to the address.

Thanks for any insight,
Jan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] MemoryRegionOps' {min,max}_access_size fields
  2015-03-27 16:21 [Qemu-devel] MemoryRegionOps' {min,max}_access_size fields Jan Beulich
@ 2015-03-30  9:49 ` Paolo Bonzini
  2015-04-13  8:47   ` Jan Beulich
  0 siblings, 1 reply; 3+ messages in thread
From: Paolo Bonzini @ 2015-03-30  9:49 UTC (permalink / raw)
  To: Jan Beulich, qemu-devel



On 27/03/2015 17:21, Jan Beulich wrote:
> Hello,
> 
> I'm trying to understand what the idea behind these is. For one,
> without .valid.accepts set I can't see the two respective .valid
> fields take effect at all. Yet all examples I looked at don't set
> .valid.accepts. What's the deal here?

The examples you see of .valid.min_access_size/max_access_size could
indeed be removed.  Most of the time, whether an access is valid ==
whether the access is naturally aligned.

.valid.min_access_size/.valid.max_access_size is really the access size
expected by .valid.accepts.

> And then the way access_with_adjusted_size() works, it looks to
> me as if with .impl.min_access_size set to greater than 1
> unaligned accesses could still reach the actual read or write
> handler, as only the access size would get bumped, but no
> adjustment be made to the address.

I don't understand what you mean exactly.  Do you have an example?

Paolo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] MemoryRegionOps' {min,max}_access_size fields
  2015-03-30  9:49 ` Paolo Bonzini
@ 2015-04-13  8:47   ` Jan Beulich
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Beulich @ 2015-04-13  8:47 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

>>> On 30.03.15 at 11:49, <pbonzini@redhat.com> wrote:
> On 27/03/2015 17:21, Jan Beulich wrote:
>> And then the way access_with_adjusted_size() works, it looks to
>> me as if with .impl.min_access_size set to greater than 1
>> unaligned accesses could still reach the actual read or write
>> handler, as only the access size would get bumped, but no
>> adjustment be made to the address.
> 
> I don't understand what you mean exactly.  Do you have an example?

access_size_min = 4 together with size = 1 yield access_size = 4,
but for a not 4-byte-aligned address (which still is properly aligned
for the original 1-byte access) access() will be called with a mis-
aligned address/size pair.

Jan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-13  9:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-27 16:21 [Qemu-devel] MemoryRegionOps' {min,max}_access_size fields Jan Beulich
2015-03-30  9:49 ` Paolo Bonzini
2015-04-13  8:47   ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.