Re: [Xen-devel] [PATCH 1/2] x86/p2m: fix PoD accounting in guest_physmap_add_entry()

2020-02-21 Thread Andrew Cooper
On 23/01/2020 11:51, Jan Beulich wrote: > The initial observation was that the mfn_valid() check comes too late: > Neither mfn_add() nor mfn_to_page() (let alone de-referencing the > result of the latter) are valid for MFNs failing this check. Move it up > and - noticing that there's no caller

[Xen-devel] [PATCH 1/2] x86/p2m: fix PoD accounting in guest_physmap_add_entry()

2020-01-23 Thread Jan Beulich
The initial observation was that the mfn_valid() check comes too late: Neither mfn_add() nor mfn_to_page() (let alone de-referencing the result of the latter) are valid for MFNs failing this check. Move it up and - noticing that there's no caller doing so - also add an assertion that this should