From: David Hildenbrand <david@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: Thomas Huth <thuth@redhat.com>, Cornelia Huck <cohuck@redhat.com>,
Riku Voipio <riku.voipio@iki.fi>,
qemu-s390x@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <rth@twiddle.net>
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 [thread overview]
Message-ID: <d3fad340-1ed1-fa9c-483f-7762b423d564@redhat.com> (raw)
In-Reply-To: <07f892a0-c8d8-9960-1536-082121cf2618@linaro.org>
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
next prev parent reply other threads:[~2019-08-28 20:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-28 11:10 [Qemu-devel] [PATCH v1 0/2] tcg: Introduce probe_access() and return a host pointer David Hildenbrand
2019-08-28 11:10 ` [Qemu-devel] [PATCH v1 1/2] tcg: Make probe_write() return a pointer to the host page David Hildenbrand
2019-08-28 14:44 ` Richard Henderson
2019-08-28 20:34 ` David Hildenbrand [this message]
2019-08-28 11:10 ` [Qemu-devel] [PATCH v1 2/2] tcg: Factor out probe_write() logic into probe_access() David Hildenbrand
2019-08-28 14:52 ` Richard Henderson
2019-08-28 20:30 ` David Hildenbrand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d3fad340-1ed1-fa9c-483f-7762b423d564@redhat.com \
--to=david@redhat.com \
--cc=cohuck@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=riku.voipio@iki.fi \
--cc=rth@twiddle.net \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).