qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v1 1/2] tcg: Make probe_write() return a pointer


From: David Hildenbrand
Subject: Re: [Qemu-devel] [PATCH v1 1/2] tcg: Make probe_write() return a pointer to the host page
Date: Wed, 28 Aug 2019 22:34:46 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

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

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