[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [v3][PATCH 03/16] xen/vtd: create RMRR mapping



On 2015/6/18 18:07, Tim Deegan wrote:
At 14:13 +0800 on 12 Jun (1434118407), Chen, Tiejun wrote:
could you explain why existing guest_physmap_remove_page can't
serve the purpose so you need invent a new identity mapping
specific one? For unmapping suppose it should be common regardless
of whether it's identity-mapped or not. :-)

I have some concerns here:

#1. guest_physmap_remove_page() is a void function without a returning
value, so you still need a little change.

I'd be happy with adding a return value to it -- even if other callers
don't check it yet it's better to have errors ignored by callers than
ignored inside the function. :)

#2. guest_physmap_remove_page() doesn't make readable in such a code
context;

rmrr_identity_mapping()
{
      ...
      guest_physmap_remove_page()
      ...
}

I think it's fine there.

In general I'd prefer to avoid the code duplication of another helper
function if we can.


Fine to me.

Thanks
Tiejun

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.