From: Ian Jackson Subject: Re: [PATCH V3] X86/vMCE: handle broken page with regard to migration Date: Fri, 16 Nov 2012 18:19:00 +0000 Message-ID: <20646.33684.410414.579210@mariner.uk.xensource.com> References: <446f6b9bfc89137e1aa0.1353117881@ljsromley.bj.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <446f6b9bfc89137e1aa0.1353117881@ljsromley.bj.intel.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: Liu Jinsong Cc: George Dunlap , "xen-devel@lists.xensource.com" , Ian Campbell , "JBeulich@suse.com" List-Id: xen-devel@lists.xenproject.org Liu Jinsong writes ("[PATCH V3] X86/vMCE: handle broken page with regard to migration"): > This is V3 patch, adding handle for vMCE occur at last iteration of migration: I think you should take off my ack, having added significant new code in the tools section. About that code: > + /* > + * if vMCE occur at last iter, do one more iter so that it get > + * chance to transfer broken page's pfn_type and pfn number to > + * target and then take appropriate action > + */ > + if ( last_iter ) > + { > + for ( j = 0; j < batch; j++ ) > + { > + if ( hvm ) > + pfn_type[j] = pfn_batch[j]; > + else > + pfn_type[j] = pfn_to_mfn(pfn_batch[j]); > + } > + > + if ( xc_get_pfn_type_batch(xch, dom, batch, pfn_type) ) > + { > + PERROR("get_pfn_type_batch failed"); > + goto out; > + } > + > + broken_page_num2 = 0; > + for ( j = 0; j < batch; j++ ) > + if ( pfn_type[j] == XEN_DOMCTL_PFINFO_BROKEN ) > + broken_page_num2++; > + > + if ( broken_page_num1 < broken_page_num2 ) > + last_iter = 0; > + } Is this really the best way of doing this ? Isn't there some single flag the hypervisor sets somewhere ? Ian.