From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Yu, Zhang" Subject: Re: [PATCH 3/3] tools: introduce parameter max_ranges. Date: Wed, 20 Jan 2016 19:13:53 +0800 Message-ID: <569F6BF1.6080605@linux.intel.com> References: <1453195678-25944-1-git-send-email-yu.c.zhang@linux.intel.com> <1453195678-25944-4-git-send-email-yu.c.zhang@linux.intel.com> <20160119115349.GV1691@citrix.com> <7a1e981ca15b491e878fb32287f5ea7a@AMSPEX02CL03.citrite.net> <20160119143725.GI1691@citrix.com> <968fc8fc8f824ee7903fe7c8cbb7b5c0@AMSPEX02CL03.citrite.net> <20160119150400.GK1691@citrix.com> <1453216725.29930.84.camel@citrix.com> <569F0008.1010201@linux.intel.com> <1453284978.26343.29.camel@citrix.com> <0a14c64daa72474daff7527adc3c90d0@AMSPEX02CL03.citrite.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <0a14c64daa72474daff7527adc3c90d0@AMSPEX02CL03.citrite.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Paul Durrant , Ian Campbell , Kevin Tian , Wei Liu Cc: "Keir (Xen.org)" , Andrew Cooper , "xen-devel@lists.xen.org" , Stefano Stabellini , "Lv, Zhiyuan" , "jbeulich@suse.com" List-Id: xen-devel@lists.xenproject.org On 1/20/2016 6:18 PM, Paul Durrant wrote: >> -----Original Message----- >> From: Ian Campbell [mailto:ian.campbell@citrix.com] >> Sent: 20 January 2016 10:16 >> To: Kevin Tian; Yu, Zhang; Wei Liu; Paul Durrant >> Cc: Keir (Xen.org); jbeulich@suse.com; Andrew Cooper; xen- >> devel@lists.xen.org; Lv, Zhiyuan; Stefano Stabellini >> Subject: Re: [Xen-devel] [PATCH 3/3] tools: introduce parameter >> max_ranges. >> >> On Wed, 2016-01-20 at 03:58 +0000, Tian, Kevin wrote: >>>> From: Yu, Zhang [mailto:yu.c.zhang@linux.intel.com] >>>> Sent: Wednesday, January 20, 2016 11:33 AM >>>>> As a feature this write-protection has nothing to be GPU >>>>> virtualization specific. >>>>> In the future the same mediated pass-through idea used in XenGT may >>>>> be >>>>> used on other I/O devices which need to shadow some structure w/ >>>>> requirement >>>>> to write-protect guest memory. So it's not good to tie this to either >>>>> XenGT >>>>> or GTT. >>>>> >>>> Thank you, Kevin. >>>> Well, if this parameter is not supposed to be xengt specific, we do not >>>> need to connect it with any xengt flag such as ."vgt=1" or "GVT-g=1". >>>> Hence the user will have to configure the max_wp_ram_ranges himself, >>>> right? >>>> >>> >>> Not always. The option can be configured manually by the user, or >>> automatically set in the code when "vgt=1" is recognized. >> >> Is the latter approach not always sufficient? IOW, if it can be done >> automatically, why would the user need to tweak it? >> > > I think latter is sufficient for now. We always have the option of adding a specific wp_ram_ranges parameter in future if there is a need Thank you all for your reply. Well, I believe the latter option is only sufficient for most usage models on BDW due to rangeset's ability to merge continuous pages into one range, but there might be some extreme cases, e.g. too many graphic related applications in one VM, which create a great deal of per-process graphic translation tables. And also, future cpu platforms might provide even more PPGGTs. So, I suggest we use this max_wp_ram_ranges, and give the control to the system administrator. Besides, like Kevin said, XenGT's mediated pass-thru idea can also be adopted to other devices, and this parameter may also help. Also, we have plans to upstream the tool-stack changes later this year. If this max_wp_ram_ranges is not convenient, we can introduce a method to automatically set its default value. B.R. Yu > > Paul > >> Ian.