From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kai Huang Subject: Re: [PATCH 05/10] VMX: add help functions to support PML Date: Fri, 10 Apr 2015 17:28:47 +0800 Message-ID: <552797CF.5050905@linux.intel.com> References: <1427423754-11841-1-git-send-email-kai.huang@linux.intel.com> <1427423754-11841-6-git-send-email-kai.huang@linux.intel.com> <20150409120033.GF17031@deinos.phlegethon.org> <5527764A.506@linux.intel.com> <20150410090304.GB12937@deinos.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150410090304.GB12937@deinos.phlegethon.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tim Deegan Cc: yang.z.zhang@intel.com, andrew.cooper3@citrix.com, kevin.tian@intel.com, jbeulich@suse.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 04/10/2015 05:03 PM, Tim Deegan wrote: > At 15:05 +0800 on 10 Apr (1428678346), Kai Huang wrote: >> >> On 04/09/2015 08:00 PM, Tim Deegan wrote: >>> Hi, >>> >>> That's also buggy, because there's no locking here to make sure >>> gfn->mfn->gfn ends up in the right place. :( >> Yes you are right. Thanks for pointing out. >> >> Just curious, looks if I use get_gfn_type_access and put_gfn here, the >> gfn->mfn->gfn can be guaranteed, and it's safe to use them here, right? > Yes, that would be the right way to do it. > > In this particular case, there's another race too: the gfn might have > been entirely deleted after it's logged by PML but before the entry is > processed here. I don't think that's a problem here, because if the > gfn's not mapped any more it's not relevant that it's dirty. Just > mentioning it out of interest. Agreed. I think the gone gfn should be irrelevant. Thanks. Thanks, -Kai > > Cheers, > > Tim.