After r271635 mmap(2) requires either MAP_PRIVATE or MAP_SHARED

for non-anonymous mappings.

This gets 'bhyvectl --get-all' working again.

Reported by:	Anish Gupta (akgupt3@gmail.com)
This commit is contained in:
Neel Natu 2014-09-27 03:43:49 +00:00
parent ce71bdcad4
commit d3e19acf3d

View File

@ -309,7 +309,7 @@ dump_vmcs_msr_bitmap(int vcpu, u_long addr)
if (fd < 0)
goto done;
bitmap = mmap(NULL, PAGE_SIZE, PROT_READ, 0, fd, addr);
bitmap = mmap(NULL, PAGE_SIZE, PROT_READ, MAP_SHARED, fd, addr);
if (bitmap == MAP_FAILED)
goto done;