Re: [PATCH for-4.19 v2 3/3] xen/x86: remove foreign mappings from the p2m on teardown

2024-05-14 Thread Jan Beulich
On 08.05.2024 13:23, Roger Pau Monne wrote: > @@ -1043,7 +1045,7 @@ static inline int p2m_entry_modify(struct p2m_domain > *p2m, p2m_type_t nt, > break; > > case p2m_map_foreign: > -if ( !mfn_valid(nfn) ) > +if ( !mfn_valid(nfn) || p2m !=

Re: [PATCH for-4.19 v2 3/3] xen/x86: remove foreign mappings from the p2m on teardown

2024-05-10 Thread Roger Pau Monné
On Wed, May 08, 2024 at 01:23:23PM +0200, Roger Pau Monne wrote: > Iterate over the p2m up to the maximum recorded gfn and remove any foreign > mappings, in order to drop the underlying page references and thus don't keep > extra page references if a domain is destroyed while still having foreign

[PATCH for-4.19 v2 3/3] xen/x86: remove foreign mappings from the p2m on teardown

2024-05-08 Thread Roger Pau Monne
Iterate over the p2m up to the maximum recorded gfn and remove any foreign mappings, in order to drop the underlying page references and thus don't keep extra page references if a domain is destroyed while still having foreign mappings on it's p2m. The logic is similar to the one used on Arm.