From: BlaisorBlade <bla...@ya...> - 2004-06-14 23:40:16
|
Alle 13:21, gioved=EC 10 giugno 2004, Vincent Guffens ha scritto: > Hi, > The only changes that have to be made to compile with SMP is > > *add the folowing to arch/um/config.in > > define_bool CONFIG_SMP $CONFIG_UML_SMP > +int 'Number of CPUs' CONFIG_NR_CPUS 1 > > *change this line in arch/um/kernel/um_arch.c > -int ncpus =3D 1; > +int ncpus =3D 4; No, please at least make CONFIG_NR_CPUS =3D=3D ncpus, PLEASE! > *turn it on in the kernel config Well, watch this code in the patch: +void switch_mm_skas(int mm_fd) +{ + int err; + +#warning need cpu pid in switch_mm_skas + err =3D ptrace(PTRACE_SWITCH_MM, userspace_pid[0], 0, mm_fd); + if(err) + panic("switch_mm_skas - PTRACE_SWITCH_MM failed, errno =3D= =20 %d\n", + errno); +} + +void kill_off_processes_skas(void) +{ +#warning need to loop over userspace_pids in kill_off_processes_skas + os_kill_process(userspace_pid[0], 1); +} userspace_pid[] is the array of the pids of the "userspace threads" (the=20 threads in T state, i.e. ptraced, which run the actual code of the guest=20 userspace). The warning complain that they should act onto the whole array. Here, instead, you must use smp_processor_id() to determine which CPU you r= un=20 on and then use it as userspace_pid index. +int external_pid_skas(struct task_struct *task) +{ +#warning Need to look up userspace_pid by cpu + return(userspace_pid[0]); +} + +int thread_pid_skas(struct thread_struct *thread) +{ +#warning Need to look up userspace_pid by cpu + return(userspace_pid[0]); +} Check any other usage of userspace_pid (on the code, not by debugging) and= =20 you've started solving the crashes. Then you can try again to see if there = is=20 still something. Bye =2D-=20 Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 |