On 24 Mar 2016, at 11:58, Paolo Bonzini <pbonz...@redhat.com> wrote:
> > On 24/03/2016 11:32, Alex Bligh wrote: >>>> Now I'm not saying we >>>> need to fully define what it means for a part of the backend to be >>>> "dirty" or not. It's okay to leave part of the meaning in the dark, >>>> leaving that implementation-defined. >> Well, the 3 possible states are: >> >> * unallocated >> * zero >> * non-zero >> >> So the possible replies are a bitfield of those, with a '1' if it 'might' >> be in that state, i.e. >> >> 111 = no idea >> 110 = might be zero or unallocated, but isn't zero >> 011 = I know it's allocated, but I don't know whether it is zero or not > > How do you represent "definitely unallocated?" 100 is definitely allocated. The first '1' says it 'might' be in allocated state, but as we know it's NOT in any of the other states (next two zeroes), by a process of elimination, it's definitely unallocated. Similarly 010 and 001 are the two other 'definite' states. -- Alex Bligh