From: Ian Campbell Subject: Re: [RFC] Extending numbers of event channels Date: Tue, 4 Dec 2012 09:30:50 +0000 Message-ID: <1354613450.2693.53.camel@zakaz.uk.xensource.com> References: <1354552154.18784.9.camel@iceland> <50BCF0F502000078000AD53F@nat28.tlf.novell.com> <1354557148.18784.21.camel@iceland> <50BCF6D502000078000AD6AB@nat28.tlf.novell.com> <1354558168.18784.26.camel@iceland> <50BDBCCB02000078000AD8D8@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <50BDBCCB02000078000AD8D8@nat28.tlf.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 Cc: Wei Liu , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Tue, 2012-12-04 at 08:05 +0000, Jan Beulich wrote: > >>> On 03.12.12 at 19:09, Wei Liu wrote: > > On Mon, 2012-12-03 at 18:00 +0000, Jan Beulich wrote: > >> >>> On 03.12.12 at 18:52, Wei Liu wrote: > >> > On Mon, 2012-12-03 at 17:35 +0000, Jan Beulich wrote: > >> >> Doesn't the guest also need to set up space for the 2nd level? > >> >> > >> > > >> > Yes. That will be embedded in percpu struct vcpu_info, which will be > >> > also register via the same hypercall op. > >> > >> "struct vcpu_info"? Same hypercall? Or are you mixing up types? > >> > > > > What I meant was the second level will be embedded in struct vcpu_info, > > and the 2nd level will be registered via some hypercall (not the struct > > vcpu_info). > > I would strongly recommend against embedding in > struct vcpu_info, particularly in the context of intending to > allow for having further levels in the future. > > Plus I don't think you really can embed this - there's just not > enough space left (I'm sure you're aware that you can't > extend the structure in size), in fact there's no space left at > all in the architecture independent part of the structure. > > The only option you have is to declare the array you need to > add to immediately follow the structure when having used > the placement hypercall. That would probably be acceptable > for the second from the top level, but you'd again run into > (space) issues when wanting more than 3 levels (as you > validly said, all but the leaf level ought to be per-vCPU). The amount of space needed for levels 1..N-1 ought to be pretty formulaic for any N, so we could choose to require that enough space be available after vcpu_info for levels 1..N-1? With larger N that might become multiple pages, is that a problem? It might be preferable to have an explicit call which takes potentially non-contiguous addresses. Ian.