From: "Jan Beulich" Subject: Linux: removal of contiguous_bitmap broke kexec Date: Tue, 25 Nov 2008 11:04:54 +0000 Message-ID: <492BE9E6.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Since kexec uses xen_destroy_contiguous_region() on memory it is about to free, but passed this through xen_limit_pages_to_max_mfn() only, the contiguous_bitmap check in the old code prevented any action to be taken on such regions. This could therefore be fixed in at least three different ways: 1) Since the call to xen_destroy_contiguous_region() really was pointless before, we could just eliminate that from kernel/kexec.c. 2) xen_destroy_contiguous_region() could check the region it is passed and bail out if it turns out not to be contiguous. 3) We could track which regions were actually acted upon by xen_limit_pages_to_max_mfn() (through PageForeign logic) and attempt to undo the limitation in the destructor (and at once again eliminate the [mismatched] call to xen_destroy_contiguous_region()). Since this case is not performance critical, there shouldn't be an issue with not batching these. And a check of the kexec code indicates it doesn't use the index member of struct page. Opinions appreciated. Thanks, Jan