Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust for changes in VHOST_USER_SET_MEM_TABLE #3

Merged
1 commit merged into from Nov 24, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions vhost_client.c 100644 → 100755
Expand Up @@ -51,6 +51,7 @@ VhostClient* new_vhost_client(const char* path)
vhost_client->memory.regions[idx].guest_phys_addr = (uintptr_t) shm;
vhost_client->memory.regions[idx].memory_size = vhost_client->page_size;
vhost_client->memory.regions[idx].userspace_addr = (uintptr_t) shm;
vhost_client->memory.regions[idx].mmap_offset = 0;
}

// init vrings on the shm (through memory regions)
Expand Down
1 change: 1 addition & 0 deletions vhost_server.c 100644 → 100755
Expand Up @@ -164,6 +164,7 @@ static int _set_mem_table(VhostServer* vhost_server, ServerMsg* msg)

region->mmap_addr =
(uintptr_t) init_shm_from_fd(msg->fds[idx], region->memory_size);
region->mmap_addr += msg->msg.memory.regions[idx].mmap_offset;

vhost_server->memory.nregions++;
}
Expand Down
1 change: 1 addition & 0 deletions vhost_user.h 100644 → 100755
Expand Up @@ -19,6 +19,7 @@ typedef struct VhostUserMemoryRegion {
uint64_t guest_phys_addr;
uint64_t memory_size;
uint64_t userspace_addr;
uint64_t mmap_offset;
} VhostUserMemoryRegion;

typedef struct VhostUserMemory {
Expand Down