From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chen, Tiejun" Subject: Re: [v7][RFC][PATCH 06/13] hvmloader/ram: check if guest memory is out of reserved device memory maps Date: Tue, 04 Nov 2014 13:05:46 +0800 Message-ID: <54585EAA.20904@intel.com> References: <1414136077-18599-1-git-send-email-tiejun.chen@intel.com> <1414136077-18599-7-git-send-email-tiejun.chen@intel.com> <544A84B10200007800042016@mail.emea.novell.com> <544DFDB2.2010508@intel.com> <544E29C70200007800042595@mail.emea.novell.com> <544F49F9.3070208@intel.com> <544F78B80200007800042B95@mail.emea.novell.com> <54509A8A.9060606@intel.com> <5450BE27020000780004304A@mail.emea.novell.com> <5451AC56.7010303@intel.com> <54521100020000780004363A@mail.emea.novell.com> <545320F2.5030103@intel.com> <545354500200007800043D94@mail.emea.novell.com> <5457174C.8020400@intel.com> <5457515102000078000443B0@mail.emea.novell.com> <54574D8F.8060407@intel.com> <54575E2D0200007800044443@mail.emea.novell.com> <545767C4.7070806@intel.com> <5457787002000078000445C7@mail.emea.novell.com> <54576DF7.8060408@intel.com> <545784830200007800044627@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: <545784830200007800044627@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 , Kevin Tian , "tim@xen.org" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On 2014/11/3 20:34, Jan Beulich wrote: >>>> On 03.11.14 at 12:58, wrote: >> Firstly we have a rule that we just allow all devices associated one >> RMRR to be assign same VM, right? So I mean while we create VM, we >> always call current hypercall but inside hypercall, Xen can know which >> devices will be assigned to this VM. > > I.e. the hypercall (at least optionally) becomes per-domain rather > than global. And you imply that device assignment happens > before memory getting populated (which likely can be arranged I tried to find a clue about this point but unfortunately I can't trace when we assign device exactly. But in theory, based on your hint I prefer the device assignment should follow memory getting populated. Because when we add a device, we need to create iommu map so this means at this moment the guest should already finish populating memory, right? Thanks Tiejun > for in the tool stack if that's not already the case, but which isn't > currently mandated by the hypervisor). > > Jan > >> So Xen still lookup that RMRR list >> but now Xen would check if these RMRR belongs to that device we want to >> assign this domain. If yes, we just let that callback go through these >> RMRR info from that list but exclude other unrelated RMRR. If not, we >> don't go through any RMRR info so that 'nr_entries' is also zero. >> >> Thanks >> Tiejun > > >