]> git.proxmox.com Git - mirror_qemu.git/commit
exec: Add lock parameter to qemu_ram_ptr_length
authorAnthony PERARD <anthony.perard@citrix.com>
Wed, 26 Jul 2017 16:53:26 +0000 (17:53 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Fri, 1 Sep 2017 23:15:39 +0000 (18:15 -0500)
commit30b76b24398e520b296d705393795f97005a540a
tree6258e799d6f592f6e12c75e57a626d2e2b1da1b7
parent2f64063f4e96eac79087c1eefb0b8b32097108e2
exec: Add lock parameter to qemu_ram_ptr_length

Commit 04bf2526ce87f21b32c9acba1c5518708c243ad0 (exec: use
qemu_ram_ptr_length to access guest ram) start using qemu_ram_ptr_length
instead of qemu_map_ram_ptr, but when used with Xen, the behavior of
both function is different. They both call xen_map_cache, but one with
"lock", meaning the mapping of guest memory is never released
implicitly, and the second one without, which means, mapping can be
release later, when needed.

In the context of address_space_{read,write}_continue, the ptr to those
mapping should not be locked because it is used immediatly and never
used again.

The lock parameter make it explicit in which context qemu_ram_ptr_length
is called.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Message-Id: <20170726165326.10327-1-anthony.perard@citrix.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit f5aa69bdc3418773f26747ca282c291519626ece)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
exec.c