From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: VMX status report. Xen:26323 & Dom0:3.7.1 Date: Mon, 14 Jan 2013 16:15:46 +0000 Message-ID: <50F42F32.9030003@citrix.com> References: <1B4B44D9196EFF41AE41FDA404FC0A1024486E@SHSMSX101.ccr.corp.intel.com> <50EE908602000078000B44CE@nat28.tlf.novell.com> <50EFDC8802000078000B4AC2@nat28.tlf.novell.com> <750FD2DB-E7A5-4038-9274-2CBAF2B4027C@gridcentric.ca> <50F40F42.5020807@citrix.com> <65B8802C-FE47-43CB-87EF-B168F57FF6DA@gmail.com> <50F42C6A.2080702@citrix.com> <50F43CFF02000078000B577F@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <50F43CFF02000078000B577F@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: Yongjie Ren , Ian Campbell , Konrad Wilk , Mats Petersson , xen-devel , Chao Zhou , Andres Lagar-Cavilla , Yan Dai , YongweiX Xu , Andres Lagar-Cavilla , SongtaoX Liu , AndresLagar-Cavilla List-Id: xen-devel@lists.xenproject.org On 14/01/13 16:14, Jan Beulich wrote: >>>> On 14.01.13 at 17:03, David Vrabel wrote: >> On 14/01/13 15:06, Andres Lagar-Cavilla wrote: >>> @@ -288,7 +289,19 @@ static int mmap_batch_fn(void *data, void *state) >>> &cur_page); >>> >>> /* Store error code for second pass. */ >>> - *(st->err++) = ret; >>> + if (st->version == 1) { >>> + if (ret < 0) { >>> + /* >>> + * V1 encodes the error codes in the 32bit top nibble of the >>> + * mfn (with its known limitations vis-a-vis 64 bit callers). >>> + */ >>> + *mfnp |= (ret == -ENOENT) ? >>> + PRIVCMD_MMAPBATCH_PAGED_ERROR : >>> + PRIVCMD_MMAPBATCH_MFN_ERROR; >> >> You also need to clear the top nibble on success (ret >= 0) so large >> PFNs with the top nibble already set don't give false positives of errors. > > Not really - that's what v2 was added for (the caller, unless > keeping a second array with the original MFNs, wouldn't be able > to match things up in that case). Ok, I can agree with that. David