- Forward port flush of page table updates on context switch or userret
- Forward port vfork XEN hack
This commit is contained in:
parent
69b7977cd2
commit
4ceda2abba
@ -117,10 +117,15 @@ vfork(td, uap)
|
||||
struct thread *td;
|
||||
struct vfork_args *uap;
|
||||
{
|
||||
int error;
|
||||
int error, flags;
|
||||
struct proc *p2;
|
||||
|
||||
error = fork1(td, RFFDG | RFPROC | RFPPWAIT | RFMEM, 0, &p2);
|
||||
#ifdef XEN
|
||||
flags = RFFDG | RFPROC; /* validate that this is still an issue */
|
||||
#else
|
||||
flags = RFFDG | RFPROC | RFPPWAIT | RFMEM;
|
||||
#endif
|
||||
error = fork1(td, flags, 0, &p2);
|
||||
if (error == 0) {
|
||||
td->td_retval[0] = p2->p_pid;
|
||||
td->td_retval[1] = 0;
|
||||
|
@ -65,6 +65,12 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <machine/cpu.h>
|
||||
|
||||
#ifdef XEN
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_param.h>
|
||||
#include <vm/pmap.h>
|
||||
#endif
|
||||
|
||||
static void synch_setup(void *dummy);
|
||||
SYSINIT(synch_setup, SI_SUB_KICK_SCHEDULER, SI_ORDER_FIRST, synch_setup,
|
||||
NULL);
|
||||
@ -431,6 +437,9 @@ mi_switch(int flags, struct thread *newtd)
|
||||
"mi_switch: %p(%s) prio %d inhibit %d wmesg %s lock %s",
|
||||
td, td->td_name, td->td_priority,
|
||||
td->td_inhibitors, td->td_wmesg, td->td_lockname);
|
||||
#endif
|
||||
#ifdef XEN
|
||||
PT_UPDATES_FLUSH();
|
||||
#endif
|
||||
sched_switch(td, newtd, flags);
|
||||
CTR3(KTR_SCHED, "mi_switch: running %p(%s) prio %d",
|
||||
|
@ -73,6 +73,12 @@ __FBSDID("$FreeBSD$");
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/pcb.h>
|
||||
|
||||
#ifdef XEN
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_param.h>
|
||||
#include <vm/pmap.h>
|
||||
#endif
|
||||
|
||||
#include <security/mac/mac_framework.h>
|
||||
|
||||
/*
|
||||
@ -118,6 +124,9 @@ userret(struct thread *td, struct trapframe *frame)
|
||||
sched_userret(td);
|
||||
KASSERT(td->td_locks == 0,
|
||||
("userret: Returning with %d locks held.", td->td_locks));
|
||||
#ifdef XEN
|
||||
PT_UPDATES_FLUSH();
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user