From: "Jan Beulich" Subject: Re: [v6][PATCH 2/2] xen:vtd: missing RMRR mapping while share EPT Date: Tue, 30 Sep 2014 08:09:21 +0100 Message-ID: <542A7341020000780003AD7D@mail.emea.novell.com> References: <541FB087.4080008@intel.com> <541FB7C3.9080608@intel.com> <541FFFC50200007800036C28@mail.emea.novell.com> <541FE65A.8070803@intel.com> <542017E80200007800036D1E@mail.emea.novell.com> <5420D357.1060202@intel.com> <5422A08C020000780003814F@mail.emea.novell.com> <5423E98E0200007800038C27@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Yang Z Zhang Cc: Tiejun Chen , Kevin Tian , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org >>> On 30.09.14 at 05:51, wrote: > Jan Beulich wrote on 2014-09-25: >>>>> On 25.09.14 at 03:53, wrote: >>> Jan Beulich wrote on 2014-09-24: >>>>>>> On 24.09.14 at 10:23, wrote: >>>>> 1. RMRR region isn't reserved in guest e820 table and guest is >>>>> able to touch it. >>>>> >>>>> Possible solution: set RMRR region as reserved in guest e820 >>>>> table and create identity map in EPT and VT-d page table. >>>> >>>> And relocate guest RAM accordingly. >>> >>> ok. Let's look into more detail: >>> 1. Whether there has device assigned or not, the RMRR mapping must >>> be created when building e820 table if the VT-d is enabled. > > My original propose should be wrong: if there is no device attached when > creating guest, we should not create the identity map in guest. But I don't > know how to setup the EPT mapping for RMRR region in this case. Any idea? Of course these mappings shouldn't be created blindly. There simply shouldn't be mapped anything in these wholes, so that the identity mappings can be put there if needed. That's why we need tool stack awareness of these regions after all. Jan