vbox: attach executable memory as such

Issue #1723
This commit is contained in:
Alexander Boettcher 2017-10-18 14:58:36 +02:00 committed by Christian Helmuth
parent db0589727a
commit c4c9e1fe7f
2 changed files with 4 additions and 5 deletions

View File

@ -58,7 +58,7 @@ struct Mem_region : public Genode::List<Mem_region>::Element,
do {
Genode::Ram_dataspace_capability ds = env.ram().alloc(map_size);
attach_at(ds, _size - rest_size, map_size);
attach_executable(ds, _size - rest_size, map_size);
rest_size -= map_size;
map_size = rest_size < sub_rm_max_ds ? rest_size : sub_rm_max_ds;

View File

@ -105,11 +105,10 @@ static Sub_rm_connection &vm_memory(Genode::uint64_t vm_size = 0)
while (allocated < memory_size) {
Ram_dataspace_capability ds = genode_env().ram().alloc(alloc_size);
enum { OFFSET_DS = 0, USE_LOCAL_ADDR = true };
addr_t to = vm_memory.attach(ds, alloc_size, OFFSET_DS,
USE_LOCAL_ADDR,
memory.addr + allocated - vmm_local);
addr_t to = vm_memory.attach_executable(ds, memory.addr +
allocated - vmm_local,
alloc_size);
Assert(to == vm_memory.local_addr(memory.addr + allocated - vmm_local));
allocated += alloc_size;