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

Re: [Xen-devel] [PATCH] x86/mm: free_page_type() is PV-only



>>> On 13.05.19 at 12:33, <george.dunlap@xxxxxxxxxx> wrote:
> On 5/10/19 3:12 PM, Jan Beulich wrote:
>> @@ -2640,11 +2639,11 @@ int free_page_type(struct page_info *pag
>>          /* A page table is dirtied when its type count becomes zero. */
>>          paging_mark_dirty(owner, page_to_mfn(page));
>>  
>> -        ASSERT(!shadow_mode_refcounts(owner));
>> +        ASSERT(shadow_mode_enabled(owner));
>> +        ASSERT(!paging_mode_refcounts(owner));
>> +        ASSERT(!paging_mode_translate(owner));
> 
> In the context of my patch to CODING_STYLE about the use of ASSERTs,
> thinking about ASSERT vs BUG_ON vs something else here.  I guess in this
> case:
> 
> 1. PV guests can't be in translate mode
> 2. If that ever changed, we'd probably trip over the ASSERT() while
> debugging
> 
> So I guess ASSERT() is probably fine.

Right, in other (more likely to be [wrongly] exposed to actual
execution) cases I'd probably not have used plain ASSERT()
here.

> Reviewed-by: George Dunlap <george.dunlap@xxxxxxxxxx>

Thanks.

> So does that mean, though, that SHARED_M2P_ENTRY & friends are entirely
> vestigal now, and can be removed?

No, it's pointless to use here only because there's no M2P
translation done here in the first place, due to the code
being PV only. In code paths reachable for HVM these
ought to still be necessary.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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