diff options
author | Wei Yang <richardw.yang@linux.intel.com> | 2019-03-11 13:42:52 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-03-11 16:51:42 +0100 |
commit | 494d199727ba248c96326b4e1c97f86eb11a5ec7 (patch) | |
tree | a17cbb6a37f783da806280537e5c2ae4e72ba92f /qemu-options.hx | |
parent | e6c165f364c669b1357f15602ae3bd1d12357135 (diff) |
exec.c: refactor function flatview_add_to_dispatch()
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: Wei 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: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qemu-options.hx')
0 files changed, 0 insertions, 0 deletions