From b8485b6ca1dad6f085b5886110dcc1f0def8cb5f Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Tue, 29 Nov 2016 13:02:53 +0100 Subject: [PATCH] vbox4: avoid iommio assertion if the mmio region is not available anymore Fixes #2182 --- repos/ports/src/virtualbox/guest_memory.h | 2 +- repos/ports/src/virtualbox/iommio.cc | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/repos/ports/src/virtualbox/guest_memory.h b/repos/ports/src/virtualbox/guest_memory.h index 1134d437e4..618e35a9cd 100644 --- a/repos/ports/src/virtualbox/guest_memory.h +++ b/repos/ports/src/virtualbox/guest_memory.h @@ -384,7 +384,7 @@ class Guest_memory Region *r = _lookup(vm_phys, size); if (!r) { - Genode::error("Guest_memory::mmio_read: lookup faile - " + Genode::error("Guest_memory::mmio_read: lookup failed - " "GCPhys=", Genode::Hex(vm_phys), " u32Value=", u32Value, " size=", size); return VERR_IOM_MMIO_RANGE_NOT_FOUND; diff --git a/repos/ports/src/virtualbox/iommio.cc b/repos/ports/src/virtualbox/iommio.cc index d2697d4903..aed9cc5dae 100644 --- a/repos/ports/src/virtualbox/iommio.cc +++ b/repos/ports/src/virtualbox/iommio.cc @@ -165,6 +165,11 @@ VMMDECL(VBOXSTRICTRC) IOMMMIORead(PVM pVM, PVMCPU, RTGCPHYS GCPhys, } } } + else if (rc == VERR_IOM_MMIO_RANGE_NOT_FOUND) { + *pvalue = ~0U; + rc = VINF_SUCCESS; + } + IOM_UNLOCK_SHARED(pVM);