qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] cpu_physical_memory_sync_dirty_bitmap: Another


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] [PATCH] cpu_physical_memory_sync_dirty_bitmap: Another alignment fix
Date: Thu, 4 Jan 2018 18:52:38 +0000
User-agent: Mutt/1.9.1 (2017-09-22)

* Paolo Bonzini (address@hidden) wrote:
> On 03/01/2018 19:33, Dr. David Alan Gilbert (git) wrote:
> > The optimised version operates on 'longs' dealing with (typically) 64
> > pages at a time, replacing the whole long by a 0 and counting the bits.
> > If the Ramblock is less than 64bits in length that long can contain bits
> > representing two different RAMBlocks, but the code will update the
> > bmap belinging to the 1st RAMBlock only while having updated the total
> > dirty page count for both.
> 
> The patch is obviously correct, but would it make sense also to align
> the RAMBlocks' initial ram_addr_t to a multiple of BITS_PER_LONG <<
> TARGET_PAGE_BITS?

Yes, I can do that as a separate patch.  The alignment starts getting
a little silly - say 4k target page, 64 bits long so aligning a 4k
RAMBlock to 256kb boundary - but I think it's OK.

Dave
P.S. I'd be careful of saying 'obviously correct' given how many small
fixes this function has had recently!

> Thanks,
> 
> Paolo
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK



reply via email to

[Prev in Thread] Current Thread [Next in Thread]