On 06.03.2020 13:50, Durrant, Paul wrote: >> -----Original Message----- >> From: Jan Beulich <jbeul...@suse.com> >> Sent: 06 March 2020 12:47 >> To: Durrant, Paul <pdurr...@amazon.co.uk> >> Cc: pdurr...@amzn.com; xen-devel@lists.xenproject.org; Andrew Cooper >> <andrew.coop...@citrix.com>; >> George Dunlap <george.dun...@citrix.com>; Wei Liu <w...@xen.org>; Roger Pau >> Monné <roger....@citrix.com> >> Subject: Re: [PATCH v3 2/6] x86 / p2m: remove page_list check in >> p2m_alloc_table >> >> On 06.03.2020 13:07, Durrant, Paul wrote: >>>> -----Original Message----- >>>> From: Jan Beulich <jbeul...@suse.com> >>>> Sent: 06 March 2020 11:46 >>>> To: pdurr...@amzn.com >>>> Cc: xen-devel@lists.xenproject.org; Durrant, Paul <pdurr...@amazon.co.uk>; >>>> Andrew Cooper >>>> <andrew.coop...@citrix.com>; George Dunlap <george.dun...@citrix.com>; Wei >>>> Liu <w...@xen.org>; Roger >> Pau >>>> Monné <roger....@citrix.com> >>>> Subject: Re: [PATCH v3 2/6] x86 / p2m: remove page_list check in >>>> p2m_alloc_table >>>> >>>> On 05.03.2020 13:45, pdurr...@amzn.com wrote: >>>>> From: Paul Durrant <pdurr...@amazon.com> >>>>> >>>>> There does not seem to be any justification for refusing to create the >>>>> domain's p2m table simply because it may have assigned pages. >>>> >>>> I think there is: If any such allocation had happened before, how >>>> would it be represented in the domain's p2m? >>> >>> Insertion into the p2m is a separate action from page allocation. Why >>> should they be linked? >> >> They are, because of how XENMEM_populate_physmap works. Yes, >> they _could_ be separate steps, but that's only a theoretical >> consideration. > > Then surely the check should be in the XENMEM_populate_physmap code?
How that? populate-physmap can be called any number of times. We can't refuse a 2nd call there just because a 1st one had happened already. Or did you mean the inverse check (i.e. that there already is a p2m)? This surely wouldn't be a bad idea, as otherwise both ept_get_entry() and p2m_pt_get_entry() would blindly map MFN 0. But adding such a check wouldn't eliminate the reason to also have the check that you're proposing to drop. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel