summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Mooney <pmooney@pfmooney.com>2020-08-04 21:48:03 +0000
committerPatrick Mooney <pmooney@oxide.computer>2020-08-05 18:10:04 +0000
commitbd05d33960c9701232eaa8bdb6a5ce585912ffc6 (patch)
tree387c3da11e986598dc32038973812868c40f959b
parent2c834067bf731e663c6269489bf5dc0a9b4c6299 (diff)
downloadillumos-joyent-bd05d33960c9701232eaa8bdb6a5ce585912ffc6.tar.gz
13016 bhyve cannot emulate MMIO from bootrom
Reviewed by: Andy Fiddaman <andy@omniosce.org> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/uts/i86pc/io/vmm/vmm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr/src/uts/i86pc/io/vmm/vmm.c b/usr/src/uts/i86pc/io/vmm/vmm.c
index b42bd733d5..579ca12e84 100644
--- a/usr/src/uts/i86pc/io/vmm/vmm.c
+++ b/usr/src/uts/i86pc/io/vmm/vmm.c
@@ -1132,8 +1132,10 @@ vm_gpa_hold(struct vm *vm, int vcpuid, vm_paddr_t gpa, size_t len, int reqprot,
count = 0;
for (i = 0; i < VM_MAX_MEMMAPS; i++) {
mm = &vm->mem_maps[i];
- if (sysmem_mapping(vm, mm) && gpa >= mm->gpa &&
- gpa < mm->gpa + mm->len) {
+ if (mm->len == 0) {
+ continue;
+ }
+ if (gpa >= mm->gpa && gpa < mm->gpa + mm->len) {
count = vm_fault_quick_hold_pages(&vm->vmspace->vm_map,
trunc_page(gpa), PAGE_SIZE, reqprot, &m, 1);
break;