• W
    exec.c: refactor function flatview_add_to_dispatch() · 494d1997
    Wei Yang 提交于
    flatview_add_to_dispatch() registers page based on the condition of
    *section*, which may looks like this:
    
        |s|PPPPPPP|s|
    
    where s stands for subpage and P for page.
    
    The procedure of this function could be described as:
    
        - register first subpage
        - register page
        - register last subpage
    
    This means the procedure could be simplified into these three steps
    instead of a loop iteration.
    
    This patch refactors the function into three corresponding steps and
    adds some comment to clarify it.
    Signed-off-by: NWei Yang <richardw.yang@linux.intel.com>
    Message-Id: <20190311054252.6094-1-richardw.yang@linux.intel.com>
    [Paolo: move exit before adjustment of remain.offset_within_*,
     otherwise int128_get64 fails when a region is 2^64 bytes long]
    Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
    494d1997
exec.c 122.4 KB