sgx.c (f9856d08139ac5aea7c1258fc85958d6786b416f) sgx.c (0fd977b3fa32d54b61554416363faae8a7bfaa2b)
1/*-
2 * Copyright (c) 2017 Ruslan Bukin <br@bsdpad.com>
3 * All rights reserved.
4 *
5 * This software was developed by BAE Systems, the University of Cambridge
6 * Computer Laboratory, and Memorial University under DARPA/AFRL contract
7 * FA8650-15-C-7558 ("CADETS"), as part of the DARPA Transparent Computing
8 * (TC) research program.

--- 344 unchanged lines hidden (view full) ---

353static void
354sgx_page_remove(struct sgx_softc *sc, vm_page_t p)
355{
356 struct epc_page *epc;
357 vm_paddr_t pa;
358 uint64_t offs;
359
360 vm_page_lock(p);
1/*-
2 * Copyright (c) 2017 Ruslan Bukin <br@bsdpad.com>
3 * All rights reserved.
4 *
5 * This software was developed by BAE Systems, the University of Cambridge
6 * Computer Laboratory, and Memorial University under DARPA/AFRL contract
7 * FA8650-15-C-7558 ("CADETS"), as part of the DARPA Transparent Computing
8 * (TC) research program.

--- 344 unchanged lines hidden (view full) ---

353static void
354sgx_page_remove(struct sgx_softc *sc, vm_page_t p)
355{
356 struct epc_page *epc;
357 vm_paddr_t pa;
358 uint64_t offs;
359
360 vm_page_lock(p);
361 vm_page_remove(p);
361 (void)vm_page_remove(p);
362 vm_page_unlock(p);
363
364 dprintf("%s: p->pidx %ld\n", __func__, p->pindex);
365
366 pa = VM_PAGE_TO_PHYS(p);
367 epc = &sc->epc_pages[0];
368 offs = (pa - epc->phys) / PAGE_SIZE;
369 epc = &sc->epc_pages[offs];

--- 851 unchanged lines hidden ---
362 vm_page_unlock(p);
363
364 dprintf("%s: p->pidx %ld\n", __func__, p->pindex);
365
366 pa = VM_PAGE_TO_PHYS(p);
367 epc = &sc->epc_pages[0];
368 offs = (pa - epc->phys) / PAGE_SIZE;
369 epc = &sc->epc_pages[offs];

--- 851 unchanged lines hidden ---