On Thu, Nov 07, 2024 at 05:38:26PM +0100, David Hildenbrand wrote:
> > David: why do we need to drop PRIVATE in ramblock flags?  I thought it was
> > pretty harmless.  I suppose things like qemu_ram_is_shared() will even keep
> > working as before?
> > 
> > It looks ok to remove it too, but it adds logics that doesn't seem
> > necessary to me, so just to double check if I missed something..
> 
> A finished ramblock is only boolean "shared" vs. "not shared/private". A
> single flag (RAM_SHARED) can express that clearly.
> 
> Consequently there is less to get wrong when using RAM_PRIVATE only as a
> flag to the creation function (and documenting that!).
> 
> To make RAM_PRIVATE consistent we might have to tweak all other RAMBlock
> creation functions to set RAM_PRIVATE in the !RAM_SHARED case, and I don't
> think that is wroth the trouble.

Yeah, I actually prefer PRIVATE to be applied everywhere, and assert that
either SHARED|PRIVATE be set in all ramblocks.

But no strong opinions, if both of you like it only applied optionally, I
already lost the vote.  But yes, please in that case extremely carefully
document PRIVATE as it can be very tricky now.

PS: when I think about how to document that, I really, really hoped we
simply apply it to all..

Thanks,

-- 
Peter Xu


Reply via email to