svn commit: r364339 - head/sys/amd64/vmm
Peter Grehan
grehan at FreeBSD.org
Tue Aug 18 07:08:18 UTC 2020
Author: grehan
Date: Tue Aug 18 07:08:17 2020
New Revision: 364339
URL: https://svnweb.freebsd.org/changeset/base/364339
Log:
Allow guest device MMIO access from bootmem memory segments.
Recent versions of UEFI have moved local APIC timer initialization into
the early SEC phase which runs out of ROM, prior to self-relocating
into RAM. This results in a hypervisor exit.
Currently bhyve prevents instruction emulation from segments that aren't
marked as "sysmem" aka guest RAM, with the vm_gpa_hold() routine failing.
However, there is no reason for this restriction: the hypervisor already
controls whether EPT mappings are marked as executable.
Fix by dropping the redundant check of sysmem.
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D25955
Modified:
head/sys/amd64/vmm/vmm.c
Modified: head/sys/amd64/vmm/vmm.c
==============================================================================
--- head/sys/amd64/vmm/vmm.c Tue Aug 18 06:55:12 2020 (r364338)
+++ head/sys/amd64/vmm/vmm.c Tue Aug 18 07:08:17 2020 (r364339)
@@ -999,8 +999,7 @@ vm_gpa_hold(struct vm *vm, int vcpuid, vm_paddr_t gpa,
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 (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;
More information about the svn-src-all
mailing list