From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chen, Tiejun" Subject: Re: [v5][PATCH 1/2] xen:x86:mm:p2m: introduce set_identity_p2m_entry Date: Tue, 29 Jul 2014 18:18:11 +0800 Message-ID: <53D774E3.1080008@intel.com> References: <1406616052-11973-1-git-send-email-tiejun.chen@intel.com> <53D763C5020000780002719D@mail.emea.novell.com> <53D74EDC.4010100@intel.com> <53D7754302000078000272AB@mail.emea.novell.com> <53D76555.5000601@intel.com> <53D78B1D0200007800027393@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53D78B1D0200007800027393@mail.emea.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: yang.z.zhang@intel.com, kevin.tian@intel.com, tim@xen.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 2014/7/29 17:53, Jan Beulich wrote: >>>> On 29.07.14 at 11:11, wrote: >> On 2014/7/29 16:19, Jan Beulich wrote: >>> ? Of course it may still be necessary to also inspect the obtained p2mt >>> and a. >>> >> >> Are you saying this? >> >> if ( !p2m_is_valid(p2mt) || >> !mfn_valid(mfn) || >> (a != p2m_access_rw) ) > > I'm afraid that's not enough context to know whether what you > mean to do is sufficient. Plus !p2m_is_valid() is too weak. You > simply need to properly think through what should happen if you > find a valid mapping, but any of the tuple (mfn, p2mt, a) don't > match what you intend to be there. > Actually as I understand we can create these mapping only in one case of !mfn_valid(mfn). For others scenarios we just return with that warning message no matter what that tuple is explicitly. So here I try to understand why you're saying we need check more by show this condition combination. Thanks Tiejun