From d3e19acf3d946bf0445e8f2fa0cbc47062783b01 Mon Sep 17 00:00:00 2001 From: Neel Natu Date: Sat, 27 Sep 2014 03:43:49 +0000 Subject: [PATCH] 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) --- usr.sbin/bhyvectl/bhyvectl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyvectl/bhyvectl.c b/usr.sbin/bhyvectl/bhyvectl.c index b6006b72a767..f5e50d35b219 100644 --- a/usr.sbin/bhyvectl/bhyvectl.c +++ b/usr.sbin/bhyvectl/bhyvectl.c @@ -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;