From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergej Proskurin Subject: Re: [RFC PATCH 4/4] arm/mem_access: Add software guest-page-table walk Date: Tue, 9 May 2017 09:17:13 +0200 Message-ID: References: <20170430194838.29932-1-proskurin@sec.in.tum.de> <20170430194838.29932-5-proskurin@sec.in.tum.de> <37891402-d135-5821-c3a8-07f6bc6138b3@arm.com> <6ef56938-b087-6027-6d0e-8bd64aacd485@arm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4405420355872650456==" Return-path: Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7zOc-0005rU-3O for xen-devel@lists.xenproject.org; Tue, 09 May 2017 07:17:22 +0000 In-Reply-To: Content-Language: en-US List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Tamas K Lengyel , Julien Grall Cc: Xen-devel , Stefano Stabellini , Razvan Cojocaru List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --===============4405420355872650456== Content-Type: multipart/alternative; boundary="------------908EB8CC6827F215E20A7A6B" Content-Language: en-US This is a multi-part message in MIME format. --------------908EB8CC6827F215E20A7A6B Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, >> What you currently do is try gva_to_ipa and if it does not work >> you= will call p2m_gva_to_ipa. This sounds a bit pointless to me and >> waste of time if the underlying memory of stage-1 page table is >> protected. > > But we don't know that the stage-1 page table is protected until the > hardware based lookup fails. I can turn your argument around and say > doing the software based lookup is pointless and a waste of time > when the stage-1 table is not protected. Which is by the way what I > would expect to see in most cases. I agree with Tamas: I also believe that in most cases the stage-1 translation table won't be protected. So, in my opinion, falling back to software (which will be presumablly a rare operation) is the better approach. Cheers, ~Sergej --------------908EB8CC6827F215E20A7A6B Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit Hi,

>> What you currently do is try gva_to_ipa and if it does not work >> you will call p2m_gva_to_ipa. This sounds a bit pointless to me and >> waste of time if the underlying memory of stage-1 page table is >> protected. > > But we don't know that the stage-1 page table is protected until the > hardware based lookup fails. I can turn your argument around and say > doing the software based lookup is pointless and a waste of time > when the stage-1 table is not protected. Which is by the way what I > would expect to see in most cases.

I agree with Tamas: I also believe that in most cases the stage-1 translation table won't be protected. So, in my opinion, falling back to software (which will be presumablly a rare operation) is the better approach.

Cheers,
~Sergej

--------------908EB8CC6827F215E20A7A6B-- --===============4405420355872650456== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============4405420355872650456==--