From: Tim Deegan Subject: Re: [PATCH] Provide support for multiple frame buffers in Xen Date: Thu, 10 Jan 2013 12:29:01 +0000 Message-ID: <20130110122901.GB99373@ocelot.phlegethon.org> References: <1357138062-9032-1-git-send-email-robert.phillips@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1357138062-9032-1-git-send-email-robert.phillips@citrix.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: Robert Phillips Cc: Jan Beulich , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Hi, I was really hoping to commit this today, but unfortunately, I've spotted two things: 1. There are a few uses of *_to_virt() to get persistent mappings of arbitrary addresses (PTEs, and pages of linked-list entries). That's presumably going to interact badly with Jan's work to support very large machines, which will reintroduce [un]map_domain_page() for 64-bit x86. I wouldn't hold this patch back just for that, specially since the code it replaces already uses maddr_to_virt(), but since it needs a respin for the other thing I'd like Jan's opinion. 2. This code still allocates user-controlled amounts of stack memory: > + { > + int size = (nr + BITS_PER_LONG - 1) / BITS_PER_LONG; > + unsigned long dirty_bitmap[size]; > + > + memset(dirty_bitmap, 0x00, size * BYTES_PER_LONG); > + > + flush_tlb |= shadow_scan_dirty_flags(d, range, (uint8_t*)dirty_bitmap); > + > + rc = -EFAULT; > + if ( copy_to_guest(guest_dirty_bitmap, > + (uint8_t*)dirty_bitmap, > + size * BYTES_PER_LONG) == 0 ) > + rc = 0; > + } Cheers, Tim.