On 28.08.19 16:44, Richard Henderson wrote:
> On 8/28/19 4:10 AM, David Hildenbrand wrote:
>> + * If the access is permitted, returns the host address similar to
>> + * tlb_vaddr_to_host(). Returns NULL in case direct access to the host page
>> + * is not allowed or if the size is 0.
> 
> Maybe we can find some better language -- "not allowed" sounds like a
> permissions check, and we longjmp out on permission check failures.
> 
> Perhaps "if the page requires i/o access"?
Yeah, and NOTDIRTY, emulated via i/o access. I will rephrase.

> 
> Why are you returning NULL for size 0?  Just because the caller hasn't
> committed to a size and thus we haven't checked watchpoints?

Yes, I think it's the right thing to do. Watchpoints are one part of the
story, the other part is TLB_RECHECK (a.k.a. TLB_INVALID_MASK or
"subpage protection"). Allowing access could lead to hidden BUGs.

I consider somebody wanting to get access to a host page with an access
size of zero an interface violation.

-- 

Thanks,

David / dhildenb

Reply via email to