Print this page
Revert "OS-8005 bhyve memory pressure needs to target ARC better (#354)"
This reverts commit a6033573eedd94118d2b9e65f45deca0bf4b42f7.
@@ -10,11 +10,11 @@
*/
/* This file is dual-licensed; see usr/src/contrib/bhyve/LICENSE */
/*
* Copyright 2015 Pluribus Networks Inc.
- * Copyright 2020 Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
* Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
* Copyright 2021 Oxide Computer Company
*/
#include <sys/types.h>
@@ -474,11 +474,10 @@
case VM_ALLOC_MEMSEG:
case VM_MMAP_MEMSEG:
case VM_MUNMAP_MEMSEG:
case VM_WRLOCK_CYCLE:
case VM_PMTMR_LOCATE:
- case VM_ARC_RESV:
vmm_write_lock(sc);
lock_type = LOCK_WRITE_HOLD;
break;
case VM_GET_GPA_PMAP:
@@ -1410,13 +1409,11 @@
* Present a test mechanism to acquire/release the write lock
* on the VM without any other effects.
*/
break;
}
- case VM_ARC_RESV:
- error = vm_arc_resv(sc->vmm_vm, (uint64_t)arg);
- break;
+
default:
error = ENOTTY;
break;
}
@@ -2187,11 +2184,11 @@
r = ENXIO;
msg = "Unsupported CPU vendor";
}
if (r != 0 && arg != (intptr_t)NULL) {
- if (copyoutstr(msg, (char *)arg, strlen(msg), NULL) != 0)
+ if (copyoutstr(msg, (char *)arg, strlen(msg) + 1, NULL) != 0)
return (EFAULT);
}
return (r);
}