Hi Stefano, On 06/07/16 12:06, Stefano Stabellini wrote:
On Tue, 28 Jun 2016, Julien Grall wrote:@@ -1146,12 +1148,14 @@ out: if ( rc < 0 && ( op == INSERT ) && addr != start_gpaddr ) { + unsigned long gfn = paddr_to_pfn(addr); + BUG_ON(addr == end_gpaddr); /* * addr keeps the address of the end of the last successfully-inserted * mapping. */ - apply_p2m_changes(d, REMOVE, start_gpaddr, addr, orig_maddr, + apply_p2m_changes(d, REMOVE, sgfn, gfn - gfn_x(sgfn), smfn,Worth considering a gfn_sub (we already have gfn_add)?
I thought about it. However the prototype of gfn_sub and gfn_add would be different.
The former is subtracting two gfns whilst the latter is add a value to a gfn. So I think it would be confusing for the user. Although, I am open to any other suggestion.
Note that I am working on a series to rework the P2M code for supporting Break-Before-Make. And a lot of this code will be different.
In any case Acked-by: Stefano Stabellini <[email protected]>
Thank you! Regards, -- Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
