From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH 2/4] sysctl/libxl: Add interface for returning IO topology data Date: Mon, 8 Dec 2014 15:30:03 +0000 Message-ID: <5485C3FB.2030402@citrix.com> References: <1417556050-23364-1-git-send-email-boris.ostrovsky@oracle.com> <1417556050-23364-3-git-send-email-boris.ostrovsky@oracle.com> <5481E39B020000780004D450@mail.emea.novell.com> <5481E564020000780004D47B@mail.emea.novell.com> <5481E6FC.1070905@oracle.com> <54857061020000780004D999@mail.emea.novell.com> <5485BC13.3030403@oracle.com> <5485CF74020000780004DD52@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5485CF74020000780004DD52@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , Boris Ostrovsky Cc: wei.liu2@citrix.com, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, dario.faggioli@citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, ufimtseva@gmail.com, keir@xen.org List-Id: xen-devel@lists.xenproject.org On 08/12/14 15:19, Jan Beulich wrote: >>>> On 08.12.14 at 15:56, wrote: >>>>> Additionally please add IN and OUT annotations. When I first saw >>>>> this I assumed they would all be OUT (in which case the long running >>>>> loop problem mentioned in the reply to one of the other patches >>>>> wouldn't have been there), matching their CPU counterpart... >>>> I don't follow this. Are you saying that if ti->max_devs in patch 3/4 is >>>> an IN (which it is) then we don't have to guard for long-running loops? >>> If they were all OUT then there wouldn't be a way for the entire >>> operation to be fooled into going over more devices than there are >>> in the system. >> Assuming I add continuations to the loop, too many devices wouldn't be a >> problem for the hypervisor, would it? If an unreasonable number is >> provided then eventually copy_from_guest() will fault. > Continuations would address the concern, but it doesn't seem like > their use is really warranted here. It depends. I have one server I have to hand looks like: [root@mpx1 ~]# lspci | wc -l 1759 (And I believe this one isn't fully populated with devices.) A continuation is possibly warranted in a case like this, particularly if an HVM domain is making this hypercall. ~Andrew