From: "Yu, Zhang" <yu.c.zhang@linux.intel.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: kevin.tian@intel.com, wei.liu2@citrix.com,
ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com,
andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com,
xen-devel@lists.xen.org, Paul.Durrant@citrix.com,
zhiyuan.lv@intel.com, keir@xen.org
Subject: Re: [PATCH v2 3/3] tools: introduce parameter max_wp_ram_ranges.
Date: Wed, 27 Jan 2016 23:23:59 +0800 [thread overview]
Message-ID: <56A8E10F.2080305@linux.intel.com> (raw)
In-Reply-To: <56A8EC6B02000078000CBA30@prv-mh.provo.novell.com>
On 1/27/2016 11:12 PM, Jan Beulich wrote:
>>>> On 27.01.16 at 15:56, <yu.c.zhang@linux.intel.com> wrote:
>> On 1/27/2016 10:32 PM, Jan Beulich wrote:
>>>>>> On 27.01.16 at 15:13, <yu.c.zhang@linux.intel.com> wrote:
>>>> About the truncation issue:
>>>> I do not quite follow. Will this hurt if the value configured does
>>>> not exceed 4G? What about a type cast?
>>>
>>> A typecast would not alter behavior in any way. And of course
>>> a problem only arises if the value was above 4 billion. You either
>>> need to refuse such values while the attempt is made to set it.
>>> or you need to deal with the full range of possible values. Likely
>>> the former is the better (and I wonder whether the upper
>>> bound shouldn't be forced even lower than 4 billion).
>>
>> Oh, I see. A check with the upper bound sounds better. Using 4G as the
>> upper bound is a little conservative, but I do not have any better
>> criteria right now. :)
>
> But when making that decision keep security in mind: How much
> memory would it take to populate 4G rangeset nodes?
>
Well, for XenGT, one extreme case I can imagine would be half of all
the guest ram is used as the GPU page table, and page frames containing
these page tables are discontinuous (rangeset can combine continuous
ranges). For other virtual devices to leverage the write-protected gfn
rangeset, I believe the same idea applies. :)
Is this logic OK?
Thanks
Yu
next prev parent reply other threads:[~2016-01-27 15:23 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-22 3:20 [PATCH v11 0/3] Refactor ioreq server for better performance Yu Zhang
2016-01-22 3:20 ` [PATCH v11 1/3] Refactor rangeset structure " Yu Zhang
2016-01-22 3:20 ` [PATCH v11 2/3] Differentiate IO/mem resources tracked by ioreq server Yu Zhang
2016-01-22 11:43 ` Jan Beulich
2016-01-26 7:59 ` Yu, Zhang
2016-01-26 11:24 ` Jan Beulich
2016-01-27 7:02 ` Yu, Zhang
2016-01-27 10:28 ` Jan Beulich
2016-01-22 3:20 ` [PATCH v2 3/3] tools: introduce parameter max_wp_ram_ranges Yu Zhang
2016-01-22 8:01 ` Jan Beulich
2016-01-26 7:32 ` Yu, Zhang
2016-01-26 11:00 ` Jan Beulich
2016-01-27 7:01 ` Yu, Zhang
2016-01-27 10:27 ` Jan Beulich
2016-01-27 14:13 ` Yu, Zhang
2016-01-27 14:32 ` Jan Beulich
2016-01-27 14:56 ` Yu, Zhang
2016-01-27 15:12 ` Jan Beulich
2016-01-27 15:23 ` Yu, Zhang [this message]
2016-01-27 15:58 ` Jan Beulich
2016-01-27 16:12 ` Yu, Zhang
2016-01-26 11:16 ` David Vrabel
2016-01-27 7:03 ` Yu, Zhang
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=56A8E10F.2080305@linux.intel.com \
--to=yu.c.zhang@linux.intel.com \
--cc=JBeulich@suse.com \
--cc=Paul.Durrant@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=keir@xen.org \
--cc=kevin.tian@intel.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
--cc=zhiyuan.lv@intel.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 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.